freenode/#lisp - IRC Chatlog
Search
22:49:49
Bike
putting in an (and keyword ...) won't speed anything up if the implementation doesn't simplify types somehow, and if it doesn't simplify types somehow type tests are probably going to be slow regardless
22:50:25
Bike
also even assuming the keyword type is checked first, for a member of the type it'll have to check a member anyway, so you'd just be speeding up testing on nonmebers at the expense of testing on members
23:02:17
Bike
on sbcl it has no effect on typep speed that i can see, because it reduces (and keyword (member ...)) to (member ...) if all the objects are keywords
23:12:47
Alfr_
Isn't it possible to reduce every (and type-spec (member ..)) to (member ..) simply by only retaining the objects o which satisfy (typep o type-spec)? Or am I missing something here?
23:24:59
aeth
Alfr_: Also, I think that technically every type can become a MEMBER type because everything's finite...
23:52:00
Bike
and any class you can make fresh instances of, so standard objects, hash tables, restarts, whatever
2:00:59
edgar-rft
It's always good to learn new things, but I myself never learned iter, so I don't know if it's really good to listen to my advice here.
6:52:17
holycow
anyone here use stumpwm? i'm doing a big of testing in emacs and drawing with code using sketch.
6:53:08
holycow
every time sketch draws something new it steals the window focus. anyone know if there is a way to stop the sketch window from setaling focus when emacs sends a live command to draw something to the sketch window?
7:25:21
opcode
hi all, newbie question: is there a reason why one might prefer (mapcar) over (map 'list ) or vice-versa?
7:29:31
beach
opcode: There is a very general rule in programming. You should choose the most specific construct that will do the job.
7:30:29
beach
The rule exists to make it faster to understand the code by someone who didn't write it, or by the same person who wrote it, but a few weeks later.
7:31:47
aeth
If you expect lists, use mapcar. If you are writing a general function on arbitrary input, map 'list might be preferable.