ooc-dev team mailing list archive
-
ooc-dev team
-
Mailing list archive
-
Message #00022
Meta-programming, python interfacing, use cases (Long time no see, btw)
Hi everyone,
It's been a long time since my last sign of life, but I haven't been
inactive =)
First I'd like to publicly display my opinion of a controversy going on in
the ooc community at the moment:
I had a few great talks with Steve Dekorte about language design, etc. and
Steve is a guy who's really
interested in Just-In-Time compilers (I can hear you shudder, thinking about
Java), and I have to admit
it's a really interesting subject that I would certainly like to experiment
in, a few years from now.
However, *I have no intent to switch the main implementation of ooc to
'using a JIT'. *ooc was
born as a compiled language and will stay so, the C-generating backend will
always be the main focus
of work as far as I'm concerned. I know it's what current users/friendlies
are excited about, and I'm
myself quite dedicated to the cause (there are lots of dynamic languages out
there exploring JITs,
but.. apart from Vala, who tries to design the language that C++ failed to
be?).
I hope this pretty much closes down the issue, so no worries, generating
plain C is still the plan, and
always will be.
Now on to the neat things. A funny bug
report<https://bugs.launchpad.net/ooc-language/+bug/393580>has been
solved today (was invalid, but that's not the point),
and the reporter, chrisecker, asked "if ooc could be used to simplify the
task of writing extensions to python."
And now what, it's a great question, because it allows me to introduce you
to my next baby: *meta*.
meta is most easily understood as a 'compiler scripting' language. To quote
myself: "It means you can
explore nodes at compile time, inspect them, modify them, replace them, move
them, add new nodes,
even define new types of nodes (e.g. to add coroutines), even define a new
piece of syntax (with tokens
and constructs).
meta is ooc's answer to C macros and C++ templates. I've always thought of
macros/templates as evil
because they 1) output text 2) are either very rigid (macros) or incredibly
complex and confusing (templates).
It is my personal impression that C++ people have come with a very wrong
solution to a legitimate problem,
and are trapped ever since<http://www.artima.com/cppsource/type_erasureP.html>,
trying to live on with the mind-boggling mess that their code is becoming.
So, now you all know what I'm trying to solve, and what I'm working on. You
can read a few thoughts <http://ooc-lang.org/macro> of mine
on the ooc-lang wiki <http://ooc-lang.org/meta>. Bear in mind that META IS
STILL IN DESIGN PHASE. The design is by no means
definitive, there are a tons of issues (even in theory, not to talk about
implementation) with it, but I can go
only as fast as my brain watercooling allows. A rough, early implementation
of a few ideas of meta can
be found on github <http://github.com/amoswenger/meta/tree/master>.
As always, I appreciate feedback, constructive critism, and genius ideas
that fix half the awful design that
came to existence at 3AM between two deep thoughts about the shape of the
ADN molecule in a silicon-based
form of life.
In the meanwhile, I wish to y'all great fun hacking around on ooc and beyond
=)
Amos Wenger