Lisaac: The power of simplicity at work for operating systems

A new compiled, protoype-based programming language called Lisaac is making some small waves on reddit due to its strong showing on microbenchmarks. Lisaac is inspired by Self, Smalltalk, and Eiffel. Sample code does look a bit verbose. Here's the grammar. Stated goal of Lisaac is to build an operating system.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Syntax is hard

I think their use of "+" and "-" is the reverse of what I would have done. And the whole ALLUPPERCASE thing is so uncouth. :-}

Edit: Clueless question - is Has-A (vs. Is-A) easily supported w/out lots of finger typing? Answer: Ah, you have have as many parents as you want. I guess that is more like MI or Mix-ins than delegation, though, since you get everything from the parent.

+ and -

To answer you about the meaning of the + and - "operators":

"+" means that the slot or local variable it refers to is not shared. That means if an object is cloned, + slots can be different for all objects. For local variables, it means that the variable is not shared betwen invocations of the slot.

"-" is like the "static" keyword in C or java. For a slot in a prototype, it means that the slot will be shared for all objects created from that prototype. This is often the case for code slots (ie methods) because you don't need a different implementation for every objects ... code is often shared. For a local variable, it means that this variable is the same for all invocations of the slot (like static variables in a function in C).

For the ALL_IN_UPPERCASE for prototypes, you'll have to argue with our the creator: Benoit Sonntag ... and personally I don't care. You just have to be remidnded to use the CAPS LOCK key on your keyboard if you don't want your fingers to get hurt.
But one advantage is that the case in Lisaac can differenciate words in different namespaces. Title case for keyword, UPPERCASE for types and lowercase for identifiers.

Thanks for the thoughts (tho this is probably getting ever OT :)

I think I understood the definitions of "+" and "-" when I read the docs, it is just that I don't think they are good mappings from a usability perspective - based only on my own knee-jerk connotations for those. I.e. to me, "+" feels more open and therefore sharable.

On every keyboard I use, I've gotten rid of CAPS LOCK. First, to avoid having it down accidentally, and second because I generally would rather have it act as another Ctrl key since I'm an Emacs user :-)

I agree

I agree with you, I think that the use of "+" and "-" signs makes it hard to read.

Neruda

How does Lisaac compare to Io?

Last month on LtU "...seems everyone on the web is talking about the language Io at the moment..." so to what extent can those "dynamic" Io examples be written in Lisaac? What do we give up to get 4500x better performance?

I'm not sure but..

..I think that "code as data" is lost somewhere in Lisaac's two-stage to-C compiler.

Also, it's interesting to note, that Lisaac's "simplicity graph" is almost a direct clone of Io's, yet excludes Io from it.

Multiple inheritance and shared vs local slots both seem like strange ideas for a prototype based language. Less simple/uniform syntax. No macros/meta-whizbang.

That's my initial opinion, at least.

That Io keyword count chart

That Io keyword count chart doesn't seem to have a link on the Io website.

Is it also interesting to note that Lisaac's keyword count chart includes a count of 0 for Prolog, and yet Io's keyword count chart excludes Prolog? :-)

I had a longer reply, but by

I had a longer reply, but by the end it seemed excessively off topic. My only point was that the authors seem at least aware of Io, but chose not to include it in their comparison, despite it's linguistic similarities (along with Eiffel and Self). Prolog isn't close at all in terms of language design to Io.

Either way, I'd looked at the Lisaac language reference to get a feel for the language and noted a few of things that stuck out to me, in response to your question posed earlier.

Like I said earlier, the language seems to have a few things which make it more complicated than necessary (ie. four kinds of inheritance, shared vs local slots, syntax).

IO ...

Io is known by Liaac authors, it appears in the Links section:

http://isaacproject.u-strasbg.fr/links.html

If it is not included I think it's because the simplicity graph is kind of old. It only refers to the first version of the language. And with the second version, the syntax changed a bit and i'm not sure the graph is still relevant. Because what is a keyword ?

Actually some words can be seen as keywords like those which start with uppercase and end with lowercase, but they do not conflict with types (all in uppercase) not identifiers (all in lowercase). And they can only be found in some contexts.

