« I chose Scheme over Common Lisp Ouija: A Scheme Interpreter in Flash »

Next Steps…?

So I’ve reached a fork in the road with my current project and am trying to figure out which path to take. I’m hoping that writing this will help me reach a conclusion.

For the past several months I’ve been building a Scheme interpreter (originally a Lisp one, but the I converted) in Flash. The differences between my this one and the previous ones are as follow.

  • Scheme instead of Lisp, this allowed me to focus on a smaller subset of commands to implement, not just my favorite ones at the time.
  • Ability to interact with the full underlying Flash Player, which allows me to mess with graphics and all those other things that you’d actually expect from an interpreter built on Flash.
  • Nifty things like continuations and optimized tail-calls, allows me to implement things in this interpreter quicker and with significantly less code that if I were implementing it in ActionScript.

So anyway, I’ve gotten to the point where I’m quite happy with what I have and I’m trying to figure out what to do next. So my options are.

  • Release it to the world as is. Probably with source code too. See who’s interested and what ideas they may have with how to make it better. The other possibility is to release it in some sort of interactive tutorial form which would let people with little or no Scheme/Lisp experience (or maybe no Flash experience) to play with it and see the power and possibilities.
  • Abstract all the ActionScript code (it is all AS2 right now since that gave me the greatest flexibility) to a level where I’m defining the interpreter in a smaller subset of Scheme and ActionScript bytecode. This would hopefully allow me to then to create a compilers specific to different VM’s such as AS3 or SilverLight or something.

    I haven’t fully thought this one out yet, but it’s currently the most attractive of the paths because it seems the most interesting and most challenging. This would then probably wind up leading into the option above.

  • The last of the options is to use the interpreter in a CMS/Web-Framework that I created a proof-of-concept for a few years back. The basic idea was if you had the same language available on the client-side as you did on the server-side, and if that language was good enough to allow you to abstract over the atrociousness of HTML and CSS, then you would be able to create higher-level web-app designs that could be altered in real-time without ever talking to the server.

    This seems like a really cool idea to me, especially if it was combined with a continuations, but in the end it would just be another web framework, and I don’t even really do any website building. I think this is only interesting to me because it allows you to show programmers and non-programmers some of the magic that Lisp lets you do (this is something that really excited me about my POC, because people that knew enough about the web would say things like “You can’t do that!!”)

Yeah, so this didn’t help me too much. They all seem to have their merits. I know this isn’t the flame-bait that my last post was, but any input would be greatly appreciated.

Comments

  1. Jon T | December 28th, 2007 | 11:47 am

    As a compiler/interpreter writer, I’d love to see the first option. I’m not an expert with ActionScript, but I’d like to see how you implemented things like closures in it.

    If it’s written completely in AS2, I don’t completely understand what you mean by your 2nd option. The only potential benefit I see in re-writing it for other VM’s is if you write some kind of abstraction layer for platform graphics internals so your Scheme code can run on any platform.

    As for your 3rd option, I’d also love to see this, as it’s one of those things that we know is theoretically possible but doesn’t exist for lame historical reasons. But if you have no use for it yourself, you’d probably end up doing a better job and having more fun with one of the other options.

Post a comment