DigiCode - My solo company in progress.
🔒 Locked
Lisp Tutorials?
Advertisement
Original Post
I was wondering if there were any good Common Lisp tutorials, that won''t come up as 404 errors...And another thing, Corman Lisp - I tried to execute some of the examples, but a DOS window didn''t pop up, all that happened was an output on the main project file itself, and I know one of them is supposed to plan a .wav file called hellowin with it, because I searched the file itself. When I renamed it as an .EXE, it complained, and .... didn''t work. Any help?
DigiCode - My solo company in progress.
DigiCode - My solo company in progress.
(load "myprogram.lisp")
___________________________________
"The outside of a horse is good for the inside of a man" - Winston Churchill
[edited by - bishop_pass on April 22, 2003 11:06:07 PM]
"The outside of a horse is good for the inside of a man" - Winston Churchill
[edited by - bishop_pass on April 22, 2003 11:06:07 PM]
Uhmmm.... It said in the .pdf that came with Corman Lisp, that if you put in (+ 20 30) and press the execute key, you will get the results...
Is this on the worksheet? If so, when I press ENTER nothing happens...
*sigh*
EDIT - but when using the Corman Console..the results DO happen..so ..... ..... what is the worksheet used for? How do I compile files in the IDE? Do I have to compile them in the Console?
DigiCode - My solo company in progress.
[edited by - Drevay on April 22, 2003 11:15:15 PM]
Is this on the worksheet? If so, when I press ENTER nothing happens...
*sigh*
EDIT - but when using the Corman Console..the results DO happen..so ..... ..... what is the worksheet used for? How do I compile files in the IDE? Do I have to compile them in the Console?
DigiCode - My solo company in progress.
[edited by - Drevay on April 22, 2003 11:15:15 PM]
Are you using the IDE?
If so, type:
And press the numeric keypad ''ENTER'' key. This executes the statement.
Now, type:
And press the numeric keypad ''ENTER'' key.
___________________________________
"The outside of a horse is good for the inside of a man" - Winston Churchill
If so, type:
(setq fruits ''(pears apples bananas))And press the numeric keypad ''ENTER'' key. This executes the statement.
Now, type:
fruitsAnd press the numeric keypad ''ENTER'' key.
fruits will be evaluated, and the list it evaluates to will be printed. "The outside of a horse is good for the inside of a man" - Winston Churchill
All Lisp statements are compiled on the fly in Corman Lisp. In other Lisp implementations, this isn''t always the case, but the
___________________________________
"The outside of a horse is good for the inside of a man" - Winston Churchill
compile function will compile for you. compile is another function, just like + or * is. "The outside of a horse is good for the inside of a man" - Winston Churchill
As for tutorials, take a look at these books:
Common Lisp: A Gentle Introduction to Symbolic Computation
Successful Lisp
On Lisp <--- highly recommended!
Here''s a reference: Xanalys HyperSpec
Common Lisp: A Gentle Introduction to Symbolic Computation
Successful Lisp
On Lisp <--- highly recommended!
Here''s a reference: Xanalys HyperSpec
Ahhh I see, very interesting! Wow, that's a neat way to associate one word with a list, it's almost artistic!
Oh and, since I have a laptop, I had to press the function key + the enter key, to get the numeric enter key, bit different but meh, who cares!
EDIT - Yes, I was wondering why does it print a line of characters twice (ie - a string) -- for example --
(write-line "Hello, this is your master speaking...")
will print out as -
Hello, this is your master speaking...
"Hello, this is your master speaking..."
Why is that?
DigiCode - My solo company in progress.
[edited by - Drevay on April 22, 2003 11:30:54 PM]
Oh and, since I have a laptop, I had to press the function key + the enter key, to get the numeric enter key, bit different but meh, who cares!
EDIT - Yes, I was wondering why does it print a line of characters twice (ie - a string) -- for example --
(write-line "Hello, this is your master speaking...")
will print out as -
Hello, this is your master speaking...
"Hello, this is your master speaking..."
Why is that?
DigiCode - My solo company in progress.
[edited by - Drevay on April 22, 2003 11:30:54 PM]
quote:
Original post by Drevay
Ahhh I see, very interesting! Wow, that''s a neat way to associate one word with a list, it''s almost artistic!
The general goal of your initial sessions with Lisp should be with symbols and lists, such as the fruits example, as opposed to typical C or C++ sessions which involve "Hello World" and factorial examples.
"The outside of a horse is good for the inside of a man" - Winston Churchill
quote:
Original post by Drevay
Oh and, since I have a laptop, I had to press the function key + the enter key, to get the numeric enter key, bit different but meh, who cares!
You can also select the code you wish to execute and press shift+Enter.
quote:
EDIT - Yes, I was wondering why does it print a line of characters twice
Because you are in the REPL (the interactive environment), it performs the print to standard output (which is the REPL), and it prints the return value to the REPL. So, the first line is the side-effect of write-line, and the second is the return value.
quote:
Original post by Drevay
(write-line "Hello, this is your master speaking...")
*sigh*
You''re going to pretend you''re programming with a language like C or C++, aren''t you?
Don''t. Start right in with a different mentality.
I found that this tutorial was good enough to start: Lisp Primer. But some of the more knowledgeable Lispers might find it inadequate, I don''t know.
As a related note, I initially began with Guy Steele''s Common Lisp and regretted it. The book doesn''t know itself if it wants to be a comprehensive tutorial, a reference, or a language specification, so it''s not recommended.
Cédric
As a related note, I initially began with Guy Steele''s Common Lisp and regretted it. The book doesn''t know itself if it wants to be a comprehensive tutorial, a reference, or a language specification, so it''s not recommended.
Cédric
Awwww
Download my new game: notavirus.jpg.exe Thanks ^___^!
(defun create-account (sock) (
(setlocal
(un (strnum (conn-getdata sock "un" "0")))
(name (conn-getdata sock "name" ""))
(pass (conn-getdata sock "password" ""))
)
(log sock (str+ "Creating new account <" name ">"))
(if (| (! (user-exists un))
(str!= (user-getname un false false) "")
(user-online un))
(begin
(conn-send sock "Very funny.\r\n" CAPS_NONE)
(conn-close sock)
) (begin
(user-setname un name)
(user-setalias un name)
(user-setshowname un name)
(user-setpass un pass)
(level-addstats 1 un)
(conn-send sock "Account created successfully\r\n" CAPS_NONE)
(conn-setidlelimit sock 3600)
(conn-setreciever sock "def-conn-message")
(user-setconn un sock)
(user-login un)
))
))
Download my new game: notavirus.jpg.exe Thanks ^___^!
Yes. I think that using Lisp to work with symbols and lists will get you ahead faster and get you thinking differently as opposed to thinking in terms of strings and printing. This goes a long way towards helping you think in terms of symbolic expressions, parsed data (you''re working with parsed data, instead of strings), code as data, symbols as data, etc.
___________________________________
"The outside of a horse is good for the inside of a man" - Winston Churchill
"The outside of a horse is good for the inside of a man" - Winston Churchill
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement