Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ann: (almost) new Little Language

0 views
Skip to first unread message

tha...@dardome.de

unread,
Jul 19, 2007, 9:40:42 PM7/19/07
to
Well, after plenty of time with no work or update on it, I finally
managed to put some time in it again, and so I thought I could
announce a new release of my toy language 'Little', which now is V
0.7.9.7.

You can find it here: http://www.thalion-graphics.de/little

To be honest, Little probably doesn't invent much stuff, which other
languages don't already have. Concerning features and runtime system
flexibility, I see it a a hybrid between Java and Python - kind of
dynamically typed Java with multiple inheritance, written in LISP
notion. It's current incarnation is mainly the result of experiments
around a fast virtual machine for a dynamically typed class-based OO
bytecode with multiple inheritance, with special emphasis on fast-as-
possible method invocations, and the fact, that this VM also needed a
reasonable language to be feeded with.

I consider the language to be quite simple: as mentioned, it uses LISP-
like sexpr notion (but has, however, not much to do with LISP-family
languages, ... which, frankly spoken, I never really understood ... I
just used the notion, because it's handy to parse), and has just a
minimal set of built-in stuff: class, attribute and method
declarations, let, prog, if, while, return, try/catch, and a cond
clause.
Attributes and locals may be read and assigned values, and methods may
be invoked.
That's almost all.

Everything else (class hierarchy itself, IO etc) is implemented via
libraries, not within language and VM. The load mechanism is mostly
borrowed from Java: class definitions are compiled to bytecode, which
usually either is stored per-class in '*.cls'-files, or bulk-wise
within library archives '*.lib', and loaded by the VM, when needed.
Native code DSOs may be linked at runtime as well.

The compiler now is written in Little itself.
The interpreter either executes precompiled classes, or launches a
REP, which allows interactive work).

Recent enhancements were: I added a macro system, and several new
syntaxes afterwards, defined as macros.

Here is, what it looks like (buargh! ;) ):

(class Hello ()
(method main () :static
((little.io.TextOutputStream:out):println "Hello
World!"))

)

You see, it has some Java-pollution to bear. ;)
However, you can abbreviate that within the REP: here the line

'((little.io.TextOutputStream:out):println "Hello World!"))'

is sufficient. :)

I tried to fine-tune the stack-based VM speed as much as possible,
while keeping the instruction set minimal. There are only 32
instructions: attribute & local variable access, method invocation,
exception handling, conditional and unconditional branch, push value,
dup, exch, pop.
I'm a bit proud, that anyway, the language doesn't execute much slower
than other interpreted languages - in fact, where it plays to it's
strength (method invocation), it is a good bit faster than, for
example, Python.
Data structures like lists and hash tables are currently written in
'pure Little', which slows it's overall performance down a bit - I
plan to replace hash tables by a native pendant as soon as there's
time.

I've also written OpenGL bindings for Little, and messed around with
Motif bindings (this effort is practically dead, because Motif is
dead). Hope to find time to tackle another GUI library binding in the
future ...
Currently, the downloadable Little gfx stuff, however, is not up-to-
date and probably will not compile with the recent Little release.

Anyway, I just wanted to post a hint to Little here - maybe some of
you find it interesting, like to play around with it and/or drop me
hints & comments.

I should add, that the latest Little VM is *not* OpenSource at this
point and available for Linux x/86 and my former favourite development
platform Irix/MIPS only (the latter still is the only platform for
which the Little VM supports just-in-time compilation to native code).
All Little library sources are available as Source, and the library C
code will become OpenSource as soon as I've cleaned it up a bit (this
may take a while ... I could not dedicate too much time to the project
lately).

Have fun,
Helmut S. aka Thalion

tha...@dardome.de

unread,
Jul 20, 2007, 4:00:30 PM7/20/07
to
Forgot to mention: I recently set up a project blog at
http://little-language.blogspot.com, with the very serious intention
to write to it sporadically. :)

Blake McBride

unread,
Sep 4, 2007, 1:09:51 PM9/4/07
to

Looks interesting. Is the source available? If not, is it planned to
be released?

Thanks.

Blake McBride

tha...@dardome.de

unread,
Sep 11, 2007, 6:32:47 AM9/11/07
to
On 4 Sep., 19:09, Blake McBride <bl...@mcbride.name> wrote:
> Looks interesting. Is the source available? If not, is it planned to
> be released?

Thanks for interest! :)

Currently, there's only part of the runtime library code available
as source - everything written in LITTLE itself is public and included
in the release archives.
Later, I intend to at least make the complete runtime library source
available under GPL. Before I do this, I'd like to clean it up a bit,
and replace the current build mess with something reasonable.
I've not yet figured out whether to open-source the VM (did not think
much about it, because it did not seem to cause much interest anyway)
... probably I will, sooner or later.

If you're interested in the source *now*, just mail me.

Best Regards,
Helmut Schulz

0 new messages