nim-lang/Nim

Interactive mode missing in macOS (Homebrew) due to missing -d:useGnuReadline or alternative

Closed this issue · 4 comments

The interactive mode command nim i does not work on macOS.
https://nim-lang.org/0.13.0/nimc.html#nim-interactive-mode

Current Output

Hint: used config file '/usr/local/Cellar/nim/1.4.0/nim/config/nim.cfg' [Conf]
Hint: used config file '/usr/local/Cellar/nim/1.4.0/nim/config/config.nims' [Conf]
Error: invalid command: i

Additional Information

$ nim -v
Nim Compiler Version 1.4.0 [MacOSX: amd64]
Compiled at 2020-10-17
Copyright (c) 2006-2020 by Andreas Rumpf

active boot switches: -d:release -d:nimUseLinenoise

Possible solutions

Clearly the macOS version of the Nim compiler distributed through Homebrew is lacking the -d:useGnuReadline switch in its boot switches. I don't know if that's just because the macOS binary build maintainer did not think or add it (which would be sweet as that would presumably be an easy fix, but I doubt this) or whether that compiler switch is not available for the macOS target. If the latter is the case, is there an alternative that could be used to get nim i-type experience on macOS?

That command was removed a very long time ago :) There's nim secret but it uses the Nim VM so it doesn't work reliably anyway (and not supported officially)

Try inim - https://github.com/inim-repl/INim

How do I contribute to the docs so that I can remove the mention of it or at least update the section to mention it is no longer there?

@TomasHubelbauer it's no longer there, 0.13 is a very old Nim version, latest docs for nimc are on https://nim-lang.org/docs/nimc.html

My bad! Google took me there and I never noticed the docs were not for the latest version.