Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Connecting SLIME to a remote Clojure Repl (asymmetrical-view.com)
46 points by kyleburton on Aug 21, 2009 | hide | past | favorite | 11 comments


I use this approach myself to remotely modify my clojure app bytecode at runtime. So if, for instance, I need to add a new function at runtime to my personal clojure blog app, all I do is connect to my remote REPL, write the function and refresh my browser. Thats extremely powerful I'd say.

Technically what this does in the case of my blog is modify the proxied Java Servlet bytecode at runtime.


Do you use source control? I think this stuff is very cool but I have misgivings about my production code not being in a VCS.


Yes, I do use a VCS. This is not something I'd recommend performing in prod on mission critical type system for obvious reasons. I quite often use the approach to apply patches, which at runtime modifies the bytecode in my remote running JVM. (So I apply a patch to my blog without needing to restart the proxied servlet, just hit refresh in browser. Something old Java guys like myself are not used to :-))


Yes, currently using git for all my projects at the moment.


Wow, that sounds insane. I'm really going to have to spend more time diving into clojure. Or is this a normal feature of most lisp variants?


Yes, in fact most common lisps support quite a bit more run-time features than Clojure does - like saving and restarting the image, conditions, etc. I found the uncommon-web screen casts to be very inspirational.


uncommon web was fantastic -- I haven't looked at it for a while, but the mailing list (which I'm subscribed to but no longer read) isn't too active. There do seem to be a few people still using and developing it though.

An approach like that for clojure would be a great thing IMO; that is, something different from the normal web framework approach, while exploiting the strengths of the clojure language and JVM ecosystem.


Same here with the casts, but actually making it work turned out to be quite a challenge. Weblocks looked a lot better, but it was still in development at the time. Since then I switched to clojure completely.


is this a normal feature of most lisp variants?

Yes.


And indeed, most programming languages.


I am serious about this. I get this exact functionality with Perl, and I'm sure it's possible in Python and Ruby just as easily. Depending on where you want to draw the line, you can do this in Haskell (see xmonad and yi, for example), and even in C.

I like Lisp, but this is not particularly amazing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: