Search found 148 matches
- Mon Jul 20, 2009 8:15 pm
- Forum: Common Lisp
- Topic: Experience of Learning Lisp
- Replies: 52
- Views: 1997405
Re: Experience of Learning Lisp
I don't really see them as statements of fact, I see them as questions. "Is this a hash table?" is the question, and the answer is true or false. But that's exactly the problem. “Is this a hash table,†is a question, and can't possiblly be true or false. To be true or false, you have ...
- Mon Jul 20, 2009 1:42 pm
- Forum: Common Lisp
- Topic: Experience of Learning Lisp
- Replies: 52
- Views: 1997405
Re: Experience of Learning Lisp
I think some of the naming conventions are better; you don't have to remember if it's SOMETHINGP or SOME-THING-P, it's always "something?". So you just have to remember to use a question mark to denote statements of fact. :? And have to disambiguate it when speaking, unless you consider s...
- Sat Jul 18, 2009 3:48 pm
- Forum: Common Lisp
- Topic: Experience of Learning Lisp
- Replies: 52
- Views: 1997405
Re: Experience of Learning Lisp
CL-USER> (listp (cons 1 2)) T CL-USER> (list-length (cons 1 2)) ; Evaluation aborted. ; The value 2 is not of type LIST. ; [Condition of type TYPE-ERROR] What's inconsistent about not being able to take the length of improper lists? I don't even know why a person would try to do this intentionally,...
- Fri Jul 17, 2009 9:47 am
- Forum: Common Lisp
- Topic: Experience of Learning Lisp
- Replies: 52
- Views: 1997405
Re: Experience of Learning Lisp
I appreciate the logical hierarchy and organization imposed on methods in an OO design. (Before I get too far, I am aware that Lisp supports objects, but what I'm addressing here is the large quantity of functions in the language spec that would be much more comprehensible and easier to learn if th...
- Fri Jul 10, 2009 2:54 pm
- Forum: Common Lisp
- Topic: Style guide
- Replies: 5
- Views: 11403
Re: Style guide
(with-some-resource foo (bar foo)) (if (foo) (bar) (baz)) (foo (bar) (baz) (quux) (blarg) (something) (else)) IMO. In general, lisp-mode has the right idea. When you make macros that take a body parameter, make sure to use &body so Emacs knows how to indent that portion. The last one, I think, ...
- Tue Jun 30, 2009 4:31 am
- Forum: Common Lisp
- Topic: Interacting with lisp from a lispbuilder-sdl application
- Replies: 9
- Views: 15454
Re: Interacting with lisp from a lispbuilder-sdl application
Swank+slime is foreign to me - can't get myself to use emacs, though everybody says it's 'the-right-way-TM', so I wouldn't know how to use swank from my app. For now, a simple repl will do :) Ouch. I wince every time I hear someone say this. Not that I don't think there couldn't be something better...
- Mon Jun 29, 2009 5:32 pm
- Forum: Common Lisp
- Topic: Interacting with lisp from a lispbuilder-sdl application
- Replies: 9
- Views: 15454
Re: Interacting with lisp from a lispbuilder-sdl application
The first problem I bumped into is interacting with lisp - I would like the user to be able to talk directly to the lisp from the GUI window - in the same way that one can talk to lisp in the terminal. Right now, the best solution I achieved is that I have an input 'field' in my application where I...
- Wed Jun 24, 2009 2:34 pm
- Forum: Common Lisp
- Topic: incorrect simple floating point math
- Replies: 28
- Views: 35372
Re: incorrect simple floating point math
If you're actually doing this stuff "for real", you probably want a BCD representation. I can't think of a reason why you would prefer BCD over pure binary integers. To my understanding, some accounting methods involve very specific rounding techniques based on base-10 encoding probably a...
- Wed Jun 10, 2009 1:17 pm
- Forum: Common Lisp
- Topic: Replacing elements in a list
- Replies: 22
- Views: 25893
Re: Replacing elements in a list
Nope I say it again... It isnt homework Then why in the world are you so obsessed with this? LAMBDA isn't something you just “modify a function with†— what you say you want to do makes absolutely no sense that I can see. :| Could you describe the intended effect of this modification in more ...
- Tue Jun 09, 2009 7:57 pm
- Forum: Common Lisp
- Topic: Replacing elements in a list
- Replies: 22
- Views: 25893
Re: Replacing elements in a list
Thanks but I've already combined two functions in a single one (defun myfunc (x) (cond ((null x) nil) ((< (car x) 0) (cons (intern (format nil "*~a" (car x))) (myfunc (cdr x)))) (T (cons (car x) (myfunc (cdr x)))))) And now I need to modify this function with lambda. Why? Is this homework...