Re: Read gzip-compressed file line by line

2019-01-30 Thread alexsad
Thanks @dom96! see please my PR ti fix it: [https://github.com/nim-lang/zip/pull/35](https://github.com/nim-lang/zip/pull/35)

Re: An Attempt to Access NumPy Array Data rom Nim

2019-01-30 Thread zarican
Thanks. Indeed, neo, arraymancer and nimtorch are feasible alternatives. Regarding accessing elements using ptr arithmetic, is there a simpler way? Is there a generic way for pointer casting (instead of ptr cdouble)?

Concatenate identifiers in template

2019-01-30 Thread lqdev
Hello, I would like to concatenate two identifiers in a template, like so: template myTemplate(id: untyped, body: untyped): untyped = proc r##id() = # I've seen it done this way in C body Run Is this possible without the use of macros?

Re: Concatenate identifiers in template

2019-01-30 Thread SolitudeSF
`proc `r id` = body ` Run

Re: Buggy concepts

2019-01-30 Thread andrea
The situation is not as dire as described, I use them quite extensively in [emmy](https://github.com/unicredit/emmy) Still, I find some issues with them, they are not completely stable right now

Re: Buggy concepts

2019-01-30 Thread lqdev
I wasn't able to create a MCVE, that's why I didn't include it in the post.

Re: Concatenate identifiers in template

2019-01-30 Thread lqdev
Thank you!

Buggy concepts

2019-01-30 Thread lqdev
Hello, I have been trying out Nim's concepts for the past few days, and I have to say: they're far from stable. In simple use cases they work, but when you add advanced OOP techniques into the mix, you get an amalgamate of compiler errors and meaningless exit codes. So far, concepts are very

Re: Buggy concepts

2019-01-30 Thread Araq
Anything reproducible available?

no "--opt:size" leads EXE to "SIGSEGV: Illegal storage access. (Attempt to read from nil?)"

2019-01-30 Thread oyster
I use nim in MSYS2+Mingw64 on Windows 7 64 bits. The involved code can be download [here](https://forums.wxwidgets.org/viewtopic.php?f=27=45513) which uses [wxnim](https://github.com/PMunch/wxnim) . And I have stated the [details to compile wxWidgets](https://github.com/PMunch/wxnim/issues/12)

Re: "Nim needs better documentation" - share your thoughts

2019-01-30 Thread miran
One more week, one more quick recap. In addition to 10 already improved modules last week, we now have better documentation for **7 more** modules: * sets, insets, parseopt, xmltree, algorithm, parsecsv, os Also, now when you're viewing the documentation for some proc, you can click on

Re: Text adventure engine in Nim using macros

2019-01-30 Thread b3liever
Well it does a lot of work, which in the original, was the programmers burden. If you look at `originalprogram.nim` you will see it is quite hard to figure out the Map structure.

Re: Text adventure engine in Nim using macros

2019-01-30 Thread Arrrrrrrrr
Surprising how the macro itself is larger than vanilla adaptation to nim.

How to use closureScope to be used in thread?

2019-01-30 Thread Arrrrrrrrr
Thinking about it, would be nice if closureScope had an argument to capture the variable. As it stands now, is so redundant: for i in 0..threads.high: closureCapture i: captureMe(i) Run

Re: How to keep the output of a recursive proc?

2019-01-30 Thread doofenstein
Grabbing the result from stdout(echo) is a bit of a detour. You usually want to seperate the calculation of something from the I/O. So for example if you later want to use that function in a GUI application you wouldn't need any modifications to the function itself, you would fetch the inputs

How to keep the output of a recursive proc?

2019-01-30 Thread cag104
This is a homework problem where I am using nim to identify the longest common subsequence. I have the correct output, but I don't know how to grab the output from a recursive algorithm. Example: AACCTTGG ACACTGTGA Run Code to run example: import

Re: no "--opt:size" leads EXE to "SIGSEGV: Illegal storage access. (Attempt to read from nil?)"

2019-01-30 Thread Araq
Compile without -d:release and with `-d:useSysAssert -d:useGcAssert`, you have a memory corruption, most likely because of a bug in your wrapping code. Don't assume that it's "only" \--opt:size that makes your program crash, you are simply "lucky" for the other optimization levels.

Re: How to keep the output of a recursive proc?

2019-01-30 Thread zevv
You should be able to pass an additional variable of type 'var string' around your recursive functions, and simply use add() to add characters as you go - strings in Nim are modifiable and adding to them is cheap. When you've fully bubbled back up the call stack the result is there for you in

Text adventure engine in Nim using macros

2019-01-30 Thread b3liever
Hey all! Wanted to share with you [Night Adventure](https://github.com/b3liever/nightadventure). It is... > This adventure is based on the original that was published in Sonic's "Python > Games: Programming _should_ be fun", at > DeltaHacker magazine in March 2012. > ...which in turn was based

Re: Onsetgame ReelValley goes opensource

2019-01-30 Thread Libman
This is awesome! Thank you very much! ☺ I hope this gets as many views as possible. To promote this, I would highly recommend a more detailed blog post [(like this older one)](https://yglukhov.github.io/Making-ReelValley-Overview/) or an updated Web-site ([OnsetGame.com](http://onsetgame.com/)

Re: no "--opt:size" leads EXE to "SIGSEGV: Illegal storage access. (Attempt to read from nil?)"

2019-01-30 Thread oyster
Maybe you have forgotten the binding, but I am using wxnim from [PMunch fork](https://github.com/PMunch/wxnim) from you, [Araq](https://github.com/Araq/wxnim), it is not my wrapping code. And the example2 is in the wxnim too. nim cpp -r -d:useSysAssert -d:useGcAssert