Low Level Virtual Machine 1.3 Released 46
RSpencer writes "The Low Level Virtual Machine project has released version 1.3. There are full release notes available. LLVM is a source-language agnostic toolkit for building compilers, optimizers, and jit or interpreted virtual machines. LLVM provides extensive optimization support, three mid-level IR formats (bytecode, assembly, and C++), three backend targets (x86,Sparc,PPC), full documentation, and a very simple and unique design. This new toolkit approach to compiler related tools is quickly attracting new developers who are making significant contributions to the work. Visit the home page where you can learn all the details. LLVM is funded by the National Science Foundation, MARCO/DARPA, and supported by UIUC's Computer Science department and other developers."
Wishy Washy... (Score:3, Interesting)
In some ways, I think this is neat. Dynamic recompilation is starting to become necessary in a lot of software (SQL, for databases, the code for emulation, hell just providing a scripting language for customizing your software would make use of this.)
On the other hand, I've been kind of jaded by lots of little projects that didn't end up doing too much. Who knows? This could become another Sqlite (An invaluable tool in my toolkit that allows anyone to incorporate a very full-featured database into their code, with all of the code in the public domain. [As soon as I have something to contribute back, I will, but it's hard to do, since they do such great work, and quickly, too.])
I'm gonna give this a try, and keep my fingers crossed...
LLVM Progress (Score:5, Informative)
LLVM is a very young project (only 3 years old) but has already made dramatic progress in it's time. Check out the status updates on the left hand side of the main site [llvm.org] to see the rate of progress.
Building a full C/C++ compiler is no small feat!
-Chris
Re:LLVM Progress (Score:1)
Re:LLVM Progress (Score:2)
Re:LLVM Progress (Score:1, Informative)
Re:LLVM Progress (Score:2)
llvmgcc is a very substantial change to GCC, and it doesn't use any of the retargetting features that GCC has. Also, LLVM provides its own optimizers and code generators, which produce substantially better code than GCC in many cases (e.g. 30% speedup for C++ codes is not uncommon).
-Chris
YAVM? (Score:5, Interesting)
What I would like to know is how they all compare. How fast does a typical program run? How portable is the implementation; how easy can the bytecode be transformed to native code for various architectures? How easy is it to target this machine? How well does the machine cope with various programming languages (esp. Common LISP)? How stable (backward compatible) is the bytecode? What are the licensing terms? Does it communicate with the host system, and how well? Etc...
The most important question (Score:4, Interesting)
Array bounds checking is not new. Dynamically loading code isn't new. What was new was the creation of a standardized toolkit and API that handled threading and network I/O and GUI and database access and XML parsing and... You get the picture.
Another portable VM holds little value for me if in the end I just end up back to the "good ol' days" of C where you were given a hammer and told to build a house. POSIX isn't enough.
Re:The most important question (Score:3, Insightful)
Re:The most important question (Score:2)
See, I differ with you there. Standard libraries can be implemented on nearly anything. The choice of VM, for me, depends on the flexibility and power of the bytecode, and how well it can be converted (run time or ahead of time) to native machine code. The reason I mentioned Common LISP is that it's can be notoriously hard to implement o
standard libraries (Score:2)
This doesn't help Common LISP as you correctly point out, but without a standard library, any language or VM is likely to be ignored.
That said, I'm curious about one of your statements. If standard libraries can be implemented on nearly anything, why haven't they been implemented? Do you think this is the result of a single company controlling the initial dev
Re:YAVM? (Score:2)
LLVM is target at traditionally static languages such as C and C++. Java and .NET VM are targeted at Java-like languages. Parrot is focused on highly dynamic languages that traditionally have been interpreted, such as Perl, Python, Ruby. SmallTalk would in theory be more comfortable on Parrot than on .NET.
This is not to say you can't implement C++ on Parrot, or Lisp on .NET CLR, only that it isn't the intended focus of the authors of the respective virt
some assembly required (Score:4, Interesting)
If I ever do build a satisfactory parser with Bison, I wonder how it would interface with LLVM. I tried converting a toy Bison parser to C++ and it seemed like there were some rough edges.
Re:some assembly required (Score:3, Interesting)
Re:some assembly required (Score:3, Funny)
Holy Cow!!! Give me back my LISP...
Re:some assembly required (Score:1)
Re:some assembly required (Score:2)
Holy Cow!!! Give me back my LISP...
Template meta-programming actually is rather LISP like, not least because you have only values and not variables to work with. Rather than assign a value to a variable, all "meta-functions" must produce a new compile-time value.
Alexandrescu's Modern C++ Design -- the m
Re:some assembly required (Score:3, Interesting)
What's wrong with Bison that you keep looking for alternatives? I think you should just get over that stage and start coding the rest.
For the record, I just wrote a parser and interpreter for a LISP-like language with Python-like syntax entirely in Python. It works (except that I didn't get lexical scoping right), and my
Re:some assembly required (Score:2)
Before I discovered the new GLR parser, I couldn't manage to write a LALR(1) grammar for the source language. The target language is Python, so I experimented with PLY, Spark, and others.
Re:some assembly required (Score:2)
"VM" in LLVM name does not do it justice (Score:4, Interesting)
GCC recently voted down using C++ in their core code. Perhaps LLVM at the very least will drag GCC into the modern age due to competition.
The VM part of LLVM is just icing on the cake.
(And yes, I am aware that LLVM uses GCC 3.4's C and C++ front-end code. That's a good thing for the short term. Perhaps longer term they will develop their own front-ends.)
Re:"VM" in LLVM name does not do it justice (Score:2)
Which could be a very good thing. Last I checked, the code g++ generated was a lot less efficient than what gcc produced, even with plain C code. Perhaps optimization would solve that, but I've heard similar complaints from others, also about other C++ compilers. I believe that, in theory, C++ programs can be more efficient that C programs, but with current compilers, this seems not to be the case.
Re:"VM" in LLVM name does not do it justice (Score:2)
Which, arguably, constitutes an ethical violation of the open source definition. It makes me wonder why there doesn't seem to be a fork of gcc that does not engage in this kind of madness. It might well grow more popular than the current project.
Speaking as a GCC maintainer, I call bullshit (Score:5, Informative)
The very best trolls always start with a grain of truth. (LLVM is much easier to understand than GCC. The GCC infrastructure is very baroque, dating from a time when assuming the presence of an ANSI C bootstrap compiler was too much. One of the major LLVM guys has presented his toolchain work at the annual GCC Summit, and maintains close communication with the rest of the GCC team -- and we wish him well. All very true; no GCC hacker would say any less.)
The trolls then move on into wild exaggerations and complete lies. Such as:
Pure malicious bullshit. RMS doesn't want proprietary backends to be able to read the GCC IR, and so we don't ever write it out in a machine-readable format. But we've never gone out of our way to obfuscate the internal API.
Again, a complete lie. We asked RMS whether we could make use of C++ in parts of the compiler. While a skilled and brilliant C and LISP hacker, RMS is a reactionary fuckhead when it comes to anything other than C or LISP. In his opinion, all GNU programs should be written in C, and only C, ever.
There was no vote.
Re:Speaking as a GCC maintainer, I call bullshit (Score:1)
Re:Speaking as a GCC maintainer, I call bullshit (Score:2)
What, you try to make common cause with me after outright attacking my friends and colleagues? Without an apology? You, "truth_revealed", are a liar and an asshole.
So of course, lying about it, as if there had been a vote and the democratic process had somehow gone awry, is completely harmless. "Ends justify the means," or some other pisshead reasoning.
Pointing to an abandoned and unmaintained toy language and
Re:Speaking as a GCC maintainer, I call bullshit (Score:1, Troll)
GCC is a great compiler designed by brilliant people. This is not in dispute. Mere mortals like me just wish its learning curve was not quite as steep.
RMS vs. Open Source (Score:4, Informative)
Then open source backends won't be able to read it either, but that's apparently okay with RMS, given his priorities. Since only REALLY good commercial software would have a chance against a no-cost incumbent, he is willing to keep great open source alternatives from becoming available in order to keep great commercial alternatives from becoming available.
This is the guy who proclaims that ALL commercial software developers are "unethical".
Open Source to me is about openness: the source is yours to use as you wish, the code can be scripted externally via a command-line interface, it can be incorporated as a library into your own code with minimal effort with a nice API intentionally designed for that purpose, it has a modular architecture that encourages others to compete at the replacement module level without having to rebuild the whole app, etc.--all the ways code can be opened: the least restrictions and the greatest usability.
This is not RMS's agenda. RMS has made his priorities clear. He has never claimed to support the "open source movement", only to be somewhat allied with it to the extent it supports his own anti-commercial software movement.
We asked RMS whether we could make use of C++ in parts of the compiler. While a skilled and brilliant C and LISP hacker, RMS is a reactionary fuckhead when it comes to anything other than C or LISP.
Having heard him speak on many occasions over the years, it's my impression that this characterization is correct and "anything other" applies to more than just programming languages, though not to everything.
I think RMS is right on in many (but not all) of his compaints about IP laws. He's a very bright and skilled guy with a lot of great ideas, but his old-fashioned leftist political philosophies are more "anti" than they are "pro" and handicap the usefulness of his products in some unfortunate ways, and that appears to include GCC.
To the extent that LLVM and other technologies compete with GCC, I'm all for it.
Re:RMS vs. Open Source (Score:2)
Yep. Most of the maintainers would agree with you.
Remember, in Free Software, you have the freedom to do anything you want -- except disagree with RMS.
Re:Speaking as a GCC maintainer, I call bullshit (Score:1)
Sincere question: Have I had a complete misunderstanding about GCC ever since EGCS? My understanding was that EGCS started as a fork of GCC because of differences with the GNU people, but eventually they agreed/relented and allowed EGCS to merge with and/or replace the old GCC, and in the process opening up GCC development to new people (the ones responsible for EGCS). Are you saying that despite that, RMS still has dictatorial power over GCC and its "steering committee"? If this is
Re:Speaking as a GCC maintainer, I call bullshit (Score:4, Informative)
You're not completely right, and not completely wrong. The politics are exceedingly complicated, and I regret it every time I learn more about them.
RMS doesn't have dictatorial power over the SC, nor a formal veto vote.
He does hold the copyright to GCC. (Well, the FSF holds the copyright, but he is the FSF.) That's a lot more important that many people realize.
Choice of implementation language is, strictly speaking, a purely technical issue. But it has so many consequences that it gets special attention.
The SC specifically avoids getting involved in technical issues whenever possible. Even when the SC is asked to decide something, they never go to RMS when they can help it, because he's so unaware of modern real-world technical issues and the bigger picture. It's far, far better to continue postponing a question than to ask it, when RMS is involved, because he will make a snap decision based on his own bizarre technical ideas, and then never change his mind in time for the new decision to be worth anything.
He can be convinced. Eventually. It took the SC over a year to explain and demonstrate that Java bytecode could not easily be used to subvert the GPL, therefore permitting GCJ to be checked in to the official repository was okay. I'm sure that someday we'll be using C++ in core code. Just not anytime soon.
As for forking again... well, yeah, I personally happen to be a proponent of that path. But I'm keenly aware of the damange that would to do GCC's reputation -- beyond the short-sighted typical /. viewpoint of "always disobey every authority" -- and I'm still probably underestimating the problems.
A compiler in C++ is not as easily bootstrapped (Score:2)
We asked RMS whether we could make use of C++ in parts of the compiler. While a skilled and brilliant C and LISP hacker, RMS is a reactionary fuckhead when it comes to anything other than C or LISP.
One of the requirements shaping the implementation of GCC is that it be bootstrappable on many systems, even on some UNIX(tm) systems shipped by their vendors with a half-broken C compiler (enough to recompile the kernel but not much more) and no C++ compiler.
Re:A compiler in C++ is not as easily bootstrapped (Score:2)
Speaking as a maintainer of software that gets ported to some really odd environments, GCC's general policy in this area is a godsend (it lets the rest of the software toolchain stop worrying quite so much about every kind of bizarre compiler bug o
Re:A compiler in C++ is not as easily bootstrapped (Score:1)
Bootstrapping is an issue for LLVM, but not as large an issue as some are trying to make out. One of the backend machines supported by LLVM is a "C" backend. That is, we can translate our IR to C code. This has been working for years now.
While GCC provides a path to new machines for LLVM today, the long range plan is to have an LLVM based C++ compiler that needs nothing from GCC. When that happens, the bootstrapping plan will be:
Re:A compiler in C++ is not as easily bootstrapped (Score:2)
Oh believe me, this point is well understood by the maintainers. Lots of traffic on this subject. :-)
The general consensus is that:
excitement (Score:2, Interesting)