Re: What text editor are you using for Nim?

2019-08-02 Thread sschwarzer
What does the Nim support in Geany cover? Originally, I used a Nim plugin for Vim which gave me "only" syntax highlighting, but now I don't want to miss completions and "go to definition". I find this very helpful, especially since I'm rather new to Nim.

Re: What text editor are you using for Nim?

2019-08-02 Thread DarkBlue
I use Geany , which now also has Nim support.

Re: What text editor are you using for Nim?

2019-08-02 Thread Libman
> what everyone else was using for writing Nim? I think most people use [VScode](https://code.visualstudio.com), which has [a great Nim extension](https://marketplace.visualstudio.com/items?itemName=kosz78.nim). The [Editor Support](https://github.com/nim-lang/Nim/wiki/Editor-Support) GH wiki

Need Help Fixing An Early Optimization Causing Incorrect Evaluation

2019-08-02 Thread deech
Can anyone familiar with the compiler offer some guidance? After a function call as an optimization the compiler immediately tries to evaluate compile time nodes or ones that have no side effects in the VM ([https://github.com/nim-lang/Nim/blob/devel/compiler/semexprs.nim#L873)](https://github.c

Re: What text editor are you using for Nim?

2019-08-02 Thread Neil_H
> I used to use Vim, but @leorize made me change to nvim because he is still > refusing to port his excellent nim.nvim plugin to vim8. (hint! hint!) hahaha... that's definitely a good enough reason to stay with nvim! :-)

Re: What text editor are you using for Nim?

2019-08-02 Thread Neil_H
Keep them coming, its interesting to see what others are using.

Re: What text editor are you using for Nim?

2019-08-02 Thread zevv
I used to use Vim, but @leorize made me change to nvim because he is still refusing to port his _excellent_ nim.nvim plugin to vim8. (hint! hint!)

Re: Async socket to server connection error handling

2019-08-02 Thread adokitkat
Thanks for replies! How about timeout for async connect? What's the correct way to do it?

seq[owned T] and delete()

2019-08-02 Thread Stefan_Salewski
Some months ago I did some plain tests with newruntime but gave up soon because of very basic bugs as [https://github.com/nim-lang/Nim/issues/11356](https://github.com/nim-lang/Nim/issues/11356) Now that many bugs are already fixed I tried a similar example again like this: type

Re: What text editor are you using for Nim?

2019-08-02 Thread sschwarzer
I use the same combination. :-)

Re: What text editor are you using for Nim?

2019-08-02 Thread leorize
neovim with my own [nim.nvim](https://github.com/alaviss/nim.nvim). Feature-wise, it should be on par with the VSCode plugin.

Re: What text editor are you using for Nim?

2019-08-02 Thread kaushalmodi
Oops, I was playing with the longlines.nim and did not run nimpretty on that last modified version. But rest assured, that asdf was manually typed by me :D

Re: Async socket to server connection error handling

2019-08-02 Thread treeform
You need to use waitFor instead of await if you want to run {.async.} proc in non {.async.} context. when isMainModule : waitFor mastercon() Run

Re: What text editor are you using for Nim?

2019-08-02 Thread treeform
VS Code with Nim Extension I really like the git/diff tool in VS Code.

Re: What text editor are you using for Nim?

2019-08-02 Thread hugogranstrom
I don't usually customize much, all I really want is an easy to use editor where I can type code and get auto completion. So for me it's sufficient.

Re: What text editor are you using for Nim?

2019-08-02 Thread Kiloneie
VS Code with Nim Extension, never used any code editors before(i mostly dabble into coding, was highly into game dev when i was 13, that died after 2 years, i still dabble though Godot Engine another open source phenomenon). Whenever i coded with a language i used an IDE, although i never really

Re: What text editor are you using for Nim?

2019-08-02 Thread Neil_H
I did try VS Code, and I didn't like the JSON customisation files but mainly I don't like its by Microsoft, because what do Microsoft do they update and change everything and usually every week... not good if your trying to get used to one editor.

Re: What text editor are you using for Nim?

2019-08-02 Thread hugogranstrom
VS Code with Nim plugin

Re: What text editor are you using for Nim?

2019-08-02 Thread Neil_H
Why, after using nimpretty longlines.nim do some of your lines have the extra element ..."adsf" tagged onto the end the end of the array?

Re: What text editor are you using for Nim?

2019-08-02 Thread kaushalmodi
You are right; may be nim-mode is exacerbating the slowness issue. I haven't come across this issue as I limit the number of chars per line to around 80. Try using `nimpretty` that ships with Nim. With a `longlines.nim` ( [http://ix.io/1QnF](http://ix.io/1QnF) ), running `nimpretty longlines.n

Re: What text editor are you using for Nim?

2019-08-02 Thread SolitudeSF
kakoune. it has some lsp capabilities with 3rd party plugin, but both the plugin and especially nimlsp are very underdeveloped.

Re: What text editor are you using for Nim?

2019-08-02 Thread Neil_H
That's cool... I don't like beautifiers myself, prefer to leave the code as I have written it :-)

Re: What text editor are you using for Nim?

2019-08-02 Thread cdunn2001
**vim**. I don't have long lines because I run `nimpretty`.

Re: spawn/sync hangs -- any ideas?

2019-08-02 Thread cdunn2001
Created Issue: [https://github.com/nim-lang/Nim/issues/11875](https://github.com/nim-lang/Nim/issues/11875)

Re: Wow. It all 'just works'

2019-08-02 Thread kobi
Communist countries and in particular modern China have been very active in intellectual property theft, industrial espionage, reaching to homeland security issues. There are reasons behind decisions. There is also ample evidence, you can ask me if you can't find it yourself - though they're all

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()

Re: What text editor are you using for Nim?

2019-08-02 Thread Neil_H
I am reluctant to upgrade at the moment because I am using a lot of packages plus my own customizations. And I don't think the slowness with scrolling with long lines would have been fixed anyway, so no gains by upgrading. Try emacs with lines like this, I also have one or two even longer

Re: spawn/sync hangs -- any ideas?

2019-08-02 Thread cdunn2001
Both the main thread (1) and the worker thread (3) are in "nanosleep()". (The rest are in `pthread_cond_wait()`.) (gdb) bt #0 0x7f172734be4d in nanosleep () from /lib64/libpthread.so.0 #1 0x0044655b in nossleep (milsecs=milsecs@entry=100) at /mnt/software/n/ni

Re: What text editor are you using for Nim?

2019-08-02 Thread kaushalmodi
> Emacs slows down when you have long lines I agree, but that would be a rare case where you have a single line unprettified JSON or something like that. How long are your lines in Nim? I default to 80 chars per line. For Emacs, "too long" lines would be in the range of upper hundreds of chars

Re: What text editor are you using for Nim?

2019-08-02 Thread kaushalmodi
> I am using version 25.1 The latest stable release as of today is 26.2, which I would recommend upgrading to. I am on the latest master build of emacs (27.x).

Re: What text editor are you using for Nim?

2019-08-02 Thread Neil_H
Emacs slows down when you have long lines so not just with Nim. I am using version 25.1

Re: What text editor are you using for Nim?

2019-08-02 Thread kaushalmodi
Emacs here, using mostly the default key bindings. About the slowness, you probably just need to disable the `nimsuggest-mode`. I haven't noticed any slowness when editing Nim code (or anything) in Emacs.

What text editor are you using for Nim?

2019-08-02 Thread Neil_H
I don't wanna start any text editor wars here, but just wondered what everyone else was using for writing Nim? And do certain editors offer better features than others, not just syntax highlighting but things like debugging support etc. I'm using Emacs myself, and even though I find Emacs slow

Re: db_mysql: how to get column name?

2019-08-02 Thread hiteshjasani
Your question was unclear. I would take a look at the code for [instantRows iterator](https://github.com/nim-lang/Nim/blob/master/lib/impure/db_mysql.nim#L187) and do something similar with the addition of calling [fetch_fields](https://nim-lang.org/docs/mysql.html#fetch_fields%2CPRES) to get

Re: db_mysql: how to get column name?

2019-08-02 Thread luntik2012
as I said, I cannot use query like this, because it is not table, it's dynamically generated pivot table, to column names are generated dynamically, like this [https://dba.stackexchange.com/questions/27659/mysql-single-table-static-and-dynamic-pivot/27669#27669](https://dba.stackexchange.com/que

Re: db_mysql: how to get column name?

2019-08-02 Thread hiteshjasani
If you know the table name being used in the stored procedure, then you can query the information_schema to get column names. SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'foo' AND TABLE_NAME ='bar'; Run

Re: db_mysql: how to get column name?

2019-08-02 Thread luntik2012
[https://nim-lang.org/docs/db_mysql.html#instantRows.i%2CDbConn%2Cseq%5BDbColumn%5D%2CSqlQuery%2Cvarargs%5Bstring%2C%5D](https://nim-lang.org/docs/db_mysql.html#instantRows.i%2CDbConn%2Cseq%5BDbColumn%5D%2CSqlQuery%2Cvarargs%5Bstring%2C%5D) const q = sql"select * from mytable" var

Re: Erroneous values returned from Nim’s C foreign function interface.

2019-08-02 Thread teroz
Sorted @napalu that was the issue. Thank you so much everyone. The Nim community never ceases to amaze

Re: Async socket to server connection error handling

2019-08-02 Thread dom96
Yes, `connect` raises when it cannot connect. I'm guessing you've been using `asyncCheck` and trying to catch the exception by wrapping `try` around that... you need to use `await`.

db_mysql: how to get column name?

2019-08-02 Thread luntik2012
query: call myProc(); Run How to get column names from result? There are dynamically generated column names inside this proc, so I cannot just query db to return me column names.

Re: How to Maintain a Nim Chinese Community

2019-08-02 Thread zulu
The problem with mirroring is that you would need to ensure that GFW,Baidu or some other actor is not injecting malicious things into your stuff.