[racket-dev] using Racket to build an image-based Lisp: feasible?

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Mar 6 20:09:38 EST 2013

Four hours ago, mikel evins wrote:
> 
> On Mar 6, 2013, at 11:42 AM, Eli Barzilay <eli at barzilay.org> wrote:
> > 
> > Aha -- in that case, it seems that your image-based workflow is
> > not much different from working with just the sources *and* the
> > (byte-) compiled files that go with them, right?
> 
> Imagine meeting someone who had never used a REPL, and trying to
> explain what its point is. At some point he might say to you, "so a
> REPL really isn't much different from just batch-compiling some
> sources, is it? After all, in both cases it's just one line of code
> after another getting executed, right?"
> 
> [...]
> 
> The same is true of image-based development. It's "not much
> different" from just using source files in the same way that using a
> REPL is "not much different" from just batch-compiling everything.

Um, no, I don't think that this is similar.  (And like I said before,
I think that if you compare the two features, an interactive REPL is
far more useful than images.)  The only point that maybe you're trying
to make is that I should use images to see what they're useful (and
that would be a weak point since I have).

Let's take an imaginary world where batch compilation is always very
fast -- say that I push a key and the whole source code gets compiled
in 50msecs.  In this world, an interactive REPL is still not close to
compilation + experimentation (for reasons that should be very clear
to people on this list).

Now, what would be the difference in this world in terms of
compilation vs image dumping?  One minor difference that I've
mentioned is the convenience of a single file.  The big difference
would be that various things that I played with on the REPL but not in
source are included in the image -- and as you've agreed before, such
"binary only" objects are not very useful.

And just to make things balanced -- dumping an image is not always an
immediate process.  At least in the lisps that I used, you'd usually
want to do some form of tree shaking on the dump.  (And IIRC, at least
in some environments the tree shaker was a part of the dumping process
by default which you'd turn off explicitly if you don't want it.)


> I'm not sure why you put scare-quotes on "compilation". [...]

You misunderstood me.  I used quotes because I didn't mean the actual
compilation that you're referring to -- I just equated the
`dump-image' functionality with a compilation.  IOW, I'm saying that
in both developement styles you need to do something to get the
distributables, so dumping an image is a kind of a compilation in that
sense.


> That's possible, but I doubt it. I worked with teams of up to
> several dozen people working with image-based systems, and to my
> knowledge, none of them ever worked that way.

(Actually, I misremembered -- I *did* work in a group that used
images, but the images were done very infrequently, and for pretty
much all of the day-to-day work we'd use sources.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.