srhm has quit [Read error: Connection reset by peer]
srhm has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 250 seconds]
srhm has quit [Ping timeout: 248 seconds]
srhm has joined #commonlisp
pillton has joined #commonlisp
srhm has quit [Read error: Connection reset by peer]
srhm has joined #commonlisp
srhm has quit [Read error: Connection reset by peer]
kuler has joined #commonlisp
<recordgroovy>
Hi, I'm looking for peer-review for my library. I'm looking for ways to improve the confidence of the code, so that other people may want to use it: https://git.sr.ht/~shunter/parsnip/tree/develop
<recordgroovy>
Confidence == Someone would feel comfortable using this library on first glance and use
abrantesasf has quit [Quit: Leaving]
tyson2 has quit [Remote host closed the connection]
<Bike>
looks pretty well put together just from the readme. though maybe use a vector drawing for the logo or something. I don't know much about parsing so I don't know what I can say about the actual code, except that you seem to prefer .,foo to ,@foo, which i'd say is a little bit unidiomatic.
<Bike>
looks basically fine to me though.
cjb has quit [Ping timeout: 256 seconds]
akoana has left #commonlisp [Leaving]
cjb has joined #commonlisp
Guest29 has quit [Ping timeout: 246 seconds]
prxq_ has quit [Ping timeout: 250 seconds]
prxq has joined #commonlisp
Bike has quit [Quit: Connection closed]
<beach>
Good morning everyone!
<lotuseater>
Good morning beach :)
rain3 has joined #commonlisp
semz has quit [Ping timeout: 250 seconds]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 268 seconds]
skami has quit [Remote host closed the connection]
semz has joined #commonlisp
waleee has quit [Ping timeout: 250 seconds]
taiju has quit [Ping timeout: 252 seconds]
Alfr has quit [Read error: Connection reset by peer]
taiju has joined #commonlisp
<semz>
in a way it's obvious, but the condition system makes fuzzing CL libraries really straightforward
* semz
has been hunting down one-offs, missing checks and typo'd constants in babel for the last hour
<moon-child>
why is that?
<semz>
you can work with the errors directly, quickly filter out the ones you're already aware of, or skip through various sections using restarts
<semz>
while still dropping into the debugger when something new pops up
<moon-child>
somebody did a SIGSEGV handler in c that would skip past the instruction causing the fault
<semz>
Wouldn't that just quickly cause another segfault? Or was it just a proof of concept for fun?
<moon-child>
well, it certainly wasn't intended to be practical
<moon-child>
and yes, you would probably end up with mroe segfaults (which you would handle in the same manner)
phadthai_ has joined #commonlisp
phadthai has quit [*.net *.split]
spec has quit [*.net *.split]
fe[nl]ix has quit [*.net *.split]
mrSpec has joined #commonlisp
fe[nl]ix has joined #commonlisp
phadthai_ is now known as phadthai
Xach has quit [*.net *.split]
sukaeto has quit [*.net *.split]
madnificent has quit [*.net *.split]
derwolf has quit [*.net *.split]
Xach has joined #commonlisp
sukaeto has joined #commonlisp
derwolf has joined #commonlisp
madnificent has joined #commonlisp
semz has quit [Ping timeout: 250 seconds]
semz has joined #commonlisp
lisp123 has joined #commonlisp
mmk2410_ has joined #commonlisp
Oladon has quit [Quit: Leaving.]
mmk2410_ has quit [Ping timeout: 248 seconds]
cjb has quit [Quit: rcirc on GNU Emacs 28.0.50]
kulernil has joined #commonlisp
kuler has quit [Remote host closed the connection]
semz has quit [Ping timeout: 250 seconds]
semz has joined #commonlisp
PinealGlandOptic has joined #commonlisp
kulernil has quit [Remote host closed the connection]
kulernil has joined #commonlisp
lisp123 has quit [Ping timeout: 250 seconds]
amb007 has quit [Ping timeout: 250 seconds]
amb007 has joined #commonlisp
contrapunctus has joined #commonlisp
paulman has joined #commonlisp
kulernil has quit [Remote host closed the connection]
pranavats has joined #commonlisp
rowanthorpe has joined #commonlisp
shka has joined #commonlisp
igemnace has quit [Read error: Connection reset by peer]
igemnace has joined #commonlisp
rgherdt has joined #commonlisp
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
<pjb>
semz: but we don't have really the position in the user code of the call that signaled the condition, so we cannot know if two seemingly identical conditions come from the same place. eg. (if (= a b) (/ a 0) (/ (setf b a) 0))
<pjb>
semz: you'd have to use an implementation specific backtrace-list function (or portability library), and even this might not be precise enough (you only get the functions, not the code locations: you wouldn't know if it's the first or the second / that was called).
amb007 has quit [Ping timeout: 240 seconds]
<pjb>
semz: however, it's conceivable to have an implementation providing enough information to make it indeed quite easy to implement a fuzzer for CL. Perhaps sicl could be specificied in that direction, as a debugging feature.
<pjb>
beach: ^
amb007 has joined #commonlisp
<moon-child>
coverage-guided fuzzing is very cool. Just tossing that out there :)
amb007 has quit [Read error: Connection reset by peer]
<hayley>
moon-child is an advertisement funded by the droopy-ear rabbit industry.
ane has quit [Remote host closed the connection]
amb007 has joined #commonlisp
<lukego>
Hey, I wonder if I am laboring under a misapprehension. Is there a way to globally/persistently specify default optimization quantities? For example to say that I want (SAFETY 3) (DEBUG 3) but that this can be overridden locally by declaim/declare. I always thought PROCLAIM did exactly this but later heard that this gets reset e.g. by COMPILE-FILE...?
<moon-child>
hayley: hey, it's lonely up here on the moon
amb007 has quit [Read error: Connection reset by peer]
<moon-child>
there's a man, a rabbit, and--that's it!
<semz>
pjb: I'm not doing it fully automatically right now, so the filtering is interactive and the worst that can happen is that the second parser bug is hidden until the first is fixed. The problem that prompted this was babel signalling the wrong (internal) error type on some inputs.
amb007 has joined #commonlisp
<semz>
That said, what you described sounds really juicy. I wonder how heavy the performance cost of such a thing would be
Cymew has joined #commonlisp
<semz>
that's a problem you have with certain C tools like asan: they detect a lot but make the program so slow it becomes hard to test
<semz>
of course that's also partially the fault of the language
notzmv has quit [Ping timeout: 240 seconds]
<moon-child>
(yes, it is a lop)
amb007 has quit [Read error: Connection reset by peer]
<hayley>
I have a plan for thread-sanitizer in SICL (which can be slightly faster with thread-local nurseries), but coverage-based fuzzing would be welcome.
amb007 has joined #commonlisp
<hayley>
In the case of fuzzing (or exhaustive search, when you have a reasonably small domain), it is still faster to fuzz than wait for something to go wrong in a real application.
amb007 has quit [Read error: Connection reset by peer]
gaqwas has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
<lukego>
pillton: Indeed. I'd always thought this is how it worked but thought that I'd recently learned otherwise. Likely I didn't phrase my past question correctly and misinterpreted the answer. Thanks!
contrapunctus has joined #commonlisp
<lukego>
(Frankly I still wasn't sure after reading the spec but my experiments with (proclaim ...) (load (compile-file ...)) support the interpretation that proclaim is global/persistent/effective)
Mandus has quit [Ping timeout: 252 seconds]
Mandus has joined #commonlisp
pve has joined #commonlisp
lisp123 has joined #commonlisp
hendursa1 has joined #commonlisp
gaqwas has quit [Ping timeout: 240 seconds]
makomo has joined #commonlisp
hendursaga has quit [Ping timeout: 244 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
cpape`` has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
cpape has joined #commonlisp
silasfox has joined #commonlisp
notzmv has joined #commonlisp
PinealGlandOptic has left #commonlisp [#commonlisp]
selwyn has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
rain3 has quit [Remote host closed the connection]
contrapunctus has joined #commonlisp
igemnace has quit [Remote host closed the connection]
amk has quit [Ping timeout: 252 seconds]
scymtym has quit [Ping timeout: 250 seconds]
scymtym has joined #commonlisp
amk has joined #commonlisp
attila_lendvai has joined #commonlisp
rain3 has joined #commonlisp
semz has quit [Ping timeout: 240 seconds]
semz has joined #commonlisp
tyson2 has joined #commonlisp
Inline has quit [Quit: Leaving]
kakuhen has quit [Quit: Leaving...]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<_death>
I think it's implementation-dependent
<lukego>
Hey I have a multidimensional array of floats and I want to write that into a file in raw format e.g. just the IEEE double float values stored back-to-back in row-major order. What's the easy way? :)
<_death>
nibbles?
<lukego>
nibbles seems to only do integers
<pjb>
lukego: there are various libraries that will convert floats into ieee-754-double bits.
<jmercouris>
and I just can't for the life of me figure out how I should structure it intelligently
<jmercouris>
I've been staring at it for like ten minutes
<jmercouris>
obvious question you may have is, "why not move the sentence-case-p into the if block?" well, because the macro will produce a bunch of (if nil xyz qwe) and SBCL will delete the non existent branch and spit out a warning
<beach>
jmercouris: You don't have to put the IF at the top level.
<beach>
Heh.
<jmercouris>
beach: what do you mean?
<beach>
What you just said.
<jmercouris>
I see
<beach>
Oh, no.
<beach>
Let me show you...
<hayley>
Is there no way to make this just a function? I suppose if spinneret doesn't let you generate HTML from some runtime structure, you need some indirection for that.
<jmercouris>
it must be a macro because of spinneret...
<beach>
jmercouris: Or, put the '(first (ppcre:split ...)) in a lexical variable, (let ((body '(first (ppcre:split ...)))) and then `(if ,sentence-case-p '(str:sentence-case ,body ) ,body)
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #commonlisp
<jmercouris>
I actually almost did a let
<jmercouris>
And then I figured that the context may not be right
<beach>
But you see what I mean, right?
<jmercouris>
Yes
<jmercouris>
I understand it
<beach>
Great!
<jmercouris>
:-)
<jmercouris>
Thanks for the help
<beach>
Pleasure.
recordgroovy has quit [Ping timeout: 252 seconds]
lisp123 has quit [Quit: Leaving...]
recordgroovy has joined #commonlisp
lisp-newbie has joined #commonlisp
cranium has joined #commonlisp
Bike has joined #commonlisp
lisp-newbie has quit [Quit: This computer has gone to sleep]
didi has joined #commonlisp
<didi>
Is it possible to extend `incf' to work with a user-defined class? e.g. (defclass my-class ...) (defmethod my-element (my-class ...) ...) (incf (my-element my-class))
<hayley>
Provided you have a (setf my-element) function, yes.
<didi>
hayley: Ah, cool. Thank you.
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
<pjb>
didi: it's automatique if you do (defclass my-class () ((foo :initform 0 :ACCESSOR my-element)))
<pjb>
didi: you can define places with defun/defgeneric foo (setf foo), with defsetf (2 forms) and with define-setf-expander.
<pjb>
didi: in addition to defclass, defstruct and the default CL places.
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
recordgroovy has quit [Ping timeout: 250 seconds]
waleee has joined #commonlisp
<didi>
pjb: Nice. Thank you.
flip214 has joined #commonlisp
* jcowan
thinks wisfully that it would be nice if s-expressioniss and s-expressions were the same github repo
jans has quit [Ping timeout: 240 seconds]
selwyn has quit [Read error: Connection reset by peer]
nij- has joined #commonlisp
karlosz has joined #commonlisp
lisp123 has joined #commonlisp
nij- has quit [Ping timeout: 252 seconds]
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
lisp-newbie has joined #commonlisp
<beach>
Shinmera: Would it be too much to ask for you to log the new #climacs channel? It is fine if don't want to because you have had enough requests of this type.
<lisp-newbie>
Hi, If I have an object of a certain class, and I want to just add a slot to that object. Is there an easy way to do this? I found 3 answers here: https://groups.google.com/g/comp.lang.lisp/c/3JhUiNth7Lk/m/IW9N1CL7JUAJ in particular the email sent at "12:55:39". Has anything changed in 10 years?
NeoCron has joined #commonlisp
<beach>
lisp-newbie: You can't add slots to individual objects (for very good reasons). You need to make a subclass and call CHANGE-CLASS to turn the object into an instance of that subclass.
<lisp-newbie>
beach thanks, any preference between CHANGE-CLASS over this method? (defmethod make-instance ((class (eql 'third-party-class)) &rest args)(apply #'make-instance 'my-class args))
<lisp-newbie>
it's a one liner, not long code, that's why I sent it... I know, longer code in pastebin
<Bike>
definitely don't do that. it won't work in general.
<lisp-newbie>
beach thanks for answering!
<beach>
lisp-newbie: I assumed you already had an instance.
<lisp-newbie>
Bike which one, change-class or the make-instance?
<Bike>
the make-instance
<lisp-newbie>
beach I have an instance, is that method not overriding the make-instance of the other class so automatically I would get an instance of the new class? I could change other things for that... not sure if that makes sense... trying to weigh approaches
<Shinmera>
beach: sure.
<Bike>
lisp-newbie: we might be able to give more comprehensive answers if you explain more context about what you're doing
<lisp-newbie>
Bike thanks
<Shinmera>
beach: is debate around clim so heated you need two channels now? :)
domovod has joined #commonlisp
<Bike>
lisp-newbie: for example you could still do (make-instance (find-class 'third-party-class) ...) and it would bypass this method
srhm has joined #commonlisp
<beach>
Shinmera: Sort of.
X-Scale has joined #commonlisp
<lisp-newbie>
Bike I have instances of a class that is being json encoded by cl-json. Now the class has a slot with local-time and is being encoded as an object to json which is quite unfortunate. I want to call a local-time function that gives me an iso string representation of the time, and have that enconded as part of the json object. So if I can just add another slot which is a string where I set the value to be the iso date it would work... otherwise t
<lisp-newbie>
hought about converting the object to a plist, but couldn't find a standard way to do it
<Bike>
well in that case cl-json has a mode built in to use "fluid" objects that can have slots added and removed like in a prototype based system.
<lisp-newbie>
Bike I thought about modifying how the json encoder works, but that is a bit of a headache and would have to modify many places... this is more general
<lisp-newbie>
Bike oh, I was reading about that in the docs and didn't get it, can you please point me to an example? thanks so much!
<lisp-newbie>
Bike that sounds much easier
srhm has quit [Read error: Connection reset by peer]
<lisp-newbie>
I want to have the change for a bunch of different classes...
srhm has joined #commonlisp
<Bike>
i haven't used it myself, but the documentation seems pretty helpful. there's a brief example under "The CLOS decoder"
<lisp-newbie>
Bike I need it for encoding btw, not decoding
<Bike>
iiiii see.
<Bike>
wait, so you want to add a slot to this local-time class? couldn't you just customize how it's encoded?
<Bike>
you could customize the encoding of the local-time directly, or it might be better to customize how your object is encoded
karlosz has quit [Quit: karlosz]
<lisp-newbie>
Bike I want to add a slot to a class that contains a local-time object as a slot, to hold the variable. I thought about customizing how it's encoded, but couldn't figure out an easy way to do it, I guess I could copy this "encode-json ((o standard-object)" from here https://github.com/hankhero/cl-json/blob/master/src/encoder.lisp and check for local-time but it seems pretty hacky, no?
<Bike>
let me assure you that adding a slot to a class is way more hacky than one method definition.
<lisp-newbie>
Bike how do you think I could do this in a better way?
<lisp-newbie>
Bike yeah, agreed
<Bike>
like literally you just need to do (defmethod encode-json ((o your-class) ...) ...)
<Bike>
and the method body can be whatever is convenient for you
<lisp-newbie>
Bike ok, will try that, thanks
<Bike>
under "Customizing the encoder" the manual describes how to do things like write out an object with whatever slots you want
<Bike>
like if i'm reading this right you could do (with-object (stream) (encode-object-member 'time (stringify-local-time (time object))) ...)
<lisp-newbie>
Bike right, but that would be for a one time encoding, the standard encoding wouldn't call that, right?
<lisp-newbie>
sorry have to run out for a bit
lisp-newbie has quit [Quit: This computer has gone to sleep]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Remote host closed the connection]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Remote host closed the connection]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Client Quit]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Remote host closed the connection]
<Bike>
why would it not call encode-json
<Bike>
i mean for one thing you can just call encode-json yourself, and beyond that it's what encode-json-to-string uses
cage has joined #commonlisp
karlosz has joined #commonlisp
recordgroovy has joined #commonlisp
jasom has quit [Ping timeout: 245 seconds]
jasom has joined #commonlisp
<mfiano>
Do I need the MOP to check whether or not the result of fboundp designates a generic function, and if so, how would I do that?
<beach>
No, just check whether the result of FDEFINITION is an instance of generic-function
<akater[m]>
mfiano: `ensure-generic-function`?
<mfiano>
Ah makes sense
<beach>
akater[m]: No, that would create it if it doesn't exist, and it will fail if the definition is already an ordinary function.
<mfiano>
beach: Why would I need FDEFINITION? Isn't (typep (fboundp 'name) 'generic-function) enough?
<beach>
I can't remember what fboundp returns, but it can be messy. Let me check...
lisp-newbie has joined #commonlisp
<beach>
It could return T.
<mfiano>
But (typep t 'generic-function) is still nil
<rain3>
(fboundp '+) ;=> t
<mfiano>
Oh, so it's not specified whether it returns a function object
* mfiano
reads
<beach>
Maybe I misunderstood the question. FBOUNDP is not specified to return enough information to determine whether the name designates a generic function.
<mfiano>
Right. So I need to use that first, so I can guard against an undefined function condition
<beach>
Right.
Lycurgus has joined #commonlisp
domovod has quit [Quit: WeeChat 3.2]
silasfox has quit [Ping timeout: 240 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
NeoCron has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 250 seconds]
Demosthe1ex has joined #commonlisp
amb007 has joined #commonlisp
nij- has joined #commonlisp
yitzi has quit [Ping timeout: 240 seconds]
Demosthenex has quit [Ping timeout: 268 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
karlosz has quit [Quit: karlosz]
waleee has quit [Quit: WeeChat 3.2]
waleee has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
amb007 has quit [Ping timeout: 248 seconds]
nij- has quit [Quit: Using Circe, the loveliest of all IRC clients]
amb007 has joined #commonlisp
silasfox has joined #commonlisp
contrapunctus has joined #commonlisp
srhm has quit [Ping timeout: 252 seconds]
lisp-newbie has quit [Quit: This computer has gone to sleep]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Remote host closed the connection]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Remote host closed the connection]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Client Quit]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Remote host closed the connection]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Client Quit]
mariari has quit [Ping timeout: 240 seconds]
Demosthe1ex has quit [Ping timeout: 240 seconds]
tyson2 has joined #commonlisp
sjl has quit [Quit: WeeChat 2.2-dev]
mariari has joined #commonlisp
cranium has quit [Quit: Leaving]
livoreno has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
livoreno has quit [Read error: Connection reset by peer]
silasfox has quit [Ping timeout: 240 seconds]
Demosthenex has joined #commonlisp
livoreno has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<mfiano>
Dumb question, but can someone explain to me why calling a function in the REPL that has a compiler macro always calls the original function?
andreyorst[erc] has joined #commonlisp
contrapunctus has joined #commonlisp
taiju has quit [Ping timeout: 252 seconds]
<random-nick>
the standard doesn't require compiler macros to be run
amb007 has quit [Ping timeout: 250 seconds]
<random-nick>
and it recommends them to be run by COMPILE-FILE, LOAD and the like but not EVAL
taiju has joined #commonlisp
andreyorst[erc] is now known as aorst[erc]
amb007 has joined #commonlisp
<random-nick>
uh, looks like I misremembered that recommendation
<pjb>
mfiano: why would you are? Compiler macros cannot change the semantics, so you should see no difference!
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<Bike>
compiler macros are basically intended for optimization. if you're just evaluating one call, the expense of calling the compiler macro, consing up a form, and evaluating it is probably gonna be worse than just calling the function
<mfiano>
Sure, this is semantically equivalent optimization. I was testing it, and realized I had to wrap it in a defun and call that, or just macro-step it
Demosthenex has joined #commonlisp
rowanthorpe has quit [Ping timeout: 248 seconds]
lisp123_ has joined #commonlisp
lisp123 has quit [Ping timeout: 252 seconds]
Demosthe1ex has joined #commonlisp
Demosthenex has quit [Ping timeout: 250 seconds]
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
Lycurgus has quit [Quit: Exeunt]
tyson2 has joined #commonlisp
lisp-newbie has joined #commonlisp
lisp123_ has quit [Quit: Leaving...]
NotThatRPG has joined #commonlisp
<jcowan>
Of course compiler macros can change the semantics. That's an abuse of them, but not impossible.
cosimone has quit [Ping timeout: 240 seconds]
karlosz has joined #commonlisp
attila_lendvai has quit [Quit: Leaving]
derelict has quit [Quit: WeeChat 3.2]
_dave has joined #commonlisp
attila_lendvai has joined #commonlisp
hunar has joined #commonlisp
tux0r- has quit [Ping timeout: 248 seconds]
lisp-newbie has quit [Quit: This computer has gone to sleep]
lisp-newbie has joined #commonlisp
tux0r has joined #commonlisp
_dave has quit [Remote host closed the connection]
ck_ has quit [Ping timeout: 248 seconds]
dlowe has joined #commonlisp
hunar has quit [Ping timeout: 240 seconds]
hunar has joined #commonlisp
hunar has quit [Client Quit]
rain3 has quit [Ping timeout: 240 seconds]
<akater[m]>
Concerning our discussions some days ago on setf that always macroexeands to (setf ,getter ..) Even if this practice became common, it would still be inconsistent due to the very setf generics this was motivated by, as they evaluate their arguments.
gaqwas has joined #commonlisp
tux0r has quit [Ping timeout: 240 seconds]
ck_ has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
srhm has joined #commonlisp
v88m has joined #commonlisp
derelict has joined #commonlisp
andreyorst[erc] has quit [Ping timeout: 240 seconds]
<pjb>
akater[m]: no, it expands to ,getter!
<pjb>
That's the point.
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 250 seconds]
Lord_of_Life_ is now known as Lord_of_Life
cosimone has joined #commonlisp
<pjb>
akater[m]: there are several cases: if the place is a macro, then it's expanded, and we process it again. If it's a function call with a (setf foo) function, then it expands to (funcall (fdefinition '(setf foo)) new-value elementary-place). If it's a form that as a setf-expander (defsetf or define-setf-expander), then the setf-expander macro is called to get the setter and this is used the elementary-place being one of the store-var,
<pjb>
etc. And finally if it's a special case, or implementation defined, then the special case is handled (eg. (setf (car k) a) --> (progn (rplaca k a) a) etc).
<pjb>
So (setf foo) is just one case amongst several, (and the generic function even more special a case).
Josh_2 has quit [Remote host closed the connection]
<akater[m]>
pjb: I mean, I don't see how you can define an `(setf accessor1)` method that ensures the `(accessor2 c)` place in `(setf (accessor1 a b (accessor2 c)) new)` gets setf'd whenever `(setf accessor1)` gets called.
<Bike>
you would have to use setf expanders instead of functions, i guess
tyson2 has quit [Ping timeout: 252 seconds]
<pjb>
akater[m]: indeed. Since it's not mutated> (accessor2 c) is only read and is only auxiliary to find the place defined by accessor1 and the passed values.
<pjb>
Bike: well, not even, because the setf-expander for accessor1 doesn't receive (accessor2 c). It receives a temporary variables where its value is stored.
attila_lendvai has quit [Quit: Leaving]
attila_lendvai has joined #commonlisp
abrantesasf has joined #commonlisp
<akater[m]>
Bike: Yes but the initial motivation was to make generic setfs always apply. If setf only operated via expanders there's no reason to consider the issue at all.
<Bike>
oh right.
<Bike>
i guess you could finagle a two-layer thing but then things are getting complicated
Cymew has quit [Ping timeout: 240 seconds]
elf_fortrez has joined #commonlisp
srhm has quit [Read error: Connection reset by peer]