Search found 148 matches
- Mon Apr 19, 2010 10:44 pm
- Forum: The Lounge
- Topic: Question about parentheses
- Replies: 27
- Views: 56422
Re: Question about parentheses
Use paredit.el or something like it and you'll type half the parentheses.
- Sat Apr 10, 2010 3:11 am
- Forum: Common Lisp
- Topic: Lists of Functions
- Replies: 9
- Views: 7804
Re: Lists of Functions
Thanks for the link Ramarren. I don't recall seeing how to do it in that chapter. I've tried funcall etc. I'll have another look. Is it possible to structure lists of functions and then call those functions from the list with a function like nth or assoc? Sure, but you didn't make a list of functio...
- Fri Apr 09, 2010 1:11 am
- Forum: Common Lisp
- Topic: Lists of Functions
- Replies: 9
- Views: 7804
Re: Lists of Functions
Sure, but you didn't make a list of functions.BIOS wrote:Is it possible to structure lists of functions and then call those functions from the list with a function like nth or assoc?
- Sat Apr 03, 2010 5:44 pm
- Forum: Common Lisp
- Topic: What am I doing wrong
- Replies: 4
- Views: 5036
Re: What am I doing wrong
I have a simple example readin function (defun read-setup (thefile) (with-open-file (stream thefile) (loop for line = (read stream nil 'end) until (eq line 'end) do (print (list (coerce line 'integer)))))) That just reads in some integers into a file, Im pretty sure it works, because it was an exam...
- Sun Mar 14, 2010 2:08 pm
- Forum: The Lounge
- Topic: hello, I'm a new lisp newbie
- Replies: 4
- Views: 9527
Re: hello, I'm a new lisp newbie
PCL is a good book for people with some programming experience. Be forewarned: you'll try to apply macros in many situations where they're not particularly necessary or appropriate. Any time you think you need a macro, try first to write it as a function instead. Often, wrapping a function with a ma...
- Wed Feb 24, 2010 8:36 pm
- Forum: Common Lisp
- Topic: Saving my work ,effectively, in lisp-in-a-box?
- Replies: 5
- Views: 13837
Re: Saving my work ,effectively, in lisp-in-a-box?
Hi, I'm learning this brilliant language and i'm using lisp-in-a-box. One "problem" i have is when want to save what i write. Do i really need to create a new file and write the code again in that file? Is there not a more effective way? Don't write code in the REPL. It's just for throwaw...
- Thu Feb 18, 2010 3:42 pm
- Forum: Common Lisp
- Topic: I have an urgent question :S
- Replies: 5
- Views: 13918
Re: I have an urgent question :S
;; Edited the indentation to make some structural issues clearer. (defun sorter A (cond (null A) nil) (eq (difference ((car a) (greatest A)) 0) (cons (car A) (sorter cdr A))) (t ( sorter (cons (cdr A) (car A)))) ;; Where did these guys below come from? ))) Is it totally wrong? I'm sorry to say that...
- Thu Feb 18, 2010 3:08 pm
- Forum: The Lounge
- Topic: LISP vs Lisp
- Replies: 8
- Views: 19818
Re: LISP vs Lisp
Hey, I'm trying to convince ESR to use Lisp instead of LISP in the hacker howto. However, I can't find any citation to why Lisp refers to modern dialects, and LISP to old ones. I don't think the difference is related to language versions. It's rather a matter of the current orthography. It seems ES...
- Sat Feb 13, 2010 2:54 am
- Forum: Common Lisp
- Topic: Lisp newbie: deck of cards in Lisp
- Replies: 17
- Views: 17192
Re: Lisp newbie: deck of cards in Lisp
I guess I'm thinking too real world (like java). Probably a mistake in Java too. I don't think it much matters what representation you choose for this, although you'll probably be happier if you store the rank in a form that can be compared without a lot of fuss. The cons cell representation that N...
- Sat Feb 06, 2010 7:09 pm
- Forum: Common Lisp
- Topic: "what will happen when i do..."
- Replies: 9
- Views: 13417
Re: "what will happen when i do..."
lists will probably be implemented as arrays in most cases You can pretty much rely on this never happening*. Your Lisp is not going to swap your data structures around. It's going to assume you know what you're doing and picked lists for a reason. * The exception being if you are using a strange l...