Xach 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>
VincentVega has quit [Ping timeout: 240 seconds]
taiju has quit [Ping timeout: 265 seconds]
Alfr has quit [Quit: Leaving]
thomaslewis has joined #commonlisp
taiju has joined #commonlisp
poselyqualityles has quit [Ping timeout: 240 seconds]
thomaslewis has left #commonlisp [#commonlisp]
kakuhen has joined #commonlisp
yewscion has quit [Quit: Connection closed]
s-liao has quit [Quit: Client closed]
s-liao has joined #commonlisp
dra_ has joined #commonlisp
kagevf has quit [Ping timeout: 256 seconds]
blihp has joined #commonlisp
dra has quit [Ping timeout: 268 seconds]
Guest7433 has joined #commonlisp
blihp has quit [Client Quit]
dpetrovs has joined #commonlisp
dpetrovs has quit [Ping timeout: 256 seconds]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
thomaslewis has joined #commonlisp
Colleen has quit [Read error: Connection reset by peer]
dra_ has quit [Remote host closed the connection]
dpetrovs has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
dpetrovs has quit [Ping timeout: 252 seconds]
makomo has quit [Ping timeout: 252 seconds]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 240 seconds]
dpetrovs has joined #commonlisp
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
Alfr has joined #commonlisp
dpetrovs has quit [Ping timeout: 265 seconds]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
Catie has quit [Quit: going home]
thomaslewis has joined #commonlisp
random-nick_ has joined #commonlisp
pdietz has quit [Quit: Client closed]
random-nickname has quit [Ping timeout: 252 seconds]
s-liao has quit [Quit: Client closed]
s-liao has joined #commonlisp
kennyd has quit [Quit: CGI:IRC (Session timeout)]
random-nick_ has quit [Ping timeout: 265 seconds]
karlosz has quit [Ping timeout: 240 seconds]
asarch has joined #commonlisp
Catie has joined #commonlisp
winning-luser has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.3]
perrierjouet has joined #commonlisp
perrierjouet has quit [Client Quit]
White_Flame has quit [Remote host closed the connection]
White_Flame has joined #commonlisp
sander has quit [Quit: So long! :)]
sander has joined #commonlisp
dpetrovs has joined #commonlisp
<asarch> How would you replace " to &quot; with format?
yewscion has joined #commonlisp
dpetrovs has quit [Ping timeout: 240 seconds]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 252 seconds]
asarch has quit [Quit: Leaving]
lisp123 has joined #commonlisp
lisp123 has quit [Client Quit]
karlosz has joined #commonlisp
yewscion has quit [Ping timeout: 265 seconds]
<hayley> Not easily.
karlosz has quit [Ping timeout: 252 seconds]
Algernon666 has joined #commonlisp
Bike has joined #commonlisp
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
Algernon666 has quit [Ping timeout: 240 seconds]
terrorjack has joined #commonlisp
<beach> Good morning everyone!
s-liao has quit [Quit: Client closed]
s-liao has joined #commonlisp
semz has quit [Ping timeout: 265 seconds]
akoana has quit [Quit: leaving]
semz has joined #commonlisp
dpetrovs has joined #commonlisp
dpetrovs has quit [Ping timeout: 252 seconds]
Catie has quit [Quit: sQuit]
tyson2 has quit [Read error: Connection reset by peer]
kagevf has joined #commonlisp
pdietz has joined #commonlisp
igemnace has quit [Ping timeout: 240 seconds]
Bike has quit [Quit: Connection closed]
pranavats has left #commonlisp [Error from remote client]
dpetrovs has joined #commonlisp
yewscion has joined #commonlisp
dpetrovs has quit [Ping timeout: 265 seconds]
pranavats has joined #commonlisp
Everything has joined #commonlisp
s-liao has quit [Quit: Client closed]
notzmv has quit [Ping timeout: 240 seconds]
pdietz has quit [Ping timeout: 256 seconds]
gaqwas has joined #commonlisp
asarch has joined #commonlisp
x88x88x has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
Cymew has joined #commonlisp
treflip has joined #commonlisp
asarch has quit [Quit: Leaving]
Oladon has quit [Quit: Leaving.]
yewscion has quit [Quit: Connection closed]
shka has joined #commonlisp
x88x88x has joined #commonlisp
Colleen has joined #commonlisp
Guest7433 has quit [Ping timeout: 265 seconds]
Algernon666 has joined #commonlisp
dpetrovs has joined #commonlisp
aartaka has joined #commonlisp
dpetrovs has quit [Ping timeout: 240 seconds]
dec0d3r has quit [Quit: Leaving]
igemnace has joined #commonlisp
Devon has quit [Ping timeout: 256 seconds]
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
gaqwas has quit [Ping timeout: 265 seconds]
pve has joined #commonlisp
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
igemnace has quit [Remote host closed the connection]
Jach has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
notzmv has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Algernon91 has joined #commonlisp
Alfr has quit [Ping timeout: 240 seconds]
Algernon666 has quit [Ping timeout: 240 seconds]
Alfr has joined #commonlisp
attila_lendvai has joined #commonlisp
kakuhen has quit [Quit: Leaving...]
dpetrovs has joined #commonlisp
frgo has quit [Read error: Connection reset by peer]
frgo has joined #commonlisp
dpetrovs has quit [Ping timeout: 240 seconds]
peterhil has quit [Remote host closed the connection]
rain3 has joined #commonlisp
s-liao has joined #commonlisp
dre has quit [Ping timeout: 265 seconds]
frgo has quit [Ping timeout: 256 seconds]
Mandus has quit [Quit: WeeChat 3.3]
Mandus has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 265 seconds]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life_ is now known as Lord_of_Life
s-liao2 has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
ahlk has quit [Ping timeout: 245 seconds]
kennyd has joined #commonlisp
pillton has quit [Remote host closed the connection]
VincentVega has joined #commonlisp
dpetrovs has joined #commonlisp
king has joined #commonlisp
s-liao2 has quit [Quit: Client closed]
dpetrovs has quit [Ping timeout: 252 seconds]
edgar-rft has quit [Quit: Leaving]
edgar-rft has joined #commonlisp
random-nick_ has joined #commonlisp
dpetrovs has joined #commonlisp
king has quit [Quit: king]
dpetrovs has quit [Ping timeout: 265 seconds]
perrierjouet has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
peterhil has joined #commonlisp
amb007 has joined #commonlisp
perrierjouet has quit [Client Quit]
perrierjouet has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
igemnace has joined #commonlisp
edgar-rft has quit [Remote host closed the connection]
edgar-rft has joined #commonlisp
<frodef> good morning
treflip` has joined #commonlisp
treflip has quit [Ping timeout: 252 seconds]
<beach> Hello frodef.
treflip` has quit [Quit: ERC (IRC client for Emacs 27.2)]
cognemo has quit [Quit: ZNC 1.8.2 - https://znc.in]
treflip` has joined #commonlisp
treflip` has quit [Remote host closed the connection]
cognemo has joined #commonlisp
cognemo has quit [Client Quit]
treflip` has joined #commonlisp
cognemo has joined #commonlisp
treflip` has quit [Remote host closed the connection]
treflip has joined #commonlisp
s-liao has joined #commonlisp
tyson2 has joined #commonlisp
treflip has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 252 seconds]
Bike has joined #commonlisp
pranavats has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
hisacro has quit [Ping timeout: 252 seconds]
cosimone has joined #commonlisp
paule32_ has joined #commonlisp
paule32 has quit [Ping timeout: 256 seconds]
paule32__ has joined #commonlisp
paule32_ has quit [Ping timeout: 265 seconds]
paule32__ has quit [Ping timeout: 265 seconds]
s-liao has quit [Ping timeout: 256 seconds]
hisacro has joined #commonlisp
contrapunctus has quit [Ping timeout: 240 seconds]
pranavats has quit [Ping timeout: 268 seconds]
axvr has quit [Remote host closed the connection]
s-liao has joined #commonlisp
s-liao has quit [Client Quit]
payphone has quit [Remote host closed the connection]
sirufer has quit [Remote host closed the connection]
zoglesby has quit [Remote host closed the connection]
sm2n has quit [Remote host closed the connection]
Schnouki has quit [Remote host closed the connection]
sirufer has joined #commonlisp
Schnouki has joined #commonlisp
payphone has joined #commonlisp
zoglesby has joined #commonlisp
sm2n has joined #commonlisp
axvr has joined #commonlisp
aartaka has joined #commonlisp
pdietz has joined #commonlisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
random-nick_ has quit [Ping timeout: 265 seconds]
NetNoodler has joined #commonlisp
<NetNoodler> Is there a notation to embed a control character in a string literal? ESCAPE for example
<Xach> NetNoodler: no.
NetNoodler has quit [Quit: Leaving]
Algernon666 has joined #commonlisp
Algernon91 has quit [Ping timeout: 265 seconds]
<pdietz> You can synthesize a string constant at read time using the sharp-period reader macro, which evaluates the following form at read time.
<pdietz> #.(format nil "foo~abar" (code-char some-integer))
<beach> ... which is way more flexible than special-case escape characters.
VincentVega has quit [Ping timeout: 240 seconds]
<mfiano> Is there a way to omit the trailing #\. character when giving 0 as a first argument here, or should I just branch? (format nil "~,vf" 0 0.123)
pdietz has quit [Quit: Client closed]
pdietz has joined #commonlisp
voltron has joined #commonlisp
<rotateq> What I had in mind some time, if it's possible to give characters additional nicknames that i can call them with #\ too by that.
<mfiano> I think I'll just #'string-right-trim
Everything has quit [Quit: leaving]
<phadthai> depending on what you need, since you can also decide what gets executed at compile time (i.e. macros), at load time and if it's only done once (i.e. defvar/defparameter), it may not matter to use something that creates the strings elsewhere, if you need any complex custom processing that you don't want to implement at read time
<phadthai> an example would be "with-html", creating static string templates at compile time and filling the template dynamic parts at runtime when those templates are applied
<phadthai> basically an enhanced custom format
kennyd has quit [Quit: CGI:IRC (Session timeout)]
<jackdaniel> cl-interpol defines a reader macro for interpolation
Guest74 has joined #commonlisp
pdietz has quit [Quit: Client closed]
pdietz has joined #commonlisp
treflip has joined #commonlisp
aartaka has quit [Ping timeout: 265 seconds]
hobo has quit [Quit: ZNC 1.8.2 - https://znc.in]
aartaka has joined #commonlisp
pranavats has joined #commonlisp
makomo has joined #commonlisp
frgo has joined #commonlisp
frgo has quit [Ping timeout: 265 seconds]
aartaka has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 265 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
karlosz has joined #commonlisp
karlosz has quit [Quit: karlosz]
georgy has joined #commonlisp
tyson2 has joined #commonlisp
sgithens has quit [Read error: Connection reset by peer]
dbotton has quit [Ping timeout: 245 seconds]
victor_ has quit [Ping timeout: 245 seconds]
alanz has quit [Ping timeout: 245 seconds]
jsatk has quit [Ping timeout: 245 seconds]
alanz has joined #commonlisp
jsatk has joined #commonlisp
sgithens has joined #commonlisp
victor_ has joined #commonlisp
dbotton has joined #commonlisp
treflip has quit [Quit: good night ✨]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<Guest74> bit-nor says it's complement of bit-array1 or bit-array2, is that ior or xor?
<Guest74> and is it (complement ba1) or ba2, or (complement (or ba1 ba2))
<Bike> the latter, which is how NOR is usually defined as far as i know
<Bike> (not ba1) or ba2 is bit-orc1
<Guest74> and is it ior or xor?
<Bike> ior. complement of xor is eqv
<Guest74> ok, thanks. i find it a bit weird they don't specify. I guess maybe or usually means ior?
<Bike> it does, yes.
<Bike> "complement of bit-array1 or bit-array2" is ambiguously worded, though, it's true
<Bike> i guess the trick is that that's written in english, in which you would prioritize "or" over "of"
voltron has quit [Remote host closed the connection]
<Guest74> also seems a bit incosistent that bit-and takes 2 arrays (plus opt whose role isn't defined) while logand takes infinite numbers.
<Bike> "If opt-arg is of type (array bit) the contents of the result are destructively placed into opt-arg. If opt-arg is the symbol t, bit-array or bit-array1 is replaced with the result; if opt-arg is nil or omitted, a new array is created to contain the result. "
<Bike> so that you can do these operations without consing, which isn't the case for the arithmetic versions
<Guest74> lol, I can't read.
lottaquestions has joined #commonlisp
<Guest74> ah, so ior is to xor as bit-nor is to bit-eqv.
frgo has joined #commonlisp
frgo has quit [Ping timeout: 265 seconds]
peterhil has quit [Read error: Connection reset by peer]
peterhil has joined #commonlisp
peterhil has quit [Remote host closed the connection]
gaqwas has joined #commonlisp
peterhil has joined #commonlisp
peterhil has quit [Max SendQ exceeded]
peterhil has joined #commonlisp
<Guest74> any thoughts on this? Might only be useful for stupid puzzles. https://plaster.tymoon.eu/view/2767#2767
<Xach> Docstrings or comments would go a long way.
<Guest74> true. I should probably work on that.
<Bike> yeah, it's not obvious what this is supposed to be
<Bike> or what u:s+ is
<Guest74> string add
<Bike> but i don't know what that means.
* Xach neither
<Bike> concatenation?
<Guest74> for when you have strings representing bit arrays, where a char represents an on bit. string-set-charset sets what an all on bit array would be. string concatenate for s+
<Bike> see, strings as bit arrays was my first thought, but then it makes no sense for string-not to remove characters
hobo has joined #commonlisp
<Guest74> if you set the charset to be "abcd" then (string-not "b") returns "acd"
<Bike> i understand that, but i don't know why i would want that, or what these strings are supposed to mean.
<Guest74> Like i said, it might only be useful for stupid puzzles.
<Bike> if you have four different characters these aren't strings of bits, i guess
casionaut has joined #commonlisp
<Guest74> characters represent unique bit positions.
<Bike> ah. so these are sparse bit vectors. i see.
<Guest74> though I guess anything that requires a complement degrades the longer the complete bit array is.
<Guest74> s/degrades/degrades performance/
Lycurgus has joined #commonlisp
aartaka has quit [Ping timeout: 265 seconds]
aartaka has joined #commonlisp
rogersm has joined #commonlisp
skempf has joined #commonlisp
Kabriel has quit [Quit: .]
Guest74 has quit [Quit: Connection closed]
attila_lendvai has quit [Ping timeout: 265 seconds]
VincentVega has joined #commonlisp
casionaut has quit [Quit: o7]
rain3 has quit [Ping timeout: 265 seconds]
<georgy> asdf
Lycurgus has quit [Quit: Exeunt]
random-nick_ has joined #commonlisp
jstoddard has joined #commonlisp
rogersm has quit [Quit: Leaving...]
Catie has joined #commonlisp
VincentV` has joined #commonlisp
VincentVega has quit [Ping timeout: 265 seconds]
aartaka has quit [Ping timeout: 265 seconds]
tyson2 has quit [Remote host closed the connection]
_73 has joined #commonlisp
dmgk has joined #commonlisp
aartaka has joined #commonlisp
<_73> why is it common to `:export` and `:use` uninterned symbols (with sharp-quote) when defining packages with defpackage?
<jackdaniel> _73: because you don't want to intern them in the package /in which/ your package is defined
<White_Flame> because those are just names
<White_Flame> also, think about what package you're in when the DEFPACKAGE form is evaluated, likely CL-USER
<White_Flame> s/evaluated/read/
<_73> I can't figure out how to produce any different behavior by interning vs not-interning the symbols
<Catie> I mean, you can always use keywords too, those are very predictable in what package they're interned into
<Catie> It still pollutes the image somewhat, I'm not disputing that bit
<White_Flame> and that pollution can interfere with tab completion, giving you unused symbols that evaluate wrong
<White_Flame> and/or cause package import conflicts later
<_73> Catie: ohh ok now I see why I was confused. What I was using as my example for an uninterned symbol was a keyword.
<Catie> There's the keyword symbol :keyword and the uninterned symbol #:keyword, those are different
<_73> Yes I understand that. I was comparing `:export :foo :bar` with `:export #:foo #:bar` and not seeing any difference. Either way the consensus is clearly to just use uninterned symbols.
<Catie> Okay gotcha, just making sure we were on the same page there!
tyson2 has joined #commonlisp
aartaka has quit [Ping timeout: 252 seconds]
dre has joined #commonlisp
cosimone has quit [Ping timeout: 265 seconds]
pdietz has quit [Quit: Client closed]
tyson2 has quit [Remote host closed the connection]
pdietz has joined #commonlisp
dre has quit [Ping timeout: 240 seconds]
pillton has joined #commonlisp
Noisytoot has quit [Remote host closed the connection]
Noisytoot has joined #commonlisp
waleee has joined #commonlisp
dre has joined #commonlisp
taiju has quit [Ping timeout: 240 seconds]
taiju has joined #commonlisp
tyson2 has joined #commonlisp
gaqwas has quit [Read error: Connection reset by peer]
gaqwas has joined #commonlisp
Algernon666 has quit [Ping timeout: 265 seconds]
pve has quit [Quit: leaving]
waleee has quit [Ping timeout: 265 seconds]
waleee has joined #commonlisp
dra has joined #commonlisp
random-nick_ has quit [Ping timeout: 268 seconds]
<mzan> dre: hi, if you are interested I'm a newbie of CL too, and I'm doing the AoC https://github.com/massimo-zaniboni/advent-of-code-2021
<mzan> I'm rather slow, up to date only day 3
<rotateq> mzan: or more thorougly :)
<rotateq> hm all those dependency libs seem to me a bit much at once for someone new :/
<mzan> I tried to use first the series
<mzan> then the loop
<mzan> then iterate
<mzan> Up to date I prefer iterate
<mzan> "newbie" not in the sense that these are my first lines of CL code.
makomo has quit [Ping timeout: 256 seconds]
<mzan> I played with CL in another project, where I studied CLOS.
<rotateq> oki
<rotateq> from now on you could switch "(when (not (null ...)))" to "(unless (null ...))"
<mzan> good
<rotateq> and CLOS is a big topic ^^
<Catie> If I may also, I'd strongly recommend with-open-file instead of open
<mzan> no you cant :_)
<Catie> Then I shall not
<rotateq> Catie: unwind-protect for saving the day :)
<mzan> In other days, I used also "(iter (for line in-file fn using #'read-line)"
s-liao has joined #commonlisp
<mzan> Catie: I'm learning new tricks every day about CL
<mzan> I like it very much
<Catie> I frequently use (loop for line = (read-line file nil nil) until (null line) ...)
<Catie> mzan: You and me both!
* Xach usually does "while line do ..."
<Catie> Xach: Is it a preference, or do the two have different semantics?
<Xach> Catie: a preference
<Catie> Okay cool thank you, just making sure
taiju has quit [Ping timeout: 256 seconds]
VincentV` has quit [Ping timeout: 265 seconds]
paule32__ has joined #commonlisp
<rotateq> mzan: and maybe sometimes DECF and INCF will come in handy for you too :)