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
17:48:32
galdor
is there any issue with APPLY-ing a function with &REST arguments such as MIN on very large lists ?
18:39:23
galdor
so if I want to find the minimum of a list with maybe a key function and a predicate, I should write it myself
18:47:29
bbsl
does cl base have any way to manipulate strings like lists? I just need a way to from a string get head (the first char) and tail (the rest of the chars)
18:49:39
Xach
bbsl: you would use subseq to get parts of the string. or you could displace an array to parts of the string. the sequence operations have different implications than with lists.
18:54:58
Xach
bbsl: any new cool info about what you're doing so we can offer more suggestions? some of them possibly helpful?
19:04:43
bbsl
Xach: well I didnt get much wiser. Online I found a string-to-list function referenced but its not part of the std lib so meh. I can use (subseq) I guess but that wont work for be because I do not know the start and end of these "sequences" other than by index. I guess the mythical sequence start/end params mentioned here is the answer to my question
19:08:35
Xach
I guess my general advice would be "don't try to work with strings like that if you can avoid it"