In the Makefile itself I use entr: http://entrproject.org/
Been able to simply and quickly run code in a variety of languages with little friction is a handy thing to have, particularly when writing fragments in multiple languages at the same time.
[1] https://marketplace.visualstudio.com/items?itemName=formulah...
https://github.com/wheineman/nrpl
[1] https://hookrace.net/blog/what-makes-nim-practical/#use-as-a...
It's not the same thing but it spares a few key strokes...
I have the nim-mode and smart-compile packages installed, and I have bound F9 to compile the nim code in the current buffer, and run it in the emacs-inbuilt eshell.
I have configured so that the point and buffer switching 'does the right thing'.
- If the compilation fails, show the compilation buffer in the other window, and do not execute the binary, and keep the point in the code window.
- If the compilation passes, execute the binary in the other window.
- Now if the binary execution ends with showing the eshell prompt, move the point back to the other window (code window).
- If not, that is, if the eshell prompt does not show up, keep the point in the eshell buffer, because that most likely means that some user input is expected.
---
So my nim learning process goes as: type a code snippet, F9, type more, probably cause error, F9, fix that, F9, etc.
Config: [1] [2]
[1]: https://github.com/kaushalmodi/.emacs.d/blob/master/setup-fi...
[2]: https://github.com/kaushalmodi/.emacs.d/blob/master/setup-fi...
It's a very simple feature that I'm sure can be implemented as a plugin in any IDE/Text editor. The Nim VS Code plugin sort of supports it, but the feature could be improved. (Nowadays, I wouldn't recommend using Aporia for various reasons).
1 - Aporia - https://github.com/nim-lang/Aporia
On https://nim-lang.org/faq.html under "What about editor support?", Aporia is mentioned as the first option. Should it be moved lower in the list?
Anyways I use nim-mode in emacs, and it works great!
Admittedly I'm still doing super basic stuff at the moment.
(Similar to http://play.rust-lang.org or https://play.go-lang.org).
And it generates the pom files so you don't have to...
Nim is to C/C++ as CoffeeScript is to JavaScript. A highly extensible template language atop a portable language with libraries for practically everything.
So why haven't I hopped on the bandwagon? Outside of C++, C, and Fortran - the only way I have ever learned a new language is through using a REPL. How much of Python's and MATLAB's (and maybe even Julia's) success is due to having a brilliant REPL?
I am not complaining, and I do not have any free time to fix it. But man... if Nim just had a killer REPL that allowed me to slowly learn the language properly while not being blocked from my daily work... it would be just killer!