Re: now().utc fails with --gc:arc

2020-07-12 Thread qqtop
Unfortunately I have no time to test this pull request,but I can give one more example which may help to pinpoint the issue: # test350.nim import os,times echo now().utc let filename = extractFileName(getAppFilename()) let fi = getFileInfo(filename)

now().utc fails with --gc:arc

2020-07-11 Thread qqtop
on latest devel , linux compile with : nim c --gc:arc -r test350 #test350.nim import times echo now().utc Run output /home/lxuser/.choosenim/toolchains/nim-#devel/lib/pure/times.nim(1090) test350 /home/lxuser/.choosenim/toolcha

Re: Doc generation fails

2020-05-27 Thread qqtop
Here a mini example which displays this error on nim-devel : #cxtimeb.nim import sequtils template doit():untyped = ## doit ## return output only toSeq([1,2,3,4,5]) echo doit() Run Output ok :

Re: Doc generation fails

2020-05-27 Thread qqtop
There are no runnableExamples in my module. The module imports sequtils The only way I found to circumvent this error in docgen is to add following line in my module : export sequtils Run I think this should not be required.

Doc generation fails

2020-05-27 Thread qqtop
After most recent improvements to doc generation I see this error running nim doc : /home/lxuser/.cache/nim/cxtimeb_d/runnableExamples/cxtimeb_examples1.nim(15, 12) Error: undeclared identifier: 'toSeq' [runnableExamples] failed: generated file: '/home/lxuser/.cache/nim/cxtime

Re: Async socket to server connection error handling

2019-08-02 Thread qqtop
But await works only inside an async proc were as asyncCheck can be used like this: when isMainModule : asyncCheck mastercon() runForever() Run How can we do: when isMainModule : await mastercon() runForever()

output order

2019-05-16 Thread qqtop
A small contrieved example to illustrate the issue : template doit(s:untyped):untyped = stdout.write(s) "" stdout.writeLine(doit("Hello: "), "This is ", doit("nice ,too."),"Is n't it?") stdout.writeLine(doit("Hello: "), doit("This is "), do

Re: Question about colorized output with nim (console application)

2019-05-13 Thread qqtop
Take a look at [https://github.com/qqtop/NimCx](https://github.com/qqtop/NimCx) which was made for similar problems. You could do something like import nimcx var nocolor:bool = false printLnBiCol("exit (quitting the app)", colLeft = if nocolor==true: term

Re: pibench2 – A multi-threaded performance benchmark written in Nim

2019-03-25 Thread qqtop
32-bit system: 69.8084 s on an Intel Atom N470 @ 1.83Ghz 2 threads running on parrot Linux 4.10.0-parrot-20t-686-pae i686 with 1GB memory.

nimpy breaks

2018-11-06 Thread qqtop
import nimpy echo("Hello") Run gives with latest nim devel 0.19.9 : /home/nord1/.nimble/pkgs/nimpy-0.1.0/nimpy/py_lib.nim(114, 5) Error: invalid type: 'Complex' in this context: 'PyLib' for var Run works ok with nim 0.19.0

strutils,unicode clash ?

2018-10-17 Thread qqtop
import strutils import unicode let words = "this does not work ".strip() Run gives here on latest dev branch and after recent changes/additions to unicode.nim test145.nim(4, 34) Error: ambiguous call; both strutils.strip(s: string, leading: bool, trailing

Re: Unicode display

2018-05-22 Thread qqtop
Thank you all for the replies ... for the time being I go with the 'Hack way' as it resolves the issue at hand without the need to change terminal encoding or doing it the 'Proper way' If there is yet another solution , I sure still would like to learn about it.

Unicode display

2018-05-22 Thread qqtop
>From a database query I get strings like that : "\u5f9e\u6e05\u6668\u958b\u59cb\u4e00\u76f4\u4e0b\u96e8\u3002" if this string is hardcoded then display via echo is as expected, however, if the string is passed in on command line echo fails to do its magic. # test

Re: Arraymancer - A n-dimensional array / tensor library

2018-05-06 Thread qqtop
Congratulations ! I especially like the neural network examples and hope more will be forthcoming.

callsite()

2018-04-26 Thread qqtop
I see warnings that callsite() is being deprecated. I use this macro and would like to know how to rewrite it without using callsite() to achieve the same effect. macro styledEchoPrint*(m: varargs[untyped]): typed = ## partially lifted from an earler macro in terminal.nim and

Re: Is it possible to run Python code from Nim?

2018-03-08 Thread qqtop
can see this in action here where a python based database driver is called. [https://github.com/qqtop/NimFirebird](https://github.com/qqtop/NimFirebird) [https://github.com/qqtop/NimFirebird/blob/master/firebird.nim](https://github.com/qqtop/NimFirebird/blob/master/firebird.nim) Unfortunately does

Re: Timeout

2017-12-09 Thread qqtop
Thanks, that clears it up. I only was focused on the middle error message as it seemed to pertain to the issue at hand . As always reading docs is a real challenge...

Timeout

2017-12-08 Thread qqtop
Issues with httpclient timeout import httpclient let callav = "https://github.com/nim-lang/Nim/blob/devel/tests/arithm/tand.nim"; var zcli = newHttpClient() echo zcli.getContent(callav,timeout = 1) # < fails #echo zcli.getContent(callav)

Re: Python3.5 extension help needed

2017-05-01 Thread qqtop
Maybe you have the newer python6 on Ubuntu or the .so file has a different link name ? For me the second example compiles without error on openSuse Tumbleweed. # The imported Python3 initialization function proc initialize*(){.cdecl, importc: "Py_Initialize" dynlib: "libpython3.

Re: Creating a new seq is not that fast

2017-04-18 Thread qqtop
On my machine I find that s = newSeqOfCap[int](128) is about 10 times slower than s = newSeq[int]()

Re: Can't build asyncnet example on macosx

2016-08-15 Thread qqtop
@dom96 I would vote against sub-forums for different languages and rather suggest to anyone to use one of the translator plugins in modern browsers like: [https://addons.mozilla.org/id/firefox/addon/s3google-translator](https://addons.mozilla.org/id/firefox/addon/s3google-translator)/ or others

Re: How about we start trying to make nim a well funded/backed project?

2016-07-27 Thread qqtop
As Nim grows , there will be the need of a management structure and the sooner this is implemented the better the foundation for future growth will be. An example of this could be : [http://www.firebirdsql.org/en/firebird-foundation](http://forum.nim-lang.org///www.firebirdsql.org/en/firebird-f

Re: Things that are great when working in the Nim Language

2016-07-17 Thread qqtop
Nim is great because it has this underdog spirit taking on all and everyone, it is down to earth , not overly academic and most of it is fun. The excitement feels similar to when I was changing from Fortran77 to Turbo Pascal , if I recall that correctly. :P