freenode/#lisp - IRC Chatlog
Search
11:12:04
shangul
What choices do I have for a library similar to Python's requests(HTTP client)? Other than drakma and dexador
11:18:04
schweers
I have to admit that I only used drakma a little bit and tried out daxador even more briefly, so I can’t comment on how good these options are
11:25:57
pve
although I think I did need to wrap it a bit, specifically to bail if a download is too large
11:31:46
iissaacc
is there something built in i can use to recursively search a list? I've ended up with a lot of homemade functions that do this
11:33:20
iissaacc
search for and return a subtree that matches some predicate, like (eq (car subtree) :select)
12:07:06
jmercouris
it really depends on how often you must search the list, and if the position in the recursive structure is relevant to your needs
13:50:14
dlowe
if the client allows, you could also pin the cert so that the one site is guaranteed to use that one certificate, which will also thwart mitm attacks
13:58:46
warweasle
Well, I tried ##C++ but most of them never heard of Unification. Any idea if there is a unification library in C/C++?
14:22:52
gendl
Hi, why would my remote slime connection get "broken by remote peer" instead of going into the debugger, when I hit an error.
14:23:35
gendl
warweasle: nope. Server is still there, I can do M-x slime-connect and connect to it again
14:24:34
gendl
nope, it's the same instance -- although that's a good question, let me double check that
14:24:46
gendl
indeed the server is running in an infinite recovery loop so you may be on to something
14:28:28
gendl
seems the server process had been constantly crashing on initialization and getting re-spawned. the startup banner and messages are repeated in the log file a gazillion times.
14:29:02
gendl
it wasn't slime/swank crashing the lisp -- the lisp was repeatedly crashing on its own.
14:29:52
warweasle
Yeah... Whenever something is wrong I always assume I did it. Generally, every library I download is much better than anything I could write myself.
14:30:00
gendl
anyway sorry for the noise, problem identified and nothing to do with slime/swank -- my init is broken...
15:15:32
daphnis
tests whether a predicate applies to the variable, rather than whether it is equal to a value
15:17:30
beach
"variable"? If it is anything like ordinary CASE, it computes the value of an arbitrary form before checking the cases.
16:04:37
remexre
anyone know of bindings to signal (the chat program)? libsignal-protocol-c is gross enough that I'd rather not write the cffi glue myself if I don't have to :)
16:07:31
jackdaniel
easye: you may be interested in the issue resolved here: https://gitlab.com/embeddable-common-lisp/ecl/-/merge_requests/194 (lambda list congruency)
16:28:14
Xach
The latest sbcl is more strict about slots with :initform and :type. It has led to a lot of projects that no longer compile.
16:31:58
Xach
there is some redundancy - if project A fails, and is used by B, C, and D, all four will show the same failure error.
16:38:08
Xach
i think they are almost all of that form, with a small number of package locks/conflicts.
17:15:44
jasom
I would do :initform nil if I wanted to require it be specified when constructed, for example.
17:16:37
Xach
I have not closely followed the discussion around the change, only that it seems to be here to stay.
17:16:40
mfiano
It doesn't. If you declare a type, it is now a warning if the initial value's type is not of the declared type. You can always use a compelx type specifier to include null
17:17:30
jackdaniel
what you want is (fo :initarg :foo :type integer)) :default-initargs :foo (alexandria:required-arg 'foo))
17:18:43
jackdaniel
with structures you are even deeper in trouble, because type is used for inlined access and accessor-functions may be used for type inferenc3e
17:19:21
jackdaniel
so you could end up with inlined assembler instruction which adds fixnum to a string ,)
17:19:53
jasom
switching to alexandria:required-arg from nil is easy enough; thanks for pointing that out jackdaniel
17:24:55
mfiano
Xach: Yeah, I always wanted that from the failure reports. Would be nice to display it as a tree structure with root nodes sorted by "most bang for the buck". For example glkit is not located in proximity to sdl2kit or sketch, but it is the cause of their failures.
17:27:31
Xach
claw is second with 23. then cl-csv with 12, cl-messagepack with 10, cl-cffi-gtk with 10, db-cp with 6, and diminishing from there.
17:28:01
mfiano
claw can be easily fixed. I already pinged borodust. He has to backport a PR that was recently merged into cl-autowrap, what claw is derived from.
17:34:54
jasom
ebrasca: fast-io works for this too, though it's original purpose was for writing to byte-vectors it supports streams as well
17:35:08
minion
ebrasca: look at pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
17:35:27
mfiano
fast-io is more for reading and writing octets. Binary parsing is at a different level.
17:35:59
jasom
mfiano: it is not for reading/writing octets, it can read binary values from 8-64 bits with specified endian
17:37:22
jasom
ebrasca: do you just want serialization/deserialization, or do you want to read externally specified binary formats?
17:37:23
mfiano
Point being, it is a tool for binary parsing, and requires no knowledge of compiler theory to function, unlike binary parsing.
17:42:37
mfiano
A friend wrote that specifically for that use case for me, because there were not any robust solutions available at the time.
17:42:39
Xach
It is also not particularly hard to write it yourself, and is quite educational. the tools cl provides are quite adequate building blocks to build up abstractions.
17:45:04
mfiano
You can check out flac-metadata, for an example of using fast-io and bitio in a mixed endian format. FLAC is BE for most fields, but does include Ogg Vorbis data which is LE.
17:47:41
Xach
i really enjoy files that mix endianness in them, it shows that real things are messy sometimes for reasons.
17:48:14
ebrasca
Here link of superblock structure https://www.kernel.org/doc/html/latest/filesystems/ext4/globals.html
17:52:28
mfiano
Mixed [byte] endianess is incredibly easy to handle. Things can get complicated without good abstractions when trying to handle bit endianness
17:53:05
ebrasca
s_blocks_count_lo is at offset #x4 and s_blocks_count_hi is at offset #x150 , both have 32 bits size and little endian
17:53:58
Xach
ebrasca: so: (if 64-bit-supported-p (+ (ash s-blocks-count-hi 32) s-blocks-count-lo) s-blocks-count-lo)
18:06:02
ebrasca
Xach: I am searching some solution because https://github.com/ebrasca/Mezzano/blob/master/file/ext4.lisp#L220 is very easy to make mistakes and it have some duplication with defstructure and writer.