Search found 17 matches

by death
Sun Aug 17, 2008 11:20 am
Forum: Common Lisp
Topic: Macro expansion, packages, and LET
Replies: 9
Views: 9238

Re: Macro expansion, packages, and LET

Eventually the charts will get more complicated, and I think it will be more useful for the user to have a little more flexibility in how they specify things. I still advise you to use functions. The primary role of macros is to provide for syntactic abstraction. The primary role of functions is to...
by death
Sun Aug 17, 2008 3:45 am
Forum: Common Lisp
Topic: Macro expansion, packages, and LET
Replies: 9
Views: 9238

Re: Macro expansion, packages, and LET

Why not just use a function?

Code: Select all

(taylor-chart:pie-chart '(25 70 75 100) "test.png" :radius 256)
by death
Thu Aug 07, 2008 6:03 pm
Forum: Common Lisp
Topic: Favorite "underrated" Lisp feature?
Replies: 13
Views: 14955

Re: Favorite "underrated" Lisp feature?

I don't know about a "favorite" feature, but one underrated Common Lisp feature I appreciate is its pathnames support. Yes, some of it is too complicated, under-specified, or plain historical baggage, but in languages that don't support pathnames, the typical approach to dealing with them is to just...
by death
Wed Jul 23, 2008 1:31 am
Forum: Common Lisp
Topic: Parsing large real numbers
Replies: 4
Views: 6172

Re: Parsing large real numbers

In this particular case, maybe it would be sufficient to use double-floats:

Code: Select all

(- (let ((*read-default-float-format* 'double-float))
     (read-from-string "1169991858.90605"))
   1169991859.32605d0)
=> -0.4200000762939453d0
by death
Tue Jul 22, 2008 3:45 am
Forum: Common Lisp
Topic: Confused ....
Replies: 6
Views: 7555

Re: Confused ....

yes, nevermind the convention, this was just test of my understanding of language btw. dynamic binding of a is 0, not symbol a No. When you evaluate (test 'a) the variable a gets bound to the symbol a. Then Lisp will inspect the binding of variable a to get the symbol a (i.e. evaluate a), and pass ...
by death
Mon Jul 14, 2008 10:36 am
Forum: Common Lisp
Topic: Passing values by reference
Replies: 12
Views: 16181

Re: Passing values by reference

Just a quick note: arguments are always passed by value, i.e. copied, in Common Lisp, but here "arguments" denotes "implicit pointers to objects" (disregarding optimization tricks). That is why the function below will never change whatever object it is called with.

Code: Select all

(defun foo (x)
  (setf x 42))
by death
Sat Jun 28, 2008 10:18 am
Forum: The Lounge
Topic: LispForum topic structure
Replies: 12
Views: 16708

Re: LispForum topic structure

Not really a thought about the structuring, but I noticed that the subtitle for the Vim section is wrong.