Re: Fastest Prime Sieve, in Nim

2019-08-03 Thread GordonBGood
@BLM2, I'm still working on this, but since comparing single threaded performance is like racing cars where each is limited to firing on only one cylinder when they have at least four and maybe six, eight, twelve, thirty-two or sixty-four: one can compare performance per cylinder but some cars

Re: Procs that work only inplace like strutils.removeSuffix()

2019-08-03 Thread juancarlospaco
I kind of agree, have you seen `os.splitPath().tail` ?, but I dont really understand whats the question/problem if any... 樂

Re: What text editor are you using for Nim?

2019-08-03 Thread Neil_H
Unfortunately Kakoune is not available for Windows so that's not an option for many users. As for modal editors like vi being faster than Emacs...maybe, once you are in the right mode... but having to check what mode you are in all the time (even if you put mode changes on keys) will

Re: What text editor are you using for Nim?

2019-08-03 Thread amalek
> In Vim I have to press Esc to come out of Insert mode then Shift-; to get : > then I have to enter w and finally press Enter then to carry on editing > text I have to press I again is that right Vim users? WTF! Ehm, no. You could just use the default shortcut: `ZQ` Or, if you want to

Re: What text editor are you using for Nim?

2019-08-03 Thread Neil_H
Yep, but I can also map Ctrl-x Ctrl-s to just Ctrl-s in Emacs if I wanted... but the default is fast enough... and Ctrl-s is mapped to search (another common editing task) anyway. And Emacs has macros that can be mapped to key strokes as well, so I cant see any Vim advantage there. Emacs Lisp

Re: What text editor are you using for Nim?

2019-08-03 Thread bevo009
You could map Ctrl-S to :w easily in your .vimrc But Space-W is faster, no holding any keys down Space rules as leader

Re: What text editor are you using for Nim?

2019-08-03 Thread leorize
yea, but you can just map Ctrl-S to save if you save so much. Typically vim keeps swap files and save the file state there periodically, so you don't have to keep saving the file as you type. If the editor crashes, you can re-open the file and the editor will ask to restore it. The power of

Re: What text editor are you using for Nim?

2019-08-03 Thread Neil_H
Here is an example of Vim v Emacs. Using default keys for both editors... Saving the current file. something we do quite often In Emacs I simply keep one finger on the Ctrl key and then press x followed by s... file saved continue editing text In Vim I have to press Esc to come out of

Re: What text editor are you using for Nim?

2019-08-03 Thread Neil_H
As I said at start of this thread ive been using Emacs for the past few months and starting to get use to it... and ive just re-installed Vim to have another look... and No, I still don't like this... press Esc then press I for insert press Esc again blah blahcrazy... sometimes you

Re: What text editor are you using for Nim?

2019-08-03 Thread Neil_H
> I tried textadept but the autocompletion feature seems a litte bit buggy; > notepad++ works fine but minimalistic; the intellij plugin seems not to be > maintained so I still stick with vscode… I tried Textadept myself a while back and didn't like it because as far as I know it was only 32

Procs that work only inplace like strutils.removeSuffix()

2019-08-03 Thread Stefan_Salewski
Often that may be OK, but not always. For removeSuffix() I have used strutils.replace() sometimes as a substitute, but that is not always the best solution. So I was just thinking about other solutions. An apply template seems to work: import strutils template apply(x:

Re: What text editor are you using for Nim?

2019-08-03 Thread mratsim
I use VSCode but as luck would have it this week I tried Howl, Micro and Neovim as well to find an alternative that exhaust less heat in my home? Unfortunately they don't come close to VSCode when working on 2/3 codebases at the same time (one with specs/tests, one with reference

Re: What text editor are you using for Nim?

2019-08-03 Thread mikra
I tried textadept but the autocompletion feature seems a litte bit buggy; notepad++ works fine but minimalistic; the intellij plugin seems not to be maintained so I still stick with vscode...

Re: db_mysql: how to get column name?

2019-08-03 Thread napalu
There is an overload to instantRows which takes a var seq[DbColumn] as in iterator instantRows*(db: DbConn; columns: var DbColumns; query: SqlQuery; args: varargs[string, `$`]): InstantRow = Run So you should be able to do something like: