Domain: alu.org
Stories and comments across the archive that link to alu.org.
Comments · 21
-
Re:Pffft.
There are a few problems with functional programming languages that have prevented their true adoption anywhere.
1. Limited paradigms - I always prefer languages that let me write my code the way I want, a la C++, than a language that requires a strict paradigm from academia like Lisp. If I want to use the inherent hardware property based side effects of certain code structures, let me. Programming languages =/= mothers.
Common Lisp (and Scheme, even more so, although the community is more oriented toward impure functional style) enforces no fixed paradigm. It can be used functionally (conses happen to be a pretty good data structure for functional algorithms), but is more often used in an object-oriented manner. It was even one of the first OO languages, and AFAIK the first to implement multiple dispatch. It even has a powerful imperative operators.
Thanks to macros and the metaobject protocol you can even add new paradigms to the language. Paternalistic, Lisp is not.
3. Most functional languages except Ocaml are like Ruby and Python in that they have tremendous performance overhead. For a consumer application, that overhead usually doesnt impede adoption (its more like the software is poorly written than the applications environment is too inefficient). But when talking about server programming the costs of running something under Ruby vs C are astronomical, and the same problem arises with functional programming. It might not hurt the consumer that the Python implementation of their music player consuming 30% more clock cycles than the exact same program written in C, but it does cause huge scaling issues with popular resources like Twitter.
4. In extension of 3, functional programming is getting away from how the hardware actually works. It is good for a novice that doesnt want to get into the details of pointers and caching and disk IO, but professionals should enter the game knowing how the underlying system runs and that making tradeoffs for readability by someone who doesnt know the language anyway vs performance benefits falls to the wayside. Developer time is important, but when you factor in the massive overhead trying to get 20+ year professional developers in C to try to think functionally you are never justifying the upfront cost of using the languages.
Languages like SML and OCaml are actually more optimizable than C. Thanks to providing more type information &c they can take advantage of fancy whole program optimization and whatnot.
The "way hardware works" is an artifact of C being the dominant language. There's no reason hardware couldn't (and it has before) have GC assistance, type checking, capabilities, etc. It's really not appropriate and scalable to view the computer as something that flips bits around a gigantic linear array... it was reasonable to deal with that when you had 4000 words, but not when you have 400000000 words.
Software is nice because you can abstract! Writing programs to a model of an infinite store that Just Works (tm) is beneficial to everyone -- it frees source code from a particular hardware implementation, is easier to reason with, and separates the concern of hardware resource management.
-
LISP
Search for Common Lisp stories and weep.
-
Kid's Programming Languages
Unless they're vaccinated, don't give them MUMPS; if you do find a nice Doctor (Like Dr. Pascal), 'cuz Pascal was fun for me in College.
If they like noises, Squeak is good, but the cogently verbiaged might prefer SmallTalk in a group. For those speech impaired, knowing there's other people who Lisp would be good.
The mean ones will abuse Snobol in Winter
The A.D.D. kids will probably like the feeling of Euphoria they get from their first
Of course, you could teach them a very nice language with a horrible name, Brainfuck.
Or, you could just look Here for a comparison of popular programming languages. -
Re:waiting
Of course, once you get the hang of writing Elisp functions, things are *much* more difficult to emulate in vi/nvi/vim...!
-
Re:Apple had its own reasons...
It's 2006 --- no programmer of desktop/workstation/server programs is going to spend time optimizing their code [...]
You know, I keep hearing these arguments as to why Lisp is Back, but I see precious little evidence for it.1) Programs are becoming platform-agnostic. [...]
2) The world is moving towards higher-level languages and higher-level programming constructs. [...]
-
Re:From a former C++ fanA lot of stuff that is implementation-specific or DIY in Scheme (packages, classes, structs, "non-hygienic" macros, useful higher order functions, conditions (exceptions), pretty printing and many other things) is standard in CL.
CL's problems actually stem from the lack of Open Source libraries (as there are just too few Lispers). There are two approaches to solving these problems:
-
(a) use commercial implementation which has everything included. An example of such implementation is Allegro CL which includes hardly much less functionality than
.NET Framework; they also provide mind-blowing CL OODB and a lot of other useful stuff. It's quite expensive though. - (b) use existing open-source CL implementations & libraries, improving them as you need, and maybe contributing some your code.
Approach (b) is feasible when most functionality of your product resides in your code and not in libraries. E.g. reddit.com code is mostly a rather thin wrapper around database + Web server, so free Common Lisp implementation may not be a best tool for the job. It may be better to use a commercial CL implementation or some other language (such as Python) in such cases, depending on how much money & spare time you have.
Another example - I'm writing an online store now as a semi-holiday project, I don't have too strict time constraints there, so I'm using CMUCL+CLSQL+TBNL to implement it. With severe time constraints it would be better to use Python in my case, as I don't want to pay $$$ for commercial Lisps.
But there are plenty of cases where Lisp proves to be just the ideal tool for the job.
-
(a) use commercial implementation which has everything included. An example of such implementation is Allegro CL which includes hardly much less functionality than
-
Re:LISP is amazing.
As already pointed out elsewhere in these threads, most people bashing (Common) Lisp have no idea of the language status.
While the ANSI standard correctly includes CAR, CDR, CADAR, CDDDR etc etc for historical and practical reasons, it also includes FIRST and REST (and SECOND, THIRD, up to TENTH)
So, before posting other comments like the above, you are kindly required to learn by hearth the ANSI standard (which can be found at www.alu.org) plus the definition of all the libraries that the 4 commercial implementations plus the 5 "free" ones provide.
What would you end up saying otherwise? Maybe that Common Lisp is an interpreted language?
:)Thank you -- marcoxa
-
Re:BIological Systems
that hybrid, son, is called lisp (at least by some
;-). -
"C/C++ is no longer a viable development language"OK, fine. But what is? It does no good to make a statement like that unless you back it up with an alternative.
Personally, I dig Common Lisp.
-
Re:Looks upon the steel book gathering dust and weThis is sooooo wrong...
There are plenty of Common Lisp tools (IDEs, web servers, utilities, etc.) available at reasonable prices or free: Allegro Common Lisp, Corman Lisp, CLISP is free...
Go read the Lisp Tools
Everything you need is available. Get a Lisp today!
-
Re:Learning Lisp?
Yes.
Read "Structure and Interpretation of Computer Programs" by Abelson and Sussman.
It is a fabulous book for introduction into functional thinking and shows many enlightening things about what you can do with Lisp in general and in this case Scheme.
Your next step might be "ANSI Common Lisp" by Paul Graham, giving an introduction into the Lisp dialect with which major applications in the industry are done (REALLY done, Franz Inc. and Xanalys, both commercial Lisp implementors and vendors have increasing sales over the years) - also a very clear and easy to follow book with lots of examples and exercises and a very cool reference which I tend to use a lot while Lisp coding.
If you prefer online information, you can find many links and pointers to Lisp on the webpage of the Association of Lisp Users (ALU, http://www.alu.org).
(Yes, I'm paid to code in Lisp)
(Yes, it's a lot of fun) -
Yeah Lisp!
Everyone always stares at me when I profess the beauty of Lisp, as well as its possibilities. While being the second oldest language still in use (after Fortran), it's still modern with respect to the new applications people are finding for the language. For the curious, here's some other cool Lisp/Scheme projects:
A Common LISP Hypermedia Server
UTexas's archive of classic Lisp AI code (SHRDLU, Eliza, etc.)
SPIKE - Planning/Scheduling software for the Hubble Space Telescope
Babylon - an environment for developing expert systems
Lisp-Stat - statistics package
Also, here's a great directory on more info and resources on Lisp:
Association of Lisp Users -
Mockmma
Richard Fateman has a program called "mockmma" that is a simple knock-off of Mathematica. I don't know how complete it is, but I doubt it is anywhere close to being a complete clone of Mathematica. It's written in Common Lisp and there's a pointer to it on the ALU's Lisp Tools page.
There are other resources:
- The Numerical Analysis & Associated Fields Resource Guide, especially sections "NA Software Libraries on the Net" and "NA Software Packages on the Net".
- Usenet newsgroups sci.math and sci.math.symbolic (but read the FAQ, first, and read the news groups for a few weeks before posting!)
I'm sure if you spend a little time with a search engine (Deja, Google), you will turn up more information. I found the above in less than five minutes, so I'm sure there's much more information out there if you look a little bit.
Rev. Dr. Xenophon Fenderson, the Carbon(d)ated, KSC, DEATH, SubGenius, mhm21x16 -
Mockmma
Richard Fateman has a program called "mockmma" that is a simple knock-off of Mathematica. I don't know how complete it is, but I doubt it is anywhere close to being a complete clone of Mathematica. It's written in Common Lisp and there's a pointer to it on the ALU's Lisp Tools page.
There are other resources:
- The Numerical Analysis & Associated Fields Resource Guide, especially sections "NA Software Libraries on the Net" and "NA Software Packages on the Net".
- Usenet newsgroups sci.math and sci.math.symbolic (but read the FAQ, first, and read the news groups for a few weeks before posting!)
I'm sure if you spend a little time with a search engine (Deja, Google), you will turn up more information. I found the above in less than five minutes, so I'm sure there's much more information out there if you look a little bit.
Rev. Dr. Xenophon Fenderson, the Carbon(d)ated, KSC, DEATH, SubGenius, mhm21x16 -
Re:Squeak for yourself
While there's no denying that C++ is a steaming heap of offal, ST is not the last word in OO languages.
I'd rate Self, Dylan, Cecil, and Common Lisp as OO languages with better designs than Smalltalk.
This is not to say ST is bad; in fact it's wicked cool. It's just not the last word in OO.
-
Re:Why I never learnt LISP
Take a look at: Association of Lisp Users.
A book called "Successful Lisp" is available on-line. The standard is available under the name "Common Lisp Hyperspec" (HTML). It can be used in [X]Emacs as on-line help (the elisp for it is available somewhere). The Lisp book "Common Lisp the Language, 2nd Ed" (CLTL2) by Steele is also available online. Actually the amount and quality of the material available for free surprised me when I started learning lisp.
If you're looking for a simple intro I'd suggest Graham's "ANSI Common Lisp". I also have a copy of SICP, but it's more about programming in general than lisp as a language and it's quite heavy stuff. All the recommended books on the ALU site are quite good.
-
Re:Why is LISP superior?
I'm by no means a Lisp expert (I have more experience hacking C and Perl), but the more Lisp code I write, the more I begin to appreciate the language. I started learning Lisp when I started using EMACS, then for a while I was hacking in Scheme (the Programming Language Concepts class at my alma mater was taught by a fellow who received his degree from Indiana University), and now I am doing a lot of programming (in my Copious Free Time) in Common Lisp - and I must say that of the three, I like Common Lisp the best.
Here's a short list of the things *I* like in Lisp (whither EMACS Lisp, Common Lisp, Scheme, Dylan, etc.):
- automatic memory management (aka "garbage collection")
- several excellent compilers available (ask about the difference between "interactive" and "interpreted" some time - those words are NOT synonyms)
- bignums and symbols
- CLOS (lots better than e.g. C++ or even Java, in my opinion), which has generic functions, multiple inheritance, CHANGE-CLASS, etc.
- continuations (only in Scheme, I think)
- "code as data and data as code"
- the macro facility
...and so forth. You can get a lot more information from the Association of Lisp Users web site (especially the pages Language Comparisons and What is Lisp?), or from the comp.lang.lisp FAQ. Another good place to get more information is from David Lamkins' on-line book Successful Lisp.
And if you have further questions on Lisp, feel free to send me an email or drop a note into comp.lang.lisp.
HTH.
Rev. Dr. Xenophon Fenderson, the Carbon(d)ated, KSC, DEATH, SubGenius, mhm21x16 -
Re:Why is LISP superior?
I'm by no means a Lisp expert (I have more experience hacking C and Perl), but the more Lisp code I write, the more I begin to appreciate the language. I started learning Lisp when I started using EMACS, then for a while I was hacking in Scheme (the Programming Language Concepts class at my alma mater was taught by a fellow who received his degree from Indiana University), and now I am doing a lot of programming (in my Copious Free Time) in Common Lisp - and I must say that of the three, I like Common Lisp the best.
Here's a short list of the things *I* like in Lisp (whither EMACS Lisp, Common Lisp, Scheme, Dylan, etc.):
- automatic memory management (aka "garbage collection")
- several excellent compilers available (ask about the difference between "interactive" and "interpreted" some time - those words are NOT synonyms)
- bignums and symbols
- CLOS (lots better than e.g. C++ or even Java, in my opinion), which has generic functions, multiple inheritance, CHANGE-CLASS, etc.
- continuations (only in Scheme, I think)
- "code as data and data as code"
- the macro facility
...and so forth. You can get a lot more information from the Association of Lisp Users web site (especially the pages Language Comparisons and What is Lisp?), or from the comp.lang.lisp FAQ. Another good place to get more information is from David Lamkins' on-line book Successful Lisp.
And if you have further questions on Lisp, feel free to send me an email or drop a note into comp.lang.lisp.
HTH.
Rev. Dr. Xenophon Fenderson, the Carbon(d)ated, KSC, DEATH, SubGenius, mhm21x16 -
Re:Why is LISP superior?
I'm by no means a Lisp expert (I have more experience hacking C and Perl), but the more Lisp code I write, the more I begin to appreciate the language. I started learning Lisp when I started using EMACS, then for a while I was hacking in Scheme (the Programming Language Concepts class at my alma mater was taught by a fellow who received his degree from Indiana University), and now I am doing a lot of programming (in my Copious Free Time) in Common Lisp - and I must say that of the three, I like Common Lisp the best.
Here's a short list of the things *I* like in Lisp (whither EMACS Lisp, Common Lisp, Scheme, Dylan, etc.):
- automatic memory management (aka "garbage collection")
- several excellent compilers available (ask about the difference between "interactive" and "interpreted" some time - those words are NOT synonyms)
- bignums and symbols
- CLOS (lots better than e.g. C++ or even Java, in my opinion), which has generic functions, multiple inheritance, CHANGE-CLASS, etc.
- continuations (only in Scheme, I think)
- "code as data and data as code"
- the macro facility
...and so forth. You can get a lot more information from the Association of Lisp Users web site (especially the pages Language Comparisons and What is Lisp?), or from the comp.lang.lisp FAQ. Another good place to get more information is from David Lamkins' on-line book Successful Lisp.
And if you have further questions on Lisp, feel free to send me an email or drop a note into comp.lang.lisp.
HTH.
Rev. Dr. Xenophon Fenderson, the Carbon(d)ated, KSC, DEATH, SubGenius, mhm21x16 -
Have you tried Common Lisp?
CL has several advantages over both Perl/Python and C/C++.
-
Like Perl and Python, Lisp provides an interactive environment. You can make changes to a running program without having to restart it. Plus, modern Lisps give you a real garbage collector, not a simple reference counter like in Python (although newer versions of Python may have a better GC).
-
Like C/C++, Common Lisp is compiled. Unlike C/C++, CL allows you to call the compiler interactively---again, you never have to restart your program. Compiled Lisp code is about as fast as comparable C or C++ code. In fact, most interactive environments compile code on the fly as you type expressions in!
-
Like Python and C++, Common Lisp also provides a robust and rich object system, called CLOS. I haven't done much with CLOS, although I like the idea of multiple inheritance and the ability to dispatch methods based on more than one object (Lisp methods and generic functions can dispatch on any of their arguments).
-
Unlike C and Perl, Lisp is pretty clean, syntacticly. You never have to remember operator precedence or any of the funky variable naming rules. Lisp is case insensitive, although it is pretty easy to override this.
Several Lisp environments are available, both commercial (Franz, Harlequin) and free (CMU Common Lisp). There's a complete web server written in Lisp, the Common Lisp Hypermedia Server. If you want to learn more about Lisp, check out the Associate of Lisp Users and browse through the section on tutorials and books (a good book, by David Lamkins, is called Successful Lisp).
Not all is happy in Lisp-land, though. There's no archive network like CPAN or CTAN, so you'll have to go digging when you want a regexp package (although I can tell you to look at SCSH for that). While commercial Lisp environments from Franz and Harlequin are available on Windows, the only free Lisp I know of that has been ported to windows is Clisp, which "only" has a byte-compiler (like EMACS). CMU CL, the best free Lisp around, only runs under UNIX. I also don't know of an equivalent to mod_perl that embeds Lisp in Apache, although if you use CL-HTTP this isn't an issue. Still, Lisp may deserve your attention. As old as the language is, Lisp is still years ahead of its time.
Rev. Dr. Xenophon Fenderson, the Carbon(d)ated, KSC, DEATH, SubGenius, mhm21x16 -
-
Re:An OO-based processor ????
Try extracting the nth element from a list in C++ in less than O(n) using the standard linked list data structure. You could make a fortune with that algorithm
;) In my experience most Lisps in serious use are at least bytecode-compiled and most are compiled to native code.A list is not the only data structure available in Lisp. For instance, Common Lisp has arrays just like C/C++ and they're as fast with proper type-declarations. Lisp is not inherently slower than C/C++; you just have to work a bit more to make it as fast. A Lisp program could be faster than C because it's easier to implement better algorithms in Lisp or because the Lisp compiler is better than the C compiler. The important thing in optimizing Lisp is to declare types and to avoid dynamic memory allocation during speed-critical code.
I've seen some numerical code go faster in CMUCL (a high quality free Common Lisp compiler for Linux/*BSD) than the equivalent in g++ (with all relevant optimizations, 10% difference in speed in favor of CMUCL), just because the CMUCL compiler is excellent in number crunching.
For more information see Association of Lisp Users, CMUCL is available at www.cons.org.