Re: COMPILE-FILE without a file...



Alessio Stalla <alessiostalla@xxxxxxxxx> writes:

Suppose I have code in text form, coming from an arbitrary stream
(e.g. the network, or a compressed archive, or...): is (1)

(compile nil `(lambda () ,@(read stream)))

equivalent to (2)

(progn
(dump-to-file stream "file.lisp")
(compile-file "file.lisp"))

No, it's not. The first form executes the /run time compiler/, the
second one the /file compiler/. They differ in how they deal with
EVAL-WHEN, and how they coalesce constants.


? Probably not... (rhetorical question) but, exactly what kind of
disaster can I expect if I use (2) instead of (1)? I'd like to avoid
dealing with temporary files if I can...

Some implementations offer a COMPILE-FROM-STREAM. Look at how
SWANK-COMPILE-STRING is implemented in the different SWANK
backends. (The swank-foo.lisp files in the source checkout of Slime.)

-T.
.



Relevant Pages

  • Re: COMPILE-FILE without a file...
    ... (e.g. the network, or a compressed archive, or...): ... The first form executes the /run time compiler/, ... dealing with temporary files if I can... ...
    (comp.lang.lisp)
  • Re: PowerPoint not linking properly to files
    ... Monitoring the file accesses does show temporary files being created (also ... delete the network file and copy over the updated file. ... isn't there when the batch file tries to run it, it just moves on to the next ... removing the blank black slide at the end of the presentations is ...
    (microsoft.public.powerpoint)
  • Re: Roaming Office Errors for Network Users
    ... issue is with the Temporary Files", not with the document file itself. ... Word, the problem is usually a Disk Full error, with Excel it is usually ... Our users are network accounts on Xserves running 10.4.9 and clients are ... McGhie Information Engineering Pty Ltd ...
    (microsoft.public.mac.office)
  • Re: PACK question
    ... >may be where the temporary files are created. ... If networked computers have sizable hard drives with plenty of free ... placing Visual FoxPro temporary work files on local drives. ... the amount of network traffic. ...
    (microsoft.public.fox.programmer.exchange)