Very cool! Hooking up the internal gambit REPL was finicky because it never got much love. I think Marc polished it up somewhere though. Still, a quick in-game REPL like that goes a long way.
The cool thing about having a real Gambit REPL was that you could use the Gambit debugger in real-time. So if an error ever occurred, the debugger REPL would pop up and you could step around. You also get all the builtin stuff for inspecting cooperative threads and such.
Anyway, it would be a great minimalistic environment if it was fleshed out more. Part of my mission in the JavaScript world is to bring these concepts to more people, and hopefully lead them to Clojure/Scheme/etc.
Did you use a module system? Last I remember Black Hole was getting really advanced. Did that ever take off within Gambit?
Yea, I don't have the debugger hooked up for catching exceptions. It's just a simple repl. That shouldn't be too tough to add in game though. It could just pull down the console upon error.
I couldn't get Black Hole to install and gave up. I remember the docs being pretty bad, even for Gambit. I use the builtin namespacing system, which works pretty well. Hopefully R7RS will make the whole scheme world a bit more user friendly.
I would love to hear more about what you're working on to bring these concepts to the Javascript world, since we at famo.us are interested in the same.
You can see a few things on my blog: http://jlongster.com/. Recently I've been helping out with the sweet.js project (http://sweetjs.org/) to implement macros in JS. People really need to understand how macros transform a language. It's going really well so far.
I'm also working on the idea of live evaluation. Most devs are used to writing code and refreshing the page. There are tools that help with live evaluation, but they all suck. I am working on something that will give you a better connection with your code, and fully support the idea of incrementally coding up an app.
I'm not focusing on specific Lisp/Scheme features, but more about the philosophy behind them. Any project I do I try to expose the good stuff that I learned from Scheme.
Interesting. How much of the JS infrastructure do you need for this stuff to work?
I'm in the middle of creating a JS port for embedded systems (yes, I know about Espruino. It made some fundamental decisions about object implementation that I find unacceptable) and it would be nice to be able to lean into something like this to avoid implementing huge chunks of the more advanced language bits.
Side note: I'm the person who did the first Nintendo DS port of Gambit so its interesting to see how all this comes full circle.
I remember hearing about the Nintendo DS work. Great stuff!
What I'm working on relies on a full JS implementation. Performance is a critical feature so I need to implement as little as possible. I basically implemented a very small VM that controls JS code using exceptions. What I've done lets you run JS code with a 3-4x perf hit, but you get full stepping and debugging abilities in user-land. I'm going to release it in a few weeks!
It sounds like it's not quite what you're looking for though. You're project sounds cool!
Outlet and Outlet-Machine look like what you're describing but the docs on those say they are deprecated/frozen and the last commits are 1-2 years ago.
No, not yet. I was exploring this indeed with outlet but discovered that wasn't the right way to do it. My technique came together very recently and I plan on releasing it soon.
Interesting. I may have to look at your exception usage and see if I can emulate the same thing faster with some hooks directly into my VM. No point in running a VM on a VM if I can just implement the hooks directly.
Your code probably isn't what I'm looking for right now. But single stepping and debugging in user-land is exactly what embedded systems need.
The cool thing about having a real Gambit REPL was that you could use the Gambit debugger in real-time. So if an error ever occurred, the debugger REPL would pop up and you could step around. You also get all the builtin stuff for inspecting cooperative threads and such.
Anyway, it would be a great minimalistic environment if it was fleshed out more. Part of my mission in the JavaScript world is to bring these concepts to more people, and hopefully lead them to Clojure/Scheme/etc.
Did you use a module system? Last I remember Black Hole was getting really advanced. Did that ever take off within Gambit?