Re: len [0, 1, 2] fails

2019-02-10 Thread SolitudeSF
its not in 0.19.4, but in 0.19.9

Re: len [0, 1, 2] fails

2019-02-10 Thread tim_st
Yes, it's fixed in 0.19.9. But this syntax is horrible. len([0, 1, 2]) is much easier to read.

Re: how to pass a C array to C function?

2019-02-10 Thread Stefan_Salewski
In C and C++, when you use an C array as parameter of a function, then the compiler automatically passes a pointer to the first element. In Nim, we may define our functions in a way that arrays and seqs are of type open array, so we can pass them directly. But if your function expects a pointer

how to pass a C array to C function?

2019-02-10 Thread oyster
for example unsigned char imgdata[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...}; Ihandle* image = IupImageRGBA(32, 32, imgdata); Run I tried var imgdata = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0...} var image = iupImageRGBA(32, 32, imgdata)

Re: How to "install" a newly built Nim on a directory?

2019-02-10 Thread slangmgh
Copy the config directory too.

Re: len [0, 1, 2] fails

2019-02-10 Thread juanv
Sorry, has it been fixed? In my computer, with 0.19.4 the example fails, but the [issue](https://github.com/nim-lang/Nim/issues/10458) had been closed.

Re: How to "install" a newly built Nim on a directory?

2019-02-10 Thread anta40
OK. New error message: $ nim c -d:release mathtest.nim Hint: system [Processing] Hint: widestrs [Processing] Hint: io [Processing] Hint: mathtest [Processing] Hint: math [Processing] Hint: bitops [Processing] C:\nim\lib\pure\bitops.nim(50, 10) Error: cannot

Re: Screencast Series Ideas

2019-02-10 Thread ryukoposting
I was looking for stuff more closely tied to the language itself, as opposed to tools related to it. That said, the tools and ecosystem are very important, and I think there ought to be increased awareness of the tools out there (on a related note: people's aversion to style insensitivity seems

Re: How to "install" a newly built Nim on a directory?

2019-02-10 Thread mashingan
import std/math

"nim cpp -d:release --noCppExceptions" fails

2019-02-10 Thread masnagam
When compiling the following source file with `nim cpp -d:release --noCppExceptions`: import unittest Run the following errors are reported: Error: execution of an external compiler program 'clang++ -c -w -O3 -ffast-math -I/Users/masnagam/.choosenim/toolc

tools to wrap C library for both static and dynamic linking?

2019-02-10 Thread oyster
I have checked c2nim which seems can do most work for using functions in dynamic library without any dynamic linking library file. I also checked wxNim source which seems to be translated by hand for static link, but of cause it can link dynamic library. But is there an aided tool can do most o

Re: How to "install" a newly built Nim on a directory?

2019-02-10 Thread anta40
OK, found an issue. I copied bin and lib directories to C:Nim. Cannot compile this program: import math echo log10(100.0) Run Nim says: C:\Users\0590\Codes\Nim>nim c -d:release mathtest.nim Hint: system [Processing] Hint: widestrs [Processin