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.
I use Geany , which now also has Nim support.
> 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
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
> 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! :-)
Keep them coming, its interesting to see what others are using.
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!)
Thanks for replies! How about timeout for async connect? What's the correct way
to do it?
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
I use the same combination. :-)
neovim with my own [nim.nvim](https://github.com/alaviss/nim.nvim).
Feature-wise, it should be on par with the VSCode plugin.
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
You need to use waitFor instead of await if you want to run {.async.} proc in
non {.async.} context.
when isMainModule :
waitFor mastercon()
Run
VS Code with Nim Extension
I really like the git/diff tool in VS Code.
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.
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
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.
VS Code with Nim plugin
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?
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
kakoune. it has some lsp capabilities with 3rd party plugin, but both the
plugin and especially nimlsp are very underdeveloped.
That's cool... I don't like beautifiers myself, prefer to leave the code as I
have written it :-)
**vim**.
I don't have long lines because I run `nimpretty`.
Created Issue:
[https://github.com/nim-lang/Nim/issues/11875](https://github.com/nim-lang/Nim/issues/11875)
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
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()
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
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
> 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
> 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).
Emacs slows down when you have long lines so not just with Nim.
I am using version 25.1
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.
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
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
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
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
[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
Sorted @napalu that was the issue. Thank you so much everyone. The Nim
community never ceases to amaze
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`.
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.
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.
41 matches
Mail list logo