|
Oktatás * Programozás 1 * Szkriptnyelvek Teaching * Programming 1 (BI) Félévek Linkek * kalendárium |
Nim2 /
Install a REPLAlthough Nim is a compiled language, it also has a REPL. (Shameless plug: I also wrote a simple REPL for the C language, see here). Nim's REPL (which is a 3rd-party library) is called INim. $ nimble install inim $ inim 👑 INim 1.0.0 Nim Compiler Version 2.2.8 [Linux: amd64] at /home/jabba/.nimble/bin/nim nim> 1+1 2 == type int nim> It's slow, because in the background it updates and compiles a Nim file, but it's still very useful if you quickly want to try something. Remove a package$ nimble uninstall inim The secret REPLNim has a secret REPL: $ nim secret Hint: used config file '/home/jabba/.choosenim/toolchains/nim-2.2.8/config/nim.cfg' [Conf] Hint: used config file '/home/jabba/.choosenim/toolchains/nim-2.2.8/config/config.nims' [Conf] >>> 1+1 2: int literal(2) >>> To get GNU readline support (arrow keys, history, etc.), launch it with " It's a hidden, undocumented and quite limited REPL, built into the Nim has a virtual machine (VM), which is used for the compile-time macro evaluations, for instance. |
![]() Blogjaim, hobbi projektjeim * The Ubuntu Incident [ edit ] |