

Ask HN: About all this Lisp fuzz - Novash

I know a little of Lisp. Not much, never went much far than 4th, maybe 5th chapter on PG's book. I did some exercises and I understand the power that Lisp brings. Maybe not fully, but I can see the potential. Before you ask, I used Lispbox to set it up, which gave me e-Macs with a Lisp extension, but which implementation I am not sure, although I know it is not any Scheme one.<p>Now, I am following all those articles posted here today about the Lisp's problems and they look to me quite similar to the Linux distro's problem, in that everyone has one that (s)he likes and disses (if not plainly hates) all others.<p>This, on the Linux world has prevented it from becoming the mainstream OS it should be, and gave Windows an undeserving and lasting afterlife. It could have died with the Vista fiasco, and it nearly did so, but now it is posing a serious comeback with Seven. Linux failed to seize the moment and Lisp is doing more or less the same.<p>Now, answer me these, since my knowledge of Lisp is severely lacking to make sense of it. If I am completely wrong about something, be merciful.<p>As far as I understand, Lisp has some 'low level' functions that are some sort of axioms on whom the implementations are built onto, right?<p>If this is true and everything on the language are built atop of those, or atop of stuff built atop of those (in n-levels), how can different implementations possible be incompatible?<p>If everyone is aware of the Lisp's problems, why isn't anyone moving to fix them?<p>Why, when one tries, the answer must always be another implementation with 'more' features instead of creating the cleanest possible implementation with 'the least' features allowing maximum compatibility?<p>I have more questions, but I need to understand these first if anyone has the patience to answer.<p>I am most grateful for your time.
======
blue1
Which lisp are you talking about? For example, Common Lisp and Scheme are both
languages of the lisp family, but they are rather different.

The PG books are about Common Lisp. CL is defined in a _very_ good ANSI
standard. Where implementations of CL really diverge is in the areas which are
not covered by the standard, e.g. networking. Not that it is an enormous
problem in practice: there are good portable libraries around ("portable"
means that they work on different CL implementations).

edit: thinking about it, if you are using Peter Seibel's lisp in a box, then
it's CL that you are playing with

~~~
Novash
I never tried Scheme so you can assume I am talking about CL if that helps,
but since I don't know the difference between them, the question is directed
at both.

In fact, if they are both 'Lisp', why do they exist at all? Why there ARE
differences? If CL is a 'very good' ANSI standard as you say, why people use
Scheme? Arc is also CL, but why does it exist at all? What does it has that
justifies it being created, increasing even more the noise? If I wanted an
implementation of strict CL, which one would be it?

~~~
blue1
Common Lisp was an effort to create an unified, "industrial strength" version
of Lisp, because at the time there were many. For this reason the resulting
standard is very large and complex. Scheme has been designed with a different
agenda (cleanliness, elegance, etc.) and it is more used in the academia ; for
example, scheme is the dialect used in the famous SICP book.

If you choose CL, the choice of implementation is not very important while you
learn it. Different CL implementations have different strength, e.g. in
unicode implementation, compilation speed, treatment of certain kinds of
numbers etc., but it is not relevant for a beginner. A popular open source
choice is SBCL, but there are others.

Also, there are free/opensource implementations and commercial
implementations. The commercial ones are costly (but trial versions exist);
they give a more complete environment.

~~~
Novash
And even though Scheme was designed to be clean and elegant, CL has to be
backward compatible and thus cannot be 'cleaned', right?.

Is there any 'cleaner' CL standard, or at least a 'best practices' guide to
code in a cleaner way, avoiding the worse pits that had to be kept in the
standard due to backward compatibility?

I can give you a simple C++ example of what I mean. In C, you had those
*parameters that had to be matched by &args when the function was called. C++
brought some self-referencing &parameters that were passed normally and worked
the same way than the former but were (saidly) less error-prone.

Is there any similar effort being made in Lisp?

~~~
blue1
The "backward compatibility issue" means simply that the Common Lisp is a very
large language, so it is slightly more scaring at first. Also, some things are
strangely named for historical reasons.

Regarding scheme vs CL, I don't want to start a flame war, I like both
languages. It seems to me that CL is more dirty-hands, product-oriented and
agnostic, while Scheme is sort of a beautiful thought experiment, meant to
teach things. [Yes, I know you can code practical things in scheme too]

CL gives you more rope to hang yourself with macros. Which is a things that
most hackers appreciate, anyway.

There aren't many style guides on CL, but Peter Seibel's book is a good start.
But in the end I think you should try to play more with code and worry less
about lisp theology :)

