Post #130,680
12/14/03 4:17:45 AM
|
Apostrophe-induced IFS!
[link|http://angryflower.com/bobsqu.gif|http://angryflower.com/bobsqu.gif]
Request to Scott: Place this image at the top of the "New Comment" page.
Peter [link|http://www.debian.org|Shill For Hire] [link|http://www.kuro5hin.org|There is no K5 Cabal] [link|http://guildenstern.dyndns.org|Blog]
|
Post #130,681
12/14/03 4:33:19 AM
|
I got yer apostraphe, swingin
stick a spork in it.
questions, help? [link|mailto:pappas@catholic.org|email pappas at catholic.org]
|
Post #131,136
12/17/03 2:23:20 AM
|
Your humor escapes me
Maybe I need to buy a *real* LISP book. Any recommendations?
________________ oop.ismad.com
|
Post #131,137
12/17/03 2:57:56 AM
|
Re: Your humor escapes me
"Lisp's" "Lambda's"
AAAAAAARGH! THEY TAUGHT YOU THIS SHIT IN JUNIOR SCHOOL! IT'S NOT HARD!
Peter [link|http://www.debian.org|Shill For Hire] [link|http://www.kuro5hin.org|There is no K5 Cabal] [link|http://guildenstern.dyndns.org|Blog]
|
Post #131,880
12/22/03 2:33:44 PM
|
you seem bitter about something
I only had one college class that had some LISP, among other languages, and they did not cover Lambda's. The campus was Pascal-happy.
________________ oop.ismad.com
|
Post #131,882
12/22/03 2:41:18 PM
|
He seems bitter?
No he's bitter about colonials... butchering things. It just so happens his spray gun has a wide area of effect. You being in that area, got hit.
I just have to stay out of reach of his IFS. I've learned to watch his weapon aim.
-- [link|mailto:greg@gregfolkert.net|greg], [link|http://www.iwethey.org/ed_curry|REMEMBER ED CURRY!] @ iwethey
Phrasers on STUN er SHUN!
|
Post #131,197
12/17/03 11:22:40 AM
|
Peter's point is that you need to learn basic English
My recommendation for a real Lisp book is, The Structure and Interpretation of Computer Programming. But I'm sure that you'll hate it, so don't bother.
Cheers, Ben
"good ideas and bad code build communities, the other three combinations do not" - [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
|
Post #131,499
12/19/03 10:30:41 AM
|
Besides, it's no good for a quick emacs hack
Which is, I bet, what Mr. T is after.
What he wants is [link|http://www.delorie.com/gnu/docs/elisp-manual-21/elisp_toc.html|GNU Emacs Lisp Reference Manual]. Simpler than Oracle User's Guide. But is it simple enough?
--
"It\ufffds possible to build a reasonably prosperous society that invests in its people, doesn\ufffdt invade its neighbors, opposes Israel and stands up to America. (Just look at France.)"
-- James Lileks
|
Post #131,503
12/19/03 10:55:38 AM
|
Answering the last question...
Wrong question. The right one is whether it will make Lisp match Bryce's expectations. Since Lisp doesn't match his expectations, and Lisp isn't about to change, he'll not like it. No matter how simple it is.
Cheers, Ben
"good ideas and bad code build communities, the other three combinations do not" - [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
|
Post #131,881
12/22/03 2:37:03 PM
|
But isn't LISP the ideal language to rewrite LISP in? :-)
________________ oop.ismad.com
|
Post #132,234
12/24/03 5:54:50 PM
|
Yes, but it is still Lisp
I'll give you a quick overview for the original question.
Lisp data structures (with a very small number of counter-examples) look like (operator argument1 argument2). Operators come in two basic forms, function calls and macros. A function call just calls the function named operator with the appropriate arguments and does something. A macro takes the arguments, and returns some data structure which is evaluated in turn. That data structure will again look like (operator argument1 argument2) although after the rewrite you generally have a different operator and different arguments.
Normally within parentheses each word is a different symbol, case insensitive. So operator actually might be OPERATOR internally, and will be printed that way if you ask the interpreter to print it. Double-quotes give you quoted strings, from which you can generate normal text like "Hello".
And in one of the few pieces of syntactic sugar in Lisp, 'foo is rewritten by the interpreter to mean (quote foo). Which gives you back the symbol foo directly, which is appropriate for passing into or out of functions and macros.
You are beginning to undersand Lisp when it is obvious to you when you can't write foo instead of 'foo (or long-hand, (quote foo)) because Lisp will immediately interpret foo as an operator and try to call it as a macro or a function immediately, rather than inserting it into the data structure that you are trying to return.
Cheers, Ben
"good ideas and bad code build communities, the other three combinations do not" - [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
|
Post #133,296
1/2/04 5:32:01 PM
|
double quotes
Okay, but I still don't get the difference between:
'(foo bar)
and
"(foo bar)"
________________ oop.ismad.com
|
Post #133,314
1/2/04 7:55:09 PM
|
Datastructure vs string
'(foo bar) is a potentially complex data structure, while "(foo bar)" is a simple string.
It might be easier for you to understand if you translate it into another language. In Perl '(foo bar) would be written [$FOO, $BAR] (the capitals are to illustrate how Lisp is case-insensitive), while "(foo bar)" is the same in either language.
Does that make sense?
Ben
"good ideas and bad code build communities, the other three combinations do not" - [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
|
Post #134,198
1/8/04 12:17:28 AM
|
Okay, I think I got it.
I suppose it is a "Lisp structure", which is basically a "pointer" version of Lisp code. Is there a way to turn a string into such a structure?
BTW, is Emacs-Lisp considered a "decent" Lisp? Stripped-down Lisp?
________________ oop.ismad.com
|
Post #134,303
1/8/04 1:49:19 PM
|
More answers
To turn a string into a data structure you could use eval. You shouldn't have to do that very often though, because with macros and functions you can do what you might otherwise want to do with eval, and do it more cleanly.
As for eLisp, it is an older Lisp. It predates the acceptance of lexical scope, and so doesn't support things like closures. In my eyes that makes it a inferior, but YMMV.
Cheers, Ben
"good ideas and bad code build communities, the other three combinations do not" - [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
|