For example "Section Private" begins a section where slots are marked as private. The keyword "Expanded" can be added in front of types and it means that the value defined that way will hold directly the object and not a reference to it. In pre/postconditions (yet, there is contract programming built-in) you can use Result to refer to the return value of the slot and Old before a variable to ask for the value it contained at the beginning of the block).

But even if there is all these words, I think the language remains simple. if you want to do all that Lisaac does, you can't avoir keywords forever. But what I like about it, is that there is never ambiguity betwen those keywords and the identifier that you choose (the case and context makes the difference)

PS: it seems that my comment didn't get posted, so if there is a duplicate, excuse me.

And, also, don't hesitate to join the mailing list if you are interrested ... ask questions ...

I agree that having keywords

I agree that having keywords or even large amounts of keywords makes a language any less simple. What does, to me, is the addition of lots and lots of features. I can understand their usefulness, things like static typing, contracts, various kinds of inheritance and slot exposure, but I don't think having these things makes a language simple. A simple prototype based language would have the minimum required to make a useable and flexible language. This would reduce the language to something like, objects are essentially collections of slots, everything is a value (higher order functions / closures), dynamic late-bound typing, one type of inheritance (copy on clone) and exception handling.

I'm sure though, that simplicity isn't their primary goal, as Io's is, and that being able to use the language to construct a reasonably reliable OS is. And that is the source of most/all differences between the two languages.

Simplicity

Well, Lisaac have a little more keywords than it once had ... but nonetheless, it is still very simple. The first time you look at it, it may not seem that simple but it is.

Basicly we have just objects with prototypes that are a collection of slots. Each slot may be associated with an advanced access list. Slots can be shared from objects of the same family or not (+/-). Slots can have contracts. And that's all. Everything else is in the library.

It may seem a bit too much for you, but there are many others languages far more complicated. Including the most used languages. and frankly, I think there is not much to remember.

But I agree that there are languages that are simpler ... Like Io probably. But they do not produce fast executables like Lisaac does. And do not provides facilities like string type system and contracts.

Simplicity graph is bogus

This simplicity graph has no value in comparing languages. A language with few keywords might force the programmer to encode everything. Just try programming in the pure lambda calculus. A language might also put everything in libraries, which may or may not be counted as keywords.

Re: How does Lisaac compares to Io?

Hi,

I suppose you are talking about the way it is possible to create const objects in Io ..? But excuse me but I don't see its usefullness. I think you could say that in Lisaac, this job is dome automatically by the compiler.

If you try to change the parser at run-time or the code representation at run-time ... well, it's impossible (it is already compiled). But I don't see where it would be useful.
And i think pretty much anything else is possible.

How to uninstall Lisaac.

I have a simple question: How to uninstall Lisaac? I mean, the language is great, but I may want to uninstall it to intall a new version. I also notice that the documentation in general is lacking a good tutorial. Where can I find a good tutorial?

Lisaac documentation

you will find documentations and tutorials here: http://isaacproject.u-strasbg.fr/li/li_docs.html

If you have installed the 0.12 version, you just have to remove the lisaac directory in your HOME and the last line of you bashrc.

If you use the 0.13 a make clean should do the job.

Compiler bug

Hi, Xoswald.
Since you seem to know a lot about lisaac, could you inform the team in charge of writing the lisaac compiler that it may have a bug? I mean, I can write programs that make the compiler crash, when running on Windows XP. I mean, the compiler should report an error, if the program is not correct; it should not crash. Below, you will find a silly buggy code, whose only purpose is to crash the compiler.

// File zeca.li
Section Header
+ name := ZECA;

Section Inherit

- parent_object:OBJECT := OBJECT;

Section Public
+ value : INTEGER := 3;
-set_value n:INTEGER ( value := n;);
-get_value ( value;)

Section Header
+ name := MICO;

// File mico.li
Section Public
-main ( +slo : ZECA;
+v:INTEGER;

slo := ZECA.clone;
v := slo.get_value;
)

Getting OT...

Issues like this are probably better raised directly with the Lisaac developers in the appropriate forum...

Compiler bug ?

I have tried to reply but it seems that pasting here delete some characters :/

Feel free to send us a mail on our list isaac-devel.
https://gna.org/mail/?group=isaac

or open a bugreport.
https://gna.org/bugs/?group=isaac