~~~
Novash
That's exactly what I am trying to do. but I am hearing all those omens about
Lisp but I sense I need to understand it better before I dive myself into it.
There is absolutely NO market for it where I live so, if I would learn it, it
would be for personal gain. Not that it is a problem, but without a market
compass, I feel like I need a map.

Thanks for your answers.

------
wglb
Speaking of one who has four "distros" in the shop (ubuntu, freebsd, openbsd,
osx) each of these has its strength and making our stuff work on them is not a
big deal. I don't get confused at all, and there isn't all that much "noise".

Similarly, for the very high performance stuff, i use SBCL which generates
native code on all the above platforms. I recently have started to do CCL
because a client wants a true mac app and CCL has this wonderful cocoa bridge.
If i had to do any java stuff or interface with java, I would probably be
using clojure.

If you are interested, I recommend continuing PCL and the lispbox.

If everyone is not moving to fix the problems that you mention, it might mean
that they disagree about what the important problems are.

Arc exists as a research effort in thinking about what the next version of
lisp should look like, and there are those that feel it is a possible answer
to some of your questions.

Scheme is a very essential (e.g. minimalist) implementation of Lisp that is
often found in teaching environments.

Don't let the variety scare you--just dive in if you are interested.

~~~
Novash
It may not be for you, but it was for me in the beggining.

