You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows, rebar3 does not support rebar3 local install which would set up $HOME/.config/rebar3 automatically for them, for some reason. Each kind of shell one might run may have a different notion where $HOME is, making it necessary to add rebar.config with the necessary plugin additions in multiple places. In a DOS or PowerShell prompt, that location is C:\Users<username>.config\rebar3\rebar.config, and in MINGW and Cygwin, it's wherever $HOME aka ~/ is.
Alternatively, there is an environment variable one can set, REBAR_GLOBAL_CONFIG_DIR, and of course one would have to do this both via Windows' standard environment variable editor and in the ~/.bash_profile initialization script for each prompt. However, once the rebar.config file is set for each prompt, everything is peachy.
OK, one thing isn't peachy. For reasons that are being investigated, the rebar3 lfe repl task needs one extra step in order to actually render the REPL. (For this same soon-to-be grokked reasons, running the lfe script by itself crash-dumps.) In order to enjoy Lisping in a fully-functional LFE REPL, you will need to invoke lfe_shell:server(). from the Erlang Shell that appears instead of the LFE REPL when you issue the rebar3 lfe repl command. Apparently, when the initialization of the LFE REPL bombs in the context of the Erlang Shell, the Erlang Shell doesn't crash with it, and issuing lfe_shel:server(). work just fine.
One final gotcha: On the DOS prompt only, the ASCII art LFE coffee cup does not render properly. Looks great in MINGW and Cygwin, but DOS being DOS it looks more like a bowl of used ramen noodles. Users are however highly encouraged to give the new Windows Terminal application a try. It renders the LFE coffee cup beautifully whether you are firing up a standard command window or a PowerShell window. And everything works in the REPL as expected from that point on.
The text was updated successfully, but these errors were encountered:
bcalco
changed the title
Windows users may need OS-specific notes to get LFE up and running
Windows users need OS-specific notes to get LFE up and running
Aug 11, 2020
This lfe_shell:server(). was the step missing for me.
There is also good to note that might be no ASCII art at all, the change is very subtle from 1> prompt to lfe> and if you don't pay attention you might be repeating lfe_shell:server(). thinking it didn't worked since there is no ASCII art.
Another way to get it running with proper readline, ASCII art is to use werl.exe as the ESCRIPT_EMULATOR. werl is shipped as a part of erlang on windows. You could do ESCRIPT_EMULATOR=werl rebar3 lfe repl in a git-bash shell or set ESCRIPT_EMULATOR environment variable with werl as the value assuming you have werl in PATH.
Result:
There is also good to note that might be no ASCII art at all
On Windows,
rebar3
does not supportrebar3 local install
which would set up$HOME/.config/rebar3
automatically for them, for some reason. Each kind of shell one might run may have a different notion where $HOME is, making it necessary to addrebar.config
with the necessary plugin additions in multiple places. In a DOS or PowerShell prompt, that location is C:\Users<username>.config\rebar3\rebar.config, and in MINGW and Cygwin, it's wherever$HOME
aka~/
is.Alternatively, there is an environment variable one can set,
REBAR_GLOBAL_CONFIG_DIR
, and of course one would have to do this both via Windows' standard environment variable editor and in the~/.bash_profile
initialization script for each prompt. However, once therebar.config
file is set for each prompt, everything is peachy.OK, one thing isn't peachy. For reasons that are being investigated, the
rebar3 lfe repl
task needs one extra step in order to actually render the REPL. (For this same soon-to-be grokked reasons, running thelfe
script by itself crash-dumps.) In order to enjoy Lisping in a fully-functional LFE REPL, you will need to invokelfe_shell:server().
from the Erlang Shell that appears instead of the LFE REPL when you issue therebar3 lfe repl
command. Apparently, when the initialization of the LFE REPL bombs in the context of the Erlang Shell, the Erlang Shell doesn't crash with it, and issuinglfe_shel:server().
work just fine.One final gotcha: On the DOS prompt only, the ASCII art LFE coffee cup does not render properly. Looks great in MINGW and Cygwin, but DOS being DOS it looks more like a bowl of used ramen noodles. Users are however highly encouraged to give the new Windows Terminal application a try. It renders the LFE coffee cup beautifully whether you are firing up a standard command window or a PowerShell window. And everything works in the REPL as expected from that point on.
The text was updated successfully, but these errors were encountered: