 |
|
| Computers Forum Index » Computer Artificial Intelligence - Philosophy » learning Lisp... |
|
Page 1 of 1 |
|
| Author |
Message |
| RichD... |
Posted: Mon Aug 31, 2009 10:23 pm |
|
|
|
Guest
|
I\m interested in learning Lisp (for no particular reason).
What's the best book for self-study?
--
Rich |
|
|
| Back to top |
|
|
|
| Gary Forbis... |
Posted: Wed Sep 02, 2009 1:28 pm |
|
|
|
Guest
|
On Aug 31, 3:23 pm, RichD <r_delaney2... at (no spam) yahoo.com> wrote:
Quote: I\m interested in learning Lisp (for no particular reason).
What's the best book for self-study?
It has been years since I've used lisp.
Before you go too far down this road you
might want to identify your focus and skill set.
Here's an interesting site:
http://www.softwarepreservation.org/projects/LISP/
Strangly it doesn't mention xlisp, tlisp, or many
other variants.
I don't know your learning approach. Mine is
to look at working code and modify it. Unfortunately,
at the time I chose a new book by Michael Dyer
and a precursor to scheme. The expansion on
conceptual dependency looked like fun. Getting
anything to run on my trs-80, trs-80 mod 4, and Tandy 1000
was much easier than on my altair 8800 but home
computers weren't very good at the time. I couldn't
focus on the code because I spent so much time
translating and banging into machine limitations.
My take away for you is to describe your focus and
learning style, determine your budget, and look for
solutions that meet your needs so you don't get
sidetracked by unrelated issues.
-- a side whine.
If my memory served me well, and it doesn't
always do so, BORIS was written in a dialect
of lisp that didn't use typed constants and
variables, that is you wouldn't use ("this") as
something separate from (this). The version
of lisp it used could easily turn (this) into (t h i s).
When it wanted to find word parts it would use this
trick but in the version of lisp I could afford I had
to use strings and string functions to achieve
something similar. It was a mess. If I wasn't
disallusioned with symbolic AI I'd try again to
get the code from the book running. The described
results were quite impressive. |
|
|
| Back to top |
|
|
|
| Pascal J. Bourguignon... |
Posted: Wed Sep 02, 2009 6:48 pm |
|
|
|
Guest
|
Gary Forbis <forbisgaryg at (no spam) msn.com> writes:
Quote: -- a side whine.
If my memory served me well, and it doesn't
always do so, BORIS was written in a dialect
of lisp that didn't use typed constants and
variables, that is you wouldn't use ("this") as
something separate from (this). The version
of lisp it used could easily turn (this) into (t h i s).
When it wanted to find word parts it would use this
trick but in the version of lisp I could afford I had
to use strings and string functions to achieve
something similar. It was a mess. If I wasn't
disallusioned with symbolic AI I'd try again to
get the code from the book running. The described
results were quite impressive.
I very much doubt that you couldn't write in the version of lisp you
could afford, the explode and implode functions similar to the
following implemented in Common Lisp.
These implode and explode functions existed in lisp since the sixties,
perhaps even already in LISP 1.5.
Lisp is an anti-whine programming language.
(defun explode (string-designator)
"
RETURN: A new list containing the character in the STRING-DESIGNATOR.
"
(map 'list (function character) (etypecase string-designator
(sequence string-designator)
((or symbol character) (string string-designator)))))
(defun implode (character-sequence-designator)
"
RETURN: A new string containing the characters in the sequence
CHARACTER-SEQUENCE-DESIGNATOR.
"
(map 'string (function character) (typecase character-sequence-designator
((or symbol character) (string character-sequence-designator))
(t character-sequence-designator))))
C/USER[19]> (values (explode 'this) (explode '"THIS") (explode #(t h i s)) (explode '(t h i s)))
(#\T #\H #\I #\S) ;
(#\T #\H #\I #\S) ;
(#\T #\H #\I #\S) ;
(#\T #\H #\I #\S)
C/USER[27]> (values (implode '(t h i s))
(implode '#(t h i s))
(implode '(#\T #\H #\I #\S))
(implode '#(#\T #\H #\I #\S))
(implode '"THIS")
(implode 'this)
(implode 't)
(implode #\T))
"THIS" ;
"THIS" ;
"THIS" ;
"THIS" ;
"THIS" ;
"THIS" ;
"T" ;
"T"
--
__Pascal Bourguignon__ |
|
|
| Back to top |
|
|
|
| Slobodan Blazeski... |
Posted: Wed Sep 02, 2009 10:57 pm |
|
|
|
Guest
|
|
| Back to top |
|
|
|
| w_a_x_man... |
Posted: Thu Sep 03, 2009 6:08 am |
|
|
|
Guest
|
On Sep 2, 9:48 am, p... at (no spam) informatimago.com (Pascal J. Bourguignon)
wrote:
Quote: Gary Forbis <forbisga... at (no spam) msn.com> writes:
-- a side whine.
If my memory served me well, and it doesn't
always do so, BORIS was written in a dialect
of lisp that didn't use typed constants and
variables, that is you wouldn't use ("this") as
something separate from (this). The version
of lisp it used could easily turn (this) into (t h i s).
When it wanted to find word parts it would use this
trick but in the version of lisp I could afford I had
to use strings and string functions to achieve
something similar. It was a mess. If I wasn't
disallusioned with symbolic AI I'd try again to
get the code from the book running. The described
results were quite impressive.
I very much doubt that you couldn't write in the version of lisp you
could afford, the explode and implode functions similar to the
following implemented in Common Lisp.
These implode and explode functions existed in lisp since the sixties,
perhaps even already in LISP 1.5.
Lisp is an anti-whine programming language.
(defun explode (string-designator)
"
RETURN: A new list containing the character in the STRING-DESIGNATOR.
"
(map 'list (function character) (etypecase string-designator
(sequence string-designator)
((or symbol character) (string string-designator)))))
(defun implode (character-sequence-designator)
"
RETURN: A new string containing the characters in the sequence
CHARACTER-SEQUENCE-DESIGNATOR.
"
(map 'string (function character) (typecase character-sequence-designator
((or symbol character) (string character-sequence-designator))
(t character-sequence-designator))))
C/USER[19]> (values (explode 'this) (explode '"THIS") (explode #(t h i s)) (explode '(t h i s)))
(#\T #\H #\I #\S) ;
(#\T #\H #\I #\S) ;
(#\T #\H #\I #\S) ;
(#\T #\H #\I #\S)
C/USER[27]> (values (implode '(t h i s))
(implode '#(t h i s))
(implode '(#\T #\H #\I #\S))
(implode '#(#\T #\H #\I #\S))
(implode '"THIS")
(implode 'this)
(implode 't)
(implode #\T))
"THIS" ;
"THIS" ;
"THIS" ;
"THIS" ;
"THIS" ;
"THIS" ;
"T" ;
"T"
explode = proc{|s| s.to_s.split "" }
implode = proc{|x| Array( x ).join }
p explode[ "this" ]
p explode[ :this ]
p explode[ ["t","h","i","s"] ]
p explode[ [:t,:h,:i,:s] ]
p implode[ ["t","h","i","s"] ]
p implode[ [:t,:h,:i,:s] ]
p implode[ %w(t h i s) ]
p implode[ "this" ]
p implode[ :this ]
=== output ==["t", "h", "i", "s"]
["t", "h", "i", "s"]
["t", "h", "i", "s"]
["t", "h", "i", "s"]
"this"
"this"
"this"
"this"
"this" |
|
|
| Back to top |
|
|
|
| Andrea Taverna... |
Posted: Thu Sep 03, 2009 11:29 am |
|
|
|
Guest
|
RichD ha scritto:
Quote: I\m interested in learning Lisp (for no particular reason).
What's the best book for self-study?
--
Rich
Among other sources:
- "Common Lisp CookBook" http://cl-cookbook.sourceforge.net/
- comp.lang.lisp.
You should keep an eye on free CL libraries as well. They're hosted at
http://www.cliki.net. |
|
|
| Back to top |
|
|
|
| Pascal J. Bourguignon... |
Posted: Thu Sep 03, 2009 1:16 pm |
|
|
|
Guest
|
w_a_x_man <w_a_x_man at (no spam) yahoo.com> writes:
Quote: On Sep 2, 5:57 pm, Slobodan Blazeski <slobodan.blaze... at (no spam) gmail.com
wrote:
On Sep 1, 12:23 am, RichD <r_delaney2... at (no spam) yahoo.com> wrote:> I\m interested in learning Lisp (for no particular reason).
What's the best book for self-study?
--
Rich
Assuming you decided to learn common lisp take a look athttp:
Here's what the experts say about Commune Lisp:
Whouah! Somebody wrote a CL to Ruby translator and hooked it to a
troll bot! Great.
In what language has it been written?
--
__Pascal Bourguignon__ |
|
|
| Back to top |
|
|
|
|
|
All times are GMT
The time now is Sun Dec 06, 2009 9:22 am
|
|