freenode/#lisp - IRC Chatlog
Search
7:14:32
no-defun-allowed
Random question, is it specified if #+FOO will intern FOO in the package KEYWORD?
7:16:51
Shinmera
"#+ operates by first reading the feature expression and then skipping over the form if the feature expression fails. While reading the test, the current package is the KEYWORD package. "
10:00:34
specbot
Modifying Hash Table Keys: http://www.lispworks.com/reference/HyperSpec/Body/18_ab.htm
15:23:27
flip214
Is there some function that can convert a number to some indirectly specified type?
15:23:59
flip214
I'd like an average to be of the same type as the input (integers, floats, ratios), but (coerce (/ sum count) (type-of (first input))) doesn't work
15:30:03
shka__
there is no generic function for this because it wouldn't be usefull for general use
15:35:06
Bike
i'm with loke in not understanding why you want this. you'll have to apply these rules yourself by checking the classes of the arguments.
15:35:49
Bike
unlike the contagion rules in the language arithmetic these don't even associate, i don't think
15:36:12
pjb
If you want to convert numbers to numbers, some rounding will be necessary. And even, how do you round #C(2 2) to integer? Is it 2? 3? 4? does this mean anything?
15:37:29
loke`
And even if you have solution in your specific case (such as for example just taking the realpart of a complex number), that's never a generic solution.
15:37:49
flip214
pjb: I'd like to print average and stddev in the same format as the input.. so that column values (1 2 3 4) don't require a 2.5 in the "average" row