nim-lang / bigints

BigInts for Nim
MIT License
123 stars 32 forks source link

Some examples do not compile #69

Closed dlesnoff closed 2 years ago

dlesnoff commented 2 years ago

I have tested the examples but could not compile some of them probably due to some optional dependencies like unsigned in the pidigits example. Is it an old file of the library that has been removed, or an external library ? In the latter case, it should be added to nimble optional dependencies list if nimble has such an option.

Furthermore, some syntax has become obsolete like .. < that is now ..<.

pietroppeter commented 2 years ago

related, some time ago I started to rerun all examples and publishing them with Nimib but I stopped very early on... might be worth doing this again (and keep recompiling them as a sort of documentation): https://pietroppeter.github.io/nblog/drafts/bigints_examples.html

pietroppeter commented 2 years ago
dlesnoff commented 2 years ago

Should we not import ../src/bigints in examples rather than bigints ? Actually, it imports my nimble package installation (nim c -r example.nim is my compilation command) and I got strange warnings with bigints 0.5.0 (e.g. could not prove that integer is initialized) during compilation. I made small changes to pidigits.nim to make it compile, but I got rangeDefect error.

pietroppeter commented 2 years ago

There should be a nim.cfg like there is in folder tests (in this way it will import the bigints in src)