Re: What is missing for the seq/string types to be not nil by default?

2017-07-29 Thread Krux02
Thank you, and yes it is related. When I touch code of strings, everything becomes important.

Re: What is missing for the seq/string types to be not nil by default?

2017-07-28 Thread bpr
This may not be directly related to your goal, but under [Future directions:](https://nim-lang.org/docs/manual.html#types-memory-regions) we have that seq and string may get memory regions.

Re: What is missing for the seq/string types to be not nil by default?

2017-07-28 Thread Krux02
Ok the problem is somewhere in the garbage collecter. It tries to create an object and fails. My motivation to fix issues with the GC is pretty low. I would spend my time rather on removing the dependency on the GC than to fix the problem with it.

Re: What is missing for the seq/string types to be not nil by default?

2017-07-28 Thread cdome
Uesful page [https://github.com/nim-lang/Nim/wiki/Debugging-the-compiler](https://github.com/nim-lang/Nim/wiki/Debugging-the-compiler)

Re: What is missing for the seq/string types to be not nil by default?

2017-07-28 Thread Parashurama
If I understood your question correctly, you want to build a compiler with debugging info? # this generate an additional compiler with debuging info # and all checks enabled that will run quite a bit slower. ./koch temp --debugger:native # run nim file with this deb

Re: What is missing for the seq/string types to be not nil by default?

2017-07-28 Thread Krux02
well I did something in that direction on a branch. I have a problem with the nim compiler to crash here and there. How do I enable debug information again in the compiler? And why is is such a hassle in nim to get debug information? Debug builds should have them.

Re: What is missing for the seq/string types to be not nil by default?

2017-07-28 Thread Krux02
well are you open for a pull request for that. I think that's easy to implement.

Re: What is missing for the seq/string types to be not nil by default?

2017-07-27 Thread Araq
Optimizations aside, `system.add` and `setLen` need to be able to handle a `nil` seq and all the toString operations need to treat `nil` as the empty sequence. Note that `len` already returns 0 for nil. `isNil` needs to produce a compilation error for seqs and strings. The compiler should not al

What is missing for the seq/string types to be not nil by default?

2017-07-27 Thread Krux02
The title is the question. I would like to contribute, if I can (maybe).