remexre has quit [Remote host closed the connection]
remexre has joined #commonlisp
jistr has quit [Quit: quit]
jistr has joined #commonlisp
edgar-rft_ has joined #commonlisp
ldb has joined #commonlisp
edgar-rft has quit [Ping timeout: 246 seconds]
lucasta has quit [Quit: Leaving]
eddof13 has joined #commonlisp
kevingal has quit [Ping timeout: 252 seconds]
eddof13 has quit [Client Quit]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cercopith has quit [Read error: Connection reset by peer]
cercopith has joined #commonlisp
brokkoli_origin has quit [Remote host closed the connection]
brokkoli_origin has joined #commonlisp
overclucker has quit [Ping timeout: 252 seconds]
random-nick has quit [Ping timeout: 252 seconds]
ldb has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
semz has quit [Quit: ZNC 1.8.2+deb2ubuntu0.1 - https://znc.in]
semz has joined #commonlisp
NotThatRPG has joined #commonlisp
brokkoli_origin has quit [Ping timeout: 252 seconds]
brokkoli_origin has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
svm has joined #commonlisp
msv has quit [Read error: Connection reset by peer]
svm is now known as msv
msv has quit [Remote host closed the connection]
msv has joined #commonlisp
puke has joined #commonlisp
amb007 has quit [Ping timeout: 272 seconds]
amb007 has joined #commonlisp
<jmercouris>
I'm having a particularly strange error with Alexandria, I'm trying to read a TTF into a string, doing simply `(alexandria:read-file-into-string ...)` and I'm getting
<aeth>
so you need to read it into a byte-vector and then poke at the subseqs that are valid
<jmercouris>
the key line is here: (electron:load-url win "resxyz:salmon")
<White_Flame>
and if you read it inot an 8-bit charset string like that, then you're constantly going to have to deal with char-codes instead of just byte values
<jmercouris>
which should be handled here: (lambda (xyz) (declare (ignore xyz)) (values font-vector "application/x-font-ttf"))
<White_Flame>
becaise ot
<White_Flame>
because it's a string, not a vector of numbers
<jmercouris>
IT MUST become a string, because I have to convert it to JSON
<White_Flame>
wat
<jmercouris>
this isn't my choice
<White_Flame>
there's no direct objective conversion from binary TTF file to JSON
<jmercouris>
I might have to make a binary encoder/decoder before and after it
<beach>
jmercouris: How can you turn something that can not be encoded as a sequence of characters into a string?
<jmercouris>
OK so I learned something new today, not all data can be encoded as a sequence of characters
<White_Flame>
you can of course hexify, base64, etc
<aeth>
jmercouris: it can't _concisely_ be encoded as a sequence of characters. You lose a bit
<aeth>
sometimes a lot, sometimes not much
<aeth>
but you have to reencode it
<jmercouris>
so let's say I take this byte vector, I can then base64 encode it
<jmercouris>
that way I can express it as a string
<jmercouris>
is that correct?
<White_Flame>
that is what base64 etc encoding is for, when you're forced to use a textual medium
<jmercouris>
I am forced, unfortunately, it is a long story
<White_Flame>
if you're doing interprocess comms, are you not using websocket?
<jmercouris>
then on the receiving end of the JSON, I can go ahead and do base64 decoding, into a binary blob
<White_Flame>
that can fip between text & binary per message
<White_Flame>
*flip
<jmercouris>
yes, I am doing interprocess COMMS, and no I am not using websocket
<jmercouris>
I'm using UNIX Domain Sockets for performance reasons
<aeth>
the more characters you can use (compare e.g. 26, 36 (26+10), 62 (26*2+10), 64, etc., and even some Unicode-based ones), the less space you waste going from binary to text, so you can go beyond base64, but you're still going to waste some space
<jmercouris>
I see, thank you all
<jmercouris>
this has been very enlightening
<White_Flame>
domain sockets are still sockets, etc agnostic char transfer
<aeth>
email was the original use case for this, pre-JSON
notzmv has joined #commonlisp
<jmercouris>
I know I could use domain sockets in a different way, however the client is expecting a character stream
<jmercouris>
I could inform the client to listen to another stream and then provide binary data, but again, that is complicated
<aeth>
it's not your bandwidth you're wasting
<jmercouris>
no, it isn't
<aeth>
base64 _works_, with the only issue being that the extra 2 characters are ambiguous because there's different ones you can use
<jmercouris>
what are the "extra 2 characters" that you are referring to?
<White_Flame>
streaming base64 can be weird as well, but I presume with TTFs you can just deal with the whole thing at once
<jmercouris>
I've never been too familiar with character encoding
<jmercouris>
I guess what I learned is that there are sequences of binary that CANNOT be represented as a stream of characters
<jmercouris>
I find this very surprising, I thought that all streams of bits could be represented as characters
<White_Flame>
depends on the encoding
<jmercouris>
I tried UTF8
<White_Flame>
right, that wouldn't work
<jmercouris>
but I guess UTF8 is insufficient
<White_Flame>
because it has multi-byte codes that need to be sensible
<aeth>
jmercouris: base 16 goes 0-9 then a-f/A-F... this is case-insensitive through base 36 (26+10) which is where CL stops because CL is quasi-case-insensitive (kind of and kind of not)
<aeth>
with case sensitivity you get to 62
<White_Flame>
8-bit encodings would read all byte as char codes 0-0xff, regardless of what those actual characters are. But you don't want characters, you want unsigned-bytes
<jmercouris>
I know I don't want bytes, but why not use an 8 bit character string?
<jmercouris>
and then take that 8 bit character string and convert into a binary blob
<beach>
jmercouris: There is no such thing as an 8-bit character string in Common Lisp.
<White_Flame>
why don't you want bytes? what do you expect to wrok with?
<jmercouris>
I'm sorry, I misspoke
<jmercouris>
I meant to say "I know I don't want a string"
<White_Flame>
you want a vector of 0-255 numbers, then find a "safe" set of printable characters (as hex encoding, base64 encoding, etc does)
<White_Flame>
which cast <8 bits of those input number (4 each in hex printing) into each output character's code
<jmercouris>
at that point, I might as well use a base64 encoder/decoder someone else has already written
<jmercouris>
I guess it would be the same exercise
<White_Flame>
yes, though hex can be done without libraries
<aeth>
jmercouris: so bases are only unambiguous up to 36 or 62 depending on if you use case sensitivity (I guess above 36 it's ambiguous which case you use first) because then you run out of letters and numbers... which means + and / or - and _ or + and , can be used for the extra 2 characters (or a bunch of others, but it's by standards one of those three)
<aeth>
CL goes up to 36 without librarise because its letters in its base encodings are case insensitive
<aeth>
*without libraries
<jmercouris>
this is why I stay on IRC, I don't think I could have learned this much this quickly elsewhere
<jmercouris>
thanks for the explanation aeth
<aeth>
you're welcome
mange has joined #commonlisp
gnoo_ has joined #commonlisp
gnoo has quit [Ping timeout: 252 seconds]
tasty has quit [Remote host closed the connection]
kurfen has quit [Read error: Connection reset by peer]
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
kurfen has joined #commonlisp
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eddof13 has joined #commonlisp
wizard has joined #commonlisp
eddof13 has quit [Client Quit]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
bitspook has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
rainthree has joined #commonlisp
notzmv has quit [Ping timeout: 264 seconds]
jon_atack has joined #commonlisp
jonatack has quit [Ping timeout: 265 seconds]
amb007 has quit [Ping timeout: 264 seconds]
amb007 has joined #commonlisp
chomwitt has joined #commonlisp
<jackdaniel>
I strongly dislike that (setf foo) lambda list is (new-value assigned-object) which is visually reverse to how you call it (setf (foo assigned-object) value)
chkhd has joined #commonlisp
<jackdaniel>
generally this whole "function names are symbols except from setf, where it can be a two-element list with fixed first element" is braindead, I'm curious about the rationale
<jackdaniel>
whole idea*
pve has joined #commonlisp
ajf has quit [Remote host closed the connection]
rainthree has quit [Ping timeout: 252 seconds]
alternateved has joined #commonlisp
King_julian has joined #commonlisp
<White_Flame>
jackdaniel: what would you propose for the setf situation re function naming instead?
<White_Flame>
mandating a single-single nickname for the setter function?
<White_Flame>
*single-symbol
<jackdaniel>
keep function names symbols and use defsetf/define-modify-macro to define setf operators I guess
<jackdaniel>
or, if we really must, allow other lists as function names (but I wouldn't like that really)
treflip has joined #commonlisp
dino_tutter has joined #commonlisp
King_julian has quit [Ping timeout: 244 seconds]
mishoo has joined #commonlisp
<White_Flame>
I guess the major difference would be having a separate fetch-setf-function reader, vs having function resolution handle both cases (eg with the list form)
jon_atack has quit [Ping timeout: 252 seconds]
<jackdaniel>
or macroexpand the setf call
<jackdaniel>
fun fact: (setf gethash) is often not a function, but rather an expansion to puthash
<jackdaniel>
s/often/sometimes(?)/
<nil>
If you use defsetf and a uniform convention for your setter name, then mostly only code that has to deal with code has to be concerned with it. Code that deals with code has various other irregularities to deal with.
treflip has quit [Remote host closed the connection]
<nil>
But I agree it's a sort of a wart. I think maybe it was influenced by flavors.
treflip has joined #commonlisp
bigbookofbug has quit [Ping timeout: 245 seconds]
bigbookofbug has joined #commonlisp
mgl has joined #commonlisp
awlygj has quit [Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in]
pkal has quit [Read error: Connection reset by peer]
pkal has joined #commonlisp
awlygj has joined #commonlisp
varjag has joined #commonlisp
random-jellyfish has joined #commonlisp
dino_tutter has quit [Ping timeout: 265 seconds]
treflip has quit [Ping timeout: 245 seconds]
bendersteed has joined #commonlisp
jonatack has joined #commonlisp
pl has quit [Ping timeout: 272 seconds]
pl has joined #commonlisp
rainthree has joined #commonlisp
attila_lendvai has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
thuna` has quit [Ping timeout: 244 seconds]
attila_lendvai has quit [Ping timeout: 252 seconds]
thuna` has joined #commonlisp
dajole has quit [Quit: Connection closed for inactivity]
<NotThatRPG>
Just had quicklisp skip loading a library (random-state) in local-projects in favor of a downloaded copy. Any idea what I might be doing wrong? I did run `(ql:register-local-projects)`
yitzi has joined #commonlisp
<jackdaniel>
NotThatRPG: if it is symlinked, then you need to call that from other implementation than ccl
<NotThatRPG>
This was Allegro, so I thought it would work.
<NotThatRPG>
I suppose I could have hard linked.
<Alfr>
NotThatRPG, did you try clearing asdf's cache?
<jackdaniel>
try sbcl to register and try again after that
<jackdaniel>
from acl
<NotThatRPG>
Alfr: No, but I restarted and tried again after running RLP and got the same behavior.
<NotThatRPG>
I'll try both of those, thanks.
alternateved has left #commonlisp [ERC 5.6.0.30.1 (IRC client for GNU Emacs 30.0.92)]
mgl has quit [Ping timeout: 252 seconds]
<Alfr>
NotThatRPG, what does (asdf:system-source-directory "random-state") say?
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
ajf has joined #commonlisp
treflip has quit [Remote host closed the connection]
treflip has joined #commonlisp
jonatack has quit [Quit: WeeChat 4.4.2]
JuanDaugherty has joined #commonlisp
lucasta has quit [Quit: Leaving]
<NotThatRPG>
Alfr: it gives me the directory in quicklisp (not local-projects).
<NotThatRPG>
Honestly, I got lazy and fed up and just pushed the directory onto `asdf:*central-registry*` ...
treflip has quit [Ping timeout: 265 seconds]
prokhor has quit [Remote host closed the connection]