seq vs ref seq

2024-01-15 Thread aiac
what are the benefits of `seq` compared to `ref seq` , and what other scenarios are `ref seq` that cannot replace `seq`

Newbie - What does this error mean and how to correct it? ld.exe: cannot find -lz

2024-01-15 Thread janAkali
xlsx shouldn't require external libz dependency since `v0.4.7`. Maybe you have outdated version installed? You can check all installed package versions with `nimble list -i`. You can also put this in your project's `.nimble` file: requires "xlsx >= 0.4.8" Run Then bu

Newbie - What does this error mean and how to correct it? ld.exe: cannot find -lz

2024-01-15 Thread demotomohiro
When Nim compile your code, Nim generates C files and call the backend C compiler. In your case, the backend C compiler is GCC. GCC compiles the generated C file and generates a object file. Generated object files and libraries are linked by `ld.exe` and it generates an executable file. `-lz` o

Newbie - What does this error mean and how to correct it? ld.exe: cannot find -lz

2024-01-15 Thread watzon
You need to have zlib installed (that's `lz`). I don't really do any development on Windows, but you probably want something like this

Newbie - What does this error mean and how to correct it? ld.exe: cannot find -lz

2024-01-15 Thread brucek
I am learning Nim and love it so far, but I have a problem that I can't figure out. Is there anyone that could provide some advice? I was trying to write some code to process Excel files. I installed the XLSX library using Nimble, but when I try to compile the code, the linker generates an erro

What are your options for dealing with leaks in asyncCheck under arc?

2024-01-15 Thread Isofruit
I am _very likely_ missing intricacies here as I can't claim to have a full understanding. However, to me this looks like this only works if: 1. spawning work (which is reading from the channel and processing the message) blocks on reading the message. As in, the server waits for messages on

unhandled exception: index -1 not in 0 .. 12 [IndexDefect]

2024-01-15 Thread dlesnoff
@stbalbach > I'll keep looking. It won't be easy. A lot of code and files. Including > tables. You may want to use nim-gdb after compiling with debug options. It helps!

How to easy create and init a large array? Its have values

2024-01-15 Thread Angluca
Yeah, Your are right If want shallow copy them add 'var' is better ... It's ok now! Thank u tell me :) can use {.global.} when you want define global var in local, Like c (static int n)

How to easy create and init a large array? Its have values

2024-01-15 Thread sls1005
Oops... I think you should use `var parameter` in that `converter`, or it might be considered unsafe to take the address, especially with an old version of the compiler. converter toAddr[I; T](a: var array[I, T]): ptr T Run I mean, it's always unsafe to do, but Nim 1.

What are your options for dealing with leaks in asyncCheck under arc?

2024-01-15 Thread arnetheduck
> Is one offender this one doesn't really matter greatly - the worst problem in asyncdispatch is that every async call creates a cyclic reference between the future and the closure environment of the iterator whose body is generated by the async macro - one needs a fair bit of rewriting to elim

Nim v2: what would you change?

2024-01-15 Thread Araq
I'm closing this thread and locking it, it's just too long, sorry. But feel free to open dedicated threads and RFCs for your suggestions.

What are your options for dealing with leaks in asyncCheck under arc?

2024-01-15 Thread arnetheduck
> Chronos has an eternally ongoing poll call that never times out `chronos` poll returns after it has processed one round of callbacks - thus, you can use a timer to make it return on a regular basis like so (`waitFor` calls `poll`): import chronos proc work(v: int) {.asyn