<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
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]
<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]