freenode/lisp - IRC Chatlog
Search
0:15:10
travv0
you sure that's what's written to the stream and not just your repl printing the return value?
0:55:37
npfaro`
Of all the knobs here http://clhs.lisp.se/Body/f_wr_pr.htm i'm not sure which one to use to get that sort of thing
1:01:09
ralt
loke: I've seen in some logs that you managed to get signals from dbus, would you care to share some snippets to do this? I want to subscribe to a known signal but unclear what I'm supposed to do.
2:46:43
npfaro
i don't know if that's the best way haha. if anyone else has a better idea please chime in
3:00:27
Alfr_
martinjungblut, careful if list has a odd number of elements, then on the last iteration b will be nil; just keep that in mind that it won't error.
3:00:35
aeth
destructuring bind will force an error, unlike LOOP's destructuring, but it's not as elegant. (loop for sublist on '(1 2 3) by #'cddr collect (destructuring-bind (a b &rest rest) sublist (declare (ignore rest)) (cons a b)))
3:01:27
martinjungblut
as a newcomer, I have to say, Common LISP is a hell of an environment to write software in
3:04:03
aeth
Oh, and there's an in between route, which is to do the sublist thing, but then destructure it in the next LOOP variable instead of having local d-b variables.
3:16:21
npfaro
is there any way to convert a number into a list of bytes without manual bit shifting
3:25:21
npfaro
Is there any better idiom for an increasing counter in loop than (loop for i = 0 then (1+ i))
3:26:34
specbot
The for-as-arithmetic subclause: http://www.lispworks.com/reference/HyperSpec/Body/06_abaa.htm
3:54:13
emaczen
What is the the timezone in encode and decode universal-time? I don't see a description in the docs
4:01:49
Bike
"time zone n. a rational multiple of 1/3600 between -24 (inclusive) and 24 (inclusive) that represents a time zone as a number of hours offset from Greenwich Mean Time. Time zone values increase with motion to the west, so Massachusetts, U.S.A. is in time zone 5, California, U.S.A. is time zone 8, and Moscow, Russia is time zone -3."
4:08:34
Bike
if you look at the bottom menu on clhs pages, the glossary is there between "symbol index" and "x3j13 issues"
4:48:43
beach
I am doing very well thank you. I am currently working on updating the SICL specification to adapt it to the many new ideas and extracted libraries that have happened since last time I worked much on it.
8:02:05
npfaro
((:TRANSLATIONS ((:TRANSLATION . "Do you think that's a good thing to do?"))) (:WORD--COUNT . 7) (:CHARACTER--COUNT . 17))
8:07:38
npfaro
i can't seem to find a predicate for it, so should i just make a substring and check that
8:13:20
beach
npfaro: Perhaps it is unorthodox because most languages don't allow keyword arguments to modify the behavior, and they don't allow "out of band" return values.
8:14:10
beach
npfaro: Lots of things about Common Lisp are that way, luckily. CLOS, the condition system, macros, keyword arguments, multiple values, etc.
8:18:02
npfaro
The only issue is that mismatch returns nil when the arguments are equal, so (zerop (mismatch ...)) breaks when they're equal
8:18:09
beach
It's a bit sad, though, that the intrinsic limitations of other languages would make them "orthodox".
8:21:26
loke[m]
Can't you do something like (NOT (MISMATCH s1 s2 :end1 #1=(min (length s2) (length s2)) #1#))
8:22:33
Nilby
In my own far off world that matters little, I say begins-with and ends-with, because I find the mismatch and search forms unintuitive.
8:25:03
loke[m]
beach actually I meant NOT, because the CLHS specifically says that MISMATCH returns “false”
8:26:09
beach
Note to self: In WSCL, consider specifying that MISMATCH returns NIL as a default value.
8:26:35
loke[m]
I think it makes sense. MISMATCH is a predicate function that also happens to return a useful value when returning true. :-)
8:27:57
loke[m]
Speaking of nil, I saw someone complaining about the terms NULL and NIL. He suggested a compromise: NILL
8:32:27
beach
It may have been the case that you could fit 6 characters in a 36-bit word at some point.