473,769 Members | 7,745 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

BIG successes of Lisp (was ...)

In the context of LATEX, some Pythonista asked what the big
successes of Lisp were. I think there were at least three *big*
successes.

a. orbitz.com web site uses Lisp for algorithms, etc.
b. Yahoo store was originally written in Lisp.
c. Emacs

The issues with these will probably come up, so I might as well
mention them myself (which will also make this a more balanced
post)

a. AFAIK Orbitz frequently has to be shut down for maintenance
(read "full garbage collection" - I'm just guessing: with
generational garbage collection, you still have to do full
garbage collection once in a while, and on a system like that
it can take a while)

b. AFAIK, Yahoo Store was eventually rewritten in a non-Lisp.
Why? I'd tell you, but then I'd have to kill you :)

c. Emacs has a reputation for being slow and bloated. But then
it's not written in Common Lisp.

Are ViaWeb and Orbitz bigger successes than LATEX? Do they
have more users? It depends. Does viewing a PDF file made
with LATEX make you a user of LATEX? Does visiting Yahoo
store make you a user of ViaWeb?

For the sake of being balanced: there were also some *big*
failures, such as Lisp Machines. They failed because
they could not compete with UNIX (SUN, SGI) in a time when
performance, multi-userism and uptime were of prime importance.
(Older LispM's just leaked memory until they were shut down,
newer versions overcame that problem but others remained)

Another big failure that is often _attributed_ to Lisp is AI,
of course. But I don't think one should blame a language
for AI not happening. Marvin Mins ky, for example,
blames Robotics and Neural Networks for that.
Jul 18 '05
303 17748
Paul Rubin wrote:
...
This is untested but looks simpler than the lisp example:

def mostn (fn, lst):
max = None
for a in lst:
score = fn(lst)
Perhaps "score = fn(a)" ?
if max is None or score > max:
max = score
ret = [a]
elif score == max:
ret.append(a)
return ret


it it all right to raise an exception if lst is empty?
I'm not sure of the lisp example's behavior in that case,
but I suspect it returns an empty list and None. In
that case, we may need to initialize ret to [] too.

Stylistically (but it's just me) I don't much like that
"first-time switch" use -- null in lisp, None in Python.
An alternative might be to treat the empty lst as
an exceptional case:

def mostfn(fn, lst):
try: a = lst[0]
except IndexError: return [], None
ret, max = [], fn(a)
for a in lst:
score = fn(a)
if score > max:
max = score
ret = [a]
elif score == max:
ret.append(a)
return ret, max

a _bit_ more complicated than Paul's code, and calls
fn twice on lst[0], but it caters to my dislike for
"first-time switches"...;-). One could remove the
double-call problem by changing the start to:

def mostfn(fn, lst):
it = iter(lst)
try: a = it,next()
except StopIteration: return [], None
ret, max = [a], fn(a)
for a in it:
...

If taking O(N) auxiliary memory was acceptable, of
course, there would be an alternate possibility:

def mostfn(fn, lst):
if not lst: return [], None
aux = [ (fn(a), a) for a in lst ]
Max = max([ f for f, a in aux ])
return [ a for f, a in aux if f==Max ], Max

Typical problem with all high-level languages --
they often make most attractive an approach that
may not be quite as spare of bytes and cycles as
some lower-level one!-) [A simple test with
fn=lambda x:x%333 and lst=range(9999) shows the
lower-level approach is over 3 times faster,
both with and without psyco.proxy on both].
Alex


Jul 18 '05 #111
Hi Marcin 'Qrczak' Kowalczyk,
What about reading (in books, on WWW)? I guess you would say
"indentation".. .

Indentation in Lisp is not clear enough. Let's look at an example from
http://www-users.cs.umn.edu/~gini/ai...m/onlisp.lisp:

(defun mostn (fn lst)
(if (null lst)
(values nil nil)
(let ((result (list (car lst)))
(max (funcall fn (car lst))))
(dolist (obj (cdr lst))
(let ((score (funcall fn obj)))
(cond ((> score max)
(setq max score
result (list obj)))
((= score max)
(push obj result)))))
(values (nreverse result) max))))

Note that only one pair of adjacent lines is indented by the same amount.
Other alignments are in the middle of lines.


I have ignored the followup-to because your comment is ignorant. If you
want to make ignorant comments please only make them in comp.lang.lisp so
corrections don't also have to be posted to comp.lang.pytho n.

