Re: Compiling with --gc:none produces unexpected prohibition

2017-11-27 Thread jzakiya
This code works as desired in parallel. Thanks for the instructions. proc column_load(prime, j, k, r: int) {.gcsafe.} = {.gcsafe.}: for ri in residues: # for each prime|residue pair let prod = r * ri # compute res

Re: Compiling with --gc:none produces unexpected prohibition

2017-11-26 Thread Araq
Well you access a global with GC'ed memory. You can use something like this to make the compiler shut up var globalSeqHere: seq[int] = @[] proc foo() {.gcsafe.} = {.gcsafe.}: for i in 0..

Re: Compiling with --gc:none produces unexpected prohibition

2017-11-26 Thread Stefan_Salewski
Yes, you are right -- it is possible to write Nim code that does not compile or does not work as you expected. But for most of us Nim seems to work well most of the time. When you do not like Nim, why are you not just using another one, there are many interesting languages available. For your