On Thu, Jan 20, 2011 at 4:45 PM, Ala'a Mohammad amalawi@gmail.com wrote:
I'm continually learning Common-lisp and trying to find the best style that suites me better. I've tried 'an imager' style (cooking a an image with all required libraries loaded when required), and 'a filer' style (loading files or systems each time I fire-up a CL implementation). I'm interested to hear what others use CL. How do they manage day to day work? how do their preferred style mesh into their production pipeline (coding, debugging, deployment and maintenance)? and what makes them prefer one way over another or the mix if applicable?
Some reasons why one would use images rather than loading up from files:
- Saving on startup times
Nowadays, using images to reduce startup time of the Lisp is often not worth the trouble. Computers are fast, file systems are fast and most importantly, restarts are relatively rare with most Lisp systems that I know. There certainly are cases where every second in terms of saved startup time is important, and in these cases, writing an image is a good way to go.
- Reducing the number of files needed to distribute an application, or distribute binary applications
Some Lisps can dump images that are self contained. Most of them require some auxiliary files. If you want to distribute your system without providing source code, a dumped image is the easiest way to achive that.
- Save transient state across Lisp invocations
As an image includes the full heap state, one can use saved images to snapshot transient state. That way, one can get around all serialization issues that database systems try to solve. The approach is limited in that the commit units are generally rather large.
Personally, I used saved images rarely. I deploy my systems with source code, so I need to deploy a lot of files anyway, and I use a database system, so I don't need images as a persistence mechanism. Startup times don't matter much to me, as I'm usually working with long-running Lisp instances.
-Hans