From: Simon McClenahan (email@example.com)
Date: Mon Jul 16 2001 - 21:14:03 MDT
> (For those of you who are wondering what "Flare" is, "Flare" is a proposal
> for a new programming language
I know I'm sounding like a cynic here, but why do we need yet another
programming language? I will admit, it's been a while (a decade) since I've
looked at LISP, and I may be a lot more familiar procedural programming and with
object-oriented programming in C++ and Java, but I still find it difficult to
> that the Singularity Institute would like
> to have on hand for AI, both because there are specific features required,
> and because we need more powerful programming tools in general. In
> dialects of LISP, both the program and the program data are represented as
> lists. In Flare, the program, program data, and ideally the program
> state, are all represented as well-formed XML. Flare would be run as an
> open-source project.)
I know you've only written preliminary documentation and very little
specification, but as one programmer to another, I would like to see some more
specific examples to justify us humans learning another language to program
computers with. Shouldn't we write the Seed AI and Friendly AI in a language
that is common and familiar? Writing the code in something more obtuse will
allow only specialist humans to be able to write and debug the code.
I am far from being an expert in programming language design, but I have made
interesting discoveries in the area. I hope there are more qualified people on
the list that could comment on my statements. I was introduced to the concept of
meta-programming when I discovered a language called Pliant http://pliant.cx/ .
I will cut and paste key bits of information I find interesting at the end of
One thing that has always bugged me about programming languages is the fact that
they are all text-based. When I started learning the graphical Unified Modelling
Language (UML), I could see much more clearly the relationships between objects
in a system through the use of both static and dynamic analysis diagrams. The
current specification may not be detailed enough to be considered a language for
programming yet, but I have a feeling that pushed to its limits, it could be. I
think that the UML can evolve as a modelling language to programming language.
As for an XML representation, maybe there is something in the XMI standard,
which allows development tools such as modellers and programming IDE's to
I prefer to think of myself as a Software Engineer rather than a Software
Programmer. "Design first, implement later," and all those other cliches and
Right Things to do when building complex systems.
The upshot of this email is that if I was to design a new language, I would do a
lot more research on meta-programming. From what I recall, Pliant is but one
language designed with this concept in mind. It would be futile to re-invent the
wheel, although I do admit that I am assuming those involved with Flare are not
aware or have not investigated this concept.
What is a program?
My personal answer is:
For a human, it is a set of expressions. Each expression is either a raw datum,
or a keyword, with a set of subexpressions (arguments), where the keyword is
providing the semantics for the expression.
For a computer, a program is a set of instructions. Each instruction is a
function call, with a set of parameters and eventually a switch to another
instruction, each parameter being a datum. Some of the functions are programs
(and thus sets of instructions), and some are hardcoded.
Now, Pliant is the bridge between the two. Prior languages focus either on the
semantics, pretending that a program is a set of expressions (Lisp) and so fail
to get efficient handling by a computer, or focus on efficiency, pretending that
a program is a set of instructions (C) and so fail to get efficient handling by
A language is a bridge between the human way of coding a program and the
computer way. I assert that Pliant is the best way now available, because it
addresses the bridging goal with the highest level of flexibility.
Pliant features summary
As a summary: Pliant is typed-Lisp + C++ + reflective-C in one language:
A few more key Pliant aspects: Pliant is
A modern logical programming language: Lisp lists are back in Pliant as the
'Expression' data type, which moreover introduces typing just like modern
logical programming languages
A full-featured, efficient programming language: C++ equivalent without the set
of horrible things: preprocessor, crazy syntax, inefficiency due to nouse object
A fine scripting language since small applications can be written in very few
lines (see the Pliant forum application), you need no compiling step (it is done
on the fly), the debugger is integrated (not an external tool), and, it runs
fast and scales well ...
The first language well suited to very large applications, because (1) it's
module model is very extensible (separated namespaces, and parser and optimizer)
and then (2) a library (module) can check the consistency and rewrite on the fly
(for optimizing) the programs that use it.
A few more details for more technical readers:
The first few lines on this page clearly mean that Pliant is reflective: the
program is the data.
In Pliant, everything is an object, including functions and data types, so a
Pliant function call can be compiled, then executed, then freed.
Pliant syntax is roughly an extension of Lisp syntax (an example).
Meta programming enables lazy evaluation wherever it is needed.
Pliant eliminates the preprocessor and make since, as a dynamic compiler, Pliant
can check details about the machine it runs on, much as some applications can do
at run time: it may be the first non-blind compiler.
Lots of good stuff here
Conclusion: Pliant's place in the evolution of languages
Pliant's author views the main steps in programming language evolution as:
No abstraction: Machine code
Human readable notation of hardware instructions: Assembly
Abstract instruction sets: COBOL, FORTRAN, Basic
Functions with prototype and private variables: Pascal, C
Types with embedded low level management: Object languages: Smalltalk, C++,
Library can check and (re)write the program using it: Meta programming language:
Two stage programming model: Brain model languages
So, Pliant is likely not the ultimate way to program, but it may be as long as
computer parallelism is far less than in brains.
Up to the limits of the sequential programming model, Pliant enables inventing
new ways to program by including new modules rather than moving to another
language. Far more important, various parts of an application can be written in
various programming styles, and still work perfectly together. This is what
Pliant truly does and truly is designed for.
The ability to make several pieces of code written with different programming
styles (so different languages) work together was previously assumed by the
linker, but it was a nightmare to use practically since an application is not
only some binary code, but also a set of prototypes, data types, and constants
that had to be written in every language. Pliant enables writing all these
things in any of them and using them in all others, or even to generate them as
a result of computations.
Rather than being a true language, Pliant is a very general language framework
that can be customized very deeply to match specific needs. In Pliant, most
parts are not in the compiler executable, but rather in the modules, so the
right question for programmers may not be:
Should I use Pliant or another language ?
What Pliant modules should I use ?
Hope you have been interested by these fairly abstract considerations and are
now ready to study how Pliant truly works.
This archive was generated by hypermail 2.1.5 : Wed Jul 17 2013 - 04:00:36 MDT