Here is what a Common Lisp users see from the indentation:

1. IF takes a "test" form, a "then" form and in this case an "else"
form. By the indentation I can instantly see that the "test" form is
(null lst), the "then" form is (values nil nil) and the "else" form is:

(let ((result (list (car lst)))
(max (funcall fn (car lst))))
(dolist (obj (cdr lst))
(let ((score (funcall fn obj)))
(cond ((> score max)
(setq max score
result (list obj)))
((= score max)
(push obj result)))))
(values (nreverse result) max))))

2. LET is binding values to RESULT and MAX. By the indentation I can
instantly see that this binding is in effect for the remainder of the form:

(dolist (obj (cdr lst))
(let ((score (funcall fn obj)))
(cond ((> score max)
(setq max score
result (list obj)))
((= score max)
(push obj result)))))
(values (nreverse result) max))))

3. By the indentation I can also instantly see that the DOLIST is
only operating over:

(let ((score (funcall fn obj)))
(cond ((> score max)
(setq max score
result (list obj)))
((= score max)
(push obj result)))))

4. I can instantly see that SCORE is bound only within this form:

(cond ((> score max)
(setq max score
result (list obj)))
((= score max)
(push obj result)))))

5. And finally I can instantly see that there are two test conditions, the
first being (> score max) and the second (= score max). Again by the
indentation I can see the return results grouped with the test conditions.

In pulling apart these forms there are still dangling parentheses
remaining on the page. That's the point. You can read the semantics
through knowledge of the special forms and the indentation alone. I didn't
attempt to manually delete the parentheses without the assistance
of an appropriate editor because I would probably screw something up. But
it did not stop me from being able to read the code.

