freenode/lisp - IRC Chatlog
Search
8:18:09
fiddlerwoaroof
tail-recursion, to me, is a bit like REDUCE: it's great when needed, but it's usually better to use it to make intermediate-level abstractions
8:18:46
fiddlerwoaroof
e.g. I could use REDUCE to do what MAPCAR does, but MAPCAR is less noisy and expresses my intent more clearly
8:21:41
npfaro
tail recursion and a pattern matcher are a "match" made in heaven when it comes to parsing lists
9:30:53
npfaro
is there any way to do a nested loop in a single `loop` form or do you have to do (loop for x do (loop for y do))
11:31:38
daphnis
did something change about the way one should load the code from Practical CL? i tried putting the practicals-... directory into asdf:*central-registry* and doing (asdf:oos 'asdf:load-op :practicals)
12:30:46
phoe
https://github.com/Apress/practical-common-lisp/blob/339dbf0224db6b3b23fd69b336c21625ca9142be/practicals/Chapter24/binary-data.asd
12:40:03
daphnis
phoe: yeah, it's just that the method suggested in the readme doesn't seem to work very well. but someone on so suggested putting it into quicklisp/local-projects/. that still doesn't work with everything at once, but at least i was able to load the package i needed.
13:35:57
beach
daphnis: For the local-projects directory, you need to execute (ql:register-local-projects) once for it to be found.
13:57:46
Xach
that is, you do not necessarily need to run it manually; it runs automatically in some circumstances.
14:28:39
heisig
Unfortunately, the automatic updating of local projects fails when the contents of ~/quicklisp/local-projects/ are symlinks.
14:35:36
mfiano
heisig: It's not that it's a symlink, there's a max depth for discovering systems automatically without ql:register-local-projects.
14:39:17
Xach
here is how it works. if the timestamp on the directory is newer than the timestamp of system-index.txt, it is scanned automatically and system-index.txt updated.
14:39:44
Xach
so anything that updates the timestamp of the directory will trigger an automatic registry. that includes symlinking or making directories or touching it via touch.
14:45:29
heisig
I see, thanks. Maybe I should add (ql:register-local-projects) to some git hook instead.
14:48:50
mfiano
I also constantly touch the asd file I'm working with along with setting ql:*quickload-verbose* in my init file, as only the remainder of the modules that were modified will be recompiled by ASDF
17:09:11
nij
How to format a time string so it can return "...-06:00", where -6 is my time zone? https://bpa.st/DQS2S
17:29:42
ogamita
nij: the first problem is that when you use ~w@d the sign is placed on the right of the filler character. It wors nicely when it's space, but if you use ~3,'0@d, you get 0-1 instead of -01. So you need to process the sign separately first.
17:30:27
ogamita
The second part is that the tz can be a fraction such as -9/2 for Afganistant (-04:30).
17:36:12
ogamita
it's for booleans and small ints:(format nil "~{~[zero~;one~;two~;fizz~:;what?~]~^ ~}" '(0 1 2 3 4)) #| --> "zero one two fizz what?" |#
18:07:43
Alfr
nij, what do you want to do? Also remember #\newline gives you exactly one char, which may not be what you want on some OS.
19:17:31
_death
I defined an event-case macro with arglist of (&body clauses) in a simple-graphics package, which also has a nickname sg.. but (sg:event-case ...) indentation was off.. it turns out that clx also defines an event-case operator, and the indentation comes from that one.. slime-cl-indent stores the correct indentation rule for my event-case, except it only has simple-graphics as package and not its nickname.. I guess it's time to patch it
19:24:15
ealfonso
does anyone know why this hangs for longer than 5 seconds? (drakma:http-request "https://health.usnews.com/doctors/carolyn-connelly-544761" :connection-timeout 5)
19:43:46
phoe
likely because connection-timeout is only effective before the connection is established
19:44:05
phoe
the backtrace shows me that it is trying to read a byte, which means that the connection was already established...
19:52:10
theothornhill
I'm having some trouble with quicklisp on M1 Mac. Is it known that some libraries don't seem to download on it?
20:01:28
asarch
In Emacs, how do you insert all the necessary )'s to close the expression? E.g. (foo (bar (smap (baz (if (when (cond ... <- Is there a key shortcut for this?
20:04:29
theothornhill
....WARNING: /usr/local/Cellar/sbcl/2.0.11/libexec/bin/sbcl is loading libcrypto in an unsafe way
20:07:12
phoe
it seems like a bug in cl+ssl - https://github.com/cl-plus-ssl/cl-plus-ssl/blob/ff4634a2addedc033394e93a402523532e9b470a/src/reload.lisp#L44-L49
20:07:36
phoe
new versions of macos crash when libcrypto is attempted to be loaded without a version
20:08:53
theothornhill
So what is the fix? Should I provide some patch upstream or is it simple to avoid locally?
20:09:13
phoe
AFAIK you need to load a concrete version of libcrypto rather than the un-versioned one
20:09:58
phoe
I'm not a macOS user so I can't check, but I've seen this break e.g. in https://github.com/orthecreedence/cl-async/issues/181