From: Helmut Eller on
* Hugh Aguilar [2010-03-13 01:32+0100] writes:

> I have read that Lisp has a COMPILE function that will compile a list
> at run-time. Do your commercial Lisp systems clobber the COMPILE
> function when they are making an executable, similar to what
> SwiftForth does?

It depends on the license you buy. I think Lispworks removes
COMPILE-FILE but leaves COMPILE there.

> On a related note, do Lisp and/or Scheme have quotations similar to
> Factor? Can you pass a chunk of compiled code to another function, and
> have that code access local variables in the originating function when
> it is executed by the other function? Can quotations be constructed at
> run-time, or do they have to be literally defined at compile-time? I
> don't really know anything about Lisp at this time, so if these are
> dumb questions and your answer is RTFM, I will understand. :-)

Factor's quotations are similar to (anonymous) functions in Lisp/Scheme.
The part with local variables also works pretty much the same. E.g.

{ 1 2 3 } [| x | x 1 + ] map

would be written as

(mapcar (lambda (x) (+ x 1)) '(1 2 3))

Helmut
From: Eli Barzilay on
Hugh Aguilar <hughaguilar96(a)yahoo.com> writes:

> On Mar 11, 7:57 pm, Eli Barzilay <e...(a)barzilay.org> wrote:
>> PLT has one too, though I don't remember who did it. (Binding to some
>> jitting library is usually easy though -- at some point we had an LLVM
>> interface which would just generate LLVM code in text then pass it to
>> LLVM's jitter. In addition, PLT has certain features that makes it
>> easy to invoke some compiler from a macro, making the code generated
>> when the Scheme code compiles.)
>
> Please pardon my ignorance, but I don't know what "jitting" means. Is
> that Lisp parlance?
>
>> MrEd -- the GUI extension of MzScheme provides you with the usual
>> drawing primitives that you'd find in any such library. You can then
>> direct drawing to a window, a bitmap to be saved in an image file, or
>> to a postscript handle for printouts. On X, the drawing is handled by
>> Cairo (or if it isn't available, by plain X), so you don't need
>> specific Cairo bindings.
>
> I'm leaning toward learning PLT Scheme and using it for my slide-rule
> program. Afterward I will graduate to CCL or some other CL system. I
> will be able to make a more informed decision by then, hopefully.

(I'd s/graduate/downgrade/ here.)


>> (Postscript or PDF is probably much better than latex if you care
>> details like exact placement of text.)
>
> I don't know much about Postscript (or anything about PDF), but I do
> have some of the colored-series Postscript books in storage, so
> maybe I should dig them out and study them. You are probably right
> that Postscript would be a better choice. LaTeX is designed for
> writing books, not doing exacting work such as the face of a
> slide-rule.

Yes -- I've had some attempts of doing this in the past, and my
conclusion was that the amount of pain involved in getting latex to do
things at that level makes Word seem like an appealing option.

--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!
From: Nicolas Neuss on
Eli Barzilay <eli(a)barzilay.org> writes:

>> I'm leaning toward learning PLT Scheme and using it for my slide-rule
>> program. Afterward I will graduate to CCL or some other CL system. I
>> will be able to make a more informed decision by then, hopefully.
>
> (I'd s/graduate/downgrade/ here.)

Let agree on something like "change environments":-)

Nicolas


From: Vassil Nikolov on

On Fri, 12 Mar 2010 07:03:58 -0600, rpw3(a)rpw3.org (Rob Warnock) said:

> Vassil Nikolov <vnikolov(a)pobox.com> wrote:
> +---------------
> | ...
> | In any kind of practical situation, yes, certainly, both of the
> | above, but that means accessing software and breaks the constraint
> | imposed on the thought experiment.
> +---------------

> To that, my only reply would be that the stated thought experiment is
> unrealistic/unhelpful for people planning on really developing hardware.
> We *do* have existing (cross-)software at this point; there's no point
> in spending time speculating otherwise.[1]
> ...
> [1] Unless you're talking about pure "hobby" speculation, something
> like medieval role-playing where you don't permit sanitary toilets,
> running water, or refrigeration of food. But dysentery has never
> been one of my favorite games. :-{ YMMV.

True, but it was never intended to be realistic (or helpful for the
above task). ("Imagine yourself alone on an island with just your
favorite piece of hardware but no software or connection to the rest
of the world" is quite unrealistic, though comparing that to
suffering from a disease is a tad too far.) I should not have
called it a "thought experiment", though.

---Vassil.


--
No flies need shaving.
From: Hugh Aguilar on
On Mar 13, 4:16 am, Nicolas Neuss <lastn...(a)kit.edu> wrote:
> Eli Barzilay <e...(a)barzilay.org> writes:
> >> I'm leaning toward learning PLT Scheme and using it for my slide-rule
> >> program. Afterward I will graduate to CCL or some other CL system. I
> >> will be able to make a more informed decision by then, hopefully.
>
> > (I'd s/graduate/downgrade/ here.)
>
> Let agree on something like "change environments":-)
>
> Nicolas

I didn't mean to be disparaging to PLT Scheme in my use of the word
"graduate." I am leaning toward starting with PLT Scheme for my slide-
rule. Who knows, maybe I will like PLT Scheme so much that I won't
want to learn Common Lisp at all. Generally speaking, most programmers
prefer whatever language they learned first, so that will likely
happen to me too. That is largely why I started this thread --- to get
advice on which language to start out on.