Re: How to call runForever()?

2018-01-29 Thread woggioni
BTW on my machine (archlinux 64bit) it breaks in this way [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". In doStuff() In initProcess() [New Thread 0x770aa700 (LWP 992)] Thread 2 "test" received

Re: How to call runForever()?

2018-01-29 Thread woggioni
@monster As far as I can remeber GDB cannot read Visual C debug symbols, you have to use the Visaul Studio debugger for that to work

Re: Can't send email via port 587 with TLS

2018-01-29 Thread woggioni
@alexsad what is your OS and what SSL library are you using?

Re: "U64: static[int]" as type paratmeter => "cannot generate code for: U64"

2018-01-29 Thread Araq
The error message means that you are trying to compute something at compile-time that the compiler doesn't support (yet?). The VM (and the compiler in general) still has a hard time with this `static[T]` "values are used as types" mess.

Re: The Morning Paper Haskell paper and Destructors (cross post from Reddit)

2018-01-29 Thread Araq
> Is there any insight in their linear calculus that could be applied to the > Nim destructor calculus? There are certainly lots of similarities but I haven't studied Haskell's solution enough to be able to answer this question.

Re: Can't send email via port 587 with TLS

2018-01-29 Thread alexsad
Yes. Then: Error: unhandled exception: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number [SslError]

Re: Can't send email via port 587 with TLS

2018-01-29 Thread dom96
Tried with `useSsl = true`?

Can't send email via port 587 with TLS

2018-01-29 Thread alexsad
How send email via port 587 with TLS? trying: import smtp, net let ctx = newContext(protVersion = protTLSv1, verifyMode = CVerifyPeer, certFile = "mycert.pem", keyFile="mycertkey.pem") let smtpConn = newSmtp(useSsl = false, debug=true, sslContext = ctx)

Re: Concatenate string and int

2018-01-29 Thread allochi
although **$** is defined for **BigInt**, **&** is not, so the following works because **echo** uses **$** (toString) for each argument (read the documentation) echo "abc: ", x To make the following work echo "abc" & 2 We need to define **&** for

Re: Concatenate string and int

2018-01-29 Thread frogEye
@Stefan_Salewski, I was trying to read a num value from jsonNode using proc getNum(n: JsonNode; default: BiggestInt = 0): BiggestInt {..} which is a part of json module. Hence when you concatenate without converting it to string it doesn't work. As I am new to nim I thought I

Re: Concatenate string and int

2018-01-29 Thread def
Seems to work fine with bigints module: [https://github.com/def-/nim-bigints](https://github.com/def-/nim-bigints) import bigints var x =

Re: Concatenate string and int

2018-01-29 Thread Stefan_Salewski
Yes, so it works fine! And I strongly assume that it works also fine in this way with BigInts. But you did not tell us what BigInt module you have used -- maybe you wrote your own?

Re: Concatenate string and int

2018-01-29 Thread frogEye
It will never work fine. As & operator doesn't work with integers. Integer need to be stringified. echo "abc" & $2 the above one works. Just figured that out.

Re: Concatenate string and int

2018-01-29 Thread Stefan_Salewski
Why do you think that. I would assume that it works fine.

Concatenate string and int

2018-01-29 Thread frogEye
I want to concatenate a string and int. I tried doing echo "abc" & 2 But it doesn't seem to work. One possible solution is to convert int to string and then do the concatenation. But the value which I have is BigInt not int. So conversion is not possible.

Re: Error on runtime (SFML/CSFML related)

2018-01-29 Thread dom96
I was using 0.17.3 to develop this, so you might want to try the same.

Re: How to call runForever()?

2018-01-29 Thread dom96
You can try running your exe using gdb: `gdb runforever.exe`. Then type `run` in gdb and once it crashes `bt`.

Re: Json key names encoding

2018-01-29 Thread frogEye
Thanks @dom96

Re: block expression

2018-01-29 Thread woggioni
@Udiknedormin Thanks, you code works! Actually I was using this: template scope(body : typed) : auto = (block: body) but I guess ther is something I miss about the semantics of typed because this code template scope(body : typed) : auto = (block: body) let

Re: os.putEnv limited to application's scope?

2018-01-29 Thread deooo
Gotcha, thanks for pointing these links out.

Error on runtime (SFML/CSFML related)

2018-01-29 Thread erasmo85
Hi everyone, I'm trying to compile the game that Dominik made for the Ludum Dare 40, and I got two errors (of which I solved one): 1) Error on the line > if game.music.status() == Playing: - which I solved it with if > game.music.status() == SoundStatus.Playing: 2) SIGSEGV: Illegal storage

Re: Making a Matrix

2018-01-29 Thread solo989
* Interesting. It makes sense that it would be accessible. I think I just dismissed it because I can't echo it. I'm too used to python where you can print everything to confirm it exists. It would be nice if types had an automatic string representation when you call them with echo. Or at

Re: Making a Matrix

2018-01-29 Thread Udiknedormin
Actually, it works for ALL of type's parameters, including types: type Matrix[W, H: static[int], T] = object data: array[W * H, T] var m : Matrix[3, 2, int] m.data = [1,2, 3,4, 5,6] proc `[]`(m: Matrix, x, y: int): m.T {.inline.} = # here m.T is a return

Re: block expression

2018-01-29 Thread Udiknedormin
Well... the template is the right thing to do but without closure magic --- just use a block: template scope(code): auto = block: code let a = scope: echo "hello" 1 echo a