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/>
cognemo has quit [Ping timeout: 258 seconds]
cognemo has joined #commonlisp
green_ has joined #commonlisp
Inline has quit [Ping timeout: 248 seconds]
dinomug has quit [Remote host closed the connection]
X-Scale7 has quit [Ping timeout: 248 seconds]
Lord_of_Life has quit [Ping timeout: 258 seconds]
Lord_of_Life_ has joined #commonlisp
makomo has quit [Ping timeout: 255 seconds]
Lord_of_Life_ is now known as Lord_of_Life
habamax has quit [Ping timeout: 255 seconds]
puke has quit [Quit: puke]
puke has joined #commonlisp
chomwitt has quit [Ping timeout: 264 seconds]
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
rogersm_ has joined #commonlisp
rogersm has quit [Ping timeout: 264 seconds]
Pixel_Outlaw has joined #commonlisp
iosevka has quit [Ping timeout: 252 seconds]
Pixel_Outlaw is now known as BippoVille
waleee has quit [Ping timeout: 252 seconds]
X-Scale has joined #commonlisp
habamax has joined #commonlisp
habamax has quit [Remote host closed the connection]
akoana has joined #commonlisp
habamax has joined #commonlisp
Lycurgus has joined #commonlisp
Lycurgus has quit [Client Quit]
Lycurgus has joined #commonlisp
Lycurgus has quit [Changing host]
Lycurgus has joined #commonlisp
bubblegum has joined #commonlisp
random-jellyfish has joined #commonlisp
random-jellyfish has joined #commonlisp
random-jellyfish has quit [Changing host]
Alfr has quit [Killed (silver.libera.chat (Nickname regained by services))]
Alfr has joined #commonlisp
X-Scale79 has joined #commonlisp
Lycurgus has quit [Quit: leaving]
X-Scale79 has quit [Client Quit]
X-Scale65 has joined #commonlisp
X-Scale has quit [Ping timeout: 248 seconds]
habamax has quit [Ping timeout: 255 seconds]
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
X-Scale65 is now known as X-Scale
dcb has quit [Quit: MSN Messenger 4.1.0]
habamax has joined #commonlisp
simendsjo has joined #commonlisp
shka has joined #commonlisp
Pirx has quit [Ping timeout: 248 seconds]
vats has joined #commonlisp
Cymew has joined #commonlisp
vats has quit [Ping timeout: 248 seconds]
Guest63 has joined #commonlisp
BippoVille has quit [Quit: Leaving]
Guest63 has quit [Quit: Client closed]
pranavats has joined #commonlisp
vats has joined #commonlisp
chomwitt has joined #commonlisp
Guest63 has joined #commonlisp
igemnace has joined #commonlisp
vats has quit [Ping timeout: 260 seconds]
attila_lendvai has joined #commonlisp
akoana has quit [Quit: leaving]
habamax has quit [Remote host closed the connection]
akoana has joined #commonlisp
Guest63 has quit [Quit: Client closed]
attila_lendvai has quit [Ping timeout: 264 seconds]
akoana has quit [Quit: leaving]
Posterdati has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
dajole has quit [Quit: Connection closed for inactivity]
Lycurgus has joined #commonlisp
Lycurgus has joined #commonlisp
Lycurgus has quit [Changing host]
rtypo has joined #commonlisp
Lycurgus has quit [Quit: leaving]
Posterdati has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
bubblegum has quit [Ping timeout: 260 seconds]
<Shinmera> as always: :USE is the devil
simendsjo has quit [Ping timeout: 255 seconds]
dino_tutter has joined #commonlisp
<moon-child> or maybe alexandria is an angel for being designed to allow you to :use it
<moon-child> (I kid, pln 4 lyf, but still)
bendersteed has joined #commonlisp
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
contrapunctus has joined #commonlisp
anticrisis has quit [Read error: Connection reset by peer]
Lycurgus has joined #commonlisp
Lycurgus has quit [Changing host]
Lycurgus has joined #commonlisp
Lycurgus has quit [Client Quit]
pve has joined #commonlisp
herjazz has joined #commonlisp
makomo has joined #commonlisp
rgherdt has joined #commonlisp
<|3b|> "will never add a new exported symbol, ever" isn't really a design thing though
<|3b|> and i'd argue alexandria isn't designed to allow me to :use it, because it has symbols that conflict with domain-specific things i'd want. pretty common to want to ROTATE things in 3d for example, and easy to not notice conflicts of things you don't use directly
donleo has joined #commonlisp
robin_ has joined #commonlisp
robin has quit [Ping timeout: 260 seconds]
X-Scale has quit [Ping timeout: 248 seconds]
danse-nr3 has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
rgherdt has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
rgherdt has joined #commonlisp
habamax has joined #commonlisp
makomo has quit [Ping timeout: 255 seconds]
kurfen has quit [Ping timeout: 240 seconds]
kurfen has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
rgherdt has joined #commonlisp
mjoerg has joined #commonlisp
mjoerg has quit [Read error: Connection reset by peer]
varjag has joined #commonlisp
triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
rgherdt has quit [Read error: Connection reset by peer]
vats has joined #commonlisp
karlosz has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
msavoritias has joined #commonlisp
danse-nr3 has quit [Ping timeout: 240 seconds]
random-jellyfish has quit [Ping timeout: 248 seconds]
Gleefre has joined #commonlisp
random-jellyfish has joined #commonlisp
random-jellyfish has joined #commonlisp
mrcom has quit [Read error: Connection reset by peer]
mrcom_ has joined #commonlisp
yitzi has joined #commonlisp
igemnace has quit [Read error: Connection reset by peer]
random-jellyfish has quit [Ping timeout: 272 seconds]
green_ has quit [Ping timeout: 272 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
simendsjo has joined #commonlisp
mgl has joined #commonlisp
igemnace has joined #commonlisp
beach has quit [Ping timeout: 264 seconds]
waleee has joined #commonlisp
thollief has joined #commonlisp
vats has quit [Ping timeout: 246 seconds]
iosevka has joined #commonlisp
habamax has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1.90)]
danse-nr3 has joined #commonlisp
tyson2 has joined #commonlisp
beach has joined #commonlisp
danse-nr3 has quit [Read error: Connection reset by peer]
danse-nr3 has joined #commonlisp
random-jellyfish has joined #commonlisp
random-jellyfish has joined #commonlisp
karlosz has quit [Quit: karlosz]
pranavats has quit [Ping timeout: 255 seconds]
danse-nr3_ has joined #commonlisp
danse-nr3 has quit [Ping timeout: 260 seconds]
waleee has quit [Ping timeout: 255 seconds]
rgherdt has joined #commonlisp
waleee has joined #commonlisp
danse-nr3_ has quit [Remote host closed the connection]
danse-nr3_ has joined #commonlisp
sjl has quit [Quit: leaving]
herjazz has quit [Quit: leaving]
waleee has quit [Ping timeout: 260 seconds]
varjag has joined #commonlisp
simendsjo has quit [Ping timeout: 258 seconds]
CO2 has quit [Quit: WeeChat 4.1.0]
rgherdt has quit [Ping timeout: 240 seconds]
Lycurgus has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zxcvz has joined #commonlisp
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #commonlisp
Lycurgus has quit [Quit: leaving]
yitzi has quit [Remote host closed the connection]
gjvc has quit [Ping timeout: 255 seconds]
gjvc has joined #commonlisp
Pirx has joined #commonlisp
X-Scale has joined #commonlisp
Cymew has quit [Ping timeout: 258 seconds]
Inline has joined #commonlisp
bendersteed has quit [Quit: bendersteed]
tyson2 has quit [Remote host closed the connection]
CO2 has joined #commonlisp
zxcvz has quit [Quit: zxcvz]
danse-nr3_ has quit [Remote host closed the connection]
danse-nr3_ has joined #commonlisp
<lispmacs[work]> hi
<lispmacs[work]> I was just curious: if SBCL compiles a function FOO inline into function BAR, and then I run (trace FOO), how does trace keep track of that?
amb007 has quit [Ping timeout: 258 seconds]
NotThatRPG has joined #commonlisp
amb007 has joined #commonlisp
<NotThatRPG> Morning, everyone!
ronald_ has quit [Ping timeout: 240 seconds]
ronald has quit [Ping timeout: 248 seconds]
ronald has joined #commonlisp
tiber_ has joined #commonlisp
random-jellyfish has quit [Ping timeout: 264 seconds]
notzmv has joined #commonlisp
dino_tutter has quit [Ping timeout: 258 seconds]
cage has joined #commonlisp
<beach> Hello NotThatRPG.
<beach> lispmacs[work]: Do you have reasons to believe that it does keep track of that?
Oladon has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
<jcowan> Easy enough to test it
<lispmacs[work]> it just see, in the debugger, that it appears that FOO must have been inlined into BAR, which I observed by purposely causing a division by zero error in FOO. But yet, I can also set (trace FOO) and I will still get the FOO trace output
<beach> I see.
<lispmacs[work]> e.g.,
<lispmacs[work]> (defun foo (x) (/ x 0)) (defun bar (x) (+ 1 (foo x))) (bar 1)
<jcowan> Maybe you should do a dissasemble on foo to see if it uninlined bar.
<lispmacs[work]> in the backtrace, the error appears to be thrown in BAR
<jcowan> That definitely makes me suspicious
eddof13 has joined #commonlisp
<lispmacs[work]> hmm, even without setting (trace foo), it appears there is still a call to FOO in BAR
<lispmacs[work]> according to DISASSEMBLE
contrapunctus has joined #commonlisp
<lispmacs[work]> so it seems the answer is that it is not inlining the function, even though the function name does not appear in the backtrace for some reason
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
tiber__ has joined #commonlisp
tiber_ has quit [Ping timeout: 240 seconds]
yottabyte has quit [Quit: Connection closed for inactivity]
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
iosevka has quit [Remote host closed the connection]
iosevka has joined #commonlisp
eddof13 has quit [Quit: eddof13]
Inline has quit [Ping timeout: 240 seconds]
contrapunctus has quit [Ping timeout: 272 seconds]
contrapunctus has joined #commonlisp
yitzi has joined #commonlisp
danse-nr3_ has quit [Ping timeout: 255 seconds]
contrapunctus has left #commonlisp [#commonlisp]
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
mgl has quit [Ping timeout: 245 seconds]
contrapunctus has joined #commonlisp
zephyr has joined #commonlisp
Inline has joined #commonlisp
eddof13 has joined #commonlisp
eddof13 has quit [Quit: eddof13]
X-Scale has quit [Quit: Client closed]
contrapunctus has left #commonlisp [#commonlisp]
Guest63 has joined #commonlisp
dcb has joined #commonlisp
zxcvz has joined #commonlisp
contrapunctus has joined #commonlisp
dino_tutter has joined #commonlisp
Oladon has quit [Quit: Leaving.]
X-Scale has joined #commonlisp
eddof13 has joined #commonlisp
eddof13 has quit [Quit: eddof13]
tiber__ has quit [Ping timeout: 264 seconds]
X-Scale has quit [Quit: Client closed]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NotThatRPG has joined #commonlisp
eddof13 has joined #commonlisp
mrh57 has joined #commonlisp
eddof13 has quit [Quit: eddof13]
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
tyson2 has joined #commonlisp
X-Scale has joined #commonlisp
mgl has joined #commonlisp
eddof13 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
random-nick has joined #commonlisp
CO2 has quit [Quit: WeeChat 4.1.0]
CO2 has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Gleefre has quit [Remote host closed the connection]
Guest63 has quit [Quit: Client closed]
mgl has quit [Ping timeout: 255 seconds]
chomwitt has quit [Ping timeout: 240 seconds]
Guest63 has joined #commonlisp
eddof13 has quit [Quit: eddof13]
eddof13 has joined #commonlisp
msavoritias has quit [Remote host closed the connection]
Demosthenex has quit [Ping timeout: 258 seconds]
zxcvz has quit [Quit: zxcvz]
tiber__ has joined #commonlisp
attila_lendvai has joined #commonlisp
dirtcastle has quit [Ping timeout: 258 seconds]
deadmarshal_ has quit [Ping timeout: 260 seconds]
Demosthenex has joined #commonlisp
Guest63 has quit [Ping timeout: 248 seconds]
dinomug has joined #commonlisp
attila_lendvai has quit [Remote host closed the connection]
attila_lendvai has joined #commonlisp
chomwitt has joined #commonlisp
dirtcastle has joined #commonlisp
rogersm_ has quit [Quit: Leaving...]
deadmarshal_ has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
deadmarshal_ has quit [Ping timeout: 272 seconds]
dirtcastle has quit [Ping timeout: 272 seconds]
chomwitt has quit [Ping timeout: 272 seconds]
Just_in has joined #commonlisp
mgl has joined #commonlisp
NotThatRPG has joined #commonlisp
contrapunctus has joined #commonlisp
tiber__ has quit [Ping timeout: 272 seconds]
thollief has quit [Quit: Leaving]
amb007 has quit [Ping timeout: 255 seconds]
mgl has quit [Ping timeout: 245 seconds]
amb007 has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
eddof13 has quit [Quit: eddof13]
deadmarshal_ has joined #commonlisp
dirtcastle has joined #commonlisp
contrapunctus has joined #commonlisp
eddof13 has joined #commonlisp
karlosz has joined #commonlisp
akoana has joined #commonlisp
mgl has joined #commonlisp
ec has quit [Ping timeout: 256 seconds]
eddof13 has quit [Quit: eddof13]
ec has joined #commonlisp
karlosz has quit [Quit: karlosz]
eddof13 has joined #commonlisp
eddof13 has quit [Quit: eddof13]
yitzi has quit [Remote host closed the connection]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #commonlisp
NotThatRPG has joined #commonlisp
pve has quit [Quit: leaving]
Lycurgus has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 29.1]
tyson2 has joined #commonlisp
X-Scale has quit [Quit: Client closed]
<johnjaye> how would I get the dot product of two lists in a recursive way?
<johnjaye> so '(1 2 3) and '(4 5 6) -> (4 10 18).
<johnjaye> i know map can do it but is there another way
<aeth> you can just write it out in LOOP with COLLECT
<aeth> but why
<aeth> generally, if you're list-building and don't want to (or can't) use a higher order function (like MAP, MAPCAR, etc.), then the next fastest way is :collect inside of a LOOP because you have to think about the iterating but you don't have to think about the low-level list building from conses part
<aeth> I mean, the second fastest way to write. Probably actually the fastest way to run, but it's not going to make a huge difference.
<aeth> If speed's an issue, not using a list is probably the way to go
vats has joined #commonlisp
deadmarshal_ has quit [Ping timeout: 260 seconds]
dirtcastle has quit [Ping timeout: 246 seconds]
Lycurgus has quit [Quit: leaving]
deadmarshal_ has joined #commonlisp
X-Scale has joined #commonlisp
dirtcastle has joined #commonlisp
<jcowan> aeth: is :collect typically transformed into a map, or how is it done?
mgl has quit [Ping timeout: 264 seconds]
rgherdt has joined #commonlisp
dirtcastle has quit [Ping timeout: 245 seconds]
deadmarshal_ has quit [Ping timeout: 245 seconds]
<aeth> jcowan: I don't think so because :collect is much more general so I'd assume the implementation goes the other way around (although you could implement multiple :COLLECTs inefficiently with e.g. REMOVE-IF/REMOVE-IF-NOT)
<aeth> e.g. (loop :for i :from 1 :to 10 :if (evenp i) :collect i :into a :else :collect i :into b :finally (return (values a b)))
<aeth> and something like that is generally where you need to fall back to LOOP for lists in CL unless you're stubborn
<jcowan> that could actually execute at compile time
<moon-child> jcowan: loop typically expands into--well, a loop, using tagbody/go or similar
<jcowan> mmm
<moon-child> but I would expect (loop for x in xs collect (f x)) to produce basically the same code as (mapcar #'f xs), in a compiler like sbcl
<moon-child> so what are you asking really?
<jcowan> How smart the macro actually is (typically)
<aeth> jcowan: fine, this: (defun split-range (f a b) (loop :for i :from a :to b :if (funcall f i) :collect i :into a :else :collect i :into b :finally (return (values a b))))
<moon-child> what kind of smartness are you looking for?
<aeth> e.g. (split-range #'evenp 1 10)
<moon-child> also, as far as I know there are only two implementations of the macro--one which everybody uses, and one which beach wrote for sicl a couple of years ago
<jcowan> ah
eddof13 has quit [Quit: eddof13]
<jcowan> this is more or less a continuation of the april discussion on detecting idioms
<aeth> jcowan: just seems far more natural to implement new HOF on top of LOOP (as I just did) than the other way around (implementing LOOP on top of dozens of conditional functions)
<moon-child> jcowan: I don't understand what idioms you're looking for loop to recognise, though
<aeth> moon-child: I could actually probably implement a third version of LOOP using some of my planned iteration macros as a base, if I ever get around to doing that.
<jcowan> in general, you want to take advantage of the second-class nature of LOOP iteration (at least when some clauses are not present)
<jcowan> or take special forms
<jcowan> Also there is the question of what guarantees exist about variable scope and order of execution
rgherdt has quit [Quit: Leaving]
<moon-child> I don't think there's any profit to be had by making anything specific to loop
shka has quit [Ping timeout: 248 seconds]
<aeth> moon-child: fwiw, there's a really easy way to go from jcowan's insight of "that could actually execute at compile time" to actually guarantee it if the implementation doesn't do it (and it probably doesn't, at least not yet)
<aeth> #.
<jcowan> I see that http://www.lispworks.com/documentation/lw51/CLHS/Body/06_aaf.htm provides order of execution
<ixelp> CLHS: Section 6.1.1.6
<aeth> Although actually it doesn't seem to combine well with multiple values. But e.g. '#.(multiple-value-list (loop :for i :from 1 :to 10 :if (evenp i) :collect i :into a :else :collect i :into b :finally (return (values a b))))
<moon-child> jcowan: insofar as there's nondeterminism, taht's a spec bug
<moon-child> (I believe there is a wee bit of nondeterminism, but it's not too bad)
<jcowan> it doesn't define variable scope afaict
<jcowan> e.g. are with-clauses guaranteed to be within the scope of preceding with-clauses (simplest case)
eddof13 has joined #commonlisp
<bike> 6.1.2.2 is pretty clear about that one actually
X-Scale has quit [Ping timeout: 248 seconds]
X-Scale has joined #commonlisp
eddof13 has quit [Quit: eddof13]
random-nick has quit [Ping timeout: 255 seconds]
habamax has joined #commonlisp
dino_tutter has quit [Ping timeout: 258 seconds]
mrh57 has quit [Ping timeout: 272 seconds]
<lispmacs[work]> I just learn about how to use CERROR to create a continuation restart option, which seems very useful. But it seems like I should be able to offer more than one continuation restart option if I want to. Is there some way to do this?
vats has quit [Ping timeout: 245 seconds]
<lispmacs[work]> using SBCL, if that makes a difference
<lispmacs[work]> (warn "test warning")
<lispmacs[work]> sorry, wrong window
<lispmacs[work]> the danger of using an Emacs IRC client
rtypo has quit [Ping timeout: 248 seconds]
deadmarshal_ has joined #commonlisp
tyson2 has quit [Ping timeout: 258 seconds]
dirtcastle has joined #commonlisp
attila_lendvai has quit [Ping timeout: 260 seconds]
<bike> ::clhs restart-case
<ixelp> CLHS: Macro RESTART-CASE
<bike> lispmacs[work]:
ronald has quit [Ping timeout: 272 seconds]
akoana has quit [Quit: leaving]
<lispmacs[work]> bike: okay, thanks
ldb has joined #commonlisp
* edgar-rft sets RESTART-CASE to :UPCASE
tyson2 has joined #commonlisp
zephyr has quit [Ping timeout: 255 seconds]
NotThatRPG has quit [Quit: Textual IRC Client: www.textualapp.com]
zephyr has joined #commonlisp
donleo has quit [Ping timeout: 240 seconds]
Oladon has joined #commonlisp
waleee has joined #commonlisp
eddof13 has joined #commonlisp
zephyr has quit [Ping timeout: 260 seconds]
zephyr has joined #commonlisp
eddof13 has quit [Quit: eddof13]
masinter has joined #commonlisp
zephyr has quit [Remote host closed the connection]
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp