Version 24 of Cloverfield

Updated 2008-01-18 23:09:40 by FB

1-18-08


Announcement

The official announcement for the Cloverfield project can be found there: Cloverfield - Announcement


Goals

Along with the general goals listed in the above announcement, here are a few more specific technical goals:

Language

Improve the Tcl language syntax on several points to address common criticisms as well as implement missing features. For example :

  • 'Fix' the comments;
  • Auto-expand the first word of a command recursively. This will simplify currying and can give great results if namespaces become regular commands (spaces would thus become a valid namespace separator);
  • Improve variable access : allow e.g. $$var, and subscript access such as var[1] or var(a) along with interfaces (see Data structures below);
  • Allow variable references using the syntax $&var. This can fill the gap between current value/reference access semantics, e.g. lindex vs lappend, and solve many mutability vs. immutability problems;
  • Add a new quoting rule using parentheses, and drop the list command as we know it. For example, (a b $c) should be equivalent to [list a b $c]. The semantics of quotes and braces is preserved (minus changes needed for e.g. comments). Incidentally, this is the same syntax as LISP.
  • Extend the metasyntax pioneered by the argument expansion operator. This is the most controversial syntax change, but is unfortunately needed by the nature of some changes, like references or LISP-like delayed evaluation.
  • Define a syntax for specifying references. This can be used for example to serialize circular references, or keep references to variables that go out of scope; for example, {ref}(a {ref}{}) specifies a list whose second element points to its parent.

For more detailed information, see Cloverfield - Tridekalogue

Data structures

Use ropes as the internal string representation. Ropes will use B-trees of immutable strings. This will give fast concatenation, slicing, insertion, and should dramatically reduce the memory usage and data copying.

Use interfaces (à la Feather) instead of Tcl_Obj. This should eliminate most cases of shimmering.

Runtime

Implement the runtime on existing virtual machines. Primary target is LLVM. Secondary target could be Java, .NET, Parrot. LLVM is the most interesting solution since it gives access to JIT compiling, platform independence, native performances, and allow total control over the internal model (contrary to JVM). Moreover, other languages such as C or C++ are already supported, which means that we could get cross-platform Critcl-like features for free.

To achieve the goal of VM independence, internal data structures should be sufficiently high level.

Provide a VM-less, purely interpreted reference platform for embedded and small footprint solutions.


Related information

See also Tcl 9.0 WishList and all things Tcl9 related.

Just found Tcl/2 as well. Perhaps the first task of the Cloverfield project should be to gather all information related to language improvement? Cloverfield could be an umbrella for all these micro-projects/features/suggestions. I have the feeling that many people share similar views on all these problems, but that there is an overall lack of communication and organization. Cloverfield could be the sparkle that ignites the engine...

And yet another couple of discussion pages: Unified Programming Language, and If I were to complain. The more I dig into the wiki, the more I realize that these are very long standing issues, that everybody wants change, that most people agree that some things must be started over, but nobody makes the first move. Tcl needs a vision.

Another one: Tackle! This one dates back from 2004. I think I've opened a kind of Pandora box. For the better I hope.


Discution

DKF: Experience with strings-implemented-as-trees in the past makes me point out that you'd better make sure that you take care to keep the trees balanced. Otherwise you'll have terrible performance. And using C arrays of characters seems to actually work quite well in practice...

FB: Moved discussion to Cloverfield - Data structures

George Peter Staplin: Hi FB! I think you have some good ideas. I've read some of your code for TkGS. I'm hoping that you can get developers behind this project, and it doesn't become moribund. I am interested. Cloverfield is a good name, and I think it gets away from many old misconceptions about Tcl.

FB: Thank you! Yes, I hope Cloverfield will get more attention. TkGS scope was a bit too narrow to really get developers on the project. But I've learned a lot working on it, even if the project never completed due to lack of free time (building a family needs a lot of commitment). Anyway I think it is a bit obsolete now, since most of the work involved the creation a new graphic layer, and I feel that Cairo would do the job perfectly. I even had the project to port Tk to Cairo a few months ago, but given the success of Tile I came to the conclusion that Tk no longer needed significant improvements (at least for now), whereas Tcl was losing ground, so I moved on to what became Cloverfield.

About the name: I chose Cloverfield only a couple of days ago after realizing that the date for the announcement was 18-1-08. But prior to that I made a list of possible names, see: Cloverfield - Alternate names


Misc

Previous speculations over the Cloverfield project were:

Monster

Manhatten

Digital video cameras

What does this have to do with Tcl?

All cool monsters program in Tcl.

Do you suppose that there are monsters in Philidelphia as well [L1 ]?