XL Compiler Bootstrapped
descubes inputs: "An XL compiler bootstrapped two days ago (that means it compiled itself). Take a look at the project homepage to discover this language, designed around concept programming ideas, which is a sort of cross between C++, Lisp and XML. Much help is now needed to improve this rudimentary first iteration." One thing to note is that the C++ version of the compiler came in at 4500 lines, while the XL equivalent came in at some 2700 lines. This seems to imply that XL may be easier to work in than C/C++. Might XL someday be nudging the old workhouse out of a job in the near future?
That's a huge difference in line count between the two versions. If XL is that good a language, it may be worth learning. Now maybe I can get that 1400-line C++ program I've been working on for a year to be less than 1000 lines!
Would braces count as lines?
if (X == Y)
{
Z = X * 2;
return Z;
}
I'd be happier if the braces were in the language... using white space seems intangible.
I'm a fan of english, now if only a programming language was:
"be a calculator"
and that was it, I'd be so happy!
100% not funny.
This is why we need something like .NET
I often wish to use programming languages other than C++, but the library bindings aren't there.
For example, I'm currently struggling to use libkabc from C# so I can use the kontact name and addressbook.
I've long wanted C++ to compile on my Atari 8-bit XL computer. At last, the moment has come!
Don't blame Durga. I voted for Centauri.
[Arnold Schwarzenegger joke:] 100% not funny.
So the rumors are true! There is at least one Republican on Slashdot!
Take that, you stereotypers of Slashdot!
Opinions on the Twiddler2 hand-held keyboard?
That website smells an awful lot like, "Let's see how many buzzwords we can fit into as small a space as possible!"
... or have I been watching the Matrix a few too many times?
Of course, I didn't actually read any of it, so it could actually be damn cool. I'm personally of the opinion that we've yet to see a language that doesn't suck in one way or another...
Maybe this is The One (tm)
A Minesweeper clone that doesn't suck
The web site seems to completely lack examples. It also isn't apparent how they do 'objects' (ie bundles of data and the functions that operate on them). It just looks like a very poor man's version of Python to me.
Whoa...check out that SWEET hacker logo in the upper right corner .. anybody else check it?
That logo means this guy is a hacker (no, not the kind that break into computers illegally, the kind that have scrawny mustaches and like to shoot people with guns. Excuse me, like to shoot guns, not necessarily at people. But keep an eye on them anyway if you're a teacher or parent.)
Wow, anybody kool enough to use the neat-o hacker logo must have like the most AWESOME program evarrrrr!
That's just silly. An APL version of it might be only 20 lines long, but it wouldn't be easier to work with because of that.
Soon there will be two-handed gestures, underground clubs, and 10% discounts at Best Buy for possessing a member's card.
I did not see support for "iterators" mentioned directly, but if the extension mechanism is strong enough that should be doable.
I'll be taking a careful look at it myself. These are some very powerful features. (Sather had many of these and was (in my experience) the best language I've ever used.) If C# had only put in decent syntax for some of these things I could have been persuaded that Microsoft was not the SAOE (Software Axis Of Evil), but they didn't.
"Concept"-based programming is the only programming people do.. In non-buzzword terms, it's abstraction. Whether you abstract over code, or data, semantic or syntax... it's all basic abstraction. I read the code for the compiler itself, and didn't really see the kind of abstraction I really wanted to see..
I've taken a stab at this kind of mutable language, and I'm sure more than a few others have, but there's always something missing. It's the same problem that occurred in one of the original mutable languages, LISP (+ macros). While you can go ahead and create domain specific abstractions with syntax, the code to implement a nontrivial abstraction with reasonable semantics and syntax is equally or *more* complex than just using either domain specific tools separately, or using basic functional abstraction in the first place. Nevermind the added complexity of trying not to break anything else in the language at the same time.
After a while, I realized the nut that I, and many other people, were trying to crack is slightly different. You can implement every abstraction buzzword ever mentioned with functional decomposition combined with a preprocessing pass. The important part is not the mechanics, since every programming language since lisp has these mechanics. The important part is the interface to the programmer... and that's a tough problem...
Has anyone else tried this, and actually gotten it to bootstrap?
:)
With gcc/g++: had to add in a #include <unistd.h> that was missing (needed it for sbrk()); compiled fine, bootstrap died with lots of errors. (it looks like it generates lots of bad C++ code or something)
With icc: Compiled fine (modulo a few harmless warnings); bootstrap compile looks like it has hung (been going now for over 8 minutes!) -- but hey, at least it didn't die, right?
I guess I'll take another look at this one when it isn't pre-alpha.
pb Reply or e-mail; don't vaguely moderate.
It looks more like an object oriented Pascal variant to me than the mentioned cross of C++, Lisp and XML. Have a look at the parser source.
But it certainly looks like a nice, clean language, with lots of syntatic sugar removed: they seem to use parens only where absolutely necessary, no semicolons in sight and no curly braces anywhere... well, if you like sugar-free languages this one's for you :-)
Luckily they seem to not follow the current trend of languages without header files, since I personally think header files help writing more elegant APIs (but maybe that's just me).
I'm very impressed by Concept Programming & XL. It appears to capture many ideas I have had about benefits and shortcomings of pattern matching, functional programming and object orientation.
Could anyone point me to papers/books or PDF resources about this topic?
i agree completely. LOC really has nothing to do with the quality of the code either. like while (thing 10) { thing++; } is only 3 lines, but it does not make it any more better then: while (thing 10) { thing++; } both really are just as readable. Also, when dealing with stuff like C++, u can discover while VB does things in less code, a game coded in VB will probably never run as well then a c++ equivilent. Looks a bit like eiffel to be honest.. Of course, I cant say anything until I've tried the language
It's not in the looks. From http://xlr.sourceforge.net/info/xl.html:
A lot of ideas come from older languages.
Think C/C++... without the syntactic and semantic complexity.
Think Lisp... without the parentheses.
Think XML... with better support for highly structured data such as program.
There are links to explanations on the original page.
-- Did you try Tao3D? http://tao3d.sourceforge.net
Where's the language manual?
I would prefer iterators the way Sather did it though :
loopi
end ;
It should have been named XXL, so I could make a mint selling sweatshirts to geeks.
Healthcare article at Kuro5hin
One thing to note is that the C++ version of the compiler came in at 4500 lines, while the XL equivalent came in at some 2700 lines. This seems to imply that XL may be easier to work in than C/C++. Might XL someday be nudging the old workhouse out of a job in the near future?
Ever heard of functional programming? That's the family of programming languages lisp is in? Ever programmed in them? They are freaking painful if you ask me. It makes so much more sense to use a procedural language in everyday programming environments. That's why commercial projects aren't written in lisp or ML or scheme or whatever. Just because the code takes up less space doesn't mean it's any easier to use.
You said it, but, people aren't to blame for letting it slip past them; the restrictions on its use make it non-Free Software, even though they've revised the license in the hopes of getting it taken up. I wonder though, even if it were to become fully open - would it even be possible to integrate it with Unix / Linux, or reimplement *nix as a subset? Ie, is there even a path for it to become mainstream, now?
Someday we'll all be negroes
Nothing will ever get rid of C or C++. Java tried, C# tried, hell, D language tried. When's the last time you heard of D?
Oh, and if your next question is: why would we want to get rid of C... you're kidding, right?
i ate crayons when i was a kid and now i have two braincells and the blue ones taste nicer
That all computer programs contain at least one bug, and all computer programs contain at least one superfluous function .. :-)
Therefore all computer programs can be reduced to a single instruction that does not work !
Sorry - Couldn't resist
It is true that the story of the license has hindered adoption of this interesting and intreaguing operating system. It serves as an illustration of how fraught with unseen circumstances the world is. Free software wasn't the way to go when plan9 was born 14 years ago. Lucent's Lawyers live in a different world. Bell-Labs has lost many of it's staff. It is a place where lightbulbs have been removed to save money.
The user base, as monitored by newsgroup traffic, has been very slowly growing, a few more people at a time but nothing like a swell. Catch22 : more users = more momentum for change in whatever direction.
There is no-one officially paid to maintain plan9 any more, though it still is under active maintenance.
It won't die for a good while yet, it is a nice antithesis of eye candy & gee whizzery replaced by real magic.
There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
The web site has background pictures below the text. That's the only thing I needed to know.