I wanted to share a new tutorial resource that combines two excellent 
projects: Relevance's labrepl with tryclojure's web-based REPL. Here is a 
first, very rough cut of try-labrepl:

http://bit.ly/O1Q8B8

Just run "lein cljsbuild once" and then "lein run" to get the app running 
locally on port 8080.

New features:
 * A new "Toggle REPL" link is available on each lab page, which opens up a 
Clojure REPL on the right-hand side of the page
 * All code examples in the labs can be clicked, which inserts the code 
directly into the Clojure REPL and auto-focuses it
 * All the custom client-side code is written in ClojureScript (large 
portions of which are just labrepl's and tryclojure's JavaScript ported to 
ClojureScript)
 * The labrepl backend has been rewritten to use Noir instead of Compojure

A couple of things that aren't perfect:
 * The jquery-console library is supposed to keep the REPL scrolled to the 
bottom as content flows down, but this isn't currently working (after 
trying a few different things, I've added a "Reset REPL" link as a sad, 
temporary workaround)
 * Some multi-line code samples, when clicked, have space issues that cause 
a compiler error in the REPL session
 * I've only made a few cursory edits to the content of the labs in light 
of the new Noir backend (specifically the mini-browser lab)
 * This has only been tested in the latest Chrome and Firefox on a Mac

This began with a friendly fork of labrepl, but enough of the underlying 
code was changed that I felt a fresh project would be more conducive to 
developing the proof of concept. I'm happy to port any of these features as 
legitimate pull requests against the labrepl project, if that would be 
desirable.

Feedback, additions and fixes welcome.

-Daniel Gregoire

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to