Hi Light Tablers,
I'm the author of a browser-based rich Clojure nREPL client called
Gorilla REPL. It's just like a normal REPL, but has flexible rendering of output values - so you can plot things like graphs, tables etc - and it lets you save REPL sessions as "worksheets" which combine code, markdown notes, and rendered output. People often compare it to iPython notebook. Probably the most common feature request I get is integration with Light Table, so I thought I'd post up here to canvas opinion, and get some technical pointers :-)
Personally, I think it would be great to integrate with Light Table, as while the core of Gorilla works nicely, it's rough around the edges - in areas like file handling, usability (keymaps aren't configurable, commands aren't so easy to discover ...), managing nREPL connections. These are all things that Light Table has got sorted out really nicely. The question is how best to integrate it.
Perhaps the most direct option would be to try and drop the Gorilla "editor" directly into Light Table. Currently, Gorilla's editor is written in JS, using knockout.js to connect its data to the UI, and uses multiple CodeMirror instances per worksheet to handle text editing. I could imagine packaging the core into a JS library that could have API to hook in to a Light Table plugin. The big questions here would be: can knockout.js work inside Light Table? would Gorilla's approach of expecting to handle key/mouse events directly be compatible? how does Light Table handle document data - could the Gorilla editor just have API to get a plain-text serialised model on save, or is it more complicated than that?
If dropping the full Gorilla app in as an editor isn't possible, then there are a number of possibilities that I can see, but perhaps it's best to stay focussed on that idea first.
I'd love to hear thoughts on this, and any suggestions on how to implement it would be very welcome. Also, any pointers to understanding the structure of LT's code would be great - I think I understand the basics of BOT, but I'm finding it difficult to put together all of the pieces to see how the whole works. Is there any documentation on the overall structure, more specific than the generalities of BOT?
Thanks,
Jony