I already went through 3 distros - Kurumin, Suse and Ubuntu, and the only
reason I still have a Windows partition is to play some games that I couldn't
(or didn't bother to) make work under Linux. I can tell you, the bar is very
high to start. Ubuntu made it lower (and lower at each version) but it is
still too high for mainstream.

And it need not be. The whole problem is always understanding the differences.
If I pick that distro or that distro, what changes? What do I lose? What do I
earn? Unable to find answers, one doesn't choose lest one chooses poorly.

Lisp implementations are the same.

Thank you for your answers. Allow me to add just two more. If one says Arc is
not CL, but a whole new kind of Lisp that tries to solve some of those
problems, what exactly are the differences? What does Arc advance as a Lisp
standard?

~~~
blue1
1\. choose your lisp dialect: do you want to learn CL, Scheme, Arc, ...?

2\. randomly pick an implementation of your chosen lisp. It really makes no
difference as a beginner. I speak from experience. You can always switch later
in a painless way.

regarding CL, choose an open source implementation if you don't fear things
like emacs. If you prefer a more polished IDE, choose a commercial
implementation.

~~~
Novash
CL on Lispbox is what I have now. Which means I use (use being a
overstatement) e-Macs with a Lisp extension.

~~~
J_McQuade
'emacs', please!

------
rikthevik
When you write C, you can be reasonably sure it will compile with a decent C
compiler. There is no way to write 'Lisp'. Each Lisp dialect has different
goals. A person might as well think of them as completely different languages
belonging to the Lisp family. It might be analogous to think of Perl, Python
and Ruby as being high-level dynamically typed interpreted languages as being
part of the same family, but having completely different ways of going about
things.

As an aside, I really like clojure. Their attitude towards concurrency and
transactions (ie: they actually thought about it) is refreshing. Add to that
great library support and good performance and I'm a pretty happy guy.

~~~
lispm
C, C#, C++, Objective C, C with extensions, ...

~~~
mahmud
lispm, sophistry and propaganda are near impossible to fight on the internet
:-(

------
mr_luc
Your questions are reasonable ones given your experiences, but their nature
makes it unlikely for people to expend much energy answering them -- questions
like "why isn't anyone moving to fix them?" may be perfectly reasonable to
you, and inspire eye-rolling in others.

Nonetheless, you'd be able to answer most of them if you tried to make a few
of your own knock-off programs in lisp. ;) To do that, you'd have to decide on
a lisp, installing a few and trying them out, and then decide on a project --
hopefully, something small and manageable. Perhaps a visual "hello, world"
program. Or a code-golf exercise. My personal "hello, world" for learning a
new language is usually a basic 1D cellular automata.

Once you've written your hello world, you'll have answered many of your
questions. Next, rewrite it! Is your code idiomatic? What are some common
idioms, and why do they exist? Could you make it shorter?

Next, extend it. Can you use it from the web? What would it take? What about
letting people customize your helloworld? etc etc. See what it feels like to
develop in the new language, even though the entire "project" cycle could
conceivably be done in a single day. (Disclaimer: not by me. It takes me, at
least, two months of part-time hacking to feel affection for a language).

After that kind of a learning process -- which isn't terribly onerous; it's
the sort of thing you end up doing with almost any interesting language --
you'll look back at these questions and laugh.

And, if you aren't willing to go through that sort of "learning lite", why
bother asking the questions?

( If you're looking for enlightenment about the process of actually using
Lisp, in book form, I recommend _Practical_ _Common_ _Lisp_ , which is
available as a free pdf ).

------
swannodette
You should also look into Clojure, especially if you're interested in getting
into concurrency and functional programming. I recommend using
Enclojure+Netbeans for a user friendly introduction to a very powerful new
Lisp.

~~~
Novash
Java is not really my field. However, I have half a mind to learn F#.

~~~
philwelch
I think we need a linkbait article about whether or not F# is an acceptable
Lisp before I seriously consider it.

~~~
Novash
I don't really care if it is an acceptable Lisp when I decide if I will or
will not learn something. :P

BUT, I will use that excuse on my teacher on the Calculus class.

~~~
javery
F# is based on ML not Lisp.

------
sidmitra
Read the bipolar lisp programmer, it's quite an interesting insight.
<http://www.lambdassociates.org/blog/bipolar.htm>

~~~
coconutrandom
Wow. That's exactly me.

I'm a self taught(obsessed?) programmer, barely finished high school, quit
collage the first month. And I just started with Arc Lisp. It feels so right
and has improved my programming in other aspects. The good thing is that now
I'm in nerdvana doing what I love for a small but cool company.

------
CyberFonic
The axioms you refer to is Church's lambda calculus, the seminal material may
be found on John McCarthy's website: <http://www-formal.stanford.edu/jmc>. The
stuff is like 1960's !

There are basically two main camps, Lisp-1 and Lisp-2 and consequently two
divergent major families, Scheme and Common Lisp. From my recollection, the
"Lisp Wars" started with hardware implementations, Symbolics vs. Lisp
Machines, et al., see <http://en.wikipedia.org/wiki/Symbolics>.

My take is that the hardware implementations came at a time when CPU speeds
and memory capacities where not up to the demands of integrated Lisp
environments. By the time speed and memory were sufficient to host Lisp, the
world of IT got preoccupied with x86 architecture and Windows. Neither of
these being suitable (in 1980's) as a production Lisp hosting environment.

In the hands of an expert Lisper, any version of Lisp quickly becomes
extremely productive. The issues of libraries (FFI) and compilation are
addressed in different ways, it's like you have a choice! It's like asking a
guitarist why there are so many brands of guitars? Why don't they all use ____
(insert your pref. brand).

To research further, I suggest looking-up "John McCarthy", "Guy Steele",
"Richard Gabriel", "Symbolics", "Lisp Machine" on Wikipedia and Google.

------
grosales
I think you have a valid analogy of Lisp to Linux, but you you should finish
the PG book before you make any final judgment. The power of Lisp comes from
its "simplicity", its extensions, and the magical Aha moment you get while
coding in Lisp (it's like obtaining zen only to realize new and bigger doors
have opened before you and there is a vast ocean of new knowledge to gain) -
the Aha moment is rather special, to the point that I don't know how to
describe it, that's why you should try to have it yourself. Like other
comments have mentioned, Scheme and CL have different purposes (Scheme is
mostly used in academia and is very simplistic while CL was geared to
enterprises mostly). I really don't know why Lisp flavor wars arise, I suppose
is the price we pay for being among passionate people, it can hold back a
technology for sure, but if that war can be turned into a logical debate of
merits, great things can come out. On that note, I do like Windows 7 a lot,
but I will stick to Linux because I have learned so much (shell scripting,
network administration, socket programming) ever since I started using it that
it's not even funny, and there is some fun in being able to fix something
yourself instead of having to report a bug to MS and wait for them to fix it.

------
paracelsus
Why, when one tries, the answer must always be another implementation with
'more' features instead of creating the cleanest possible implementation with
'the least' features allowing maximum compatibility?

This was said in 'The Next Lisp'

<http://www.lambdassociates.org/blog/nextlisp(1).htm>

------
ilyak
"If this is true and everything on the language are built atop of those, or
atop of stuff built atop of those (in n-levels), how can different
implementations possible be incompatible?" You cannot build i/o atop of
axioms. It would always be a foreign thing that you have to deal with,
incompatibly of using a long spec.

~~~
rgoddard
Details matter, and ultimately the code needs to run on a machine. Hence the
implementation matters.

~~~
CyberFonic
Implementation is where theory and practice collide in a conflict! In GNU
tradition, guile (a Scheme) is widely available. Personally, I've found
newLisp (<http://www.newlisp.org/>) to be small, fast, portable across all
main platforms, good if you want to deploy web-apps, not so good if you want
to write full-featured GUI apps.

As for the Linux comparison, once you really know (i.e. can use command line,
the shells, awk, grep, sed, etc) one Linux distro, you can work your way
through the others and even AIX, the various BSDs, HPUX, Mac OS/X and Solaris.

