Re: Minimal keywords needed for constructing a full CL system



Don Geddis wrote:
"Rob Thorpe" <robert.thorpe@xxxxxxxxxxxx> wrote on 5 Jul 2006 10:23:
It is not really the minimum set since it does no I/O, as I mentioned
earlier. So unless your prepared to speculate about implementing the whole
universe using lambda

Why not implement the "whole universe" using lambda?

I don't think it's really in the spirit of computer science. When
discussing abstractions like minimal sets etc its useful to try to pick
meaningful ways of talking about them, rather than trying to pick ways
that deliberately reveal weaknesses in the question.

Of course it would be silly in practice, but so is the original question.
If you don't want "just LAMBDA" to be the answer, then you have to ask a
more precise question.

Well if you mention something like Common Lisp which has I/O then
really you don't want that answer.

I think what the OP is looking for is the smallest set that meets some very
limited criteria of practicality. That was the sense I answered the
question in anyway.

Yes, of course, but what we're doing here is a kind of Socratic method of
uncovering the answer. We're demonstrating that the original question isn't
a very good one

And not much of this has helped. The problem with Socratic examination
is that it irritates as much as it informs.

Almost every question asked is not a good one. People assume that
those they are asking can fill in the gaps. If we didn't ask questions
like this then it would be very difficult to communicate, we would have
to define everything precisely in discussion. It would be like
programming.

and suggesting that maybe even the OP's original motivations
are misplaced.

People did this on the basis of not really any evidence. The problem
was that the OP seemed to be talking about minimalism which is a
subject people are rather hostile to on c.l.l.

The truth, as many people have already said, is that there is no single unique
canonical "minimal" set of lisp "primitives".

There is the whole spec. It would be possible to implement each function
there directly in some other language (assembly, Fortran, etc.). It's also
possible to implement some small subset of them in another language (perhaps
C), and then the rest in Lisp itself. Pretty much all CL implementations do
this latter thing.

But it is somewhat arbitrary which operations you choose to put in the subset,
and which you choose to implement in Lisp. It is arbitrary for two reasons:

1. There are different possible "minimal" sets, rather than a single
canonical one. Much like you can implement any logical operation either
just using NAND gates, or else just using AND/OR/NOT gates. Either choice
is a fine basis for building up all logical operations.

Yes. I think that's clear.

2. Unlike this theoretical exercise, in practice you need to worry about
efficiency. So an implementation might "primitively" implement many different
functions, even if it is theoretically possible for some of them to be
defined in terms of others.

Certainly. Or even define things that look "primitive" functions in
terms of more complex things that actually are.

Conclusion? The theoretical question "what is the minimal subset of Lisp" is
either silly or malformed or useless. "Just LAMBDA" is one possible answer,
likely of only minor interest. It's actually hard to ask a precise question
that gives the kind of answer the OP thought he was looking for.

Functions clearly fall into two categories though, setf could be useful
in a minimal set, stable-sort could not be that useful.

But what he thinks he's looking for isn't as interesting as he believes it is.

I think it's of some interest. I mentioned some reasons it might be
interesting previously.
I thought of another one since. Lets say you want to implement CL on a
very small platform. So to do this you use slightly different
workflow, more like a C compiler. That is rather than dumping an image
you compile an executable, in that executable you need:
* All the user code put in
* All the code the user code calls
* All the code that code calls.

Solving this problem -or some nearby problem- could be much simpler if
you knew one of the possible small sets.

.



Relevant Pages

  • Re: Minimal keywords needed for constructing a full CL system
    ... whole universe using lambda ... discussing abstractions like minimal sets etc its useful to try to pick ... processor instructions, they just re-use existing instructions, ... but with magic arguments, to have a different semantics (namely, I/O). ...
    (comp.lang.lisp)
  • Re: Minimal keywords needed for constructing a full CL system
    ... Why not implement the "whole universe" using lambda? ... and then the rest in Lisp itself. ... Much like you can implement any logical operation either ...
    (comp.lang.lisp)
  • Re: The 13.7 billion light-year length denotes a fifth spatial dimension.
    ... WMAP's March 2006 polarity data is consistent with an ever constant lambda, ... The observable universe was Planck length 13.7 billion light-years ... The Inflation Theory, developed by Alan Guth, Andrei Linde, Paul ... such as symmetry breaking and phase transitions, to cosmology. ...
    (sci.physics)
  • Re: Difference between let, let* and letrec
    ... > "We have an anonymous procedure (the first lambda) having two pointers ... Now it seems that those two pointers are not ... If you don't want to bind a determined value, ... IMPORTANT NOTICE TO PURCHASERS: The entire physical universe, ...
    (comp.lang.scheme)