Re: Legal Threats In Nimble Packages

2019-03-07 Thread mikra
yeah I discovered that nasty license stuff recently. Actually I have a problem in choosing the right license for my wrapper. the lib itself is apache2 but I dont´t like that for my wrapper. Are there possibilities to override that built in virus behaviour? And I think it depends if you wrap a

Re: Legal Threats In Nimble Packages

2019-03-07 Thread Libman
Please understand my priorities: * Dealing with the aforementioned threat of "even more restrictive than copyleft" licenses is the most pressing concern, and it's an issue that I hope most people can agree on. Nim module licenses are not the place to punish people you don't like. * The

Re: Is there are something like Python's 'pass' statement in Nim

2019-03-07 Thread miran
> Is there are something like this in Nim? proc foo = discard Run

Re: Legal Threats In Nimble Packages

2019-03-07 Thread gemath
> Checking that the Nimble license metadata matches the license claims in the > code. Very true. > I think most people will disagree with me on where this line should be drawn.. Very true :o) > .., but it needs to be drawn somewhere... Yes, individually by every user of a library. If I don't

Legal Threats In Nimble Packages

2019-03-07 Thread Libman
Did you know that using Nim's import keyword supposedly constitutes entering into a contract? Are you aware of all the legalese imposed on you by the modules you use (as well as their dependencies, and their dependencies' dependencies, etc)? Here are a few examples: * The

Is there are something like Python's 'pass' statement in Nim

2019-03-07 Thread WilliamTi
I am a newer to Nim programing language. when I use Python, I can use the 'pass' to skip the defination detail of a function and class. .. def foo(): pass # skip detail class Bar(): pass nim Is there are something like this in Nim?

Can't call Nim dll in NodeJS

2019-03-07 Thread WilliamTi
I have a C library clib.c with this function. int hi(char* hello) { return 900; } compiled as: gcc clib.c -o clib.so --shared -fPIC I'm consuming this in a Nim libray called 'nlib.nim`: proc hi*(hello: cstring): cint {.cdecl, importc: "hi", dynlib: "./clib.so".} proc hi2*(hello: cstring):

Re: Some weird Heisenbug with the implicit result variable which results in a segfault

2019-03-07 Thread Varriount
I would double-check the ZLIB binding code that you have, to make sure that everything is correct. This looks suspiciously like a memory-corruption issue, which tends to happen when Nim bindnigs don't accurately represent the functions/structures they are wrapping. You

Some weird Heisenbug with the implicit result variable which results in a segfault

2019-03-07 Thread Clyybber
So while cleaning up [https://github.com/haldean/nimage](https://github.com/haldean/nimage) I came across a rather weird bug, which results in a segfault/SIGSEV. To reproduce, clone this repo: [https://github.com/Clyybber/nimage.git](https://github.com/Clyybber/nimage.git) and checkout the

Re: Can I access arrays faster than this?

2019-03-07 Thread ggibson
@cblake True, true. I was simply enjoying that I could write "one through fifty, so fifty times" very simply and easy to read in nim, whereas I just relied on trained C eyes to interpret the C code of its intended meaning "zero up until 50, meaning 50 times". Perhaps nim's `countup()` would

Httpclient and hangs

2019-03-07 Thread blmvxer
Is there any reason that getContent should hang indefinitely even if httpclient has been given a set timeout?

Re: Can I access arrays faster than this?

2019-03-07 Thread cblake
With such a brief comment, it's hard to know which is why I said "probably intending". Only one person knows. ;) Maybe he did think iterators cost more. You are right I did misread his 1..50 as 0..50 {after looking at the first version of the ggibson Nim code, not the 2nd where he confusingly

Re: Can I access arrays faster than this?

2019-03-07 Thread miran
> @mratsim is probably intending to refer to the .. including 50 in Nim while > the C for with a < excludes 50 I doubt that because he has written **1** .. 50 ;)

Re: nlvm update

2019-03-07 Thread arnetheduck
> Do you think it is feasible? probably not. what would likely be needed is that nim would expose a nim api/abi to nlvm, much like if you had wrapped a c++ library with a c api.. that would require a lot of changes to nim, including specifying an ABI etc. header pragmas for C stuff are kind of

Run all failed tests?

2019-03-07 Thread revilotom
Is it possible to run all failed tests using unittest? If not, is there a nim testing framework that allows this?

Re: Can I access arrays faster than this?

2019-03-07 Thread cblake
@mratsim is probably intending to refer to the `..` including `50` in Nim while the C `for` with a `<` excludes `50` doing about 2% less work, but the terseness and style of of his comment may leave the wrong impression. for i in 0..50: echo i Run indeed compiles

Re: Can I access arrays faster than this?

2019-03-07 Thread mratsim
Also for r in 1 .. 50: does more work than C for (size_t r=0; r<50; r++) {