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/> | News: ELS'22 this Monday (2022-03-21), see https://european-lisp-symposium.org
Guest74 has quit [Ping timeout: 240 seconds]
karlosz has joined #commonlisp
azimut_ has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
lisp123 has joined #commonlisp
lottaquestions has quit [Quit: Konversation terminated!]
lisp123 has quit [Ping timeout: 268 seconds]
zacque has joined #commonlisp
notzmv has joined #commonlisp
karlosz has quit [Quit: karlosz]
karlosz has joined #commonlisp
Guest74 has joined #commonlisp
Krystof has quit [Ping timeout: 268 seconds]
<sveit> I am writing some conceptually simple but mechanically complicated macro code. i ended up implementing my own internal tracking of variables and their relative dependencies, and sorting/grouping them myself in various macro compilation routines. this seems a bit overkill (especially because what I want to do was simple), and I was wondering if there were libraries that handled things like this?
<sveit> or examples? essentially, I am writing something that handles looping code and steps certain variables. I guess I could look at iterate, but my usecase is really quite a bit simpler
<Xach> sveit: i can't think of examples offhand, but i don't think it's too crazy to do what you describe
X-Scale` has joined #commonlisp
X-Scale has quit [Ping timeout: 240 seconds]
X-Scale` is now known as X-Scale
Jach has joined #commonlisp
random-nick has quit [Ping timeout: 252 seconds]
Colleen has quit [Ping timeout: 256 seconds]
Colleen has joined #commonlisp
Guest11 has joined #commonlisp
Guest11 has quit [Ping timeout: 256 seconds]
frgo has quit [Ping timeout: 240 seconds]
yewscion has joined #commonlisp
frgo has joined #commonlisp
hashfunc569 has joined #commonlisp
Bike has quit [Quit: Lost terminal]
hashfunc569 has quit [Ping timeout: 240 seconds]
unixlisp has joined #commonlisp
azimut_ has quit [Ping timeout: 240 seconds]
hashfunc569 has joined #commonlisp
<unixlisp> Does CCL still have an advantage of compiling speed with SBCL? (cl-bench:bench-run) is faster than CCL at compiler.
Inline__ has joined #commonlisp
Inline has quit [Ping timeout: 250 seconds]
ec has quit [Remote host closed the connection]
karlosz has quit [Ping timeout: 245 seconds]
Guest11 has joined #commonlisp
karlosz has joined #commonlisp
yewscion has quit [Quit: Connection closed]
waleee has quit [Ping timeout: 240 seconds]
<hashfunc569> sveit: that's an incredible coincidence. i've been working on something similar. if you don't mind me asking, what relative dependencies are you keeping track of for said variables?
karlosz has quit [Ping timeout: 240 seconds]
livoreno has joined #commonlisp
Brucio-61 has quit [Ping timeout: 240 seconds]
edgar-rft has quit [Ping timeout: 268 seconds]
edgar-rft has joined #commonlisp
eddof13 has joined #commonlisp
unixlisp has left #commonlisp [#commonlisp]
Guest74 has quit [Quit: Ping timeout (120 seconds)]
Guest74 has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
beach has joined #commonlisp
wyrd has quit [Ping timeout: 240 seconds]
<beach> Good morning everyone!
wyrd has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
Guest74 has quit [Quit: Ping timeout (120 seconds)]
Guest74 has joined #commonlisp
semz has quit [Ping timeout: 256 seconds]
rotateq has quit [Ping timeout: 240 seconds]
semz has joined #commonlisp
<hashfunc569> is there a simple way to get the current line a stream is at within a file? or do i have to count the lines another way? i'm currently using (UIOP:WITH-TEMPORARY-FILE (:PATHNAME OUT :STREAM STREAM) ... )
<beach> clhs file-position
<hashfunc569> awesome, thanks beach
<beach> Pleasure.
eddof13 has joined #commonlisp
<Josh_2> Good morning
<hashfunc569> hello Josh_2
<hashfunc569> alright last question for the night. how can i conditionally set a slot value? i tried this, but this, of course, will not work: (SETF (SYMBOL-VALUE (IF T (SLOT0 OBJ) (SLOT1 OBJ))) 55)
<Josh_2> (if t (setf (slot1 ..)) (setf (slot 0))
<hashfunc569> Josh_2: that's what i'm currently doing, but the newvalue in (SETF (SLOT1 ...)) is long
unixlisp has joined #commonlisp
<beach> hashfunc569: But the newvalue will show up only once. And it has to show up at some point.
<phoe> hashfunc569: (when ... (let ((newvalue ...)) (setf slot newvalue)))
<phoe> oh wait a second
<phoe> why does SETF SYMBOL-VALUE IF not work?
<beach> Because the desired effect is to set the slot value, not the symbol value?
<phoe> this should SETF a SYMBOL-VALUE correctly
<phoe> oooh
<phoe> (funcall (if t #'(setf slot0) #'(setf slot1)) 55 obj) is one way
<beach> I think what was intended was for SETF to receive some kind of locative.
<beach> But we don't have locatives, and SETF is not a function, so it won't work.
rotateq has joined #commonlisp
<phoe> we have (SETF FOO) functions though, which should be good enough for simple accessors
<beach> But we don't have #'(SETF SLOT0)
<phoe> oh? I assumed SLOT0 was a defined accessor name
<phoe> in that case (setf (slot-value object (if t 'slot0 slot1)) 55)
<phoe> err, s/slot1/'slot1/
<beach> Ah, you may have been right. Since slots were mentioned, I assumed SLOT-VALUE.
<beach> I mean, your solution depends i now way of the functions been slot writers.
<beach> s/i now/in no/
* beach is not awake yet apparently.
triffid has quit [Remote host closed the connection]
<phoe> yes, depends on whether we have slot writer functions or just slot names
<beach> Right.
<phoe> but both variants are up there now, so
<beach> Indeed.
triffid has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rotateq> And I still have to understand how to work with DEFINE-SETF-EXPANDER and DEFSETF.
<hashfunc569> beach: phoe: ok thanks
hashfunc569 has quit [Ping timeout: 240 seconds]
mfiano_ has joined #commonlisp
Lord_Nightmare has quit [Quit: ZNC - http://znc.in]
beach has quit [Ping timeout: 256 seconds]
Guest11 has quit [Quit: Client closed]
attila_lendvai has joined #commonlisp
Lord_Nightmare has joined #commonlisp
orestarod has joined #commonlisp
lisp123 has joined #commonlisp
<unixlisp> rotateq: the secret is GET-SETF-EXPANDER
notzmv has quit [Ping timeout: 245 seconds]
mfiano_ has quit [Quit: WeeChat 3.4.1]
mfiano_ has joined #commonlisp
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
bru has joined #commonlisp
<rotateq> unixlisp: okay so you mastered them?
<unixlisp> not a master. but can use it.
<unixlisp> you can see some examples in cons.lisp or character.lisp in Mezzano/system/
zacque has quit [Quit: Goodbye :D]
<rotateq> okay
scymtym_ has joined #commonlisp
<unixlisp> and many good examples about define-setf-expander are in cmucl/src/code/macros.lisp (cmu code clean and pretty)
scymtym__ has joined #commonlisp
Krystof has joined #commonlisp
mfiano_ has quit [Quit: WeeChat 3.4.1]
lisp123 has quit [Remote host closed the connection]
shka has joined #commonlisp
mfiano_ has joined #commonlisp
Dynom has joined #commonlisp
scymtym__ is now known as scymtym
mfiano_ has quit [Quit: WeeChat 3.4.1]
mfiano_ has joined #commonlisp
mfiano_ has quit [Client Quit]
<unixlisp> scymtym: where is the new beirc?
mfiano_ has joined #commonlisp
mfiano_ has quit [Client Quit]
mfiano_ has joined #commonlisp
<phoe> there is a single setf expander in it, but a good example I guess
<rotateq> thanks :)
<rotateq> ah right, it returns five values
<phoe> a list of variables to bind, a list of values to bind, a list of variables that new values will be stored in, the real code for writing the value and the real code for reading the value
mfiano_ has quit [Quit: WeeChat 3.4.1]
s-liao has joined #commonlisp
mfiano has joined #commonlisp
MajorBiscuit has joined #commonlisp
mfiano has quit [Client Quit]
lisp123 has joined #commonlisp
MajorBiscuit has quit [Client Quit]
mfiano has joined #commonlisp
mfiano has quit [Client Quit]
scymtym has quit [Remote host closed the connection]
scymtym_ has quit [Remote host closed the connection]
mfiano has joined #commonlisp
Brucio-61 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
scymtym has joined #commonlisp
mon_aaraj has quit [Ping timeout: 268 seconds]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 256 seconds]
lisp123 has joined #commonlisp
MajorBiscuit has joined #commonlisp
mon_aaraj has joined #commonlisp
bru has quit [Ping timeout: 252 seconds]
mgl has joined #commonlisp
wacki has joined #commonlisp
cosimone has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
anticomputer_ has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
mon_aaraj has quit [Ping timeout: 252 seconds]
treflip has joined #commonlisp
mon_aaraj has joined #commonlisp
Everything has joined #commonlisp
nature has joined #commonlisp
unixlisp has left #commonlisp [#commonlisp]
notzmv has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.4.1]
perrierjouet has joined #commonlisp
attila_lendvai has quit [Ping timeout: 245 seconds]
perrierjouet has quit [Quit: WeeChat 3.4.1]
perrierjouet has joined #commonlisp
lisp123 has quit [Quit: Leaving...]
rotateq has quit [Quit: ERC (IRC client for Emacs 26.3)]
s-liao has quit [Ping timeout: 256 seconds]
amk has quit [Remote host closed the connection]
amk has joined #commonlisp
bru has joined #commonlisp
<scymtym> unixlisp: it is unfinished and unpublished. if you just want to get an idea of what it will be like, i can post a screenshot later
<scymtym> ::notify unixlisp it is unfinished and unpublished. if you just want to get an idea of what it will be like, i can post a screenshot later
<Colleen> scymtym: Got it. I'll let unixlisp know as soon as possible.
Everything has quit [Quit: leaving]
karlosz has joined #commonlisp
Brucio-61 has quit [Quit: Application exit]
s-liao has joined #commonlisp
semz has quit [Remote host closed the connection]
semz has joined #commonlisp
Brucio-61 has joined #commonlisp
yewscion has joined #commonlisp
mon_aaraj has quit [Ping timeout: 252 seconds]
luna-is-here has quit [Remote host closed the connection]
Dynom has quit [Quit: WeeChat 3.4]
perrierjouet has quit [Quit: WeeChat 3.4.1]
luna-is-here has joined #commonlisp
edgar-rft has quit [Ping timeout: 240 seconds]
edgar-rft has joined #commonlisp
perrierjouet has joined #commonlisp
perrierjouet has quit [Client Quit]
azimut has joined #commonlisp
perrierjouet has joined #commonlisp
bru has quit [Ping timeout: 268 seconds]
beach has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.4.1]
tyson2 has joined #commonlisp
perrierjouet has joined #commonlisp
s-liao has quit [Quit: Ping timeout (120 seconds)]
akoana has quit [Quit: leaving]
s-liao has joined #commonlisp
Oddity has quit [Ping timeout: 240 seconds]
perrierjouet has quit [Ping timeout: 240 seconds]
yewscion has quit [Ping timeout: 252 seconds]
bru has joined #commonlisp
perrierjouet has joined #commonlisp
beach has quit [Ping timeout: 245 seconds]
yewscion has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
s-liao has quit [Ping timeout: 256 seconds]
random-nick has joined #commonlisp
<jackdaniel> minion: assert your existence
<minion> please stop playing with me... i am not a toy
frgo has quit [Ping timeout: 256 seconds]
perrierjouet has quit [Ping timeout: 252 seconds]
perrierjouet has joined #commonlisp
razetime has joined #commonlisp
<Mrtn[m]> Good afternoon.
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
beach has joined #commonlisp
karlosz has quit [Quit: karlosz]
bru has quit [Ping timeout: 252 seconds]
yewscion has quit [Quit: Connection closed]
yewscion has joined #commonlisp
Bike has joined #commonlisp
waleee has joined #commonlisp
lagash has quit [Remote host closed the connection]
lagash has joined #commonlisp
Josh_2 has joined #commonlisp
beach has quit [Ping timeout: 240 seconds]
ec has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
dlowe has joined #commonlisp
triffid has quit [Remote host closed the connection]
dlowe has quit [Read error: Connection reset by peer]
dlowe has joined #commonlisp
scymtym has quit [Ping timeout: 250 seconds]
Brucio-61 has quit [Ping timeout: 252 seconds]
wmblathers has quit [Remote host closed the connection]
wmblathers has joined #commonlisp
triffid has joined #commonlisp
wmblathe_ has joined #commonlisp
bru has joined #commonlisp
wmblathers has quit [Ping timeout: 260 seconds]
<phoe> Mrtn[m]: hie
fitzsim has quit [Ping timeout: 240 seconds]
cage has joined #commonlisp
Brucio-61 has joined #commonlisp
scymtym has joined #commonlisp
tyson2 has joined #commonlisp
fitzsim has joined #commonlisp
beach has joined #commonlisp
hhdave has quit [Ping timeout: 240 seconds]
cosimone has quit [Read error: Connection reset by peer]
cosimone has joined #commonlisp
hhdave has joined #commonlisp
eddof13 has joined #commonlisp
waleee has quit [Ping timeout: 256 seconds]
igemnace has quit [Ping timeout: 252 seconds]
tyson2 has quit [Remote host closed the connection]
Inline__ has quit [Quit: Leaving]
beach has quit [Ping timeout: 252 seconds]
rotateq has joined #commonlisp
Inline has joined #commonlisp
mgl has quit [Quit: Client closed]
<phoe> what does the color green represent in slime's debugger?
triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
attila_lendvai has joined #commonlisp
<phoe> found it - a restartable frame
frgo has joined #commonlisp
knusbaum has quit [Ping timeout: 240 seconds]
knusbaum has joined #commonlisp
frgo has quit [Ping timeout: 252 seconds]
jack_rabbit has joined #commonlisp
knusbaum has quit [Ping timeout: 252 seconds]
frgo has joined #commonlisp
knusbaum has joined #commonlisp
jack_rabbit has quit [Ping timeout: 250 seconds]
cosimone has quit [Quit: ERC (IRC client for Emacs 27.1)]
razetime has quit [Remote host closed the connection]
mingus has joined #commonlisp
yagamisato has quit [Ping timeout: 240 seconds]
cosimone has joined #commonlisp
yagamisato has joined #commonlisp
yagamisato has quit [Changing host]
yagamisato has joined #commonlisp
knusbaum has quit [Quit: ZNC 1.8.2 - https://znc.in]
knusbaum has joined #commonlisp
beach has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 252 seconds]
semz has quit [Quit: Leaving]
semz has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tane has joined #commonlisp
livoreno has quit [Ping timeout: 252 seconds]
kevingal has joined #commonlisp
treflip has quit [Quit: Quit]
Dynom has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
mingus has quit [Ping timeout: 240 seconds]
mingus has joined #commonlisp
mingus has quit [Client Quit]
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
unyu has quit [Ping timeout: 240 seconds]
beach has quit [Ping timeout: 245 seconds]
waleee has joined #commonlisp
mgl has joined #commonlisp
Guest74 has quit [Quit: Connection closed]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Bike100 has joined #commonlisp
Bike100 is now known as Bicyclidine
unyu has joined #commonlisp
kevingal has quit [Ping timeout: 256 seconds]
dlowe has quit [Ping timeout: 240 seconds]
rain3 has joined #commonlisp
tyson2 has joined #commonlisp
mgl has quit [Quit: Client closed]
morganw has joined #commonlisp
perrierjouet has quit [Ping timeout: 256 seconds]
Oddity has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
Lord_of_Life_ is now known as Lord_of_Life
tyson2 has quit [Remote host closed the connection]
X-Scale has quit [Ping timeout: 256 seconds]
X-Scale` has joined #commonlisp
X-Scale` is now known as X-Scale
hashfunc569 has joined #commonlisp
aeth_ has joined #commonlisp
aeth has quit [Killed (NickServ (GHOST command used by aeth_))]
aeth_ is now known as aeth
mon_aaraj has joined #commonlisp
yewscion has quit [Ping timeout: 252 seconds]
tyson2 has joined #commonlisp
rain3 has quit [Ping timeout: 240 seconds]
<Krystof> any language lawyers around?
unyu has quit [Ping timeout: 250 seconds]
<pjb> Krystof: ask in #languagelawyersstatus
<Bicyclidine> what's up
<Krystof> I am intrigued by the `initial-final` grammar entry in loop's grammar
<Krystof> specifically, that it is a production of `variable-clause`
Bike61 has joined #commonlisp
<Krystof> as I read it, (let ((x 2)) (loop initially (setq x 3) with y = x repeat 1 sum y)) is well-defined but (I think surprisingly) returns 2
<pjb> Yes.
<pjb> Now of course, nothing prevents you to write (let ((x 2)) (loop with y = x initially (setq x 3) repeat 1 sum y)) #| --> 2 |#
<Bike61> because initially clauses take place after initial with bindings... right
Bicyclidine has quit [Ping timeout: 240 seconds]
<Krystof> as I read it, (let ((x 2)) (loop initially (Setq x 3) for y = x repeat 1 sum y)) is also well-defined but returns 3
<Bike61> really?
<Bike61> cos 6.1.7.2 says "The initially construct causes the supplied compound-forms to be evaluated in the loop prologue, which precedes all loop code except for initial settings supplied by constructs with, for, or as." which makes it sound like it should still be 2
<pjb> Krystof: the syntax specifies at what position in what order you can write the clause. But the order in which the clauses are interpreted is specified elsewhere.
igemnace has joined #commonlisp
<Krystof> Bike61: right! But the initial binding of an iteration variable can't be the first value of that variable, because that first value might not exist
<Krystof> pjb: yes, but I'm trying to figure out whether this free positioning of initially-finally clauses is intended, makes sense to anyone, is error-prone...
<Bike61> i've never actually had occasion to use initially, so i don't have a good idea of where you'd want it
<pjb> Well, it's better to order them as they are evaluated. But it's not always possible.
<Krystof> Bike61: I am less certain about the well-definedness of the `for` variant, but implementations I just tried are surprisingly in agreement
<Krystof> "Stepping assignments are made in the loop body before any other forms are evaluated in the body."
<Bike61> I don't follow what you said about the initial binding. The initial binding of a "for" variable should only be able to refer to previous for/with clause bindings or outside bindings, so why couldn't the value exist
cage has quit [Quit: rcirc on GNU Emacs 27.1]
<Krystof> so: in the `for` variant, y is initialized to something arbitrary, x is set to 3, y is stepped to x (as the earliest thing in the loop body)
<Krystof> Bike61: for example `for x in nil`
<Bike61> ah. hm.
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
xaltsc has quit [Read error: Connection reset by peer]
tane has quit [Quit: Leaving]
Dynom has quit [Quit: WeeChat 3.4]
wyrd has quit [Ping timeout: 240 seconds]
cosimone has quit [Read error: Connection reset by peer]
ebrasca has joined #commonlisp
wyrd has joined #commonlisp
kevingal has joined #commonlisp
rgherdt__ has joined #commonlisp
rgherdt_ has quit [Ping timeout: 252 seconds]
shka has quit [Ping timeout: 260 seconds]
Bike61 has quit [Quit: Connection closed]
<dbotton> Is there a known reason why handle-case doesn't have an implied progn instead of just an expression?
mon_aaraj has quit [Ping timeout: 260 seconds]
mon_aaraj has joined #commonlisp
rgherdt__ has quit [Quit: Leaving]
rgherdt has joined #commonlisp
unyu has joined #commonlisp
<Krystof> with an implicit progn, where would the handler clauses go?
morganw has quit [Read error: Connection reset by peer]
<dbotton> ok, so I found the answer I believe and has to do with restarts, phoe if around perhaps could confirm
<dbotton> using the following example
<dbotton> If I choose not to abort, the entire expression is re-evaluated
<dbotton> ie I choose "retry"
<dbotton> ie from 0 not from where I left off
nature has quit [Ping timeout: 256 seconds]
<dbotton> an implied progn would certainly express the wrong idea, that the conditions are for each of the forms in the progn.
mon_aaraj has quit [Ping timeout: 240 seconds]
mon_aaraj has joined #commonlisp
<dbotton> Krystof the handler clauses would go where they are now, no change
bru has quit [Ping timeout: 260 seconds]
wacki has quit [Quit: Leaving.]
hashfunc569 has quit [Ping timeout: 240 seconds]
<Mrtn[m]> Some people still didn't make the transition from FreeNODE I guess.
rotateq has quit [Quit: ERC (IRC client for Emacs 27.2)]
attila_lendvai has quit [Ping timeout: 268 seconds]
<Krystof> dbotton: how do you distinguish a handler clause from an expression to evaluate? in `(handler-case (foo () "bar") (bar () "baz"))` with an implicit progn, how do you tell where the expressions stop and the handler clauses start?
<dbotton> I see what you mean
pillton has joined #commonlisp
kevingal has quit [Remote host closed the connection]
orestarod has quit [Ping timeout: 240 seconds]
cosimone has joined #commonlisp
<_death> dbotton: in your paste, if you wish to be able to retry a particular iteration, you need code that sets up a restart each time.. like (dotimes (i 10) (loop (restart-case (if (< (random 1.0) 0.5) (error "Iteration ~D failed" i) (return 'ok)) (try-again () :report "Try again"))))
Jach has quit [Remote host closed the connection]
Jach has joined #commonlisp
<_death> of course, you can abstract this pattern into a with-retry-restart macro.. similarly, it may make sense to abstract a handler-case into a macro that does set up an implicit progn
<_death> note to that invoke a restart you should use handler-bind, not handler-case
perrierjouet has joined #commonlisp
mon_aaraj has quit [Ping timeout: 272 seconds]
perrierjouet has quit [Quit: WeeChat 3.4.1]
mon_aaraj has joined #commonlisp
Everything has joined #commonlisp
perrierjouet has joined #commonlisp
igemnace has quit [Remote host closed the connection]
mon_aaraj has quit [Ping timeout: 272 seconds]
igemnace has joined #commonlisp
mon_aaraj has joined #commonlisp
<dbotton> Appreciated
igemnace has quit [Remote host closed the connection]