jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
NicknameJohn has joined #commonlisp
triffid has quit [Remote host closed the connection]
random-nick has quit [Ping timeout: 255 seconds]
mingus has quit [Ping timeout: 265 seconds]
mingus has joined #commonlisp
tevo has quit [Read error: Connection reset by peer]
tevo has joined #commonlisp
kevingal_ has quit [Ping timeout: 248 seconds]
kevingal has quit [Ping timeout: 248 seconds]
occ has joined #commonlisp
dipper has joined #commonlisp
occ has quit [Ping timeout: 248 seconds]
tyson2 has joined #commonlisp
Lord_Nightmare has quit [Quit: ZNC - http://znc.in]
Lord_Nightmare has joined #commonlisp
dtman34 has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
dtman34 has joined #commonlisp
notzmv has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
NicknameJohn has quit [Ping timeout: 250 seconds]
NicknameJohn has joined #commonlisp
earl-ducaine has quit [Ping timeout: 250 seconds]
jon_atack has joined #commonlisp
jonatack has quit [Ping timeout: 255 seconds]
dcb has quit [Quit: MSN Messenger 3.8]
euandreh has quit [Ping timeout: 265 seconds]
Lumine has quit [Quit: brb]
dipper_ has joined #commonlisp
dipper has quit [Ping timeout: 250 seconds]
domovod has joined #commonlisp
domovod has quit [Quit: WeeChat 3.8]
pvb has joined #commonlisp
pve has joined #commonlisp
msavoritias has quit [Ping timeout: 248 seconds]
occ has joined #commonlisp
msavoritias has joined #commonlisp
Cymew has joined #commonlisp
rgherdt has joined #commonlisp
euandreh has joined #commonlisp
Bocaneri has joined #commonlisp
Bocaneri is now known as Guest5635
Sauvin has quit [Ping timeout: 240 seconds]
shka has joined #commonlisp
Guest5635 is now known as Sauvin
oselyqualitylesp has quit [Quit: Using Circe, the loveliest of all IRC clients]
rogersm has joined #commonlisp
attila_lendvai has joined #commonlisp
LW has joined #commonlisp
LW has quit [Client Quit]
LW has joined #commonlisp
Brucio-61 has quit [Ping timeout: 260 seconds]
scymtym has quit [Ping timeout: 252 seconds]
poselyqualityles has joined #commonlisp
scymtym has joined #commonlisp
Brucio-61 has joined #commonlisp
scymtym_ has joined #commonlisp
scymtym has quit [Ping timeout: 250 seconds]
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
NicknameJohn has quit [Read error: Connection reset by peer]
attila_lendvai has quit [Ping timeout: 252 seconds]
rogersm has quit [Quit: Leaving...]
occ has quit [Ping timeout: 248 seconds]
jeosol has quit [Quit: Client closed]
remexre has quit [Read error: Connection reset by peer]
remexre has joined #commonlisp
gpiero has quit [Quit: Quitting...]
rgherdt_ has joined #commonlisp
rgherdt has quit [Read error: Connection reset by peer]
ardon has joined #commonlisp
gpiero has joined #commonlisp
Guest29 has joined #commonlisp
Guest29 has quit [Client Quit]
azimut_ has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
jmdaemon has quit [Ping timeout: 252 seconds]
bollu has quit [Quit: Ping timeout (120 seconds)]
bollu has joined #commonlisp
rendar has quit [Quit: Leaving]
<cpli> if i have to efficiently convert between syms and numeric values, is an alist a good idea?
random-nick has joined #commonlisp
<cpli> ^ this snippet currently creates one large case statement which sbcl nicely compiles into a lut
rendar has joined #commonlisp
rendar has joined #commonlisp
Gleefre has quit [Ping timeout: 260 seconds]
<pjb> cpli: I use (ecase expr (#.+foo+ +foo+) …) ; in both cases, you need to wrap the the defconstant in eval-when :compile-toplevel (or compile and load them separately first).
<cpli> pjb as in you create a list of 2-element lists as a toplevel compile-time constant and then use a macro?
<pjb> You may use a macro. In that case, you can generate both the defconstant and the functions to convert using the values directly. See for example: https://gitlab.com/com-informatimago/com-informatimago/-/blob/master/common-lisp/cesarum/utility.lisp#L389
<ixelp> common-lisp/cesarum/utility.lisp · master · com-informatimago / com.informatimago · GitLab
edgar-rft has quit [Quit: Leaving]
<beach> cpli: It is recommended to use '() to initialize the lexical variable to the empty list.
<cpli> thank you, beach
<beach> cpli: And the use of KEY as a Boolean is a violation of the rules suggested on page 13 of the LUV slides.
<beach> Sure.
pjb has quit [Read error: Connection reset by peer]
<beach> cpli: And for a large number of values, I might have preferred a hash table. For a small number of values, it doesn't matter much whether you use a CASE form (not a "statement") or alist.
<cpli> beach, ~512 values..
<beach> I would use a hash table then.
<beach> You can't be sure what code the implementation will generate from a CASE form.
<jackdaniel> on the other hand the implementation may generate better optimized code form a CASE form compared to using a hash table
<jackdaniel> (in fact I think that sbcl indeed does something special when cases are numbers)
<splittist> cpli: you are receiving symbols and run time, and need to turn them into integers?
<splittist> s/and/at/
<beach> Sure, you may want to program specifically for one implementation if you really need top performance.
<cpli> i'm writing this and its repetition smells: https://0x0.st/HHZ0.bin
<jackdaniel> using a CASE for ENUM is also more elegant
<beach> jackdaniel: But in this case, the keys are symbols.
<beach> cpli: That seems to be a binary file.
<cpli> it isn't, i'm not some crazy hacker. nullpointer (the paste service) just sniffs maim badly
<jackdaniel> beach: I believe that this is incorrect and the keys are numbers
<jackdaniel> according to the linked snippet
Lumine has joined #commonlisp
<cpli> jackdaniel: they're both. but the user facing code shouldn't have to deal with windows/macos(karabiner)/linux(evdev/libinput) keycodes simulatiously
<cpli> it will deal with :A
<beach> OK, I just read "if i have to efficiently convert between syms and numeric values, is an alist a good idea?".
<beach> cpli: My browser refuses to open https://0x0.st/HHZ0.bin
<jackdaniel> the extension is .txt
<ixelp> dpaste/wudPp (Common Lisp)
<jackdaniel> in any case (ha!) CASE gives more opportunities for the compiler for optimizations than a hash table. in the worst case the implementation may implement it with a hash table
<cpli> i have a keybind that POSTs my clipboard onto 0x0.st and replaces the clipboard contents with the url, so it's my goto
<hayley> Isn't the worst case if the compiler generates sequential tests?
<beach> hayley: Indeed.
<cpli> hayley: and that's not what it does. it creates a lookup table
<hayley> ...when there are many cases. I don't know how many cases there are.
<cpli> sbcl decomp was a lut
<jackdaniel> hayley: yeah, it could be that the compiler will do worse than what it could do with the information
<beach> cpli: So you specifically target SBCL?
<hayley> Yes, SBCL can make a lookup table.
<jackdaniel> but if we are not relying on good behavior of the implementation, are we going to rely on its fuckups and avoid better suited (more specific) language operators?
pjb has joined #commonlisp
<hayley> That does not negate my statement; a sufficiently unsmart compiler could well generate a sequence of tests.
<jackdaniel> sure, and sufficiently unsmart compiler may implement a hash table as a plist
<cpli> beach, for now i don't mind being that implementation dependent. my posix utils package has specific cffi fallbacks for when sb-posix is unavailable
* hayley was thinking that.
<cpli> i don't think specific assembly optimizations that may or may not be performed by my impl should stop me from writing the product first
<hayley> An actual hash table is easier to implement than transforming branches into a lookup table into a compiler, I would guess. Have yet to implement the latter :)
<cpli> hayley i need to convert back.
<cpli> having two hash tables also seems superfluous
<cpli> plus, this set of data is known at compile time, hayley
<cpli> if i wanted that sort of performance i should really optimize my hash function..
<cpli> then optimize access to the underlying buckets in my hash table..
<cpli> wait..
<cpli> i get lut performance + runtime of my tortured hash function
tyson2 has joined #commonlisp
<cpli> iterate that process for the conversion back
<splittist> cpli: then why not deal with it at compile-time? Instead of :a have a reader-macro #!a that converts to the integer. Then it can take as long as you like.
<cpli> splittist: **now** we have the good answers
<cpli> damn that's good
<cpli> really the overhead of any conversion seemed superfluous to me
<cpli> since all i'm trying to do is stay within one backend at a time..
marsia has quit [Ping timeout: 248 seconds]
<splittist> Don't forget #!Super-Hyper-Meta-Shift-Control-A etc.
<cpli> splittist: the integers are unique on different platforms, i just deal with that by #+windows?
<splittist> or uiop:os-windows-p / uiop:os-cond with appropriate (eval-when ...)
<cpli> splittist: would'ya recommend i swallow the additional dependency and use uiop instead of features?
<cpli> (i *am* using trivial-features)
<splittist> cpli: you know your system better (:
<splittist> there's probably some asdf incantation to include the correct file for each os
ardon` has joined #commonlisp
dtman34 has quit [Ping timeout: 252 seconds]
attila_lendvai has joined #commonlisp
morganw has joined #commonlisp
scymtym_ is now known as scymtym
<Shinmera> My ELS paper got accepted, hoorah.
<beach> Congratulations!
jeffrey has joined #commonlisp
dcb has joined #commonlisp
<hayley> Mine was accepted too. Phew.
<beach> Nice!
<beach> hayley: Will you be there?
* beach seems to remember the answer is "no".
<scymtym> hayley: congratulations
<hayley> Not in person, unfortunately.
<beach> :(
<hayley> Don't quote me on it, but I'm secretly hoping to at least visit Europe next year.
<jackdaniel> wouldn't it be hard to switch from upside-down?
<jackdaniel> Shinmera: hayley: congrats!
<hayley> jackdaniel: I recall some movie about people who managed to reverse time for them, and said people needed tanks of reversed-time oxygen for some reason.
<jackdaniel> the title was "tenant" I think
<Shinmera> tenet
<jackdaniel> right you are, tenet
<jackdaniel> I've liked it
<jackdaniel> cheap entertainment, loud bangs, action and good ending
<jackdaniel> something specifically tailored for me:)
<hayley> Right you are.
<beach> hayley: Will that potential visit be after you are done at the university?
<hayley> Right.
<hayley> I'm just waiting to finish my degree this year. Then I'm not sure what I'll do, honestly. Admittedly I seem to have no issue coming up with more reasons to move.
dtman34 has joined #commonlisp
<beach> I think you should explore other places. You could work or study just about anywhere.
pvb has quit [Ping timeout: 252 seconds]
<Equill> Exploring other places is worthwhile, if you can do it. Europe's a good area to explore, too.
occ has joined #commonlisp
ardon` has quit [Read error: Connection reset by peer]
jmdaemon has joined #commonlisp
triffid has joined #commonlisp
jmdaemon has quit [Ping timeout: 276 seconds]
<NotThatRPG> Anyone have experience using quicklisp in github actions? I'm having odd results, and debugging this is killing me, since it loops through git push and running actions...
<prxq> uiop is fancy under the hood :-) with SLURP-INPUT-STREAM and VOMIT-OUTPUT-STREAM
dcb has quit [Ping timeout: 248 seconds]
<NotThatRPG> Using one of the CL Foundation images, installing quicklisp, and putting my library in local-projects/ but QL still pulls the remote project instead of the local. Tried setting both ql:*local-project-directories* and running ql:register-local-projects)
dcb has joined #commonlisp
<Shinmera> NotThatRPG: I set this up just recently https://github.com/Shinmera/ldapper/blob/master/.github/workflows/build.yml
<ixelp> ldapper/build.yml at master · Shinmera/ldapper · GitHub
<Shinmera> the biggest gotcha is that the checkout action doesn't just put the clone to home
pranavats has left #commonlisp [Error from remote client]
<NotThatRPG> Shinmera: Thanks! I see you forcibly load the asd file... Hadn't thought of that.
<Shinmera> it's an ok solution if you only have one asd, yeah.
<NotThatRPG> Yes, the way GitHub initializes the filesystem in a Docker image is nutso, and their docs are terrible. Rambling and conversational instead of precise.
pranavats has joined #commonlisp
<NotThatRPG> If you run in docker you get /home/github instead of /home/runner because... ¯\_(ツ)_/¯ and the checkouts go in $GITHUB_WORKSPACE ¯\_(ツ)_/¯
<Shinmera> they always go into that envvar, I just was too lazy to figure out how to smush the value into the lisp expression.
dipper_ has quit [Ping timeout: 268 seconds]
kevingal has joined #commonlisp
kevingal_ has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
jeosol has joined #commonlisp
jmdaemon has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
pranavats has joined #commonlisp
pvb has joined #commonlisp
luna-is-here has quit [Quit: luna-is-here]
<NotThatRPG> Debugging GitHub actions is the 1980s all over again!
tyson2 has joined #commonlisp
jmdaemon has quit [Ping timeout: 265 seconds]
pranavats has left #commonlisp [Error from remote client]
Cymew has quit [Ping timeout: 248 seconds]
edgar-rft has joined #commonlisp
<NotThatRPG> Thank you so much, Shinmera ! That *finally* fixed all of my problems and you will see a PR that's ready to go.
luna-is-here has joined #commonlisp
<Shinmera> alright
jmdaemon has joined #commonlisp
pranavats has joined #commonlisp
johnjaye has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
jmdaemon has quit [Ping timeout: 255 seconds]
pranavats has joined #commonlisp
NicknameJohn has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
rogersm has joined #commonlisp
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
marsia has joined #commonlisp
pve has quit [Ping timeout: 248 seconds]
pve has joined #commonlisp
dino_tutter has quit [Ping timeout: 255 seconds]
pvb has quit [Ping timeout: 255 seconds]
rgherdt__ has joined #commonlisp
rgherdt_ has quit [Ping timeout: 248 seconds]
tevo has quit [Ping timeout: 250 seconds]
bird_ has quit [Ping timeout: 260 seconds]
lagash has quit [Ping timeout: 252 seconds]
tyson2 has joined #commonlisp
cinerion has quit [Quit: WeeChat 3.6]
cinerion has joined #commonlisp
Gleefre has joined #commonlisp
tevo has joined #commonlisp
lagash_ has joined #commonlisp
pjb has quit [Remote host closed the connection]
worstname has joined #commonlisp
tane has joined #commonlisp
tane has quit [Changing host]
tane has joined #commonlisp
bird_ has joined #commonlisp
mariari has quit [Read error: Connection reset by peer]
dilated_dinosaur has joined #commonlisp
zyni-moe has joined #commonlisp
zyni-moe has quit [Client Quit]
mariari has joined #commonlisp
occ has quit [Ping timeout: 248 seconds]
occ has joined #commonlisp
eddof13 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
jmdaemon has joined #commonlisp
frgo has joined #commonlisp
NicknameJohn has quit [Ping timeout: 255 seconds]
pjb has joined #commonlisp
frgo has quit []
Brucio-61 has quit [Ping timeout: 260 seconds]
scymtym has quit [Ping timeout: 252 seconds]
kevingal_ has quit [Ping timeout: 276 seconds]
kevingal has quit [Ping timeout: 276 seconds]
Brucio-61 has joined #commonlisp
igemnace has quit [Remote host closed the connection]
lxi has joined #commonlisp
rgherdt__ is now known as rgherdt
rogersm has quit [Quit: Leaving...]
kevingal has joined #commonlisp
kevingal_ has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NotThatRPG has joined #commonlisp
lxi has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
pve has quit [Quit: leaving]
karlosz has quit [Quit: karlosz]
<czy> is it possible to query a defined symbol and return its definition as a quoted list in lisp?
grawlinson has quit [Quit: SIGTERM]
shka has quit [Ping timeout: 250 seconds]
<random-nick> no, implementations are not required to keep that kind of information in memory
grawlinson has joined #commonlisp
<aeth> however, they usually provide the functionality to look up the source (which e.g. Emacs uses) so you could, if it is valid (and not guaranteed to still be around, either), read the file
<aeth> I wouldn't be surprised if e.g. SLIME already supports this as an alternative to M-.
<aeth> but if you need to rely on it, you have to have a macro that saves it.
<aeth> rather than directly using DEFUN/etc.
eddof13 has joined #commonlisp
tasty has quit [Quit: rebooting for kernel updates]
rgherdt has quit [Remote host closed the connection]
prxq has quit [Ping timeout: 260 seconds]
prxq has joined #commonlisp
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
karlosz has joined #commonlisp
tane has quit [Quit: Leaving]
tasty has joined #commonlisp
tasty has quit [Changing host]
tasty has joined #commonlisp
<ixelp> Common Lisp - Image Based Development
czy has quit [Remote host closed the connection]
morganw has quit [Remote host closed the connection]
LW has quit [Ping timeout: 265 seconds]
dcb has quit [Ping timeout: 252 seconds]
dcb has joined #commonlisp
johnjaye has quit [Ping timeout: 248 seconds]
johnjaye has joined #commonlisp
tyson2 has joined #commonlisp
worstname has quit [Remote host closed the connection]
triffid has quit [Remote host closed the connection]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<masinter> image based development -- just like Interlisp!
<masinter> it's great
NotThatRPG has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 250 seconds]
Lord_of_Life_ is now known as Lord_of_Life