Ask Kent M. Pitman About Lisp, Scheme And More
Kent M. Pitman has been programming in Scheme and Lisp, and contributing to the design of those languages, for a long time -- 24 years. He was a technical contributor and an international representative for the ANSI subcommittee that standardized Common Lisp, and in that capacity directed the design of Lisp's error system. Scheme may be better known as a teaching language, but both Scheme and Lisp have applications (as any Emacs user knows) that go far beyond this. Now's your chance to ask him about the pros and cons of those two languages, circa 2001 A.D. Kent also has an interesting, ambivalent take on Free software that's worth noting in an atmosphere where complex issues are often oversimplified and radicalized. Since he's someone who's helped develop standards, this is perhaps a timely issue on which to probe his opinion. It's also a good time to get acquainted with things he's written, which might interest you just as much as his programming. (Soap opera parodies, anyone?) So suggest questions for Kent below (please, one per post) -- we'll pass along the highest-rated ones for him to answer, and Kent will get back soon with his answers.
As we move closer to having infinite memory and infinite processor speed do you see Lisp being used more in the mainstream?
John Casey
he's a man who is influential in the programming language called lisp.
The death of one man is a tragedy; the death of a million is a statistic --Joseph Stalin
I think LISP would be more readable and easier to transition to if the command was on the left side of the parenths instead of between.
How hard would it be to change the interpreter(s) for that?
Table-ized A.I.
Lisp and Scheme have long been viewed as just "Educational Languages". Do you see any future with the two languages in commercial software?
Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
It seems that more and more universities are focusing only on C++/Java, even to the point of discouraging learning other languages. Do you see this as continuing trend? If so, how do you think this will shape the next generation of computer scientists?
It seems many of the more popular CS programs in the world use Scheme as a teaching language. A lot of times, students complain about this, saying they'd prefer to learn about C or another language that is considered "apt for industry." I used to be like this too, but have now discovered the error of my thinking. How have you convinced others that while the latest programs might not be written in Scheme, that it is worth a student's time to learn Scheme. Many seem stuck to the point that if they won't use it outside of school, they shouldn't learn it. How can we convince them otherwise, to become scholarly citizens instead of drones?
Does the relative absence of a good, free LISP interpreter for Windows ever give you pause?
I've suggested to my employer that we use Lisp to generate some source code as a product of pattern matching. His response was "where has Lisp been for the last seven years?" He's right. No new books. No press. No interest. Do you see Lisp falling off the end of the earth?
What is the extension of the file you're trying to open? If it is something like .tgz, .tar.gz, or something similar then you need to download winzip to open it. If it is .rpm then you can't use it in Windows. If it is .iso then you can burn it to a cd-rom and boot the cd and the linux will come up after that.
I'm a professional programmer, mostly Java, primarily in the financial services industry. I've recently become interested in Lisp (UPS delivered Graham's book yesterday).
It seems to me that Lisp would be useful in areas such as derivatives ananlysis, where people come up with a new exotic type of option every day. I'm still learning about Lisp, but it seems that it might provide more flexibility to handle this constant evolution.
Is that analysis accurate? What general types of problems is lisp best suited for?
-------------------------
A person of moderate zeal
IMHO you have downloaded something for Linux, just another OS.
Lisp and scheme are both used in educational setting pretty commonly, but I don't know of any production projects (which isn't to say they don't exist) that use either language. Could you discuss the difference between what makes a good educational language and a good working language, specifically as to why it might be useful to learn in a language that you are unlikely to ever use in a work environment.
Narrative
Are there any programs other than Autocad and Emacs that use lisp as the macro language?
Best Slashdot Co
Gregory Chaitin has a book called "the limits of mathematics." In it he claims that mathematicians should love Lisp because Lisp is basically set theory, and all mathematicians love set theory. I wholeheartedly agree with this, one only needs to look at Chaitin's Lisp programs to realize how quickly and succinctly one can arrive at astonishing incompleteness results in mathematics. So we know Lisp is great for stuff like this, really researhing a mathematical subject. Do you see Lisp continuing in this direction, showing and discovering theorems, or will it move into industry? Or has it moved into industry, and we just don't know it? Do the likes of NASA and JPL use Lisp and Scheme religiously? I would bet so.
We're no closer to having infinite memory and infinite processor speed than we were 40 years ago.
mmmm...a set of bits of cardinality aleph-null...
pooptruck
There don't appear to be a lot of Lisp programming jobs out there right now. I suspect that is because there aren't many commercial Lisp projects, perhaps because there aren't many Lisp programmers....
If Lisp is so great, why is that so? Or, more positively, how do we overcome this bias against Lisp?
-------------------------
A person of moderate zeal
Hey - just what the world needs - another site for morons to go on and on about how the world would be better if THEY were in charge. Is Inadequacy.org taken?
That'th not a lithp. Thith ith.
Don't read this!
The IEEE spec has expired, I can't find any information about efforts towards r6rs, and not much seems to be happening on the SRFI front. On the other hand, there's an active Scheme community and dozens of implementions, and it seems more show up daily.
How do you reconcile these apparent contradictions, and where do you see Scheme going?
What are your thoughts about Haskell, OCaml, and teh state of functional programming in general?
However, I think Lisp will never be more than a niche language, for reasons Richard P. Gabriel has made all too obvious.
My question, for what it's worth, is "Why bother?"
668: Neighbour of the Beast
I know a lot of big academic (erstwhile) lisp shops, such as CMU, have transitioned away from lisp to ML and relatives. Some of the reasons we might give are:
- Sophisticated type systems, catching most bugs before your program is run, ensuring safety, etc.) , partly due to compilation strategies using types
- Much more efficient (http://www.bagley.org/~doug/shootout/craps.shtml
- Increased modularity and abstraction
- Pattern matching, (subjectively) more natural syntax
In fact, I'm one of those people. I've been scoffed at by lisp fans, but most had never used ML. But I have an open mind, so, in the face of more "modern" languages, what advantages do lisp and scheme offer? Do you think that these advantages are fundamentally impossible to achieve in a typed setting?
Given that LISP and Scheme have traditionally been portrayed as research languages most suitable for AI work, and have not been accepted as widely as more traditionally structured languages such as C:
-What arguments would you give to convince programmers looking for easier ways to accomplish traditional computing tasks to use LISP or Scheme, mindful of the overhead required to learn LISP and Scheme and the lack of programmers who are intimately familiar with them?
For example, I start to develop an OpenSource text editor at SourceForge, and I choose Scheme. What advantages would I have over someone using a language such as Java or C++ that would outweigh the fact that I might not be able to find another developer who is familiar with Scheme?
-Do you feel that any work is being done at present to bring the two languages further into mainstream?
Thanks, I genuinely like both languages, and would like to seem them gain greater adoption by programmers et al.
I've read some interesting articles about lisp, and I'm interested in learning to some extent.
;)
One problem though is that most people stop at saying that feature X (which no other language can do) is really great, and stop there. Never having used feature X, I don't have enough context to say, yes that will help me solve problems more easily.
For example, somebody claims that LISP is better because a lisp program can write code as it goes, or something like that. Having never had that as an option I can't see circumstances where I'd want to do that.
Could you please describe in some detail the top features of lisp and why they are GOOD THINGS?
Also, I promise to not make fun of parenthesis if you don't state that infix notation is one of the reasons that lisp is good.
I've finally found the off by one erro
Why do you think that people so often overlook many of the wonderful things in Common Lisp such as unwind-protect, the whole condition system (which you are of course closely associated with), and so on - things that make it very useful for day-to-day programming, and are there any such things that you'd particularly highlight, or conversely that you wish had become part of the standard but did not.
Incidentally, thank you for all of the insight so generously and regularly poured forth in comp.lang.lisp.
I have recently been working on learning Scheme in my spare time, with the eventual goal of writing a scheme based scripting system to run the guts of a massive adventure game/graphical mud sort of system, everything from environment simulation (predator/prey cycles, etc...) to 3d models (i.e. models will be geometry glued together by scripts so you could have trees that by a random seed and a growth level variable have grown over time and are unique to provide interresting landscape features). Scheme is appealing because it's simple, powerful, and adapts well to the idea of a threaded interpreter.
To further my goal of learning Scheme inside and out, i've been reading "The Little Schemer", as well as "Structure and Interpretation of Computer Programs". Do you have any other recommendations for good Scheme programming texts?
---
Play Six Pack Man. I
What I'm most intereseted in is not Lisp as a mainstream language, but rather Lisp as a research language. When people talk about the new things in programming languages these days, they talk about lazy evaluation, polymorphicly typed functional languages (e.g. Haskell). Since the ANSI spec, it seems as if Lisp has stagnated. CLOS gave us objects, but very little new has come down the pike since then. At one time, much of the new work in programing languages was done with Lisp. Now Lisp seems to be in the position of C: an excellent language that has aged out of the cutting edge. I guess my question is, is this a correct assessment, if so, should something be done about it and what should that be?
cheers,
ric
What do you see as the unique strengths and weaknesses of Lisp?
What strengths does it specifically have over other functional languages (such as ML), over structured languages (such as C, Algol, etc), over object oriented languages (such as C++, smalltalk, simula, etc), and over scripting languages (such as TCL, perl, etc)? Can these other languages or classes of languages be enhanced to include these strengths? If so, how, and if not, why?
What about weaknesses? What do you see as the weaknesses of Lisp, both in general and in comparison to the above classes of languages? Can these weaknesses be eliminated? If so, how and if not, why?
I mean strengths and weaknesses not only in the formal sense of the language itself, but also in terms of its usability in today's world. For example, difficulty in delivering binaries or lack of accessibility of system libraries from within common implementations of a language would be considered weaknesses.
...which I've been suffering with for years. Am I the only one who finds their offerings to be clunky, quirky, and inefficient?
When you first learn a language, you often do toy programs for some time, until you know the most important features of the language. Then you should be able to try your skills out in a bigger application. Now I would like to know what program that was when you learned Lisp.
A monkey is doing the real work for me.
I've become fairly interested lately in using Scheme (probably mzscheme) and the SXML package as a way to do arbitrary XML translations in my free time (if I had any).
From the looks of it, the ability to create a reflexive mapping between an arbitrary XML document and an interpretable programming language is too powerful to be ignored.
Do you think that in the future one of the primary roles of Scheme/Lisp is going to be in manipulation of XML documents, or is this going to be relegated as an academic curiostiy while the world struggles through parsing XML in Java?
Dear Sirs,
I must voice my strong objection to people ripping of stale Monty Python sketches revolving around faked letters to the editor in a sad attempt to get cheap yuks.
We all know that the only way to reduce crime is to reduce the number of offences. Get it out in the open, I say! Who, at one time or another, hasn't set fire to a great public building? Lord knows I have.
Brig. Gen. John A. Biggboote, (Mrs.)
Bumwap-on-the-Thames, Sissyshire
Well, judging from Emacs, it's really insanely great for creating huge, bloated, overkill applications that hog more system resources than sendmail taking it in the ass from a horde of Nigerian fraud spammers. I mean, come ON people! You're editing TEXT! PLAIN! ASCII! TEEEEEEEXT!
I use Lisp for something similar in finance. So, yes, it does work for that.
As a Scheme and Common Lisp programmer, I got excited when I heard that the Java Virtual Machine would have automatic memory allocation and garbage collection. I thought it would be possible to build Lispish languages to run on the JVM. The rate at which Kawa has been developed, to implement a near-Scheme on the JVM has been frustrating to me. I attribute this at least in part to the absence in the JVM of a construct equivalent to Scheme's continuations. Do you think it is feasible to establish a "basis set" of programming language concepts on which all programming languages could be built, so that the distinctions between C, Scheme, etc would be "merely" syntactic? If yes, please enumerate your candidate set.
If it isn't true, don't say it. If it isn't helpful, don't say it. If it's true and helpful, wait for the right time.
Hi there,
I'm a serious c++ programmer, and I'm interested both in using c++ in a functional manner as well as learning a true functional language. I looked at lisp, and then at scheme, and lately I've been looking at Haskell. Unlike the Java/C/C++/C#/ObjC/Pascal/68K wars I've been seeing, I've never seen any good flamewars between the various camps in the functional community. Everyone's so busy liking everyone else, how does an outside like myself choose which language to learn? Which is "best"?
--- The reclining dragon deeply fears the blue pool's clarity.
And what do you think of using a bytecode standard (like
last time I ever post a joke as me. can't you fuckers tell the difference between a joke and a troll?
I was recently (April) hired-on as webmaster at Franz, a commercial lisp company (we make Allegro Common Lisp) which has introduced me to lisp in a very loud way. Since joining these guys (and gals), I've been thoroughly indoctrinated - with my full consent - because of my belief that as computing hardware progresses programming in more abstract languages will allow for more creative and effective use of the platform. Sure, coding assembler on a new super-duper petaflop chip will still be possible and less wasteful, but who would want to code a million lines of asm to save a few (or even a few thousand) operations out of a few billion, or trillion when it will only net a difference of nanoseconds in the end? I'm less interested in making super-fast programs than I am in making artistic and super-functional programs.
I'm not expressing the views of Franz, every member of the company has their own beliefs on what makes for great programming - which is one of the major reasons I find this place so fulfilling, everyone has complex reasons for their design considerations, and everyone communicates them (something I've grown to appreciate from working in too many places where this was definitely not the case), and consequently I've been exposed to quite a few different techniques of Lisp coding since my introduction half a year ago. I'm constantly amazed that so many different styles of programming can be expressed in the same language, it's capable of accomodating any logical thought process that can be converted to code - and I doubt many of you often use recursion in a logical way on a daily basis, but even that can be done efficiently in lisp.
I'm still very new to lisp, and I was never a serious programmer in the past, but I've always been accustomed to asking questions, and here are a few that I'd like some input on:
I'd love to hear about what people think sucks about lisp and needs improvement - or can't be improved, so far I haven't found anything that I could complain about, the most difficult thing for me has been managing all the documentation on a half-century old language in the process of learning it. I've begun to love working in lisp, but I suppose being surrounded by a group so full of passion for it has helped contribute to my bias - if I'm wrong, help snap me out of it with a good argument against using lisp. ;)
Lisp doesn't seem to get the "mind share" and media attention that some programming languages (C, Java, Perl) do. You don't see a lot of books and articles about Lisp and, with the obvious exceptions of Emacs and Sawfish, most people would have trouble naming major applications written in Lisp.
Why do you think Lisp doesn't get mentioned more in the computer press?
Similarly, can you tell us about any major applications written in Lisp, or any great Lisp success stories?
(what 'part (about (the lisp) syntax) (do you) like (the most) (?))
For myself and a number of friends, Lisp/Scheme programming has for too long been a kind of mystical Eden, fading in our memories, from which we have been mostly banished in our professional lives. But we can still recall how it felt to work in a language able to shape itself to any pattern our minds might ask: coding was more interesting and more expressive, and the rate of increasing returns over time was tremendous, because fine-grained -- almost continuous -- abstraction was in the nature of the language. Life was just more fun, frankly.
Alas! In our jobs and even in our personal projects, we are often forced to use C, C++, Java, Perl, or Python -- not because we prefer to write in those languages, but for two much less satisfying reasons: first, everyone else knows those languages, so we'll get more developers with them. And second, you can't count on users and testers having the right environment to run programs written in Lisp/Scheme, so right away you take a portability hit if you choose to develop in them.
Do you think there is a chance of Lisp/Scheme becoming "mainstream" again? That is, when someone contemplates starting a project, it would be as realistic for them to consider Lisp or Scheme as, say, Perl, without worrying about losing developers or initial testers? What will it take?
http://www.red-bean.com/kfogel
(1) The first scientific workstations were LISP-based. Symbolics and Texas Instruments sold graphics workstations in the early to mid 1980s. My recollection is that in the late 1970s Mead & Conway developed elegant software for circuit design that made it easier for programmer types to design their own computer chips. Prof. Sussman of the MIT A.I. Lab and others used this to develop a LISP-accelerating CPU (mainly typed memory and instructions). T.I. got some commercial rights and Symbolics spun off of M.I.T.
A few years later commodity chip UNIX workstations from Sun and DEC took over the workstation market. Custom LISP processors could not evolve new generations as fast as commodity chips. Furthermore, clever LISP interpreters learned to emulate LISP hardware in coventional machine languages almost as fast as the custom hardware.
(I have worked on some oil-industry software with LISP at its core because it was first developed in the 1980s when LISP machines were the only viable workstations.)
(2) The second pulse was the "Expert System" frenzy of late 1980s. Applied A.I. was going to take over the world. Japan was going leap-frog the USA in doing this first. The expert system stock bubble and bust resembled the internet stock bubble on a smaller scale. There are a couple of survivors doing interesting things such as the CYC (enCYClopedia) project in Austin TX.
The first language of the expert system frenzy was LISP. Then a language specifically designed for logic inference called Prolog was used. And finally very fast implemntations in conventional languages such as C.
For a variety of reasons, Lisp and Scheme remain, in my opinion, marginal languages for computer programming. If you had the chance to redesign Lisp and/or Scheme, what would you change so that they would have become as popular as say C/C++/Java?
GIMP uses Scheme, which is of course a kind of Lisp
One needn't look far to find arguments that there is still something unique to Lisp that differentiates it even from very recent languages which have had ample opportunity to borrow from Lisp. But one rarely finds a really clear articulation of that uniqueness. Do you think concur with the view that Lisp is still unique, and if so, do you think that Lisp's putative advantage really is ineffable?
If there is an advantage but it's ineffable and therefore opaque to managers with purchasing power, that would explain why Franz, Harlequin, et al have had such a rocky road. Does the Lisp/Scheme community regard this as a worrisome issue? (Some folks on c.l.lisp clearly don't think so, but I don't know if they are just a noisy minority.)
WWJD for a Klondike Bar?
There are quite a few major applications of lisp on the market right now - yahoo storefront is one example (although they've been changing some things around lately inside the company), and Orbitz.
Check out the list here - it's sure to make you think twice about the commercial viability of lisp: Lisp Success Stories
Check out this list for some lisp job listings.
(its (parenthesis (you idiot)))
As a mathematician, the most appealing thing about Lisp is it's closeness to the lambda-calculus. When I actually program, however, I often find a more procedural language (eg Python) a great deal easier.
One of the things that mars the "niceness" of Lisp (and Scheme) is the fact that evaluation is strict --- this moves the language further from the theory of lambda-calculus as it means that some programs with normal forms (at least would have normal forms if written in the lambda-calculus) don't actually terminate.
Two questions:
1) How practical is it to implement an evaluation scheme in a Lisp-like language that is both efficient and has the property that every program with a normal form terminates?
2) Are there practical benefts to programming of doing so. Just the fact that a language is mathematically elegant doesn't necessarily imply that real benefits will acrue from using it.
Thanks.
For the many Lisp and Scheme implementations that exist for Linux, look at http://www.hotfeet.ch/~gemi/LDT. There are also many implementations for Haskell and ML.
Several years ago I wrote a term paper on my idea of a LISP machine in which CONS cells were verctorized in the CDR direction. For example, 8 cells will be stored in consecutive memory locations and the chunk will be handled by the processor as a single data unit. The hardware would be a VLIW architecture where operations will be performed simultaneously on all 8 cells. The simulation of such hypothetical machine exhibited an 8-fold speedup for list operations such as REVERSE and APPEND which encoded data in the CDR direction. There was no functional difference with conventional LISP at the user level except that REPLCD was disallowed. Also memory efficiency was somewhat sacrificed. Another conclusion from my study was that the width of the VLIW did not have to exactly match the width of the chunk in order to reap the benefit of this architecture. For example, a 4-wide VLIW could be used to process chunks consisting of 16 CONS cells with a performance comparable to this implemented with a 16-wide VLIW.
What do you think of my idea?
Download Mazes and Puzzles from www.puz.com
emacs or vi ?
>> pass an expression like
(+ 2 (* x (/ x 3))) into a "derivative" method, which would examine that expression, MODIFY it, and return a completely valid new scheme method that was the actual mathematical derivative. <<
Why not pass it as a string? It would most likely come in as user-entered data anyhow. The people that create the data are not usually the ones who create the software. Smalltalk fans keep forgetting this also.
BTW, I don't think it is good practice to modify the original in most cases.
BTW2, why did I get tagged as "redundant"? Where is the alleged orgininal? It is like sending an application to the government, only to get rejected because you "are missing one of the 500 listed requirements", but it does not say which one is missing or wrong. Hit and run rankoid jerks!
Table-ized A.I.
KMP also wrote an animal guessing game that would get upset and warn you not to use naughty words. If you didn't relent and kept on cussing, it would get angry at you, and send some email to you and KMP, telling on you and demanding an apology. So you couldn't play the game again until you emailed an apology to his program.
It's great to know KMP is still teaching lisp.
But I've always wondered: who was the bright-12-old (who's now about 28) who benefited from recycling Jerry Pournelle's account?
====
From http://catalog.com/hopkins/text/pourne-smut.html:
====
-Don
Take a look and feel free: http://www.PieMenu.com
Realistic evidence!
If you want to "sell" a language, then show side by side code examples of it kicking say Python's or Smalltalk's butt.
It is easy to brag at the starting line that you have a better race car engine using intellectual cliches, etc., but nobody wants to "race their car" and show it actually beating the competition with realistic examples. (No more foobar examples under rigged conditions.)
OO fans refuse to race also, using mounds of cliches instead.
(Note that I am talking about things like code size and change-scenarios, not necessarily execution speed.)
Table-ized A.I.
Why would anyone want a lisp? I mean, it only provides others the opportunity to make fun of you for your defect. Why would anyone want that?
I have been planning on writting a Lisp based OS, but I like Scheme's conventions, and some of it's design features. Unfortunately, there's no complier for Scheme that's fit for the task out there. Do you have any recommendations? is CL fit for the task?
What do you have to say about Lisp OSes? What do you think of the past efforts? I hear that the old Lisp machines (genera, etc.) can do cool things that even modern machines can't do, but I've never heard anything specific. Do you know what these are?
(My OS, HomunculOS (tm), will hopefully have it's own dialect of Lisp (If I can get around to doing this) that is hybridized with the best of Scheme. Modular, capability based, orthogonally persistent, only as much low level coding as necessary, for portability. Scheme shell text interface. )
Lisp is one of those meta-languages you either learn or avoid. I write practical stuff all the time, daily in fact, and I've never had something that required the arcane stuff in LISP.
Every new form of media has it's own Requirimento
I'm suprised I've never seen scheme and JIT compiling mentionned together.
First, it seems JIT compiling would elegantly solve the problems linked to eval and macros (and their specific environments). When you program a simple scheme interpreter, eval and macros actually are no problem as long as you're not aiming for speed. But they do become a problem once you start compiling code. Thus the ability of compiling a macro or an eval at execution time seems to me like an elegant solution.
Secondly, scheme's structure allows for easy code analysis that could render a JIT compiler extremely efficient.
In my opinion this could be a killer combination in provoking LISP's regained acceptance.
So what do you think - are scheme and JIT compiling a perfect match?
Relinquish
I had an all-too-brief love affair with Lisp back in college in the 70s, but I never used it in my subsequent career in various scientific environments, thinking of it as an interpreter (somewhat slow) for doing symbolic processing rather than number crunching. However, a report from JPL recently came to my attention, which suggests that Lisp (using new compilers/interpreters) is competitive with Java or C++ in terms of programming time and execution speed & memory. While the authors themselves admit the study is not very conclusive or scientific, it did re-kindle my old love with the language.
Do you think its worthwhile pursuing Lisp solutions to everyday-type problems in scientific/engineering enviroment, which are numerically intensive or data-intensive? (for example, a particle physics monte-carlo simulation, or searching gigabytes of DNA sequence for patterns)
Sean McCorkle
Genome Group, Brookhaven National Laboratory
-- MarkusQ
Kent,
I am one of the lucky ones who programs professionaly in Common Lisp. I certainly appreciate your hard work and the hard work of everyone else who helped to bring us the ANSI standard - which serves to reify much of the esoteric knowledge the Lisp community has developed in the many years since the language was born.
While I do not need to be sold on Lisp, I know many people who do not fully appreciate the power of the language. To a large degree, this is due to misconceptions about the language. Specifically, there seem to be a number of what I would call 'cultural misconceptions'. Because many people have never worked in a tightly interactive development environment with incremental compilation, language-level introspection, and real code/data equivalence (not to mention the differences between CLOS and what the rest of the world seems to have come to believe is the God-given definition of 'object-oriented' programming) - they don't really 'get' what makes Lisp so special and so powerful. More to the point, because the logistics of developing and deploying applications in Lisp is different than what the typical c/c++/perl/java developer knows, the hurdle to even investigating or considering Lisp as a real possibility seems unnecessarily high.
Could you talk a bit about how those who have a feeling that Lisp might help them with their hard problems could go about bootstrapping their way into finding out? How would you suggest getting started? What is a reasonable set of tools for experimentation, and where should a beginner start with the language? (The standard is a big document!) Also, could you give an example of the type of problem space and style of application delivery that demonstrates that Lisp is more practical than many seem to believe?
What is the state of LISP usage in the Artificial Intelligence Community? How has it fared in that field vs mainstream languages?
For a good example of Lisp in mathematics, check out Maxima. It is written almost entirely in Lisp, and has a crapload of features.
Even i know the answer to this one.
There are 3 steps to make lisp a language of fashion:
1) Obfuscate lisp to death. Make it completely unreadable.
2) Write a popular news + comment site with it. Use this bully pulpit to bash all languages except your obfuscated language. Only give moderation rights to your language's supporters, and label all critics 'trolls'.
3) buy out, or otherwise eliminate slashdot. Since they have already implemented this plan with perl, you must eliminate the competition.
As participant in the standardization process for Lisp, what are your thoughts on standards for programming languages? What would you like to see different in this process? And speaking of standards, what do you think about the RAND licensing issue and the W3C?
The bias against Lisp is based on the simple fact that the first word that springs into most peoples pointy little heads when they hear the word "Lisp" is: "Gay". And that scares off all the homophobic repressed closet queens, which includes a large percentage of the computer industry. Especially Perl programmers, who use Perl as a means of expressing their manhood and covering up their repressed homosexual tendencies.
-Don
Take a look and feel free: http://www.PieMenu.com
So let us in on the secret - is this enormous project actually the raw output from some radically complex Lisp application?
How about good graphical bindings? Not many programs are strictly command line these days, certainly not for end user consumption.
Please give me ONE reason to use recursion.
Just one. Is all I'm asking for.
At least two companies built $250M worth of value from Lisp (Cadabra,Inc and Mergent Inc). I believe Paul Graham also sold a Shopping system built from Lisp.
I was employed as a Lisp engineer for Cadabra (which was acquired by GOTO/Overture). However, our comparison shopping product is now in mothballs, and I'm coding Java for my bread.
Thoughts on LISPs problems:
(1)Very low volume, tight supply and demand of Lisp programmers of any degree of competency.
(2) Package and Build technology horribly non-standard. 1 and 2 Leading to:
(3) GUI, OS and Network support declining with respect to languages like Java and Perl (see 2).
Vicious cycle ? Do you agree ?
Secondly, there is virtually a commercial monopoly on Lisp, through Franz Inc (However we had a lot of success moving to CMUCL). What do you think Franz should try and do to ensure that Lisp or its successors enjoys the widespread deployment and usage it deserves ? Java has Sun as it's advocate.
Should we be looking for either LISP to change its syntax or for Java to absorb more and more of LISP's capabilities.
Winton
Hi,
:-) see this article
Some comments and background first:
At least two companies built $250M worth of value from Lisp (Cadabra,Inc and Mergent Inc). I believe Paul Graham also sold a Shopping system built from Lisp.
I was employed as a Lisp engineer for Cadabra (which was acquired by GOTO/Overture). However, our comparison shopping product is now in mothballs, and I'm coding Java for my bread.
Thoughts on LISPs problems:
(1)Very low volume, tight supply and demand of Lisp programmers of any degree of competency.
(2) Package and Build technology horribly non-standard. 1 and 2 Leading to:
(3) GUI, OS and Network support declining with respect to languages like Java and Perl (see 2).
Vicious cycle ? Do you agree ?
Secondly, there is virtually a commercial monopoly on Lisp, through Franz Inc (However we had a lot of success moving to CMUCL). What do you think Franz should try and do to ensure that Lisp or its successors enjoys the widespread deployment and usage it deserves ? Java has Sun as it's advocate.
Should we be looking for either LISP to change its syntax or for Java to absorb more and more of LISP's capabilities. McCarthy said that he always planned to move to M-expressions, but never got round to it
Winton
The thing to make anything fashionable is constant loud-mouthed hype, just look at Java and Linux.
I'm wondering if LISP might have been more popular if it had a name that didn't invoke a joke coming to mind every time the name comes up:
Interviewer: Do you program in LISP.
Candidate: Yeth.
Has this been a problem over the years or is it largely overlooked? Maybe there's an old story or two you could tell in this vain.
I've been hearing lots lately about Lisp being used in mainstream software shops, and how it provides a powerful competitive advantage to good developers. Where would you recommend a curious, serious software engineer with real-world problems to solve start to study Lisp? Are there any good practical references (not necesarily for the Lisp novice, I can get that elsewhere) that focus on high-leverage software engineering techniques possible in Lisp? Things you just can't do in other kinds of languages?
'In knowledge is power, in wisdom humility.'
Braces?! You're thinking C, Perl or Java, foo! Lots of semicolons there too!
How doth ith feel to be one oth the moth important programmers worthing tothay?
"What I'm trying to get across here is that I'm no novice when it comes to computer trickery."
Hahahahahaha! This is great, almost Onion-like. Nice!
One of the primary reasons why Scheme and Lisp interest me is that they are well suited for making applications interactively programmable at runtime (Scheme especially, due to its small size). This is far more flexible and useful than applications which are only extensible through heavyweight, precompiled plugins. Since the Slashdot readership tends to be made up of people who are comfortable with programatic interfaces (unlike the general computer-using public), why do we not see more such applications?
But my grandest creation, as history will tell,
Was Firefrorefiddle, the Fiend of the Fell.
Uh, they already did that when it was designed.
Are you in touch with the current participants in the SRFI process? Do you know if any work is being done towards standardizing bidirectional FFIs between Scheme and other languages/runtimes (especially C and Java, but also CORBA, SOAP, and COM)?
FFIs are, of course, crucial for being able to use new libraries which are not designed specifically for your language. I'm convinced that the primary reason why C is so popular to this day is because it standardized its FFI very early on. I'm also of the opinion that this is why adoption of Scheme and Lisp lags so far behind single-implementation languages like Tcl, Perl, and Python, which have a "standardized" FFI by default.
(For the newcomers: SRFI = Scheme Request For Implementations, the current, informal "standards" process for adding features to Scheme; FFI = Foreign Function Interface.)
But my grandest creation, as history will tell,
Was Firefrorefiddle, the Fiend of the Fell.
Why are so many so-called implementations of Scheme incomplete when compared to the current spec? The only R5RS compliant implementation of Scheme for Java which I've found is SISC, yet the project seems to be largely unknown, even within the Scheme community. Have you had any experience with it?
But my grandest creation, as history will tell,
Was Firefrorefiddle, the Fiend of the Fell.
(1) Better IDE
I suspect that when people say they like or dislike a particular language, they often mean they like or dislike the entire development environment associated with that language. LISP needs a powerful IDE like MSCV++ with syntax-sensitive indenting, keyword auto-completion, and chroma-coding (perhaps they already do?)
(2) Non-intrusive garbage collection.
One thing that makes me shy away from using LISP for commercial product is the long pauses of the garbage collector that kicks in at unpredictable times. I would like to have a guaranteed maximum pause time.
(3) Efficient recursion
I would like to have an implementation that does not use up too much stack space with non-tail recursion. For example, the return path for a case like A calls B calls A.... probably can be compressed to 1 or 2 bits per call.
(4) Better handling of large projects
I don't have a specific suggestion on this but just a vague notion that large projects in LISP are hard to manage. Granted, part of the charm of LISP is that you can quickly write and run code without much planning, i.e., without declaring variables, and the binding is non-lexical i.e., last-visible. So my question is, is manageability and writability mutually exclusive?
Download Mazes and Puzzles from www.puz.com
From hypermeta.com:
... It dismays him that there's such a bandwagon of people who think thse are the automatically right answers in all contexts. It's a kind of religious dogmatism he finds very distasteful. ...
Kent does not like software patents, but he does like copyrights and is a strong advocate of free market capitalism. Unlike a many people, Kent is quite ambivalent about the idea of both the "free software movement" and the "open source movement".
Where does Kent think that this "dogmatism" comes from? If he thinks the current open source zeitgeist is an oversimplification of a complex issue, what is his more nuanced view? How does he square the simultaneous holding of libertarian social values with communistic licensing ideologies by many in the open source and free software "bandwagon", in light of his characterization of the movements as simple minded.
Although I personally agree with Kent's observation that these movements have taken on a import in discussion that is more perceived than real, I do think the tone of his page is more than a little condescending and would like to hear why it is a more "complicated opinion" to think that open source isn't automatically the "right answer", than to think, for example, that it is?
sig is
The things of it is, if (1) through (3) were really factors then I don't think Java would have taken off the way it has - Java has had those problems, though is getting over them.
I think (4) is a factor for Enterprise adoption - though I loved using Scheme in school but I'm not sure how well it would work for large projects with a lot of people.
In general though, Lisp has seemed to lack a big champion to promote Scheme and help move it into new spaces. I grew interested in Java initially because I really liked Sun, the company, and thought they might have some good ideas - in the following years Sun has done a tremendous promotoing job, but in helping make it easy for developers to choose Java and to push Java into every space, like small devices or distributed systems.
I think what also helped Java is that there is Java, the platform AND language vs. Lisp, the language. With Java you gain quite a bit more than just another nice programming language, you also get the features of the platform (like security and a wide set of standard API's) to build on.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
I'm not Scheme expert. But I really wonder if you need any text at all to learn it. What little work I've done with Scheme has been in my occasional attempts to work through S&I. That book is interesting because it (a) assumes no prior knowledge of Scheme (b) spends very little time explaining the language as such. And yet the whole book is about Scheme programming! It would seem that Scheme programmers spend less of their time thinking about language issues than other programmers.
- C++ isn't a fully object-oriented language. It's a set of object-oriented extensions grafted onto a non-OO substructure. One particular place where you can see this is the way the object-oriented extensions combine with operator overloading and type coercion to create something that's deeply confusing. Also, since C++ is aimed at building very efficient systems programs, it skirts things that seem difficult, like multiple inheritance.
- C++ has no garbage-collection. This means that lots of things that should be natural (like having methods that CONS together new objects and return them) become difficult and fraught with error.
Scheme, on the other hand, provides a good framework for teaching not just object-oriented design, but functional programming, as well.Note that I'm not trying to get into a war about the best programming language for building things, nor am I trying to diss C++. But I think it's a pretty crummy language from a teaching perspective.
Fundamentally, I don't think that CS education should be vocational education. If you learn the concepts and theory, learning a new language is a breeze. If you don't, then you don't walk away from the education with much; everything you learn is in imminent danger of evaporating in your hands.
Recursion is a critical concept and is much harder to master than iteration.
I once taught Computer Science in a University where the introductory courses were all taught in procedural programming languages. I had to teach theory and some other advanced topics to people who'd never mastered recursion and it was unspeakably painful. Like teaching physics to students who hadn't mastered algebra.
One (ok two) of the nicest features of lisp, IMHO, are defmacro and defadvice, which allow you to use the full power of lisp to rewrite an arbitrary expression or function and thus extend the syntax and semantics of the language. This is so far beyond the C macro preprocessor it's not funny (and of course Java has no preprocessor at all, whine). I miss this more perhaps than any other Lisp feature. Various people have worked on getting something like this into C/C++/Java: ePerl lets you use perl as a macro language, and some of the AOP (Aspect-Oriented Programming) folks are old lisp hackers (I think Alan Bawden is in that group, for instance) and these people would like to see some kind of defmacro/defadvice functionality in C.
So here's my question: do you think that's possible, given C's irregular syntax and poor token/string handling, and would it be a good idea? Any thoughts on how it could work?
If I was spending my own money to do lots of software development, I would almost certainly rather spend it on Lisp instead of C++ when either language is reasonably suited to the task at hand. But this has much more to do with programmer productivity than with run-time performance. Don't pay too much attention to a single experiment. Every language studied with this same problem that has builtin hash tables has looked OK vs C++, including Python and Tcl, which are no way performance champions. If they were, we wouldn't need NumPy and SWIG.
> LISP needs a powerful IDE like MSCV++ with syntax-sensitive indenting, keyword auto-completion, and chroma-coding (perhaps they already do?)
Never seen MSCV++, but mere lowly Emacs does at least part of this, and could be programmed to do the rest.
> One thing that makes me shy away from using LISP for commercial product is the long pauses of the garbage collector that kicks in at unpredictable times. I would like to have a guaranteed maximum pause time.
There are lots of garbage collection strategies around, addressed to different tradeoffs, so maybe there is a Lisp implementation that uses one that will suit you.
However, in the limit, the garbage collector has to find memory as fast as your program consumes it. You could have a gc that only spent, say, 1ms whenever it butted in to do its business, but if your program is grabbing memory too fast you'd just get lots of 1ms interruptions without too much substantial computation between them. At some point your gc has to be in equilibrium with your program, regardless of what strategy it uses.
Sheesh, evil *and* a jerk. -- Jade
No one here claimed that C++ was a "full" or a "true" object oriented language. Furthmore, while I agree that the overuse or misuse of operator overloading can be "deeply confusing", i would not go as far as to say that when it comes to type coercion. Data typing and type coercion is a very important concept for anyone truly interested in the efficiency of execution and storage on real-world digital microprocessors. As to multiple inheritance, it is often -- like Scheme itself -- a high-minded conceptual approach to programming that often makes little sense from an efficiency standpoint. Furthermore, speaking of a concept that can be thoroughly misused or overused... you just named one of the worst offenders!
Yes, you are correct, C++ has no garbage collection. Thank the lord! For many, that is a significant plus, not a drawback. While you are correct in saying that any functionality that requires memory allocation and deallocation becomes fraught with error, it also means that you are not subject to the ineffeciences and vagaries of a universal garbage collector.
You and others here praise Scheme for its elevation and promotion of the concept of functional programming. And while, yes, it can be elegant; functional programming, and Scheme in general, tend to promote recursive over iterative algorithms. And while tail-recursive procedures can be optimized into the iterative form, it is nevertheless my opinion that recursion often is an exercise in the elevation of concept over execution that Scheme epitomizes. It becomes so much form over substance. IMHO, they want to teach some algorithmically pristine view of the world that does not necessarily mesh with the programming effeciences and inefficiences of real world digital devices.
I agree that CS education should not be reduced to vocational education or mere certification programs, but neither do I believe in dogmatically elevating algorithmic form over machine code substance and being so often blythely ignorant of the implmentation efficiencies and tradeoffs that must be made for such a pristine view. It is the difference viewpoint between a computer programmer coming from a mathematics background versus one coming from a digital electrical engineering background. One views solely algorithms and functions, while the other is mindful of things like register sizes and machine code instruction efficiencies.
Richard P. Gabriel and Ron Goldman argue that software needs to become more organic, more forgiving, less brittle, less obsessed with performance, and more people-centered. One example they give is of small agents cleaning up objects if their class definitions have changed since their creation. This is possible using the Common Lisp Object System's (CLOS's) Meta-Object Protocol (MOP), which is a run-time MOP, but not, say, with Christian Queinnec's Meroon object system for Scheme, which can be described as having a compile-time MOP. On the other hand, Meroon's object system, in my experience, has much higher performance than CLOS.
Where do you stand on the flexibility-performance divide?
As a frequent LISP user, I think you are right about 1 & 4-- 2 & 3 would be nice, but GC doesn't bug me so much since I turned off the debugging feedback that told me every time it was collecting, and I almost never have to use non-tail recursion, and even then I find myself re-writing most recursive calls with mapcars and lambda functions.
I think the best IDE I've used is for MCL. The editor, FRED (Fred Resembles EMACS Deliberately), is probably better than the ilisp modes I currently use in EMACS (the paren highlighting keeps breaking, for instance.) Allegro's Windows IDE was pretty fancy, but was very difficult to work with. An IDE that allowed for better large-scale organization, as well as better GUI interface, could go a long ways toward reviving LISP. Something like Delphi/C++ Builder, but in LISP. But don't ask me how it would work.
But, in order to understand recursion, we must first understand recursion. ;)
-
Basically, nothing you ever do in undergraduate computer science will be useful. It's there purely to teach concepts. Thus, it seems pretty silly to try and force it into de facto standards. If a class is teaching about graphs, for example (and operations thereon), nothing is gained in doing in C++ over Scheme except extra headaches due to the pragmatism of C++ (and possibly some extra practice in C++, so that's not really the purpose of the class).
It's in everyone's best interest to understand things as quickly as possible. If I'm a student, I can do an assignment in Scheme in a few hours that might take a few days to do C++. This means that more topics can be covered in the class (which probably only runs about 15 weeks). Since the class is there purely to teach me computer science concepts (such as graph theory), it doesn't make any sense to waste time in C++, to be more "practical" about a thing which is inherently useless anyway.
I've played around with both Lisp and Scheme (no strong preference either way), enough so that I feel pretty comfortable with the languages and my next step would be to write a minor application. But my lisp compiler sits around unused while I merily do useful (and occasionally interesting) things in Perl, Java, C++, ... Why? I think my problem is likely related to why Lisp isn't used much in industry: it's the integration, baby.
:)
Now, I haven't poked around a lot, but what I want to know is, "Where are the libraries? The toolkits?" Perl has CPAN and there are so many C and C++ libraries that I don't want to think about it, and the standard Java libraries are pretty impressive in their scope and breadth (if not in quality or consistency, but I hear they're improving rapidly). All these languages can tie in easily to OS services and tend to play pretty nicely with each other. They have built in support in things like web browsers and web servers. Where is mod_lisp???
My question for you is: do you see any interest in the Lisp or Scheme communities to become mainstream in the first place? Or are they pretty much content with where they're at? Where is the work going on to make Lisp or Scheme competitive with Perl, Python, Java, etc in terms of portability and ubiquity and integration with important other programs (especially web stuff)?
Thanks for your time
technically, by giving the taliban $43mil in may this year, the us has "supported terroristic activities against the United States of America".
Don't blame me if you don't like it...
My primary reason to have a scheme-shell type interface is that it is consistent. I do plan on having Unix compatability built on as either a layer, or a module.
I didn't intend to have language enforcement, but the best-of-both-worlds scheme/lisp hybrid language that I plan to prepare for HomunculOS (tm) would be natively supported, and would allow EASIER tweaking/personal tuning of the OS, compared to the OS's written in C, like Linux and AtheOS.
What I envisioned was an interface that's like EMACS on steroids. Imagine the power! It's just that some of the commands are counter intuitive. The thing I love about Scheme is that the conventions are somewhat more intuitive than Lisp.
Let me know what you think. . .
All I read about LISP makes me want to use it. when I was a math student, I imagined programming languages to made of pure logic. Imagine my disappointment as I slowly morphed into a professional programmer and found so few tools with which to implement what I knew. But I'm having trouble starting with LISP.
Call me spoiled, but I've been looking for standard libraries to talk to COM ports, ODBC data sources, or various Internet protocols (POP3,HTTP, LDAP). The search is coming up pretty flat. I could write these libs as I need them, but I don't want to HAVE to.
So where can find some extensions and APIs for LISP?
The LispOS mailing list was the first place I looked. My design principle can be summarized as KISS aSS:
:o)
Keep It Stable, Secure, and Small/Simple
j/k
.
If anything, Scheme has taught me clean iteration techniques (through its tail-recursion syntax). Recursion isn't really that hard to grasp, but iteration is easy to screw up. And, judging from my fellow non-programmer students' reactions, teaching Scheme as a first language (and introducing set! as late as possible) creates programmers who enjoy writing clean code in general - modularized, high-level, generic code.
cons of the 2 languages, was that a pun?
How the fuck is this Informative?
It seems that you haven't looked at Lisp in the past 10 years. Otherwise you would have known that all your complaints except for the one about compressing stack frames have been answered very well already.
Compressing stack frames is probably impossible, because otherwise you'd lose information. You at least need to keep the return address and the size of the stack frame on the stack. That's much more than 1 or 2 bits. If you want to do very efficient recursion, put all the functions involved in a LABELS form and put a (declare (speed 3) (debug 0)) in the surrounding DEFUN. That will tell the compiler to do whatever it can do to speed up the function calls, at the expense of debuggability.
-- Rahul Jain
Perhaps if people knew WHY their replies keep getting zeros, they would stop repeating behavior that gets them zeros.
Thus, I propose that someone be required to give an explanation of why they are modding somebody down. And, plese be more specific than "troll". "Troll" is anybody you don't like these days.
Table-ized A.I.
LISP is very "elegant", I am told, because it has a single syntax for everything - braces, and lots of them! This allows LISP to be easily meta-programmed to a high degree, and I agree that this is an extremely powerful feature. However, it seems to me that the single syntax really detracts from the readability of the code - without a variety of seperators in the language it becomes a much larger effort to "parse" the code as a human [even though the computer finds it much easier!] This becomes particularly important in team projects and maintenance programming - which academia traditionally doesn't have much care for anyway! Where do you see the ideal balance between psychological "ease of use" of a language versus mathematical "elegance"?
Paul Graham makes some big claims for Lisp/functional programming in some of his essays (see www.paulgraham.com). But logic also dictates that some sort of artificial intelligence will have to come to pass; otherwise, we continue telling the computer each thought to have, hoping we thought of everything, and that those thoughts don't clash and crash. (To be sure, this hand-built, hand-coordinated approach is already pretty much maxed out.) Between Graham and the inevitability of AI's reemergence, Lisp seems like a good bet. Or am I (and Graham) way off?
--- WWSD? What Would Strider Do?
Although it's called VisualLISP, does pretty un-LISP like stuff, and other weirdness, like an actual LISP IDE. But nonetheless, it's a major software package that uses LISP.
the most popular programming languages today seem to enjoy the support of rich development environments. features like displaying reverse call graphs, integrated debuggers, and other visual cues (beyond syntax highligting) that emacs does not appear easy to augument with.
what does your LISP coding console look like, and what tools do you recommend?
free software, repositories of emacs mode enhancements, essential code analysis tools, and other visual tools would all be pointers of interest.
thanks,
- Ryan
In theory, everyone should be using LISP: it's fast, interactive, elegant, extensible, and reflective. Many modern languages lack its power: e.g. most "design patterns" are solutions to the problem that you aren't using LISP.
As time goes on, I get to program in LISP less and less, largely because it is being used less. I've wondered about this for some time, and here's my theory:
In the old days, when computers cost $200,000 a piece, the scarcity of hardware made the competition for the chance at a CS degree very high. Graduating required at least the ability to write a compiler, a toy OS, know how to use all the standard data structures, know algorithmic complexity, Turing machines, computability, etc. A DEC-20 supported so few users that a Uni could only graduate 40 CS majors per year: the bar was raised to the point that those making it intuitively understood that LISP expressed computation well.
When desktop machines arrived, there became a demand for programmers (people that could turn ideas in programs.) The schools could turn out more programmers because resources where cheaper for them too. CS (or IT) became as common a major as English Lit, and the bell-curve of talent was no longer chopped off at +3 sigma.
10 years ago, many new CS graduates couldn't explain what a Continuation was. Now, many can't explain how a hashtable is implemented. Moore's Law has obsoleted deep CS knowledge (and thus LISP,) as brutally as the industrial revolution killed weaving skills.
There will always pockets of LISP (the skilled craftmen working on human-scale projects,) but the vast bulk of computer programming is now carried out by people with neither the time, inclination, nor mental capacity to understand what was once Computer Science.
I wish I were wrong, but I fear programming is becoming like food: yes, there will always be some great chefs, but most people in the industry will never be able to progress beyond their fast food outlet's Fryolator.
I've never bought the CS degree argument that you need theory, etc. in order to be fit enough to catch the next wave. Believe me, nobody like Oracle or Microsoft is going to come out with something so new and big that it'll take a CS degree to grok it. The real IT world makes the next wave as catchable as possible for their developer base. Hence, good IT jobs are very possible without CS degrees. Look at MS: a study in living totally outside the CS degree.
A CS degree says you can tackle big stuff and not get thrown the first day. If you don't want to do bread-and-butter data management work, but stuff more cutting edge, then yes, the compter as a scientific subject should be in your realm of knowledge. But when as many as 75% of any given CS program's students only want big-buck commercial data management gigs, why torture them with CS theory?
--- WWSD? What Would Strider Do?
Q: Are you lisping?
A: No, I'm scheming.
--- WWSD? What Would Strider Do?
Although the syntax is very different, Java has a run-time environment that's LISP-like, with dynamic loading, run-time safety, and garbage collection. Java is now the first language taught at Stanford. Is Java now being used where LISP once was?
in languages like Java. (Don't say do it with
threads. Performance will be abysmal. Remember
that it's supposed to be legitimate Scheme style
to use continuations anywhere other languages
would use gotos, loops, or even ordinary function
calls, not just fancy constructs like coroutines.
You can see him giving a lecture about this idea here. The video is only available in Windows Media format on this site.
Damn it! How do you know ??? :)
Julien.
It's all about learning the basic fundamentals of programming, algorithms, data structures, different ways of solving things, lot's of theory - it's called "computer SCIENCE", remember.
Scheme is a good teaching language for a lot of reasons:
Most CS students nowadays have experience with computer "programming": VB, Delphi, C, C++, Java, Javascript,... nearly everybody has some experience with some programming language. The problem is that a lot of this experience isn't always built on the proper fundamentals, they're mostly about solving a particular problem without knowing why they should use data structure X or algorithm Y. The usage of Scheme as a teaching language has the advantage that most (if not all) students are forced to learn a new language, which probably isn't at all similar to what they're used to - enabling the teachers to start from scratch. That way, there aren't differences in the level of knowledge of the students, also a plus.
The language structure of scheme is very flexible: most (if not all) fundamental bits can be dealt with properly in Scheme: procedural programming, heaps of different data structures, OOP,
I do agree that other languages (be it C, C++, Java, Pascal, Fortran, O'Caml, Eiffel,
With the boom of IT and internet the last 5 years, there are so many programmers out there that lack those proper fundaments. I'm not saying that they aren't any good, but there are a lot of people that don't have a grip on what lies beneath - which is a pity.
Don Knuth showed us that computer programming is an art, not based on a specific programming language, and I tend to agree with him
Okay... I'll do the stupid things first, then you shy people follow.
[Zappa]
This is not true. C++ has full support for OOP (and lots of other paradigms as well by the way). In that aspect it is more complete than Java which misses multiple inheritence due to concessions to its VM interpretation. Operator overloading is a blessing or a curse depending on how you use it.
Too bad that many beginning C++ programmers expose the same habit like new wordprocessor users who try out every font and style to create ugly documents, but that's not the fault of C++.
Also, since C++ is aimed at building very efficient systems programs, it skirts things that seem difficult, like multiple inheritance. C++ has no garbage-collection.
Again I disagree. Java has shown how helpful a modern, large, portable, well documented set of libraries is. The libraries are the real part, where C++ could need additional work.
The conventional wisdom about my college's CS program is this:
1. We spend our first year doing Java, so we can concentrate on designing clean software.
2. We spend our second year working in Scheme, so we can actually write algorithms that work.
3. There are many students, even when they are working in C, who start a complicated problem by solving it in Scheme, and then worrying about the language change later.
The essential idea is that all CS students will write as cleanly as possible from design down to the nitty-gritty search algorithms.
I have read that in Lisp you cannot create threaded code. If this is true is it just impossible to implement threads within the Lisp model of computation or is threaded Lisp not used because it would make the language ugly (Lisp being the "only beautiful programming language").
We've seen nearly everything written in lisp these days. Are there any kinds of projects you can think of which would better have been written in another language?
"You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
My program at the University of Washington is very much against the "get them ready for industry attitude" which some of the students don't like. We learn Scheme in a class called "survey of programming languages" as the first of a series of four languages meant to touch on the difference between functional, pure functional, procedural and object oriented code. Early in the course we write programs for Scheme in Guile. The final project is write an interpretor of Scheme in Java.
I think this is the best way to sell Scheme. Once students see how easy it is to write an interpretor for it they get all kinds of great ideas of how to integrate it into other applications.
What do you think is the nicest Free Software Lisp environment now, and what would need to be changed or added to make it as good as or better than the most appealing Lisp environment you have used?
Did you can have anything to do or know who had anything to do with the "loop" form in Common Lisp? Why does it look and feel just like a FOR loop on C (from the Graham book):
(loop for x = 8 then (/x 2)
until (< x 1)
do (princ x))
This is one of by biggest minor nags about CLisp and I am very curious what was going through the committee's collective head. Didn't anybody balk at this enough to at least get the syntax cleaned up?
-j
Nobody ever mentions call-with-current-continuation. Scheme-like continuations seem to change everything in a language. Now Scheme behaves like Icon in that any function can return multiple times. Coroutines and cooperative threading become trivial to implement. Try to wrap your head around returning a continuation from a function or passing a continuation into another continuation. Continuations provide a functional way to remove control logic from a program.
;; delays the evaluation of the function thunk (a thunk is a function that does not take an angument) until it is later needed.
;; forces the evaluation of the promise prom, which is the value of evaluting the origiinal thunk.
...) ;; returns all its arguments, one at a time (meaning the function returns multiple times), until it has no more arguments to return. At that time it fails, and computation backsup to the preceding the preceding amb form.
Continuations make forms like "promise" and "force" work. With promise and force you can make Scheme lazily evaluate arguments to a function of an infinitely long list (or promise to provide a continuation). force will only evaluate a promise once, no matter how many times a promise is forced.
(promise thunk)
(force prom)
You make lists where the tail if the list is a promise to evaluate the rest of the list.
Another fun Scheme form is "amb" meaning abigious. Solving the 8-queens problem becomes trivial. Amb allows a program to search a state space without having to encoding the search and backtracking logic.
(amb
C++ has no elegant way to specialize on multiple arguments of a method, because C++ methods are tied to classes. "friend" is a symptom of this disease.
Sure, you can use various "patterns" to get around weaknesses in the C++ object model, but why should you have to?
Also, when you re-define a class, you have to recompile your C++ program. Which means it has to stop running. Neither is true in CLOS. You can interupt a CL program, re-define a class, write code (if necessary) which updates older instances to work as instances of the re-defined class, on demand, and then continue execution, perhaps after you've interactively tried your new class definition.
Still think C++ really supports OOP?
I have now been learning + programming in Common Lisp about 3-4 years. I have learned that CL gives more degrees of freedom to programmers than any other language I have learned before (C/C++, Java, ,Ada ,Prolog ,Haskell, Pascal, Python, Perl).
It is said that (Common) Lisp is programmer amplifier. The good news is that superior programmers/architects get 100X boost. But my experience is that bad/medicore programmers can shoot themselves in the foot as badly as in Perl (usually in more abstract level).
My question is:
Can Common Lisp be used/learned in company of tens of people who have been using C/C++/Java and only 10 persent of those programmers have masters degree?
Dyslexics have more fnu.
For example, I've seen people reinvent OO databases, I've seen more linear time searches than you can shake a stick at (this is a sure recipe for disaster in big-buck commercial data management), I've seen parsers that would make you want to cry, written by people who never took compilers, etc., etc.
CS without theory is like engineering without physics.
Those points are all well and good, but they don't get at my argument. I wasn't trying to argue for the abolition of C++. Just trying to point out some reasons for using Scheme over C++ for instructional purposes.
Sorry if I was being harsh, but there is an important difference between "interpreted" and "interactive." Macintosh Common Lisp, for instance, compiles everything to native code, but is still just as interactive as an interpreter. Since compilation can act on individual functions, it is very fast, and the overhead is completely negligible. I enter (+ 3 5) and get 8 back without a blink. Many people use the "Lisp is interpreted, therefore slow and inefficient" myth as a way to dismiss it.
More typically (CMU CL), when you type things by hand, including function definitions, they are held in interpreted form, which is more flexible for tracing, debugging, introspection, etc. You have to add the extra step of asking things to be compiled. You can ask for individual function definitions to be compiled, or for whole source files. Much of the work that went into Common Lisp was to ensure that compiled code and interpreted code have exactly the same semantics, unlike the original Lisp implementations.
I haven't done work on the PC, but at least on Mac and Unix, it is de rigueur to support a foreign function interface to libraries that follow the native linkage format (C, Fortran, etc.) In the other direction, things are a little more limited, as Lisp has a pretty elaborate run-time environment, that can be difficult to access from more primitive environments like C.
If you mean linking to Lisp libraries, then I believe that the shipped binaries would have to be Lisp platform specific. I.e. Franz "fast load libraries" have a different format from Xanalys.
I've heard a lot of talk on comp.lang.lisp about the use of CORBA as a mechanism to solve a lot of these inter-language problems. Lisp provides a very good platform for using such protocols.
Paul Graham in 'Being Popular':
Does Common Lisp have/constitute a system to hack on vanilla hardware?
The tool for integrated circuit design that leads (monopolises ?) the market is using a lisp/scheme like language called "skill".
Yes, you can get many advantages with strongly typed functional programming languages. But, you can get most of their abstraction power with Lisp's first-class functions and macros, without the pain and suffering of adhering to formality. Most Lisp hackers acknowledge the utility and power of functional programming, but use Lisp anyway because it doesn't force them to do everything functionally
Yes, Java, Python and Ruby have many of Lisp's features without Lisp's syntax. But, they don't have Lisp macros, so the abstraction power of designing your own language is not available to them. I use Lisp because it allows me to take
FileInputStream infile = null;
try {
infile = new FileInputStream("foo")
} catch (Exception e) {
} finally {
infile.close();
}
and replace it with:
(with-open-file
(infile "foo"
)
and get the same level of safety, with a lot less repetitious code.
To a Lisp hacker, XML is S-expressions in drag.