Re: how to properly release memory?

2020-04-26 Thread RodSteward
malloc/free does not directly return pages to the operating system. It depends on the implementation when the heap implementation decides to shrink the heap virtual area so it can be stuck there as much as stuck in the nim garbage collector.

Re: Automated Nim Packages Security Audit

2020-04-26 Thread Yardanico
Seems like it's a python script which uses "ptrace" python module to trace different syscalls when installing packages, and it tracks how the package creates/removes directories, changes permissions, deletes and renames stuff

Re: How to download a file concurrently?

2020-04-26 Thread cblake
Sounds like an application of the "byte range requests" introduced in HTTP/1.1. You can definitely use those + multiple TCP connections to be as self-optimized/unfriendly to other internet traffic/robust to unusual packet loss/etc. situations as desired, but I don't know what Nim ecosystem

Re: How to download a file concurrently?

2020-04-26 Thread Omnomnim
Does [https://nim-lang.org/docs/httpclient.html#downloadFile%2CAsyncHttpClient%2Cstring%2Cstring](https://nim-lang.org/docs/httpclient.html#downloadFile%2CAsyncHttpClient%2Cstring%2Cstring) not suit your needs?

Re: Nim's strutils.split() slower than Python's string split()?

2020-04-26 Thread krtekz
You are right. That's why outputs are sent to /dev/null in my tests.

Re: How to download a file concurrently?

2020-04-26 Thread adnan
That actually downloads a file in a sequential order. The HTTP Client itself is async, which means that the client can run in a separate process. What I am interested in is downloading 1 file concurrently. For example, in Windows I remember download managers were able to download a file in

How to download a file concurrently?

2020-04-26 Thread adnan
Is there something similar to [https://github.com/porjo/braid](https://github.com/porjo/braid)

Re: ggplotnim - pretty native plots for us

2020-04-26 Thread Vindaar
I'm happy to say that facet_wrap is finally back with version v0.3.5. Normal classification by a (in this case 2) discrete variable(s): Classification by discrete variable with free scales: See the code for these two here:

Re: Nim's strutils.split() slower than Python's string split()?

2020-04-26 Thread cblake
If you are not redirecting to a file but letting it display to the terminal then a big variable is what GUI terminal emulator you are using - XTerm, rxvt-unicode, st, etc. I think that could create a lot of varying numbers..why it may even depend on if you use TrueType fonts or cheaper to

Re: Nim's strutils.split() slower than Python's string split()?

2020-04-26 Thread adnan
But OP is not going to divert the output into `/dev/null`. In a Linux terminal you don't really gain much benefits from avoiding flushing because it will flush on a newline regardless. $ time cat bigfile.txt | ./mine ; cat -n mine.nim # ... real0m3.707s user

Re: Mixing Rust and Nim?

2020-04-26 Thread mratsim
You can use [nbindgen](https://github.com/arnetheduck/nbindgen)

Mixing Rust and Nim?

2020-04-26 Thread gattomatto
How feasible / ergonomic is mixing Rust and Nim? Would it be possible to leverage Rust's libraries in Nim?

Re: Automated Nim Packages Security Audit

2020-04-26 Thread Araq
How does it work? And what does it do?

Re: NOOB: How to get "cAlternateFileName" from WIN32_FIND_DATA data structure ...

2020-04-26 Thread Ward
You can use [winim](https://github.com/khchen/winim) and [winstr](https://khchen.github.io/winim/winstr.html) . Example: import winim/lean var ffd: WIN32_FIND_DATA var hFind = FindFirstFile("*.*", ffd) if hFind != INVALID_HANDLE_VALUE: defer:

NOOB: How to get "cAlternateFileName" from WIN32_FIND_DATA data structure ...

2020-04-26 Thread RobertNio
Hi, thanks for all the help I got so far ... NIM is a treasure :) Ok, now I am stuck at a CONVERSION from a WideCString string to a string in NIM. I know I have to use cast to link to the address of the CString, however ... I get errors ... Here is my code with comments: import