Showing posts with label filesystem. Show all posts
Showing posts with label filesystem. Show all posts

Thursday, November 13, 2008

Web-based IDE for X Erlang

In one of my previous posts I described a console application that allows the user to interact with X Erlang instance. As the logical next step I wanted to make it more a 'Visual Studio' than a 'DOS prompt'.

After two months of petty bickering I finally settled to use dojo for portability among browsers and ready-to-go widget goodies. Currently, the application allows management of the in-memory filesystem, editing of Erlang code using CodeMirror control and compilation of the code. It even jumps to the correct line in the source 
code when the error message is clicked in the compiler output pane!

The progress is stalled by the capabilities of the X Erlang itself. Now it is not possible to 'pause' a process to observe its internals.

The current version looks like this:


Wednesday, July 23, 2008

X Erlang as a userland OS

Erlang system has many features of an operating system. The most obvious is processes, the more subtle is modules.

X Erlang takes a few steps further to the autonomous userland OS than OTP does. In X Erlang the operating system is never searched when the system needs to load a module. Two dozens of modules are 'embedded' into the X Erlang executable. There is also an internal storage for module images. These images may be loaded on request. If the referenced module is not embedded and it is not found in the internal storage then {undef,...} is thrown. The file system of the underlying OS is never touched in the process.

To calm down the readers I need to ascertain them that there is a file system in X Erlang. It is internal and in-memory, simplistic, yet hierarchical. In X Erlang file:write_file("temp1.txt", <<1,2,3>>) creates an in-memory 'file' (or rather a named binary). The external file system of the underlying OS is still accessible though 'efile' interface. Compiler works on files and emits output files to the internal file system only.

In X Erlang you need exactly one executable file copied to a freshly installed operating system to launch your application. No runtime, no libraries, a single file typically of less than 2 MB size.