Interactive programming (repl): Difference between revisions
Content added Content deleted
(Add min) |
(Changed the REPL as "nrpl" ne longer compiles and "tnim" is not very friendly compared to "inim".) |
||
Line 957: | Line 957: | ||
=={{header|Nim}}== |
=={{header|Nim}}== |
||
Nim is not provided with a REPL but there is several available. Online, it is possible to use Nim playground at https://play.nim-lang.org/. And one can install “inim” with “nimble” (command <code>nimble install inim</code>). |
|||
Use <code>nimble</code> (Nim's package manager) to install a REPL ('''nrpl''' or '''tnim''') |
|||
Run the REPL and paste the following code |
Run the REPL and paste the following code: |
||
⚫ | |||
<pre> |
|||
⚫ | |||
⚫ | |||
⚫ | |||
</pre> |
|||
which outputs |
which outputs: |
||
<pre>Rosetta::Code</pre> |
<pre>Rosetta::Code</pre> |
||
To get working arrow keys, compile nim with readline, like this: <code>./koch boot -d:release -d:useGnuReadline</code> or just run <code>rlwrap nim i</code> instead. |
|||
=={{header|OCaml}}== |
=={{header|OCaml}}== |