Regards,
Adam
Jul 18 '05 #112
wa************* *@eircom.net (Russell Wallace) writes:
However, this really applies only when you're doing things the
language designer anticipated. The great thing I find about Lisp is
When I'm really doing something the language designer didn't
anticipate (and the required features don't already exist), I'm
probably doing something wrong and need to revise my design
anyway. You can do a whole lot in Python, esp. as you can code parts
in C if you really need that.
that when I'm doing something the language was _not_ designed to
handle, it's not an "oh shit" problem, it's a "well, I suppose I can
do this with a few macros" problem.


One can always go to c.l.py and ask, only to see that the problem is
easily solved in plain old Python. I think the benefits of Python far
outweigh the theoretical scenario that I actually needed some feature
that isn't there, and could be done in Lisp. Most often the missing
features involve not having a library to, say, access some database,
and I doubt Lisp has more than Python to offer in that area.

Meanwhile, people are voting with their feet: a lot (thousands? don't
know the exact figure) of people are taught Lisp (well, Scheme, but
anyway) at colleges/whatever every year, and they abandon it in a
blink of an eye after the course (obviously this might be because the
courses emphasize functional programming). Many even think that C++,
of all things, is easier!

--
Ville Vainio http://www.students.tut.fi/~vainio24
Jul 18 '05 #113
On 20 Oct 2003 09:01:33 +0300, Ville Vainio <vi************ ********@spamtu t.fi> wrote:
Meanwhile, people are voting with their feet: a lot (thousands?
don't know the exact figure) of people are taught Lisp (well,
Scheme, but anyway) at colleges/whatever every year, and they
abandon it in a blink of an eye after the course (obviously this
might be because the courses emphasize functional programming). Many
even think that C++, of all things, is easier!


Yeah, sure. And 95% of all computer users use Windows so it must be
the best OS. You know the "50 million flies" saying?

Edi.
"If a million people say a foolish thing, it is still a foolish
thing."

(Anatol France)
Jul 18 '05 #114
Edi Weitz <ed*@agharta.de > writes:
Yeah, sure. And 95% of all computer users use Windows so it must be
the best OS. [..]


...and presumably the masses of Windows users are also thinking that
whatever theoretical (read "something I've never heard of") benefits
other systems may offer, it will surely be offset by the next
point-and-click application from Microsoft.

--
Frode Vatvedt Fjeld
Jul 18 '05 #115
Paul Rubin <http://ph****@NOSPAM.i nvalid> writes:
No language feels more natural than Lisp. There's a real sense that
while Python was invented by a brilliant programmer, Lisp is built
into of the structure of the Universe.


yes! The following quote from the ILC-03 (please help me: I can't
remember who said it!) says it all: "John Mc Carthy didn't invent lisp,
he _discovered_ it".
--
(espen)
Jul 18 '05 #116
Edi Weitz <ed*@agharta.de > writes:
Yeah, sure. And 95% of all computer users use Windows so it must be
the best OS. You know the "50 million flies" saying?


Yep, but when exposed to a clearly superior language, one might assume
that at least a part of the students would get the clue and keep on
using it after the course. You can only go so far with "all college
students are morons". People diss Python if they haven't tried it, but
convert soon after giving it a spin; people diss Lisp even after
trying it. Perhaps they are morons, flies, whatever. Python also
welcomes them with open arms. When all is said and done, being 31337
is not that important.

However, Lisp (Emacs Lisp) *is* one of the three languages I actually
can find use for. The other two are C++ (day job) and Python.

--
Ville Vainio http://www.students.tut.fi/~vainio24
Jul 18 '05 #117
On 20 Oct 2003 12:29:39 +0300, Ville Vainio <vi************ ********@spamtu t.fi> wrote:
Edi Weitz <ed*@agharta.de > writes:
Yeah, sure. And 95% of all computer users use Windows so it must
be the best OS. You know the "50 million flies" saying?


Yep, but when exposed to a clearly superior language, one might
assume that at least a part of the students would get the clue and
keep on using it after the course.


As the OP wrote, most of these students are taught Scheme, not Common
Lisp. (And, as we have seen quite often on c.l.l., probably by
teachers who force them to use weird recursive constructs and tell
stories about Lisp - "it is slow, it is interpreted, ..." - that have
been obsolete for decades.)

Also, where do you see evidence that /all/ students dismiss Lisp
immediately? We have a constant (albeit small) influx of newbies on
c.l.l.

As a counter-example consider the courses Robert Strandh teaches in
France (Bordeaux?) - they seem to be very successful. He's teaching
Common Lisp and some of his students "got the clue." They even
implemented a perfectly usable window manager in Common Lisp during
the course.[1]

Edi.
[1] <http://common-lisp.net/project/eclipse/>

The website is mostly empty but you can download the software and
also subscribe to the mailing list.
Jul 18 '05 #118
Ville Vainio wrote:
wa************* *@eircom.net (Russell Wallace) writes:

However, this really applies only when you're doing things the
language designer anticipated. The great thing I find about Lisp is

When I'm really doing something the language designer didn't
anticipate (and the required features don't already exist), I'm
probably doing something wrong and need to revise my design
anyway.


So why is it that Python is continuously evolving as a language? Do you
think this is going to stop at some stage?

Wouldn't it be better if everyone could contribute to the evolution of a
language, and then let the community decide what the best approaches are?

See for example, the SRFI approach of the Scheme community.
that when I'm doing something the language was _not_ designed to
handle, it's not an "oh shit" problem, it's a "well, I suppose I can
do this with a few macros" problem.


One can always go to c.l.py and ask, only to see that the problem is
easily solved in plain old Python. I think the benefits of Python far
outweigh the theoretical scenario that I actually needed some feature
that isn't there, and could be done in Lisp.


The approach for Lisp is to write a domain-specific language for the
problem at hand, and then to write the program in that domain-specific
language. (These are not actually two distinct steps, but these parts
are usually achieved in an evolutionary way.)

If you want to keep your Lisp program in a specific programming style
(OOP, functional, imperative, etc.) you can do that either. Lisp gives
you a choice here.

With Python, you have to stick to the constructs the languages give you.
When you want to add domain-specific abstractions on the language level,
you have to step outside of the language, and for example use program
generators. Python doesn't give you a choice here.

This is only to say that in general, we usually don't use macros just to
"fix" the language, but we want macros because it enables a programming
style that is not available in most other programming languages.
Most often the missing
features involve not having a library to, say, access some database,
and I doubt Lisp has more than Python to offer in that area.
That's correct.
Meanwhile, people are voting with their feet: a lot (thousands? don't
know the exact figure) of people are taught Lisp (well, Scheme, but
anyway) at colleges/whatever every year, and they abandon it in a
blink of an eye after the course (obviously this might be because the
courses emphasize functional programming). Many even think that C++,
of all things, is easier!


They can't vote with their feet wrt to particular features of the
programming languages they use, can they?

And as a sidenote, if you are seriously considering to learn and maybe
use Lisp in practice, you should take a look at _both_ major dialects,
i.e. Common Lisp and Scheme. They are very different in several
respects, and if you think that one of them sucks, this doesn't
necessarily mean that you will also despise the other one.
Pascal

--
Pascal Costanza University of Bonn
mailto:co****** @web.de Institute of Computer Science III
http://www.pascalcostanza.de Römerstr. 164, D-53117 Bonn (Germany)

Jul 18 '05 #119
Ville Vainio wrote:
Edi Weitz <ed*@agharta.de > writes:

Yeah, sure. And 95% of all computer users use Windows so it must be
the best OS. You know the "50 million flies" saying?

Yep, but when exposed to a clearly superior language, one might assume
that at least a part of the students would get the clue and keep on
using it after the course.


In fact this happens. There are people out there who get it and stick to
Lisp. It's true that the majority doesn't do it (yet?), but that's
because Lisp doesn't give you instant rewards. I guess it takes
considerably longer to learn Lisp so that you can use it effectively, in
the sense that you can go beyond the stage that you can maximally get at
in other languages. (Also think about the possible net effects of
instructors who try to teach Lisp without having gotten it themselves.
Especially in the functional programming camp, there are people who see
Lisp as just a prelude to languages like ML and Haskell. This misses
some important points.)

All in all, these things are hard to measure. I have first learned about
Lisp about 10-15 years ago, and then completely forgot about it. It was
only about one and a half years ago that I have rediscovered it. In the
meantime, I have learned a lot about restrictions that most languages
impose on me as a programmer. Now I can really appreciate the expressive
power of Lisp and the degree to which unnecessary restrictions don't
bother me anymore in Lisp. This wouldn't have been possible 15 years
ago. Now do you really think the fact that I have "dissed" Lisp at first
tells us something really important about the language other than that I
was just too inexperienced to be able to appreciate it?

And in the meantime the world is continuously moving in the direction of
more dynamic and less restricted languages. Otherwise other languages
before Python would have been enough already. I think there is a pattern
involved here, and I am pretty sure that it will ultimately lead to
something that is as powerful as Lisp is today.

This is not just a fanatical rant of a religious follower, although it
may sound like that. However, you can objectively point out the
ingredients that make Lisp the mother of all languages in a certain
sense. See http://www.paulgraham.com/rootsoflisp.html
Pascal

--
Pascal Costanza University of Bonn
mailto:co****** @web.de Institute of Computer Science III
http://www.pascalcostanza.de Römerstr. 164, D-53117 Bonn (Germany)

Jul 18 '05 #120

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

73
8069
by: RobertMaas | last post by:
After many years of using LISP, I'm taking a class in Java and finding the two roughly comparable in some ways and very different in other ways. Each has a decent size library of useful utilities as a standard portable part of the core language, the LISP package, and the java.lang package, respectively. Both have big integers, although only LISP has rationals as far as I can tell. Because CL supports keyword arguments, it has a wider range...
699
34155
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro capabilities, unfortunately. I'd like to know if it may be possible to add a powerful macro system to Python, while keeping its amazing syntax, and if it could be possible to add Pythonistic syntax to Lisp or Scheme, while keeping all of the...
34
2686
by: nobody | last post by:
This article is posted at the request of C.W. Yang who asked me to detail my opinion of Lisp, and for the benefit of people like him, who may find themselves intrigued by this language. The opinions expressed herein are my personal ones, coming from several years of experience with Lisp. I did plenty of AI programming back in the day, which is what would now be called "search" instead.
82
5380
by: nobody | last post by:
Howdy, Mike! mikecoxlinux@yahoo.com (Mike Cox) wrote in message news:<3d6111f1.0402271647.c20aea3@posting.google.com>... > I'm a C++ programmer, and have to use lisp because I want to use > emacs. I've gotten a book on lisp, and I must say lisp is the ugliest > looking language syntax wise. What is up with this: (defun(foo()). (DEFUN FOO () NIL) > What were the lisp authors thinking? Why did Stallman use lisp in
852
28681
by: Mark Tarver | last post by:
How do you compare Python to Lisp? What specific advantages do you think that one has over the other? Note I'm not a Python person and I have no axes to grind here. This is just a question for my general education. Mark
0
9414
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10197
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10032
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9977
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8860
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7391
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6661
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5432
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3549
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.