Noisytoot has quit [Remote host closed the connection]
drainpipe has joined #commonlisp
<phoe>
Josh_2: nice, what is it?
drainpipe has quit [Ping timeout: 268 seconds]
gko has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.2)]
drainpipe has joined #commonlisp
gko has joined #commonlisp
drainpipe has quit [Ping timeout: 268 seconds]
Cymew has joined #commonlisp
drainpipe has joined #commonlisp
drainpipe has quit [Ping timeout: 268 seconds]
rdrg109_ has quit [*.net *.split]
zagura has quit [*.net *.split]
Bike has quit [*.net *.split]
genpaku has quit [*.net *.split]
makomo has quit [*.net *.split]
jmd_ has quit [*.net *.split]
son0p has quit [*.net *.split]
gpiero has quit [*.net *.split]
grawlinson has quit [*.net *.split]
akonai has quit [*.net *.split]
m5zs7k has quit [*.net *.split]
phantomics has quit [*.net *.split]
psf has quit [*.net *.split]
Colleen has quit [*.net *.split]
Shinmera has quit [*.net *.split]
splatt990 has quit [*.net *.split]
d4ryus has quit [*.net *.split]
zachel has quit [*.net *.split]
nyx_land has quit [*.net *.split]
Bike has joined #commonlisp
psf has joined #commonlisp
d4ryus has joined #commonlisp
Colleen has joined #commonlisp
Shinmera has joined #commonlisp
zachel has joined #commonlisp
nyx_land has joined #commonlisp
Noisytoot has joined #commonlisp
phantomics has joined #commonlisp
gpiero has joined #commonlisp
jmdaemon has joined #commonlisp
m5zs7k has joined #commonlisp
akonai has joined #commonlisp
grawlinson has joined #commonlisp
rdrg109_ has joined #commonlisp
makomo has joined #commonlisp
zagura has joined #commonlisp
zagura__ has joined #commonlisp
genpaku has joined #commonlisp
zagura__ has quit [Client Quit]
zagura is now known as zagura__
zagura__ has quit [Client Quit]
zagura has joined #commonlisp
_cymew_ has joined #commonlisp
igemnace has joined #commonlisp
drainpipe has joined #commonlisp
drainpipe has quit [Ping timeout: 268 seconds]
azimut has joined #commonlisp
Noisytoot has quit [Ping timeout: 252 seconds]
ttree has quit [Remote host closed the connection]
ttree has joined #commonlisp
rgherdt has joined #commonlisp
Noisytoot has joined #commonlisp
<flip214>
jcowan: but in other contexts (like #'function), a local function is already used up. so if FORMAT were a macro that translates ~/my::fn/ to just (funcall #'my::fn stream arg colon at), the compiler would (could) already optimize the indirection away.
<flip214>
phoe: https://paste.debian.net/hidden/b3286b4b/ ... I'd have thought that FORMAT with a constant string runs a compiler macro to use FORMATTER, but that ain't so
<phoe>
might be an implementation detail
<phoe>
...just like the fact that FORMATTER actually expands into Lisp code rather than a call to #'FORMAT
<phoe>
since my snippet is not portable by any means
drainpipe has joined #commonlisp
<flip214>
it isn't? I'd read CLHS 27.5. that this should be okay.
<phoe>
27.5?
drainpipe has quit [Ping timeout: 268 seconds]
MajorBiscuit has joined #commonlisp
ttree has quit [Read error: Connection reset by peer]
<phoe>
the issue is that FORMATTER is specified to be equivalent to #'(lambda ... (apply #'format ...) ...)
Oddity has quit [Ping timeout: 264 seconds]
mariari has quit [Ping timeout: 260 seconds]
mariari has joined #commonlisp
<phoe>
and this does not capture local functions
<phoe>
so any situation in which FORMATTER actually captures local functions is not portable
<phoe>
for instance CCL fails to run the above
<phoe>
whereas SBCL, ECL, ABCL, CLISP run it
<phoe>
because on CCL (formatter "~/cl-user::frob/") macroexpands into #'(LAMBDA (CCL::S &REST CCL::ARGS) (CCL::DO-SUB-FORMAT-0 CCL::S "~/cl-user::frob/" CCL::ARGS)) where DO-SUB-FORMAT-0 is a function
drainpipe has joined #commonlisp
aartaka has joined #commonlisp
makomo has quit [Ping timeout: 250 seconds]
drainpipe has quit [Ping timeout: 248 seconds]
drainpipe has joined #commonlisp
drainpipe has quit [Ping timeout: 268 seconds]
scymtym has quit [Ping timeout: 246 seconds]
Brucio-61 has quit [Ping timeout: 268 seconds]
<pjb>
Note that the control-string parameter of FORMAT can be a function, so if you want to use a local function to help format, you can pass a function that calls it. eg. (format t (lambda (…) … (my-local-function …) …) …)
drainpipe has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
Brucio-61 has quit [Read error: Connection reset by peer]
pjb has quit [Remote host closed the connection]
pjb has joined #commonlisp
lisp123 has joined #commonlisp
epony has quit [Ping timeout: 252 seconds]
lisp123 has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
lisp123 has joined #commonlisp
aartaka has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
drainpipe has joined #commonlisp
thuna` has joined #commonlisp
Lowly_Drainpipe has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
drainpipe has quit [Ping timeout: 264 seconds]
xlarsx has joined #commonlisp
Lowly_Drainpipe is now known as drainpipe
random-nick has quit [Ping timeout: 264 seconds]
xlarsx has quit [Ping timeout: 268 seconds]
jeosol has quit [Quit: Client closed]
splatt990 has joined #commonlisp
waleee has joined #commonlisp
lisp123 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
drainpipe has quit [Ping timeout: 268 seconds]
lisp123 has quit [Ping timeout: 260 seconds]
drainpipe has joined #commonlisp
son0p has joined #commonlisp
mariari has quit [Ping timeout: 268 seconds]
mariari has joined #commonlisp
waleee has quit [Ping timeout: 248 seconds]
eddof13 has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
attila_lendvai has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
aartaka has quit [Ping timeout: 268 seconds]
cosimone has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
anticomputer has quit [Remote host closed the connection]
pranavats has joined #commonlisp
Lowly_Drainpipe has joined #commonlisp
anticomputer has joined #commonlisp
Lowly_Drainpipe has quit [Ping timeout: 268 seconds]
jolby has joined #commonlisp
Lowly_Drainpipe has joined #commonlisp
Brucio-61 has joined #commonlisp
tyson2 has joined #commonlisp
Lowly_Drainpipe has quit [Ping timeout: 260 seconds]
tyson2 has quit [Remote host closed the connection]
Lowly_Drainpipe has joined #commonlisp
tyson2 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
Lowly_Drainpipe has quit [Ping timeout: 260 seconds]
eddof13 has joined #commonlisp
tyson2 has joined #commonlisp
Lowly_Drainpipe has joined #commonlisp
Lowly_Drainpipe has quit [Ping timeout: 268 seconds]
waleee has joined #commonlisp
Cymew has quit [Ping timeout: 268 seconds]
waleee has quit [Ping timeout: 264 seconds]
lisp123 has joined #commonlisp
Colere is now known as Sauvin
epony has joined #commonlisp
lisp123 has quit [Read error: Connection reset by peer]
anticomputer has quit [Ping timeout: 258 seconds]
anticomputer has joined #commonlisp
cage has joined #commonlisp
makomo has quit [Ping timeout: 268 seconds]
morganw has joined #commonlisp
Lowly_Drainpipe has joined #commonlisp
Lowly_Drainpipe has quit [Ping timeout: 264 seconds]
morganw has quit [Ping timeout: 264 seconds]
tyson2 has quit [Ping timeout: 246 seconds]
Oddity has joined #commonlisp
<phoe>
does anyone know of versions of CL set operators (UNION, INTERSECTION, SET-DIFFERENCE, SET-EXCLUSIVE-OR) which resolve duplicates in favor of one set rather than the other?
<phoe>
in the CL versions, it is unspecified whether the "winning" element is taken from the first or the second set
<pjb>
phoe: obviously, each implementation does one, the other, or a combination.
<pjb>
(eg. it could depend on the length of the sets).
<phoe>
pjb: I worded it poorly - which resolve duplicates in favor of the *first* set rather than the *second*
lisp123 has joined #commonlisp
<pjb>
Oh, I see, you want an implementation of them that does this.
<pjb>
If you find a free implementation that does what you want, you can copy the code.
Everything has joined #commonlisp
<phoe>
yes - I specifically want to favor elements from one set over the other, and I'm currently looking for an already existing implementation to avoid NIH
<phoe>
...in theory, for a biased UNION, I could first take a SET-DIFFERENCE and then UNION the first set with the difference
<phoe>
no idea about INTERSECTION though
makomo has joined #commonlisp
Faed is now known as Fade
<phoe>
SET-DIFFERENCE is specified to be biased and SET-EXCLUSIVE-OR has no common elements by definition, so INTERSECTION is the remaining one
<phoe>
...hmm, I can SET-EXCLUSIVE-OR the two and then SET-DIFFERENCE to get the common part!
<phoe>
thanks, #commonlisp, for being my rubber duck for a moment
<pjb>
phoe: well, it's a simple matter of exchanging the two lists in the right place. https://termbin.com/3sb8
MajorBiscuit has quit [Ping timeout: 268 seconds]
lisp123 has quit [Ping timeout: 268 seconds]
jolby has quit [Quit: Client closed]
Lowly_Drainpipe has joined #commonlisp
Madsy has joined #commonlisp
Lowly_Drainpipe has quit [Ping timeout: 268 seconds]
jolby has joined #commonlisp
Lowly_Drainpipe has joined #commonlisp
Brucio-61 has quit [Remote host closed the connection]
Brucio-61 has joined #commonlisp
Lowly_Drainpipe has quit [Client Quit]
attila_lendvai has joined #commonlisp
ttree has joined #commonlisp
Algernon69 has joined #commonlisp
chipxxx has joined #commonlisp
ns12 has quit [Quit: bye]
ns12 has joined #commonlisp
random-nick has joined #commonlisp
Algernon69 has quit [Ping timeout: 268 seconds]
cosimone has quit [Ping timeout: 252 seconds]
Lycurgus has joined #commonlisp
_cymew_ has quit [Ping timeout: 250 seconds]
Lycurgus has quit [Quit: Exeunt juan@acm.org]
waleee has joined #commonlisp
cosimone has joined #commonlisp
ec has quit [Remote host closed the connection]
causal has joined #commonlisp
azimut has quit [Ping timeout: 258 seconds]
attila_lendvai has quit [Ping timeout: 264 seconds]
drainpipe has quit [Ping timeout: 268 seconds]
tyson2 has joined #commonlisp
chipxxx has quit [Remote host closed the connection]
chipxxx has joined #commonlisp
chipxxx has quit [Read error: Connection reset by peer]
shka has quit [Read error: Connection reset by peer]
shka has joined #commonlisp
Brucio-61 has quit [Ping timeout: 248 seconds]
scymtym has quit [Ping timeout: 264 seconds]
drainpipe has joined #commonlisp
igemnace has quit [Remote host closed the connection]
xlarsx has joined #commonlisp
anticomputer_ has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
Guest6166 has quit [Quit: WeeChat 3.6]
Brucio-61 has joined #commonlisp
lisp123 has joined #commonlisp
Everything has quit [Quit: leaving]
shka has quit [Quit: Konversation terminated!]
shka has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #commonlisp
scymtym has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
anticomputer_ has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
xlarsx has quit [Remote host closed the connection]
xlarsx has joined #commonlisp
random-nick has quit [Ping timeout: 246 seconds]
rgherdt has quit [Remote host closed the connection]
xlarsx has quit [Ping timeout: 268 seconds]
pve has quit [Quit: leaving]
morganw has joined #commonlisp
xlarsx has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.7]
jmdaemon has joined #commonlisp
xlarsx has quit [Ping timeout: 268 seconds]
jolby has quit [Quit: Client closed]
perrierjouet has joined #commonlisp
shka has quit [Ping timeout: 268 seconds]
cosimone has quit [Remote host closed the connection]
xlarsx has joined #commonlisp
drainpipe has quit [Ping timeout: 252 seconds]
zyni-moe has joined #commonlisp
zyni-moe has quit [Client Quit]
lisp123 has joined #commonlisp
xlarsx has quit [Ping timeout: 268 seconds]
lisp123 has quit [Ping timeout: 268 seconds]
phantomics has quit [Ping timeout: 268 seconds]
xlarsx has joined #commonlisp
xlarsx has quit [Ping timeout: 268 seconds]
phantomics has joined #commonlisp
ec has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xlarsx has joined #commonlisp
drainpipe has joined #commonlisp
xlarsx has quit [Ping timeout: 264 seconds]
drainpipe has quit [Ping timeout: 268 seconds]
eddof13 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
morganw has quit [Read error: Connection reset by peer]
tyson2 has joined #commonlisp
dilated_dinosaur has quit [Ping timeout: 268 seconds]
akoana has joined #commonlisp
drainpipe has joined #commonlisp
drainpipe has quit [Ping timeout: 252 seconds]
thuna` has quit [Read error: Connection reset by peer]