INim Versions Save

Interactive Nim Shell / REPL / Playground

0.4.1

5 years ago
  • Windows fix: removed unicode char/emoji from welcome screen (Windows specific)
  • Windows fix: discard shortcut didn't show output
  • Fixed nimble package warning

0.4.0

5 years ago
  • Ctrl-C no longer exits INim, now it breaks/clears the current statement (similar to ipython / bpython). Use exit or quit() instead
  • Discard shortcut: support complex expressions, e.g. fmt"{var}" (import strformat)
  • Discard shortcut: support functions returning values
  • Discard shortcut: type is colorized to yellow, to differentiate from the value
  • Exception errors: display one relevant line of the error message, but when import or -s display more of the stack trace
  • (Internal) src/embedded.nim contains code copied into user's REPL session, possibly use this for special commands
  • Prompt symbol shortened to nim>, indentation symbol changed to ...., both aligned

0.3.1

5 years ago
  • Gracefully handle runtime errors (unhandled exceptions by user)
  • Discarded expressions (shortcut) can now display multiline strings
  • Changed prompt symbol to inim>
  • Added crown emoji to welcome screen
  • Minor code refactor/improvements/fixes

0.3.0

5 years ago

Issues solved:

  • #16: Shortcut to print values of discarded symbols fails on OSX (@timotheecour)
  • #18: Newlines not printed to stdout, produces different output from nim compiler
  • #22: Support command-line arguments, added --help (@timotheecour)
./inim -h
Usage:
  main [optional-params]
inim interpreter
  Options(opt-arg sep :|=|spc):
  -h, --help                      write this help to stdout
  -n=, --nim=      string  "nim"  path to nim compiler
  -s=, --srcFile=  string  ""     nim script to run
  --showHeader     bool    true   show program info startup

--showHeader:false is useful to use inim as a cmd line tool:

echo 'import os; echo os.findExe("dmd")' | ./inim --showHeader:false /Users/timothee/homebrew//bin/../Cellar/dmd/HEAD-81082d5/bin/dmd

--nim is useful to allow using a custom nim binary, eg nim_temp produced by ./koch temp

0.2.5

6 years ago
  • Support echo char type shortcut (issue #12)

0.2.4

6 years ago
  • Built-in shortcut to print values of discarded symbols: >>> x Supports any expression, returns its value instead of having a discarded error message.
>>> 2.5 * 2.5
6.25 : float

>>> "hello".replace("he", "HEEEE")
HEEEEllo : string

0.2.3

6 years ago
  • Fixed issue #9: Linenoise returned nil [IOError] / Allow Ctrl+D / Ctrl-C to quit the Interactive shell

0.2.2

6 years ago
  • Colorized output (red for errors, cyan for results)
  • Runs in the current directory: import your local modules (access to exported* symbols. Use inim myfile.nim to access non-exported symbols)
  • Minor improvements in code-style/comments

0.2.1

6 years ago
  • Preload existing source code with command-line argument: inim myfile.nim (@cavariux)
  • Added "import" keyword as one of indentation triggers (@cavariux)

0.2.0

6 years ago
  • UNIX: Use rdstdin from stdlib for input: now support arrow keys to navigate on last commands (up/down) and line navigation (left/right)
  • Use OS temp directory to store INim temp files (source and compilation output)