collections of procs[T]()

2018-09-28 Thread mitai
is there a way to have a collection (seq or better: Tables) of procs with generic types?

Re: Defined Symbol Value Error

2018-09-28 Thread geezer9
Yes, that is now much clearer - need to use {.strdefine.} ( as in your other post) Thanks AGAIN.

Re: I'm to stupid for Jester's public folder!

2018-09-28 Thread Gekkonier
I am on Windows too here, maybe file something?

Re: Nim hashtable mapping strings to any type

2018-09-28 Thread drywolf
@mratsim Since I have already written my own custom vTable mechanism with nim macros and some emitted C++ code (in order to interop i.e. inherit with C++ base classes) ... I'm wondering what you meant by saying: > In the future you will also be able to use concepts and VTables. Is there somethi

Re: calculated import argument

2018-09-28 Thread geezer9
Very cool. The toImport allows any static string expression to be used as the argument of the import. I had seen the strdefine pragma but did not understand its purpose. THANKS

Re: I'm to stupid for Jester's public folder!

2018-09-28 Thread moigagoo
I'm having this issue on Windows. And it does work in Ubuntu WSL. So it's a Windows-specific issue.

Re: Defined Symbol Value Error

2018-09-28 Thread jangko
you can use when defined(CTS): # if the CTS value is "true" or "false" ... Run or const CTS {.strdefine.} = "default_value" when CTS=="yes": ... Run currently there is nothing like `when getValue(CTS) == "xxx"` and conditi

Defined Symbol Value Error

2018-09-28 Thread geezer9
Version 0.18.0 of nim does not seem to recognize defined symbol values: The source named checkCTsym.nim is: when CTS==yes: echo "yes" else: echo "no" Run The compile command is: > nim c -r -d:CTS=yes checkCTsym The error message is: > checkCTsym.

Re: Version 0.19.0 is out

2018-09-28 Thread jyapayne
I'm very happy to see this release! Keep trucking on :D

Re: Why can't the Nim VM use FFI?

2018-09-28 Thread jyapayne
@Araq, ah, thank you very much for the explanation. I thought it might be more complicated than I originally considered. I find this kind of stuff fascinating. I didn't know an LLVM backend was in the works :0

Re: I'm to stupid for Jester's public folder!

2018-09-28 Thread boia01
Your example works just fine for me. $ ./hello INFO Jester is making jokes at http://0.0.0.0:5000 Starting 1 threads DEBUG GET /test2 DEBUG 200 OK {"content-type": @["text/html;charset=utf-8"]} DEBUG GET /hm.html DEBUG 200 OK {"etag": @["fd5b9189aefa751b5d4

Re: I'm to stupid for Jester's public folder!

2018-09-28 Thread Gekkonier
I hope I'm not sounding rude. English is not my mother language and I know english not that much, so I don't know if I sound sometimes a little bit like an... I really don't know if this could be a bug or my fault, that's why I'm asking and wonder. I hope you all have a nice weekend then.

I'm to stupid for Jester's public folder!

2018-09-28 Thread Gekkonier
Hi guys, I tend to think that I'm stupid, because I don't get why I'm not able to use public folder with jester. I try to give as much information as possible: C:\Users\cutter\Desktop\webtest>nim -v Nim Compiler Version 0.19.0 [Windows: amd64] Compiled at 2018-09-26 Co

Re: Version 0.19.0 is out

2018-09-28 Thread federico3
Nim 0.19.0 is in Debian Unstable since yesterday evening. Derivative distributions will fetch the package in the next days. A little dashboard: [https://repology.org/metapackage/nim/versions](https://repology.org/metapackage/nim/versions)

Re: Interop with Delphi Interfaces

2018-09-28 Thread bobd
Thanks - didn't work unfortunately (also switched to stdcall) - still getting nil on the Delphi side. I'll go back and try experimenting with simple records.

Re: calculated import argument

2018-09-28 Thread Araq
Wow, I had no idea this is possible. :D

Re: Why can't the Nim VM use FFI?

2018-09-28 Thread Araq
I wrote the code to do that, twice. It always "kinda works" but the devil is in the details and it increases the attack surface of the compiler too much. Consider this problem: void a(int* x; int L); Run Does the `a` write into `x`? If it does, we need to write b

Re: Why can't the Nim VM use FFI?

2018-09-28 Thread Trustable
I think it would be possible, e.g. with libffi. [https://en.wikipedia.org/wiki/Libffi](https://en.wikipedia.org/wiki/Libffi) [https://github.com/Araq/libffi](https://github.com/Araq/libffi)

Re: Version 0.19.0 is out

2018-09-28 Thread Aiesha_Nazarothi
_Running to update._ >.this. pragma removed _Running to roll back_ Well, well... Seems like I better wait for 1.0

Re: Version 0.19.0 is out

2018-09-28 Thread Araq
"deprecated" does **not** mean "removed".