[MLton] Parallel Runtime System
skaller at users.sourceforge.net
Sat Jun 16 16:04:36 PDT 2007
On Sat, 2007-06-16 at 13:55 -0500, Matthew Fluet wrote:
> Eric McCorkle wrote:
> Sounds like a cool project. One tough problem is making 'portable'
> runtime systems -- in the implementation of a high-level language, the
> compiler and runtime system are usually tightly integrated.
Felix is portable (all of it). This is done with a mix of facilities:
partly with conditional compilation and partly with plugin
replacement libraries, but mainly by simply using abstract concepts
which naturally port.
The C++ it generates can:
(a) do async socket I/O with native notifications using libraries
(b) use a computed jump with gcc but exactly the same generated
code compiles on all platforms -- using tricky macros
In addition, the whole build system is portable: it's written
in Python, which is portable, and it uses portable constructions
like os.path.join(dir,base) for filenames, and uses Python classes
to encapsulate details of the driver for the C/C++ compilers
Finally, the run environment automatically finds and links all
libraries, so the manner of using the supplied tools is the
same on all systems.
The cost of doing all of this is that most people used to
common tools have a hard time when first faced with the system.
I've had to junk a LOT of stuff.
There are some hard problems too. Handling errors is one
of them that I haven't really got a good solution for.
[Eg .. error returns from threads and I/O function calls
differ wildly between Unix and Windows .. in fact they
differ between Unix and Unix .. :]
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net
More information about the MLton