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
@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
@alexsad what is your OS and what SSL library are you using?
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.
> 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.
Yes.
Then:
Error: unhandled exception: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong
version number [SslError]
Tried with `useSsl = true`?
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)
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
@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
Seems to work fine with bigints module:
[https://github.com/def-/nim-bigints](https://github.com/def-/nim-bigints)
import bigints
var x =
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?
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.
Why do you think that. I would assume that it works fine.
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.
I was using 0.17.3 to develop this, so you might want to try the same.
You can try running your exe using gdb: `gdb runforever.exe`. Then type `run`
in gdb and once it crashes `bt`.
Thanks @dom96
@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
Gotcha, thanks for pointing these links out.
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
* 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
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
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
24 matches
Mail list logo