Hacker News new | comments | show | ask | jobs | submit login

I like the idea of a REPL into my web app (may add one actually - different language, but that's not the issue).

But can a production-lisper tell me what is best practice regarding versioning and saving to files?

I'm assuming that modifications via the REPL are affecting the running image only. Can the running image save back out as source? (I'm assuming not, surely comments etc aren't preserved?)

Is it down to the admin to replay all changes they make to the REPL to the app source?




When I ran CL server (it was in-house service, but heavily accessed 24/7 and I couldn't stop it to update frequently), I used a few ways, depending on how imminent the problem was.

The normal routine was to change the source, test it, then from server REPL I just reload it. If the problem was more serious that I had to fix it ASAP, I sent the definitions directly from the editing source to the REPL (in Emacs it's just a couple of keystrokes).

It was only when the situation was extremely serious (e.g some bug stopped large part of the production pipeline) that I typed expressions directly into REPL and afterwards I put the fix into the source. It was pretty rare, though.


Our process is to test code first locally, push it with Git to the server (on the cloud) then type: (sf-load) on the server REPL - done (less than a minute). The (sf-load) function loads the asdf file which recompiles any code necessary with the changes, such as dependent macros, etc, automatically. The server continues to run through the process - unnoticed by the user except for the sudden new features :) . http://www.cliki.net/asdf


Thanks to you and shiro for the replies. It sounds as though the REPL is more useful for inspection than modification - which makes sense. Graceful addition of new functionality is useful, but provided by other frameworks.

/goes off to think about how best to provide an inspection-based REPL to his web app




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: