Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

How do I learned Lisp?

Name: Anonymous 2006-04-11 15:12

I have tried several times -- and FAILED UTTERLY. It felt like having a fetus shoved up your ass, and then having to shit it out while a big bad nigger is trying to shove it back up with his humongous cock. All while the fetus is growing at a steady pace.

Alright, what I need to know is:
1) How do I indented Lisp.
2) What dialect is "the best".
3) Minor programming project good for a stupid ignorant wapanese newbie.
4) PROTIPs.

Only serious inquiries, dear Sir or Madam.

Name: Anonymous 2006-04-11 16:15

I can't even find a compiler.  A tutorial on LISP like the one at http://www.cplusplus.com/doc/tutorial would be mighty keen too.

Good luck with that fetus/black guy thing.

Name: Anonymous 2006-04-11 16:43

An intro to "programming" with Scheme: http://mitpress.mit.edu/sicp/full-text/book/book.html (doesn't teach "Lisp" but how to use it)

Practical Common Lisp: http://www.gigamonkeys.com/book/ (more difficult but focused on Lisp)

Name: Anonymous 2006-04-11 16:47

>>3
I forgot: the best to learn is Scheme, but Common Lisp is better for huge projects (its library is a thousand times bigger than Scheme's)

And try to read "The Elements of Artificial Intelligence", it's an intro book with programs written in Lisp :p

Name: Anonymous 2006-04-12 2:56

>>2
clisp

Name: Anonymous 2006-04-12 3:32

>>1
1) How do I indented Lisp.
This is the least of your worries, you'll pick it up as you go along. In general though start a new line for the body of block-style macros, eg defun, or whenever you feel you need to. Closing parens go on the end of the line, they don't get lines all to themselves.

2) What dialect is "the best".
Scheme is simple and elegant, Common Lisp is powerful, has a more complete standard library, has more external libraries (see http://www.cliki.net/index). Use CL for real work, Scheme for a beautiful toy. All other dialects were either killed off by Common Lisp or are special purpose languages.

3) Minor programming project good for a stupid ignorant wapanese newbie.
Implement this: http://www.gamecabinet.com/rules/WavingHands.html

4) PROTIPs.
Learn emacs. I'm a vim user by preference, but emacs + SLIME will make you a happy lisper.
Get to know this site: http://www.cliki.net/index
If you find yourself starting to doubt that Lisp is REAL Ultimate Power, read some essays from this site: http://www.paulgraham.com/index.html

This is a good book for newish programmers: http://www.cs.cmu.edu/~dst/LispBook/

Compilers: SBCL is the most current, CMUCL and CLISP are fine too. They're all for *nix, as all good things are, but they run fine in cygwin.

Name: Anonymous 2006-04-12 14:51

A better question: why would I want to learn Lisp?

Name: Anonymous 2006-04-12 14:54

>>7
A better question: why would you learn another programming language when ASM can do everything already? Maybe because Lisp is more suited to my needs? Maybe because it's been specifically designed to ease the development of AI applications?

If you're asking such a stupid question, you don't need Lisp to begin with...

Name: Anonymous 2006-04-12 22:34

>>8
Is it really any easier to write "AI applications" in lisp? I mean, it really depends on what kind of AI you're doing... John McCarthy invented lisp, and he was mostly concerned with programs that did logic deduction. That was Good Old Fashioned AI. Most AI systems people are concerned with now like learning systems and planners are probably easier to implement in a more general purpose language like C.

That being said, any other reason to learn lisp?

Name: Anonymous 2006-04-13 0:13

Planners? More easy in C? Uh... o.Oa

Name: Anonymous 2006-04-13 0:51

>>6
Fucking DoD fag

Name: Anonymous 2006-04-13 0:59

http://www.answers.com/topic/lisp-programming-language

[from ‘LISt Processing language’, but mythically from ‘Lots of Irritating Superfluous Parentheses’] AI's mother tongue, a language based on the ideas of (a) variable-length lists and trees as fundamental data types, and (b) the interpretation of code as data and vice-versa. Invented by John McCarthy at MIT in the late 1950s, it is actually older than any other HLL still in use except FORTRAN. Accordingly, it has undergone considerable adaptive radiation over the years; modern variants are quite different in detail from the original LISP 1.5. The dominant HLL among hackers until the early 1980s, LISP has since shared the throne with C. Its partisans claim it is the only language that is truly beautiful. See languages of choice.

All LISP functions and programs are expressions that return values; this, together with the high memory utilization of LISPs, gave rise to Alan Perlis's famous quip (itself a take on an Oscar Wilde quote) that “LISP programmers know the value of everything and the cost of nothing”.

One significant application for LISP has been as a proof by example that most newer languages, such as COBOL and Ada, are full of unnecessary crocks. When the Right Thing has already been done once, there is no justification for bogosity in newer languages.

Name: Anonymous 2006-04-13 3:43

>>9
Lisp isn't really a special purpose AI language; it just happens to be good at it because it allows amazingly high levels of abstraction and is great at manipulating symbols. The sort of language you're describing is more like Prolog which is only good for a highly restricted set of applications.

Name: Anonymous 2006-04-13 3:52

>>11

?

Name: Anonymous 2006-04-13 8:56

>>9
| Most AI systems people are concerned with now like learning systems and planners are probably easier to implement in a more general purpose language like C.

No, it's still easier in Lisp

Name: Anonymous 2006-04-26 2:02

LISP's inherent qualities make it awesome.

LISP's realities -- such as the fact that your program is only guaranteed to be functional as far as the interpreter's own limitations (any computer functionality beyond the interpreter and you probably have to write C code and FFI-call it into LISP which is a PAIN IN THE ASS BECAUSE THERE'S NO FUCKING DOCUMENTATION ANYWHERE AND IT'S DIFFERENT FOR EVERY FUCKING IMPLEMENTATION) -- aren't so nice.

LISP is nice as a scripting language for complicated AI, and for rudimentary prototyping for algorithms.  I really wish people who write the interpreters would get their shit together and agree upon some common protocols so writing portal LISP code (even within the same dialect, it's a pain) isn't such a chore.  Shit like that really makes it hard for me to convince people that LISP can allow for lower budgets on commercial projects.

Name: Anonymous 2006-04-26 3:08

Blame ANSI. Common Lisp is a political compromise between all the dialects that existed previously. ANSI standardised it with a crummy library that doesn't know about basic things like sockets. Since it lacks these essential things, the implementations have to do it their own, non-standard way.

As long as Common Lisp is the dominant dialect, Lisp will not see any substantial use in the Real World (TM).

Name: Anonymous 2006-04-26 5:50

In the meantime using the CLOCC and UFFI libraries would probably go a fair way to resolving deficiencies in the standard and incompatibilities between flavours.

If there were a more active Lisp community, these, or somthing like these, would probably be de facto standards by now.

http://www.cliki.net/CLOCC - sockets, streams, an XML parser and a bunch of other crap.
http://www.cliki.net/UFFI - universal foreign function interface.

Name: Anonymous 2006-04-28 2:16

Download or buy Common Lisp - The Language, 2nd Edition (ebook - english).pdf
http://salaam.cs.buap.mx/EBOOKS/IA/MANUAL-LISP/
This is the Paul Graham's book.

Then I whould like to say clisp+Emacs+Slime if this isn't enough ide than gtfo, find reference cards for emacs and slime, and second Cygwin if you don't want to leave your windows boxee (this is my setup now).

Paul Graham http://www.paulgraham.com/ now have an incubator http://ycombinator.com/ for funding startups. One of these startups is http://reddit.com/ which WAS ORIGINALY WRITEN IN LISP and has some good algorithms behind. Recently changed to Python, but there still's the Lisp people reading and posting there. reddit's developers in the early days was like this: someone made a sugestion and in the same day they implemented it's sugestion if it was good.

For pure algorithms and programing for fun lovers Lisp is a great expressive tool, it gives deep programming concepts and makes programming an art http://www-cs-faculty.stanford.edu/~uno/taocp.html

Name: Anonymous 2006-04-28 2:22

http://www-spi.lip6.fr/~queinnec/PDF/index.html
and remember whatever you do don't install Allegro CL!

Name: Anonymous 2006-04-28 4:37

Learning Common LISP syntax and good practice I've found is easy and fun.

The annoying part is when you -think- that Common LISP doesn't have a built-in function for something, and after Googling with unfortunately-chosen words for unhelpful search results, you set out to code just that.  Then like, a month later, you find out Common LISP did indeed have a function/macro built-in to do exactly what you coded.

Huge, huge language.  I'm sluggishly downloading Paul Graham's book now, I hope it's more an in-depth reference of Common LISP internals than Peter Seibel's book, because right now I'm still in the "random exploring" phase (and I've been on Common LISP for about 7 months now).

Name: Anonymous 2006-04-28 4:48

http://www.paulgraham.com/onlisp.html
On Lisp is not for beginners, but once you're comfortable with Lisp it's worth reading.

Name: Anonymous 2006-04-28 4:56

Also I finished downloading that "Common Lisp - The Language" and noticed that it's by Guy Steele, not Paul Graham.  I think I'd rather buy the book too, reading a 1000+ page manual on the monitor isn't comfortable or easy to flip through.

>>22, I'll check it out.  Although it looks like I'll have to settle for the .pdf for that book -- $234 on Amazon holy shit

Name: Anonymous 2006-04-28 5:08

>>23
CLTL is a pre-ANSI reference. If you'd rather buy a book, try ANSI Common Lisp, which is more up to date.
http://www.paulgraham.com/acl.html

Name: Anonymous 2006-04-28 6:46

>>23
>>24
I misspelled that, sorry, the I was looking for is ANSI Common Lisp, that is the book.

Name: Anonymous 2006-04-28 16:22

I just came across this book, "ANSI Common Lisp Reference", marked as Not Yet Released.  Should I wait for it?  Looks like it's published by the same company who published Peter Seibel's excellent (but lacking-on-reference) book, and it might be more up-to-date than Graham's "ANSI Common Lisp"?

http//www.amazon.com/...

Name: Anonymous 2006-04-28 16:24

>>26

Disregard that... I noticed it's not coming out until... uh... "February 2008"?  uh... I'll go for Paul Graham's book ^_^

Name: Anonymous 2006-04-28 16:53

My friends that didn't like Lisp liked the Paul Graham's book.

Name: Anonymous 2006-04-29 10:48

I'd recommend clisp for the stuff you'll do on the command line, as it uses GNU readline which is really quite nice. Switch to sbcl or cmucl once the performance thingamabobs start getting to you, which won't be any time soon.

As for a programming project, try coming up with a simple MUD engine. Especially given that all of the implementations I suggested support CLOS, which is like the object system to end all object systems.

Name: Anonymous 2006-05-01 23:37

This might be *similar* to the "a celebrity uses it, so it must be good" fallacy, but Paul Graham stated on his website that CLISP is his preferred Common LISP interpreter.

I personally find CLISP easier to use, but CMUCL is the only one that doesn't piss, bitch, and moan when I try to use it as my emacs SLIME interpreter of choice.  CMUCL is pretty nice also, in terms of the extensions that come with it (especially for network programming!)

Name: Anonymous 2006-05-02 3:06

I like CLISP's REPL, but in practice you're going to be doing your programming in an editor so that's not a good reason to use it. I've been told that SBCL is the only one that is still actively developed, and it's derived from CMUCL which is/was considered respectable.

CLISP also requires extra work if you want to use it with UFFI. Also the SLIME issues mentioned above.

Name: Anonymous 2006-05-03 23:32

Is there a way to get more specific terminal output going on in Common Lisp?

CLISP has some ext: macros for printing to specific x,y coordinates on a screen, but there seems to be a bug where it only counts once -- have the cursor move to (3,4) and then print a 5-character string, and then have the cursor move to some other remote part of the screen, and it'll just print from (3,9).

Is C code that glues ncurses (or whatever) + UFFI the only way to get reliable terminal output in Common Lisp?  It sucks having to write a game when manipulating devices and hardware is a pain like this.

Name: Anonymous 2006-05-04 1:24

Is there a reason no one has said "become gay" yet?

Name: Anonymous 2006-05-04 1:29

>>33

Because this isn't a Java / C# discussion.

Name: Anonymous 2006-05-04 3:29

>>34
Now it is!

Name: Anonymous 2006-05-04 3:52

BTW, question about CLISP: Can I directly call Win32 API functions? (For example, WriteConsole or CreateProcess)

Name: Anonymous 2006-05-04 4:05

>>36

I believe you can, but you'll have to write a wee bit of C code that "bridges" to those API functions, and load that compiled object code as UFFI.

I don't really know how to use UFFI but I'm pretty sure it works just as well in Win32 as it does in Linux, for Common LISP implementations that have official ports to those OSes.

Name: Anonymous 2006-05-04 4:07

be a ninja

Name: Anonymous 2006-05-04 4:28

>>37
You shouldn't even need to do that; you should be able to use def-function to declare foreign functions from, for example, kernel32 or user32. According to the manual* the syntax looks like: (def-function name args &key module returning), so if you wanted to use the win32 sleep() function for example you'd write:

(def-function "sleep"
  ((milliseconds :long))
  "kernel32"
  :returning :void)

But I could be way off. I've never actually used UFFI. The next page in the manual describes how to load an entire foreign library, which sounds neat.

This would be a good time to mention (again) that UFFI doesn't directly support CLISP and according to cliki you have to mess around with CFFI to get it working. If you're not trying to use libraries that require UFFI, it might be worth your while not using it at all and just using CFFI directly.

*http://files.b9.com/uffi/uffi-manual-latest.pdf

Name: Anonymous 2006-05-04 17:02

Er, I thought UFFI was the "standardized" method of loading foreign functions and now there's this CFFI thing I've never heard about?

Guh...

This sort of stuff really is the Achilles' Heel of LISP.  Just because something is academic, doesn't mean it should be designed to be hard to use...

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List