Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a full REPL for Erlang?

Tags:

erlang

Is there a way to have a full interpreter in Erlang, not just a "shell".

Since it is a dynamic language, not being able to define named functions in the interpreter is a little bit disappointing... I suspect that it is because compilation units (modules) must be explicitly compiled for their execution by the VM, but maybe a REPL acting as a dynamic/recompilable module exist?

like image 811
Gabriel Cuvillier Avatar asked Mar 27 '10 17:03

Gabriel Cuvillier


People also ask

Is erlang compiled?

Erlang programs must be compiled to object code. The compiler can generate a new file that contains the object code. The current abstract machine, which runs the object code, is called BEAM, therefore the object files get the suffix .

How do I start erlang?

On a Unix system you enter the command erl at the operating system prompt. This command starts the Erlang runtime system and the Erlang shell. On the Windows platform you normally start Erlang/OTP from the start menu. You can also enter the command erl or werl from a DOS box or Command box.

Which function is used to exit the erlang shell?

JCL mode Once there you can use the command q to quit the Erlang shell. This is similar in effect to erlang:halt(0).


1 Answers

> F= fun () -> io:format("Hello World~n", []) end.
> F().
like image 99
eolo999 Avatar answered Sep 27 '22 19:09

eolo999