Re: What prevents you from using Nim as your main programming language?
Got to agree regarding the language comparisons. D takes the same approach wrt comparing itself against c++ and it just detracts from the newer languages in comparison.
Re: Unable to compile
Easiest is to see it here: [https://github.com/fxcqz/nim-osprey](https://github.com/fxcqz/nim-osprey) Sorry it’s out of date so some of the .raises fail now (I just removed the ones that errored and got this)
Unable to compile
After doing choosenim update stable, and using nim v0.20 I get the following error when trying to compile my code. /Users/travis/build/nim-lang/nightlies/nim/e7471cebae2a404f3e4239f199f5a0c422484aac/lib/system/fatal.nim(48) sysFatal Error: unhandled exception: intVal is not accessible [FieldError] Run
Re: Problem with -d:release
Interesting, that does work, thanks. From a contextual stand point though I think `{}` makes more sense than an import + try block. Regarding the level of testing, yes I suppose this is true - my issue was I wasn't even seeing an assertion error in the debug mode binary (not sure why), and I wouldn't generally expect stdlib code to segfault, especially because the error does not help at all.
Re: Problem with -d:release
Actually, I didn't think about that, I was seeing it on 0.19 before but I'm using 0.18 now and seeing it too. In my original case, by the way, I think I can assume that some of the data from the request was coming back as an empty array (but not 100% sure) - I'm not checking for it so it could have slipped through as nil.
Re: Problem with -d:release
Aha, yes that was the issue, here is a minimal case: import json import unicode echo "{\"a\":[]}".parseJson["a"]["a"].getStr.toLower Run Raises AssertionError without -d:release and SIGSEGV with it. Thanks all.
Re: Problem with -d:release
I have not recreated a trivial case so unfortunately there's a bit more to the code and setting it up for yourself might be a bit of a pain as you will need a matrix.org account as it's a bot for that. Anyway the error occurs on the following line: [https://github.com/fxcqz/gouda4/blob/master/src/modules/core.nim#L50](https://github.com/fxcqz/gouda4/blob/master/src/modules/core.nim#L50) A Message is created from parsing the json of a POST request using httpclient (using -d:ssl), you can see it here: [https://github.com/fxcqz/gouda4/blob/master/src/matrix.nim#L72](https://github.com/fxcqz/gouda4/blob/master/src/matrix.nim#L72) I appreciate that this is not easy to debug for someone else so don't go to too much effort. I don't have access to the code right now so I can't make any progress debugging until later.
Problem with -d:release
Hey I'm new to nim and have an issue where my code fails with the following error, only when I compile with -d:release SIGSEGV: Illegal storage access. Any ideas how I can debug this?