A Friendly Challenge for D
Jabari Zakiya
jzakiya at gmail.com
Sat Oct 13 15:19:07 UTC 2018
On Saturday, 13 October 2018 at 14:32:33 UTC, welkam wrote:
> On Saturday, 13 October 2018 at 09:22:16 UTC, Vijay Nayar wrote:
>>
>> I downloaded the reference NIM implementation and got the
>> latest nim compiler, but I received the following error:
>> $ nim c --cc:gcc --d:release --threads:on twinprimes_ssoz.nim
>> twinprimes_ssoz.nim(74, 11) Error: attempting to call
>> undeclared routine: 'sort'
>>
>> For a person not familiar with nim, what's the fastest way to
>> fix that?
>
> import algorithm
>
> thats all but then it spits out
>
> lib/nim/pure/algorithm.nim(144, 11) Error: interpretation
> requires too many iterations
My mistake. I updated the file and forgot to include the 'import
algorithm' directive. The file is now fixed to include it.
Download the corrected version or patch your file accordingly.
As stated in the file intro **YOU MUST DO THIS** to get it to
compile with current Nim (they were supposed to fix this in this
version 0.19.0 but didn't).
To compile for nim versions <= 0.19.0 do following:
1) in file: ~/nim-0.19.0/compiler/vmdef.nim
2) set variable: MaxLoopIterations* = 1_000_000_000 (1 Billion
or >)
3) then rebuild sysem: ./koch boot -d:release
If you are using 'choosenim' to install Nim (highly advisable)
the full path is:
~/.choosenim/toolchains/nim-0.19.0/compiler/vmdef.nim
I'll post performance results from my laptop to give reference
times to compare against.
More information about the Digitalmars-d
mailing list