freenode/#lisp - IRC Chatlog
Search
22:47:13
Shinmera
Since Linus is nice and userspace rarely ever breaks, you can build binaries in one place and not have to worry about anything provided you don't use C libraries.
22:50:14
Shinmera
Depending on a variety of factors like complete dependency tree, ABI compatibility, version constraints in the tree, etc. you can get away with shipping none to some of the shared libraries with your binary.
22:50:48
Shinmera
If you're unlucky you need to either constrain yourself to releasing packages for each distribution, or grabbing deep into the bag of tricks and do stuff like I do with Portacle.
22:52:25
pjb
jmercouris: there's a portability library that lets you generate executable images on several implementations.
22:59:53
pjb
jmercouris: if you want to distribute on different platform, the best is to distribute the source, and compile for the platform at installation time.
23:00:02
jmercouris
I started with ECL though, so the other Lisp impementations seem weird to me now :P
23:00:42
pjb
jmercouris: you may try to distribute fasl files, but this is more risky. Some implementation guarantee that their fas files will work on all the platforms (eg. clisp), but not all do.
23:01:01
jmercouris
Hmm ok, let me at least get my stuff working on Linux, then I'll worry about deployment
23:01:16
pjb
jmercouris: yes, both. You write a deb and use an intallation script that will compile automatically the sources to produce the binary.
23:01:17
jmercouris
I can always just make it "compile it yourself on linux" type thing for a while, I expect that would be okay for most linux users
23:02:45
pjb
Notice that asdf provide a function to gather all the sources of your system and its dependencies in a single source file, to ease this kind of distribytion.
23:03:30
jmercouris
I can't remember what that's called though, but okay yeah, there is a facility for it, and if your implementation allows, you could do a single fasl file
7:18:58
drmeister
Clasp writes out code and data for each top level form and then plays them back at load time. I’m looking for something better that doesn’t require support from the gc
7:21:12
drmeister
I think of it like a painting. Clasp saves every brush stroke even the ones that are covered up by later stokes. Then it replays them when it loads.
7:21:45
Zhivago
Particularly where that machine has read from a file or opened a socket or whatever.
7:22:09
drmeister
I can’t save the image of a running machine because I don’t have the support of the gc.
7:22:18
Zhivago
Are you limiting it to the case of a machine which has just loaded stuff before running stuff?
7:23:26
drmeister
I’m not sure what the trade offs are. I would imagine starting up a single thread and opening files at startup.
7:28:04
drmeister
I’ve been thinking that I have a symbol table and a bunch of code and classes, load time values etc. if I inventory them and write code to save and restore them - would that do the job
7:28:49
Zhivago
Sounds reasonable. If you evaluate the symbols in those forms before saving you may avoid circularity issues.
7:31:20
Zhivago
We would expect true (EQL *a* *b*), but if *b* were restored by generating code which produced a value equivalent to that of *a*, then (EQL *a* *b*) would become false.
7:33:08
Zhivago
And then could add (setf *a* *b*) after that to show that if you fix that problem you re-introduce the order of effects issue.
7:33:53
Zhivago
But you could be a little more clever and have the sharing of sub-structure preserved by the regeneration code.
7:34:44
drmeister
What about having the gc compact all live objects, write them out, and then reload and relocate them.
7:35:42
drmeister
I’d like to do that but I have to get hold of the raven brook folks to get some library support
7:37:22
Zhivago
The only case I can think of would be where you have running threads or values hidden in closures.
7:38:09
Zhivago
I'd think of the requirement that there be no running threads at the point of save-image.
7:39:36
drmeister
Clasp has special issues. It represents objects using 450 c++ classes. They have all sorts of data hidden in them.
7:42:15
Zhivago
There's no portable way to find that 3 given *a*, but since you're part of the implementation you don't need a portable way to do it.
7:42:52
Zhivago
I'm gradually coming to the conclusion that closures of indefinite extent are a bad idea.