freenode/lisp - IRC Chatlog
Search
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
20:33:09
nij
Hello! I have a .lisp file that works if evaluated as a buffer. How do I package it into a proper lisp project?
20:37:17
White_Flame
for an ASDF/Quicklisp compatible project, you need an .asd file that loads that lisp file
20:37:49
White_Flame
(also, get your defpackage/in-package uncommented, or make a separate package.lisp containing it)
20:40:25
White_Flame
it's an illegal function call in terms of trying to evaluate the last parameter in (foo :blah :components ((:file "main"))) before trying to call foo
20:42:23
White_Flame
huh, well I suspect the error is that it doesn't know that the "defsystem" is a macro, hence it's trying to evaluate the parameters
20:47:48
phoe
or you forgot to depend on use some packages and it tries parsing macro arguments as standard function calls.
20:51:59
phoe
CL is the only package that you can safely USE 99.9% of the time, and also the only package that you'll USE 99.9% of the time in practice
20:52:28
phoe
the remaining 0.1% is for situations where you need a variant of the CL package, e.g. with qtools
20:52:28
aeth
A defpackage at the very least needs a (:use) since apparently it's UB if there isn't any (:use) so it might implicitly (:use :cl)
20:53:34
White_Flame
basically, you implicitly defined QUESTIONNAIRE::DEFUN, and now you're trying to import CL:DEFUN which is a conflict
20:55:48
phoe
try (asdf:load-system :questionnaire :force t) - that force-reloads the system and also displays all warnings
20:56:01
aeth
QL with :verbose t will only complain on new changes, too, since most of the compiled files will be cached.
20:56:23
aeth
What's annoying, though, is that QL verbose will show verbose on all dependencies, too
20:56:33
White_Flame
since a very common case is to load other people's code, it defaults that way to not be spammed by their non-breaking issues
20:56:35
aeth
So you get to learn that some library you depend on is filled with STYLE-WARNINGs or whatever
21:00:10
theothornhill
https://lispcookbook.github.io/cl-cookbook/systems.html should provide some useful info about systems.