Re: calculated import argument

2018-09-27 Thread jangko
shorter version const apple {.strdefine.} = "default_value" template toImport(x: static[string]): untyped = import x toImport(apple & "tools") Run

Re: calculated import argument

2018-09-27 Thread jangko
import macros const apple {.strdefine.} = "default_value" macro toImport(x: static[string]): untyped = quote do: import `x` toImport(apple & "tools") Run nim c -d:apple=new_value myproject Run

Re: Interop with Delphi Interfaces

2018-09-27 Thread jangko
result = cast[ptr ITestIntf](intf) probably what you want is result = cast[ptr ITestIntf](intf.addr). use addr operator to get the address of a variable. returning something on the stack is very dangerous, the time you exit/returned from the proc, the object on the stack may be already replaced

Re: Version 0.19.0 is out

2018-09-27 Thread moigagoo
Nim 0.19.0 images are on Docker Hub: [https://hub.docker.com/r/nimlang/nim/tags](https://hub.docker.com/r/nimlang/nim/tags)/

Re: 0.19.0 pegs regression?

2018-09-27 Thread jangko
yeah, this is a regression. this bug already reported on github

Why can't the Nim VM use FFI?

2018-09-27 Thread jyapayne
Once the Nim VM matures, will it ever be possible to use FFI calls? Is it a matter of supporting FFI in the VM interpreter?

calculated import argument

2018-09-27 Thread geezer9
Is there a way to use a static calculated string value as the argument of an import statement? For example: > import LIB&"tools" where LIB was a defined symbol from the nim compile command - perhaps: > nim c -d:LIB=vector myproject.nim so that myproject.nim would import vectortools.nim Tryin

Interop with Delphi Interfaces

2018-09-27 Thread bobd
Just getting started with Nim and experimenting with Delphi interop. I can pass a Delphi interface reference (which is basically a pointer) into a Nim DLL and call methods on the interface using code like this for the definition: type GUID* {.pure.} = object Data1*: in

Re: 0.19.0 pegs regression?

2018-09-27 Thread boia01
Confirming that it works for me on 0.18.0 but crashes on 0.19.0.

Re: Nim developer retention data and out-of-date packages

2018-09-27 Thread Libman
Nim isn't something you just quit. A part of Nim stays in you, always. Every missing semicolon that D smacks you for, every undefined WTFism in C++, every second you wait for your 40mb Golang binary to upload, every time you realize that half of your screen is taken up by repetitive boilerplate

0.19.0 pegs regression?

2018-09-27 Thread lucian
This used to work in 0.18.0, now it crashes run-time. Could anyone please confirm if working for them as to exclude my installation? Thanks. import pegs proc main = var pg = peg"\<(\d / [a-fA-F])+\>" let fnd = findAll("abc<5F>220<6", pg) for f

Re: Compiler plugins?

2018-09-27 Thread lotzz
What can they do??? Is there documentation?

Re: Compiler plugins?

2018-09-27 Thread Araq
It depends on what you need your plugin to do.

Compiler plugins?

2018-09-27 Thread lotzz
Digging up a dead thread, is there anybody who knows exactly what you need to do to make a compiler plugin?

Re: Version 0.19.0 is out

2018-09-27 Thread boia01
Thanks to all contributors! Great to see another release with many substantive improvements :)

Re: Version 0.19.0 is out

2018-09-27 Thread treeform
My excitement has breached the containment field.

Re: Version 0.19.0 is out

2018-09-27 Thread mitai
Great job!

Re: Version 0.19.0 is out

2018-09-27 Thread Arrrrrrrrr
Great job to everyone. All the work done by lemonboy is noticeable.

Re: Version 0.19.0 is out

2018-09-27 Thread twetzel59
Awesome! Great work!

Version 0.19.0 is out

2018-09-27 Thread Araq
We finally did it, thank you for all your help and feedback. [https://nim-lang.org/blog/2018/09/26/version-0190-released.html](https://nim-lang.org/blog/2018/09/26/version-0190-released.html) The fact that `nil` is not a thing anymore for seqs and strings is a large breaking change so please upd

Re: How to check an auto type parameter in a proce

2018-09-27 Thread kcvinu
Thanks for the Link. Let me read. And yes, You are right. Strict typing is problem. But i know, it will become easy after a few hobby projects. My previous experience was in AutoIt. It has no types, Infact, we need types actually. In VB.Net, we can use Object type and then later convert it when

Re: How to check an auto type parameter in a proce

2018-09-27 Thread lotzz
yeah sorry, I don't use it much "typeinfo" got it

Re: How to check an auto type parameter in a proce

2018-09-27 Thread mratsim
Feel free to ask on IRC then. The only way to progress fast in Nim is by trying and then asking otherwise you will lose time. I remember learning like throwing eggs on a wall a see what sticks (and then raising bug reports for static and generic types). Now from all your posts, I think the bigg