Re: Designing Lisp from scratch
[email protected] Tue, 13 Mar 2007 18:54:34 EDT
| Newsgroups | gmane.comp.lang.lightweight |
|---|---|
| Message-ID | <[email protected]> |
I read through the various object-lambda related papers at vpri.org and at Piumarta's FTP site. The overall objectives of allowing the construction of a language based on a simple, user-centered process, etc... appears to be similar to uCalc Language Builder's. However, there are some differences. I did not fully grasp the Cola concept, however, from what I understand, Cola appears to require a series of separate stages, such as front-end, parser, tree compiler, virtual processor, dynamic assembler; each of which is compiled into a separate lib file, requiring multiple compilers along the way (C, C++, Pepsi, ...) in what appears like a series of discontinuous steps. uCalc on the other hand does not burden the user with intermediate steps. The entire language construction process can be done during execution; even interactively if necessary. You can build your language (syntax, semantics, grammar, everything), write code in that language, and extend the language some more as you go, without stopping to compile anything. (Typically though, you'll have the language definition code in a file, which you simply load up prior to writing code in that language). Cola appears to still be somewhat at the idea stage. They hope to implement various languages on top of it to test the concept. On the other hand, uCalc Language Builder already has a working prototype, with implementations for languages as drastically different as Basic, Forth, Lisp, and more, to demonstrate the viability of this approach. The code that defines these languages comes in small plain text files that can be loaded right into the generic interpreter, which then becomes an interpreter for that language. Visit _www.ucalc.com/newbeta.html_ (http://www.ucalc.com/newbeta.html) to download the latest prototype. Coke appears to be a language patterned after something like Lisp and/or Smalltalk. In contrast, with uCalc's small bootstrapping language, you start with a clean slate, so that it is not biased towards a particular method of language design or type of target language. It starts with no data types, no special keywords, no syntax, no grammar, no functions or operators or methods, or concept of how to create them, etc... It doesn't have a built-in way to let you print "Hello World". Instead, the bootstrapping language / process lets you design all these things based on the combination of properties you set for units of data I call "Items". You can use this bootstrap process to gradually create one or more increasingly sophisticated intermediate languages, on top of which you eventually create your actual target language. You do not need a separate step to compile each intermediate layer. You simply load the text file(s) containing all the start-up code you need, and you're ready to continue from there. For instance, features that are equally useful for various kinds of languages were brought together to form a kind of intermediate language, and placed across files such as Types.uc (code for common data types, like various integer, float, and string types), WinAPI.uc (taps into windows routines), Errors.uc, Interp.uc (interpreter related code), Library.uc (common functions and operators, like arithmetic, trig, etc...). Lisp.uc, Logo.uc, Basic.uc, for instance are built on top of these files. The resulting Lisp.uc language definition file is quite short, and relatively easy to follow. What do you guys think of this idea? Daniel Corbier uCalc Language Builder _www.ucalc.com_ (http://www.ucalc.com) <BR><BR><BR>**************************************<BR> AOL now offers free email to everyone. Find out more about what's free from AOL at http://www.aol.com.