admich1 has quit [Remote host closed the connection]
admich1 has joined #commonlisp
malaclyps has joined #commonlisp
mala has quit [Ping timeout: 265 seconds]
admich1 has quit [Ping timeout: 245 seconds]
markb1 has joined #commonlisp
admich1 has joined #commonlisp
ingeniot has joined #commonlisp
chomwitt has joined #commonlisp
GalaxyNova has quit [Quit: :3]
rtypo has quit [Ping timeout: 276 seconds]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life_ is now known as Lord_of_Life
rtypo has joined #commonlisp
markb1 has quit [Ping timeout: 260 seconds]
GalaxyNova has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
markb1 has joined #commonlisp
rtypo has quit [Ping timeout: 248 seconds]
ewig has quit [Remote host closed the connection]
ewig has joined #commonlisp
akoana has quit [Quit: leaving]
markb1 has quit [Ping timeout: 260 seconds]
istewart has quit [Quit: Konversation terminated!]
markb1 has joined #commonlisp
markb1 has quit [Ping timeout: 245 seconds]
markb1 has joined #commonlisp
admich1 has quit [Ping timeout: 276 seconds]
ingeniot has quit [Ping timeout: 252 seconds]
Oddity has quit [Ping timeout: 252 seconds]
admich1 has joined #commonlisp
pve has joined #commonlisp
rgherdt has joined #commonlisp
markb1 has quit [Ping timeout: 244 seconds]
markb1 has joined #commonlisp
apac has joined #commonlisp
donlcn has joined #commonlisp
markb1 has quit [Ping timeout: 276 seconds]
kyoji has quit [Read error: Connection reset by peer]
kyoji has joined #commonlisp
markb1 has joined #commonlisp
markb1 has quit [Ping timeout: 248 seconds]
markb1 has joined #commonlisp
GalaxyNova has quit [Remote host closed the connection]
King_julian has quit [Ping timeout: 252 seconds]
rgherdt` has joined #commonlisp
King_julian has joined #commonlisp
edgar-rft` has joined #commonlisp
rgherdt has quit [Ping timeout: 260 seconds]
edgar-rft has quit [Ping timeout: 272 seconds]
markb1 has quit [Ping timeout: 260 seconds]
markb1 has joined #commonlisp
donlcn has quit [Ping timeout: 244 seconds]
Everything has joined #commonlisp
Guest47 has joined #commonlisp
bpanthi978 has joined #commonlisp
bpanthi977 has quit [Ping timeout: 276 seconds]
bpanthi978 is now known as bpanthi977
markb1 has quit [Ping timeout: 276 seconds]
markb1 has joined #commonlisp
flip214 has quit [Ping timeout: 245 seconds]
apac has quit [Ping timeout: 272 seconds]
flip214 has joined #commonlisp
admich1 has quit [Ping timeout: 265 seconds]
admich1 has joined #commonlisp
peludito31 has joined #commonlisp
donlcn has joined #commonlisp
<peludito31>
Hi
<beach>
Hello peludito31.
<beach>
peludito31: Are you new here? I don't recognize your nick.
peludito31 has left #commonlisp [#commonlisp]
pamporo has joined #commonlisp
varjag has joined #commonlisp
pamporo has quit [Quit: Client closed]
markb1 has quit [Ping timeout: 260 seconds]
ingeniot has joined #commonlisp
attila_lendvai has joined #commonlisp
markb1 has joined #commonlisp
chomwitt has quit [Ping timeout: 272 seconds]
ewig has quit [Remote host closed the connection]
ewig has joined #commonlisp
markb1 has quit [Ping timeout: 252 seconds]
treflip has joined #commonlisp
<beach>
Oh, well.
markb1 has joined #commonlisp
markb1 has quit [Ping timeout: 252 seconds]
LainIwakura has joined #commonlisp
kopiyka has quit [Remote host closed the connection]
chomwitt has joined #commonlisp
kopiyka has joined #commonlisp
markb1 has joined #commonlisp
treflip has quit [Ping timeout: 260 seconds]
markb1 has quit [Ping timeout: 252 seconds]
markb1 has joined #commonlisp
rbcarleton has joined #commonlisp
decweb has joined #commonlisp
treflip has joined #commonlisp
JuanDaugherty has joined #commonlisp
markb1 has quit [Ping timeout: 244 seconds]
chomwitt has quit [Ping timeout: 276 seconds]
treflip has quit [Remote host closed the connection]
donlcn has quit [Ping timeout: 245 seconds]
treflip has joined #commonlisp
markb1 has joined #commonlisp
random-nick has joined #commonlisp
LainIwakura has quit [Quit: Client closed]
ingeniot has quit [Ping timeout: 260 seconds]
JuanDaugherty has quit [Quit: praxis.meansofproduction.biz (juan@acm.org)]
rbcarleton has quit [Quit: rbcarleton]
chomwitt has joined #commonlisp
admich1 has quit [Ping timeout: 276 seconds]
admich1 has joined #commonlisp
DustyDynamite has joined #commonlisp
DustyDynamite has quit [Client Quit]
admich1 has quit [Read error: Connection reset by peer]
markb1 has quit [Ping timeout: 248 seconds]
rbcarleton has joined #commonlisp
DustyDynamite has joined #commonlisp
treflip has quit [Ping timeout: 252 seconds]
attila_lendvai has quit [Ping timeout: 252 seconds]
admich1 has joined #commonlisp
donlcn has joined #commonlisp
Guest47 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
markb1 has joined #commonlisp
ingeniot has joined #commonlisp
johnjaye has quit [Ping timeout: 252 seconds]
rbcarleton has quit [Quit: rbcarleton]
donlcn has quit [Quit: Leaving]
DustyDynamite has quit [Ping timeout: 260 seconds]
markb1 has quit [Ping timeout: 265 seconds]
Guest47 has joined #commonlisp
zxcvz has joined #commonlisp
ingeniot has quit [Remote host closed the connection]
varjag has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.3)]
ingeniot has joined #commonlisp
ingeniot has quit [Remote host closed the connection]
ingeniot has joined #commonlisp
admich1 has quit [Ping timeout: 248 seconds]
admich1 has joined #commonlisp
ingeniot has quit [Remote host closed the connection]
ingeniot has joined #commonlisp
DustyDynamite has joined #commonlisp
markb1 has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
apac has joined #commonlisp
markb1 has quit [Ping timeout: 252 seconds]
gorignak has quit [Quit: quit]
markb1 has joined #commonlisp
bjorkintosh has joined #commonlisp
Guest47 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tuck has joined #commonlisp
DustyDynamite has quit [Quit: Leaving]
Oddity has joined #commonlisp
gorignak has joined #commonlisp
mange has quit [Quit: Zzz...]
markb1 has quit [Ping timeout: 244 seconds]
jonatack has quit [Ping timeout: 252 seconds]
admich1 has quit [Ping timeout: 252 seconds]
markb1 has joined #commonlisp
apac has quit [Ping timeout: 252 seconds]
<veqq>
pity!
<veqq>
I discovered a guy who's been working on exactly what I am, but for 30 years, with a bunch of papers written in lisp etc.
<veqq>
http://www.korns.com/ makes me want to canibalize my own system/rationalize it according to this, except it's of unclear benefit as I'd have to build them before testing them
<ixelp>
Frame
zxcvz has quit [Quit: zxcvz]
markb1 has quit [Ping timeout: 260 seconds]
bjorkintosh has quit [Quit: "Every day, computers are making people easier to use." David Temkin]
<mgl>
Imagine you want to write DEFUN* macro that prints the calling form when the function is invoked. For this, from the lambda list, I need to compute a form at macro-expansion time that evaluates (in the lexical env of the underlying DEFUN) to the actual arglist. This is not unique due to the optional and keywords arguments, but any "equivalent" arglist is fine. Is this in some library perhaps?
treflip has joined #commonlisp
wacki has joined #commonlisp
rgherdt` has quit [Ping timeout: 260 seconds]
jonatack has joined #commonlisp
markb1 has quit [Ping timeout: 260 seconds]
drasken has joined #commonlisp
Gleefre has joined #commonlisp
drasken1 has joined #commonlisp
ingeniot has quit [Ping timeout: 248 seconds]
<beach>
mgl: So you are saying that any argument list that could have created the current parameter values is fine?
<Gleefre>
fwiw there exists alexandria:parse-ordinary-lambda-list, although it only parses the lambda list, you'd still need to construct the arglist generating expression. But it should be easy to do given the parsed lambda-list, I think.
drasken1 has joined #commonlisp
<Gleefre>
(Or at least easier than with the plain lambda-list.)
<mgl>
beach: Nice trick indeed. Time to tweak the task: I would like it to be really fast.
<mgl>
Gleefre: Yes, that's how I've started, but it's still a pain.
<bike>
printing the arglist is probably going to take more time than the stupid consing my macro does. honestly it might not even be that bad since the args may be dxable
<bike>
more of a problem is that the underlying lambda list won't display in editors
<Gleefre>
mgl: how portable do you want this to be?
awlygj has quit [Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in]
<mgl>
bike: I'm not really print just saving it.
<mgl>
bike: yes
<mgl>
Gleefre: very
awlygj has joined #commonlisp
<bike>
given the parsed lambda list (from alexandria) it's not too bad to build up the arguments. you collect all the required, then for each optional check the -p variable (which you should put in the lambda list if it's not there) and collect the argument if it was provided. then on the end you put any &rest, and if there's a &key you should add a &rest
<bike>
the optionals would be the most annoying part
<bike>
you're still presumably consing up an actual list of arguments to save, so that's the slow bit, but it's unavoidable given it's what you're asking for
<bike>
i don't know of any library to do this but it shouldn't be too much code
<bike>
(more than one line on irc, though)
admich1 has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
<bike>
oh, and if you do do this then you won't be collecting any incorrect arglists, since the error would happen before your collection code is run. don't know if that matters for you.
<bike>
incorrect as in too few or too many arguments, or messing up the keys
<mgl>
Yes, that's what I'm doing, but it's quite sad writing it.
Inline has joined #commonlisp
markb1 has quit [Ping timeout: 276 seconds]
markb1 has joined #commonlisp
ingeniot has joined #commonlisp
* mgl
wrote an ugly series of pushes in the general case
<Shinmera>
I've had that exact issue a number of times before but never did figure out a good solution for it
<Shinmera>
It has made me annoyed and sad every time
<Gleefre>
For optionals it uses something like (when a-p (list* a (when b-p (list* b ...))))
* mgl
updates the paste with a working (?) version
<mgl>
Gleefre: Interesting. I think my conses less.
<mgl>
*mine
<Gleefre>
That's quite possible, yes. Although I'm hoping that compiler will optimize something like (append (list ...) ...).
chomwitt has quit [Ping timeout: 265 seconds]
<Gleefre>
Also mine versions basically asks to replace the arglist with an equivalent ones with added &rest when &key is used as well as indicator variables for optional arguments.
<Gleefre>
*lambda-list
<Gleefre>
It returns the desired lambda-list as a second value.
<Gleefre>
But on the other hand this allows it to perfectly replicate the arglist. If it works correctly, that is.
<Gleefre>
Actually, I think extra consing can be prevented by simply replacing APPEND with NCONC.
<mgl>
Do you think that my version is incorrect?
treflip` has joined #commonlisp
treflip has quit [Ping timeout: 276 seconds]
<Gleefre>
Hm... Actually, I think I can break it with &optional arguments
markb1 has quit [Ping timeout: 252 seconds]
<Gleefre>
Something like &optional x (y nil y-p) z
<mgl>
I'm not adding supplied-p stuff though.
rbcarleton has quit [Quit: rbcarleton]
<Gleefre>
Or, rather, &optional x (y nil y-p) (z t)
<Gleefre>
Calling it with no arguments will resut it (nil t) as an arglist, which is wrong
markb1 has joined #commonlisp
<mgl>
I get (lambda-list-to-arglist-form ()) => (LIST)
<mgl>
Ah, the optional version.
ewig has quit [Remote host closed the connection]
ewig has joined #commonlisp
treflip` has quit [Remote host closed the connection]
treflip has joined #commonlisp
treflip has quit [Remote host closed the connection]
treflip has joined #commonlisp
<Gleefre>
By the way, any reason not to add stuff to the original lambda-list? Adding &rest would make it a lot easier to deal with keyword arguments. Adding indicator variables for optionals on top of it would allow you to recreate the arglist fully.
<mgl>
Thanks. Fixed it.
triffid has quit [Quit: triffid]
<Gleefre>
FWIW the paste seems to have a wrong version of that, there are mismatched parens there
triffid has joined #commonlisp
<mgl>
Gleefre: I'm not sure about the performance implications.
decweb has quit [Read error: Connection reset by peer]
<mgl>
Gleefre: That's what I get editing a paste manually. Paren dutifully added.
<bike>
adding optional indicators and &rest shouldn't affect performance
decweb has joined #commonlisp
<bike>
it'll cons a rest list, but you're doing that yourself anyway.
<mgl>
Why would optional indicators not affect performance?
<bike>
the function has to know how many arguments were provided anyway, in order to know how to initialize optional parameters
<bike>
like it's already going to effectively branch on those indications
<Gleefre>
mgl: actually, there is still an issue with optionals: you now push NIL when an indicator variable is NIL, but the variable itself might have a non-nil default
<bike>
and, in order to do what you want to do, you need to do that. you can't not do that. in order to reconstruct the list of arguments you need to know which were provided
<Gleefre>
mgl: but then you also can't just push all the values of the optional variables by themselves, since you might break some of the indicator variables that are present.
<mgl>
Gleefre: That kind of settles it. The indicators must be added.
DustyDynamite has joined #commonlisp
DustyDynamite has quit [Client Quit]
soweli_iki has quit [Read error: Connection reset by peer]
Inline has quit [Quit: Leaving]
<Gleefre>
mgl: it actually is possible to make it work by using nested WHEN's similar to how I already handled optional arguments
Inline has joined #commonlisp
waleee has joined #commonlisp
<Gleefre>
I have added a "weak" version that doesn't modify the arglist to the paste.
<Gleefre>
mgl: also, a small bug in your handling of keyword arguments -- the keyword in the keyarg definition actually doesn't have to be a keyword, but can be a symbol in any package. So you need to quote it in ADD-KEY-FORMS.
sye has joined #commonlisp
markb1 has quit [Ping timeout: 248 seconds]
sye has quit [Ping timeout: 260 seconds]
<tuck>
mgl: you could have a look at com.informatimago.common-lisp.lisp.stepper
<tuck>
mgl: ie. instead of printing the parameters received, you would do the printing at the call site, with the actual arguments passed. Of course, the toplevel call would have to be performed using the same defun* or it wouldn't be traced, but for all the inner calls it should make a difference.
<mgl>
Gleefre: What lisp allows to bind NIL (in DESTRUCTURING-BIND in your paste)?
<ixelp>
lisp/common-lisp/lisp at master · informatimago/lisp
<mgl>
tuck: I have no control over the callers.
<tuck>
ok.
<tuck>
(it's rather incredible that in this day and age of open source, one doesn't have any control over the caller)
chomwitt has joined #commonlisp
treflip has quit [Remote host closed the connection]
<mgl>
It's for a library.
soweli_iki has joined #commonlisp
<mgl>
Gleefre: May I incorporate this into an MIT licenced project?
<Gleefre>
Sure, I don't mind.
<Gleefre>
mgl: if you'll be taking / adapting the code from my paste, can you send me a link to where it's going to be used? I'm a bit interested now :)
kevingal has joined #commonlisp
<Gleefre>
(Hm, is it for the try testing framework?)
tuck has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.2)]
<ixelp>
make DEFTEST not accept any number of arguments · melisgl/try@9bdd2d2
markb1 has quit [Ping timeout: 268 seconds]
gooba has joined #commonlisp
johnjaye has joined #commonlisp
<Gleefre>
mgl: cool :) [ and thanks for the link! ]
<Gleefre>
One last remark: you might want to test for (null keyp) instead of (endp key) in lambda-list-to-arglist-form's cond
<Gleefre>
This will switch to the "long form" when the lambda-list ends with &key, and will be able to notice if the function is called with :allow-other-keys t
<Gleefre>
I love it how this line contains three standard equivalent predicates that have different names :)
markb1 has joined #commonlisp
<mgl>
Done. Speaking of Try, I implemented rerunning a part of the test execution tree in context (https://melisgl.github.io/mgl-pax-world/try-manual.html#TRY:*RERUN-CONTEXT*%20VARIABLE). Try has been OK without frameworky fixtures because it can, for example, rerun only failed tests from a previous run.
<ixelp>
Try Manual
cqst has quit [Quit: nyaa~]
<mgl>
With *RERUN-CONTEXT*, one run any test and Try will try to find a execution path to from the trial in *RERUN-CONTEXT*. So, one can just bind specials in the natural way and not worry about setup and teardown of individual tests at all.
gooba has quit [Remote host closed the connection]
gooba has joined #commonlisp
triffid has quit [Remote host closed the connection]
Everything has quit [Quit: leaving]
markb1 has quit [Ping timeout: 245 seconds]
attila_lendvai_ has joined #commonlisp
markb1 has joined #commonlisp
attila_lendvai has quit [Ping timeout: 276 seconds]
triffid has joined #commonlisp
JuanDaugherty is now known as ColinRobinson
wacki has quit [Ping timeout: 252 seconds]
ewig has quit [Remote host closed the connection]
wacki has joined #commonlisp
ColinRobinson has quit [Quit: praxis.meansofproduction.biz (juan@acm.org)]
varjag has joined #commonlisp
mgl has quit []
mwnaylor` has joined #commonlisp
mwnaylor has quit [Ping timeout: 260 seconds]
istewart has joined #commonlisp
markb1 has quit [Ping timeout: 268 seconds]
drasken has left #commonlisp [ERC 5.6.0.30.1 (IRC client for GNU Emacs 30.1)]
drasken1 has left #commonlisp [#commonlisp]
bpanthi977 has quit [Ping timeout: 276 seconds]
markb1 has joined #commonlisp
mwnaylor` has quit [Quit: ERC 5.6.0.30.1 (IRC client for GNU Emacs 30.1)]
mwnaylor has joined #commonlisp
markb1 has quit [Ping timeout: 245 seconds]
admich1 has quit [Remote host closed the connection]
admich1 has joined #commonlisp
markb1 has joined #commonlisp
jon_atack has joined #commonlisp
GalaxyNova has joined #commonlisp
jonatack has quit [Ping timeout: 265 seconds]
jonatack has joined #commonlisp
jon_atack has quit [Ping timeout: 268 seconds]
chomwitt has quit [Ping timeout: 265 seconds]
markb1 has quit [Ping timeout: 276 seconds]
johnjaye has quit [Ping timeout: 260 seconds]
bpanthi977 has joined #commonlisp
johnjaye has joined #commonlisp
cow_2001 has quit [Quit: ⛧]
cow_2001 has joined #commonlisp
bpanthi977 has quit [Ping timeout: 272 seconds]
markb1 has joined #commonlisp
bpanthi977 has joined #commonlisp
wacki has quit [Quit: Leaving.]
bpanthi977 has quit [Ping timeout: 272 seconds]
markb1 has quit [Ping timeout: 244 seconds]
markb1 has joined #commonlisp
markb1 has quit [Ping timeout: 260 seconds]
markb1 has joined #commonlisp
pve has quit [Quit: leaving]
attila_lendvai_ has quit [Ping timeout: 248 seconds]
kiyafirs has joined #commonlisp
markb1 has quit [Ping timeout: 272 seconds]
markb1 has joined #commonlisp
markb1 has quit [Ping timeout: 248 seconds]
bpanthi977 has joined #commonlisp
markb1 has joined #commonlisp
rbcarleton has joined #commonlisp
varjag has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.2)]
admich1 has quit [Ping timeout: 276 seconds]
Gleefre has quit [Remote host closed the connection]
bpanthi977 has quit [Ping timeout: 276 seconds]
admich1 has joined #commonlisp
waleee has quit [Ping timeout: 260 seconds]
bpanthi977 has joined #commonlisp
prokhor-zhakarov has joined #commonlisp
shka has quit [Read error: Connection reset by peer]
shka has joined #commonlisp
gorignak has quit [Read error: Connection reset by peer]