After four months of hacking, we are extremely happy that we can now say that Erjang boots OTP, and that the REPL (Eshell) is fundamentally functional. This marks a major milestone for the project, primarily because this leads the way for taking contributions from a wider range of developers. For your pleasure, here is a sample session:
krab$ ./erl.sh Eshell V5.7.3 (abort with ^G) 1> erlang:display("hello world!"). "hello world!" true 2> erlang:halt(). krab$
A more elaborate one can be found at gist.github.com. The focus of the project now will be to establish a baseline and strategy for taking in new contributions.
With OTP up and running, it has 24 processes (services) active, the shell has PID #445; and the system loads 75 beam modules. The system is now self-hosting (BEAM file loading is no longer using an external erlang process), and thus only requires an OTP installation to be able to load BEAM files and startup scripts from. As for I/O, we only have file I/O in place, network I/O is still to come.
Update: Improvements made over the last two days now also make Erjang's shell support compilation (Eshell
c("foo")command), and improved Erlang eval for expressions. This session report here shows the erlang compiler (erlc) hosted on Erjang.
All this has only been possible with the help of Erik Søe Sørensen, who has put a lot of effort into Erjang over the last two months. Thanks Erik!
Until now, we have been constrained by the progress of the main project, because there has been only one critical path. With Erjang/OTP booting, it should be much easier for other people to help.
There are still much to do; and getting to this point we have cut many corners short. So there are still many BIFs to finish, as there are many branches or versions of BIFs that only support limited sets of arguments. Likewise, there are still instructions that are not fully implemented either in the compiler or in the runtime system.
Core performance is reasonable (as posted earlier it is roughly at-par with the BEAM emulator), and all of the basic compiler/runtime infrastructure is in place. The next I envision are as follows:
- Wrap up what we have now to a "downloadable bundle" so people can more easily start playing with it. As soon as we have this, we'll announce a release "Erjang 0.2".
- We need guide lines for how to write tests, contribute code, intro to how to write a BIF, and so on.
- We need a catalog of things people can do. Off the top of my head, this can be things like
- Implement 4 the BIFs for the
re(regular expression) module,
- Try to write some expression in the Eshell, and report any strange exceptions or errors.
- You can search for
NotImplementedin the code base and suggest something to do.
- Do various cleanup/refactoring for things that we have left behind.
- Write tests tests tests, and more tests, for all the basic language stuff.
- I will start working on the
inetdriver, which is the next step to get distributed erlang up and running.
- Implement 4 the BIFs for the
If someone wants to get started somewhere, feel free to contact me and I can provide scaffolding code to get started.
We're alive and well, and I am extremely happy that we have come so far. It shall be interesting to see what the future brings for this project. Thanks for following us.
Update: Today Erik fixed the prompt, it was a small bug in the driver framework; I updated the display above to reflect that.