johnscillieri / psutil-nim

Port of python psutil to nim
MIT License
62 stars 21 forks source link

fix compile error at nim v1.1.1 add psutil_macosx.nim only finished uptime #5

Closed bung87 closed 4 years ago

bung87 commented 4 years ago

just show process, not able to merge.

johnscillieri commented 4 years ago

This is great, thanks!

This isn't actually the repo that is hosted on nimble, but we can work here and then I'll push the merge to @juancarlospaco's repo.

bung87 commented 4 years ago

ok, let me do more work when this is ready.

juancarlospaco commented 4 years ago

I just try to keep your excellent work alive @johnscillieri :slightly_smiling_face:

I think is better to use fully qualified Time, theres like 3 Times on std lib, code looks good to me.

bung87 commented 4 years ago

I get stucked ,Could you please correct the code? so I can continue

bung87 commented 4 years ago

@juancarlospaco @johnscillieri hi , I think it's ready for review before I going further, maybe you can guide me how to handle the error when the py version call goto error and the c version check whether has sufficient memory allocate to a variable. I'v tested on my macOS Catalina 10.15.1 (19B88) some interface not implemented:

pid_exists

disk_io_counters

per_disk_io_counters

net_if_stats

net_connections
...

another question when this ready, should I create a brand new PR to reduce commits ?

juancarlospaco commented 4 years ago

I dont have Macos to try. I usually dont squash commits, I never seen the benefits of it. The code looks good.

juancarlospaco commented 4 years ago

Hello, so is this ready to be Merged ?.

I have no Mac so I can not test anything, sorry. :slightly_smiling_face:

bung87 commented 4 years ago

this can be merged but only procs under when isMainModule:

juancarlospaco commented 4 years ago

Done, I pulled your branch in. https://github.com/juancarlospaco/psutil-nim/commit/862ad2dfb7645248df3456fd511c88a400e2f8aa :slightly_smiling_face:

kaushalmodi commented 4 years ago

I just submitted this PR ( https://github.com/johnscillieri/psutil-nim/pull/8 ) and then I discovered that this PR already fixed that isDigit issue.

@juancarlospaco So turns out that your fork is now the maintained repo for psutil?

If so, @johnscillieri, can you archive this repo and update the repo to forward people to the maintained fork? Thanks!