freenode/lisp - IRC Chatlog
Search
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.
21:09:19
ealfonso
phoe thanks, looks cool. quickload tells me <System "flamegraph" not found>, will try installing manually
21:10:31
White_Flame
nij: and the :serial t means the files will be read in order that you list them. If it's not serial, then each file should list what peers it's dependent on, for more complex stuff
21:11:50
White_Flame
I believe that :serial t means that each file gets a dependency list of all files before it, and then it does the full dependency resolving stuff
21:21:21
pve
Is there a good workflow that lets me start slime, and once connected, automatically load a "session" lisp file that sets up my session by loading some systems, maybe running some tests and entering some package? It would also be important for me to be able to restart the session easily, like pressing a single button.
21:22:56
pve
I've written a 20% solution that does the bare minimum i need, but I was wondering if there's maybe a contrib or something
21:23:48
pfdietz
Hypothesis is a random input generation library, originally in Python. The interesting twist it has is minimizing interesting inputs by mutating the recorded random bits used by the generator.
21:24:47
pfdietz
That way, if your generator enforces some condition on the generated objects, that is maintained even as you simplify it.
21:26:18
scymtym
pve: i use this start SBCL under wine and connect SLIME: https://techfak.de/~jmoringe/start.el
21:27:44
pve
phoe: I've a couple of elisp functions that let me start slime "with the current buffer" and then by pressing a single button (I use F7) it will restart slime and load that same "session" file.
21:30:06
nij
How do I export all symbols in a file. E.g.. here is my config.lisp: https://bpa.st/UNMAK
21:30:14
pve
phoe: and I've found it so exceedingly useful that I'd like to see if there's something a bit more polished around
21:30:41
nij
The user can add more questionnaires in side. The idea is to make all questionnaires here public, automatically.
21:40:16
scymtym
pve: yeah, i didn't use or need any of this before i started working on the McCLIM windows backend under wine