What are you writing using nim? :)

2017-08-21 Thread Benjaminel
What are you writing using nim? does it in production?

Re: Gdb pretty printers for nim

2017-08-21 Thread cdome
Hi, I have prepared gdb python script that should ease a lot of debugging pain. If anyone interested to give it a try, location is [https://github.com/cooldome/Nim-gdb](https://github.com/cooldome/Nim-gdb). Currently this script requires latest devel Nim and also needs this pull request:

Re: Nim newbie request/challenge

2017-08-21 Thread scriptkiddy
I don't have time right at this very moment, but I will take a look at this within the next few days and see if there are any changes I can make to get a faster runtime. Love all your comments by the way.

Re: vcc and nim vs mingw with vulkan

2017-08-21 Thread mashingan
I use this [nim.cfg](https://gist.github.com/mashingan/6cd3af4528ad5c11ed4f27f3aac72cc4) . I recently wiped my vcc compilers so I cannot try it again but that's the cfg when I played around using vcc.

Re: Indentation causes compiler errors

2017-08-21 Thread coffeepot
> What's the difference between have the : and not having it. I've seen both > cases in the docs and code. Perhaps what you've seen is passing blocks of code using the colon like this? template foo(actions: untyped): untyped = actions foo: # anything here gets

Re: vcc and nim vs mingw with vulkan

2017-08-21 Thread anta40
Doesn't work with me. The same error still persists. Do you mind sharing your nim.cfg?

Re: Nim newbie request/challenge

2017-08-21 Thread jzakiya
Below is the Nim direct translation of the C++ code in my paper. I have verified it on Nim 0.17 on Linux. In comparison on this same machine the Nim code runs a bit faster for some (larger >= 10^9) test values (not comprehensibly benchmarked yet). I'll post it to a gist later to make it easier

Re: Inputing numbers

2017-08-21 Thread jzakiya
Whoops, sorry, forgot to run the executable (probably should go to bed now) [jzakiya@jabari-pc nim]$ ./inputtest Enter integer number: 34422 You inputed 34422 with type BiggestUInt [jzakiya@jabari-pc nim]$ Made the same mistake on target program, but it works now

Re: Inputing numbers

2017-08-21 Thread jzakiya
I'm am running Manjaro KDE (gcc 7.1.1, clang 4.0.1) in a VirtualBox VM using another Linux distros as VB host. When I run this file: inputtest.nim import strutils, typetraits stdout.write "Enter integer number: " let val = stdin.readline.parseBiggestUInt echo

Re: Inputing numbers

2017-08-21 Thread mashingan
How do you write your code? AFAIK, `readLine` is blocking. In my machine, below code is working fine. Using Windows 10 with GCC v 7.1.0 import strutils, typetraits stdout.write "Input integer number: " let number = stdin.readline.parseBiggestUInt echo "You inputed

Re: Inputing numbers

2017-08-21 Thread jzakiya
These don't work. When the program displays Enter number value: it should stay there until I type a number and hit and then proceed. For both cases shown the program just falls through. [jzakiya@jabari-pc nim]$ ./myprogram Enter number value: Error:

Re: Move semantic and manuel memory management

2017-08-21 Thread mashingan
CMIIW, `object` is for value type while `ref object` is for reference type. If the object would be used for many occasions and its construction quite costly, it's better to use reference type then.

Re: Inputing numbers

2017-08-21 Thread mashingan
Use `parseBiggestUInt` proc in [strutils](https://nim-lang.org/docs/strutils.html#parseBiggestUInt,string)? You can do like this: import strutils let theint = stdin.readline.parseBiggestUInt or import strutils var theint = -1'u64 try:

Inputing numbers

2017-08-21 Thread jzakiya
I want to input numbers into a program from the command line. $ ./myprogram Please iput number: The input number are unsigned 64-bit (uint64) I tried the following: let var = uint64(readling(stdin, input) But I apparently have to convert a string

Re: Indentation causes compiler errors

2017-08-21 Thread mashingan
When the function has no argument and return nothing (`void`), I saw sometimes like this proc main = echo "In main proc" when isMainModule: main()