On Mon, Dec 22, 2008 at 1:22 PM, Ian Clarke <
ian.c...@gmail.com> wrote:
>
> Great! Note that the Swarm proposal doesn't just need continuations,
> they must be portable continuations (ie. you must be able to serialize
> them and send them to a remote computer where they can be
> de-serialized and continue executing).
So my current idea will be to allow the current executor/VM object to
not only be stored on the stack, it can also be packed up and sent
across the network as data.
> Portable continuations seem to be quite rare, Haskell doesn't have
> them for example. Rhino (the Java JavaScript interpreter) does have
> them, but only in interpreted mode.
>
> If Cat supported Portable Continuations then I see no reason why it
> couldn't form the basis for my Swarm proposal.
>
> Actually, I've gone ahead and set up a Google Code project, also I've
> renamed it from "Swarm" (which was a rather overloaded name), to
> "Vega" (which is less overloaded, and sounds good IMHO).
I like the name.
> You can find some very preliminary architectural brainstorming here:
>
http://code.google.com/p/vega/wiki/VegaArchitecture
>
> It would be really great if we could use Cat for the Virtual Machine
> and some of the Platform, that way we can bootstrap from Cat's growing
> ecosystem, without having to invent yet another language.
I'll keep the list informed as to progress on the next-gen Cat (that
is CVML) executor is ready to be played with.
> A few vaguely related points/questions:
>
> Have you considered how the compiler could provide support to IDEs -
> for example when it comes to auto-completion?
>
> I'm not sure how this
> is commonly handled (for example with Java's Eclipse IDE), but one
> option would be for the IDE to come up with an ordered list of guesses
> (perhaps determined statistically based on near-by keywords and other
> things), and then feed them to the compiler which will filter the list
> based on what is plausible given the types of the suggestions and
> near-by keywords.
Eclipse already has Cat syntax coloring at least thanks to Adrian Savage:
http://code.google.com/p/cat-plugin/
Perhaps this tool can be extended.
> For Vega I'd love to see an in-browser IDE with functionality like
> auto-completion. IMHO the ability to allow IDEs to do this kind of
> thing is one of the major benefits of strongly typed languages.
Auto-completion is also possible for dynamic languages in many contexts.
> A separate question: what thought have you given to namespaces, for
> example some kind of module system analogous to Java's packages or
> Haskell's Module system?
I consider a module system critical.
> If I could make a suggestion: It would be wonderful if something like
> the following could be supported (please ignore the syntax!):
>
> import HTTP.* from
http://modules.cat-language.com/net
> signed by urn:sha1:79437f5edda13f9c0669b978dd7a9066dd2059f1
> version 1.4.x
I like that. I was wondering though how important is signing of
modules? Java doesn't use it and seems to get by fine.
I should point out that my current plan has been to extend the Heron
front end to CVML, and to finish the C++ implementation of the CVML
optimizer and VM.
For me Cat was little more than a proof of concept that functional
stack-based code could be strongly typed. I am not sure that
programmers will ever use stack-based languages in a significant way.
Personally I prefer to write code in an infix syntax and let my tools
generate stack-based back end code.
My thought is that perhaps Vega would be more of a language agnostic
project. It would be based on a common bytecode and VM model, that
could be shared by different languages. CVML is designed to be
applicable to far more languages than Java bytecode. Even though we
have seen many languages targeting Java bytecode (e.g. Scala, Groovy,
etc.) they are not very efficient because Java bytecode has terrible
support for functional languages.
How does this fit in with your vision.
> In this case, it would import a module called HTTP from the /net
> directory on the Cat website, verifying the code with an SHA1
> signature, and specifying that it must be version 1.4.x of the module.
>
> Clearly, anything downloaded from here would be cached locally so it
> would only need to be downloaded the first time it is used. The user
> could specify how long modules are cached locally.
I like it.
> So what we are doing here is baking the type of functionality provided
> by systems like Java's Maven into Cat itself (the concept of Maven is
> nice, but not its nightmarishly over-engineered XML-everywhere
> design!).
>
> And of course, a future Cat IDE could provide lots of support to the
> developer for this module system.
>
> Anyway, perhaps such a thing is way-overkill for what you had in mind.
Well time is limited. I have a day job that doesn't permit to spend
the time I would like on these things. Until Feb 6 my focus is going
to be finishing up my paper on space efficient byte-code for LCTES
2009. I am also going to try and finish the CVML VM as fast as I can.