MELT, a GCC Compiler Plugin Framework, Reaches 1.0 58
karijes writes with news that the Middle End Lisp Translator extension for GCC has hit 1.0: "MELT is a high-level domain specific language for extending, customizing and exploring the GNU Compiler Collection. It targets advanced GCC users, giving them ability to hook on almost any GCC stage during compilation or interpretation phases. This release brings a lot of new things."
New features include defmacro and changes to the antiquote operator.
Also, MetaMELT 0.3 (Score:5, Funny)
In other News, MetaMELT's v0.3 was released this last weekend.
"MetaMELT a meta-level tool for the customization of MELT's dynamic pattern matching paradigm, allowing the refinement of the GCC's internal data management during the pre-hooking phase."
Re: (Score:2)
Re:Also, MetaMELT 0.3 (Score:5, Funny)
I believe that defmacro already covers that.
Defmacro defines that, but, who defines defmacro?
Or, as MetaMELT lead designer and "guru" said himself: "Quis definiet ipsos definieentis?"
Re: (Score:2)
Defmacro defines that, but, who defines defmacro?
In most Lisp implementations, given that defmacro is a macro, defmacro is - quite naturally! - defined in a defmacro. In ClozureCL, for example, it starts as (defmacro defmacro (name arglist &body body &environment env) <some-convoluted-body> )
Or, as MetaMELT lead designer and "guru" said himself: "Quis definiet ipsos definieentis?"
Excavans testudines ad infinitum patentes perspicies.
Re: (Score:1)
But how can you define defmacro using defmacro before you have defined defmacro? (And afterwards, it wouldn't make sense because it already is defined).
Re: (Score:2)
Templates.
Re: (Score:2)
I always preferred the defwhopper flavor.
Re: (Score:2, Interesting)
Basile STARYNKEVITCH [starynkevitch.net] email: basile at starynkevitch dot net
Don't forget PattyMELT 0.1, iteration 5,875 (Score:1)
PattyMELT 0.1, a fine, greasy affair consisting of a hamburger patty, slice of cheddar and sautéed onions on rye, was released at 12:43 PM at Joe's Diner on Route 7 to Bob Jenkins, a local plumber. This was Bob's 483'rd iteration on the project.
Asked what he thought the requirements might be to get the project up to a 0.2 version, he replied: "mmmrphWha?mnomnom'".
Asked again where he thought PattyMELT could use some tidying to improve its utility, he said "(gulp) Are you one of them pencil-necks from over at the college? Buzz off, before I lay a pipe wrench alongside your little pansy face. Can't a man eat?"
Re: (Score:2)
Re: (Score:1)
you can't build a great IDE for gcc, but with LLVM the license permits the necessary access to libraries.
Re: (Score:1)
Of course you can.
Re: (Score:2)
Let me translate. "Great" in this case means "non-GPL" (YMMV, of course). If you want to link into the compiler code itself (rather than just calling the compiler binaries), you've just forced your IDE to use the GPL.
LLVM, on the other hand, has a more permissive license, so it's a non-issue. And it was built with this sort of IDE-compiler interaction in mind, so there's that, too.
Re: (Score:2)
That's a very strange definition of great. Virtually everyone relates that word to features, intuitiveness, absence of annoying bugs, etc. That is, to properties of the IDE.
And no, that's not a question of mileage, that's a question of proper use of the language.
Re: (Score:2)
Yes you can as long as you license it with the GPL
Re:Too little too late (Score:5, Informative)
Your hipster hardcore developer friends might want to read the GCC license some day which has an explicit exception [gnu.org] allowing the runtime code to be incorporated in closed source software without imposing the terms of the GPL.
Re: (Score:2)
Re: (Score:2)
...dead in the water...
I don't think so. The gcc & it's toolchain, and the arm cross-compiler, are indispensable where I'm at. The current licensing is little more than an annoyance right now.
Re: (Score:2)
GCC is indepensible for so many embedded systems. Just because some are starting to move away from in on PC platforms is not all that important. But this is slashdot, things are routinely declared dead here decades before their time.
Re: (Score:2)
Try to use .progmem on an AVR chip...
Sure, cherry pick an obscure use case with old Atmel hardware. I think I'm ok with the arm stuff for now.
Re:Too little too late (Score:4, Informative)
Re: (Score:1)
"Most Linux distributions are currently compiled with GCC"
I said people who *matter*. Game developers, iOS app developers, that kind of thing.
Re: (Score:1)
Among me and my hardcore developer friends GCC is effectively dead in the water. LLVM has eaten its lunch due simply to the fact that LLVM respects developer rights by giving them the FREEDOM to do anything they want with the code. Unless and until GCC dumps the socialistic GPL license idiocy, it will stay dead to everyone that matters.
You shouldn't have been modded troll. You were making a genuine point. There's also the fact that LLVM is a far superior and more modern compiler engine than GCC. (If anyone needs objective evidence, just look at compile and run times.)
Re: (Score:2)
Compile times are better in LLVM. Run times are generally a little bit worse in LLVM.
The commercial Intel compilers (C++/Fortran) offer the highest execution performance on Intel hardware.
Interesting to learn about (Score:2)
Not too long ago, I was looking into various game engines and one feature I saw was the ability to modify semi-constant values during runtime to facilitate rapid development. For example, being able to modify the position of a barrel in a scene to just the right location and then make those changes permanent.
I wondered why this couldn't be implemented as a standalone library to allow any type of program to do this kind of thing. I envisioned a compiler plugin that would read constant values from some files
Re: (Score:2)
Re: (Score:2)
Uh, that's what 3D modeling tools are for... Using a compiler in place of a level editor is a fool's errand.
Re: (Score:2)
Lisp syntax is the problem (Score:3)
Re: (Score:3)
Isn't that also what Dylan [wikipedia.org] was supposed to do?
Re: (Score:2)
Every time someone spouts off about how their newfangled language has some awesome new feature, Lisp had it 50-60 years ago.
When we build the Museum of Computer Languages we'll be sure and devote an entire wing to the many Lisps. If I were to hop into a time machine and go back 60 years, I'd be sure to program in Lisp. That says nothing though about the best choice of language today. I don't mean this as an anti-Lisp rant; I just want to point out that the "we had it first" argument for Lisp is irrelevant.
Re: (Score:1)
The "we're still the only ones to have this" argument, however, is still relevant...
Various types of macros (reader, syntax-aware, hygienic, etc.), same code syntax and capabilities from pre-processing through run-time, generic functions and the rest of CLOS, semantics defined for compilation and interpretation, extensive compiler hinting, etc.
Re: (Score:2)
I think you want "Common Lisp".
RMS will hate it (Score:3)
As I recall, Stallman has specifically stated that GCC is not extensible this way out of the box, because he didn't want the dirty proprietary plugins piggybacking on top of the GPL'd frontend & backend. He said it's why the entire protocol between front-end and back-end is deliberately not standardized. It's also why the license specifically excludes the intermediate output from the usual "output is not covered by GPL" exemption:
"Target Code" refers to output from any compiler for a real or virtual
target processor architecture, in executable form or suitable for
input to an assembler, loader, linker and/or execution
phase. Notwithstanding that, Target Code does not include data in any
format that is used as a compiler intermediate representation, or used
for producing a compiler intermediate representation.
The "Compilation Process" transforms code entirely represented in
non-intermediate languages designed for human-written code, and/or in
Java Virtual Machine byte code, into Target Code. Thus, for example,
use of source code generators and preprocessors need not be considered
part of the Compilation Process, since the Compilation Process can be
understood as starting with the output of the generators or
preprocessors.
A Compilation Process is "Eligible" if it is done using GCC, alone or
with other GPL-compatible software, or if it is done without using any
work based on GCC. For example, using non-GPL-compatible Software to
optimize any GCC intermediate representations would not qualify as an
Eligible Compilation Process.
You have permission to propagate a work of Target Code formed by
combining the Runtime Library with Independent Modules, even if such
propagation would otherwise violate the terms of GPLv3, provided that
all Target Code was generated by Eligible Compilation Processes. You
may then convey such a combination under terms of your choice,
consistent with the licensing of the Independent Modules.