Re: In CLOS, instance remorphing considered useless in practice?

2020-12-11 Thread Duane Rettig
Date: Tue, 08 Dec 2020 22:17:10 +0100 From: "Svante Carl v. Erichsen" Hi! [Sorry to be coming late to the game.] It is used all the time while working on a live system (image). If you want raw performance, you can often substitute structs, if you can live

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-10 Thread Jean-Claude Beaudoin
On Wed, Dec 9, 2020 at 10:25 AM David McClain wrote: > Just as an aside… that DSP prototyping environment still runs today as > well as it did back in 2008 (perhaps a bit faster on todays CPUs). That is > one thing about Common Lisp that I value highly. I have code that I wrote > almost 30 years

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Robert Goldman
The answer to this question is that I *don't* invoke `change-class` -- the environment does it for me. That's the beauty of the environment. Working with Python, where I have a machine learning model that I want to tweak without retraining has been very instructive for me in reminding me what

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread David McClain
Just as an aside… that DSP prototyping environment still runs today as well as it did back in 2008 (perhaps a bit faster on todays CPUs). That is one thing about Common Lisp that I value highly. I have code that I wrote almost 30 years ago and have never needed to change, while it is still very

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Alessio Stalla
On Wed, 9 Dec 2020 at 10:50, Jean-Claude Beaudoin < jean.claude.beaud...@gmail.com> wrote: > > > On Wed, Dec 9, 2020 at 3:59 AM Alessio Stalla > wrote: > >> About multithreading, *all *kinds of redefinition have an impact. If I >> redefine a widely-used, low-level function, with hundreds of call

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread d...@refined-audiometrics.com
> Can I ask why you invoke #'CL:CHANGE-CLASS on an object instead of simply > creating a new instance of the second class with adequate initialization? > I have used CHANGE-CLASS sparingly over the years. My first use was in a graphical DSP algorithm prototyping environment, and I believe it wa

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Manfred Bergmann
Hello. > Am 09.12.2020 um 13:13 schrieb Hans Hübner : > > Am Mi., 9. Dez. 2020 um 11:03 Uhr schrieb Jean-Claude Beaudoin > : > On Wed, Dec 9, 2020 at 4:36 AM Hans Hübner wrote: > This is also where scalability comes into play, and that word certainly needs > to be qualified before it can be

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Pascal Costanza
> On 9 Dec 2020, at 10:11, Jean-Claude Beaudoin > wrote: > > > > On Wed, Dec 9, 2020 at 3:16 AM Nick Levine > wrote: > > Can I ask why you invoke #'CL:CHANGE-CLASS on an object instead of simply > > creating a new instance of the second class with adequate initi

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Pascal Costanza
> On 9 Dec 2020, at 07:42, Jean-Claude Beaudoin > wrote: > > > > On Tue, Dec 8, 2020 at 3:21 PM d...@refined-audiometrics.com > > wrote: > I am interested to hear arguments in both directions. But you haven’t > o

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Jean-Claude Beaudoin
On Wed, Dec 9, 2020 at 7:13 AM Hans Hübner wrote: > Am Mi., 9. Dez. 2020 um 11:03 Uhr schrieb Jean-Claude Beaudoin < > jean.claude.beaud...@gmail.com>: > >> On Wed, Dec 9, 2020 at 4:36 AM Hans Hübner >> wrote: >> >>> I like using CL when I know that I don't need scalability and when I >>> know t

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Hans Hübner
Am Mi., 9. Dez. 2020 um 11:03 Uhr schrieb Jean-Claude Beaudoin < jean.claude.beaud...@gmail.com>: > On Wed, Dec 9, 2020 at 4:36 AM Hans Hübner wrote: > >> I like using CL when I know that I don't need scalability and when I know >> that I'll be the only developer of the program that I'm writing.

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Jean-Claude Beaudoin
On Wed, Dec 9, 2020 at 6:18 AM Marco Antoniotti wrote: > ... I forgot. > > Let's get the CLtL2 "Environment" API back in the "extended" spec. > > Which brings me to the following statement. The issue here is to *extend > *the spec; not to cut pieces out of it. > > CLtL2 "Environment" API is seco

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Marco Antoniotti
... I forgot. Let's get the CLtL2 "Environment" API back in the "extended" spec. Which brings me to the following statement. The issue here is to *extend *the spec; not to cut pieces out of it. All the best. Marco PS. Nag, nag. :) ABCL crowd! You said you were going to bring the environment

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Marco Antoniotti
Jean-Claude the point is that CLOS is not a "library", although it was certainly possible to implement it that way.. It is an integral part of CL "as is". I see that the discussion has gone ahead, but here is my 2 cents. I don't have much time to work on it due to my day job (and other - retroco

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Jean-Claude Beaudoin
On Wed, Dec 9, 2020 at 4:36 AM Hans Hübner wrote: > > Given the discussion until now, Jean-Claude, what is it that you're trying > to accomplish with this debate? Are you up for proving that the MOP is > "wrong"? You have repeatedly indicated that this would be your opinion. If > so, are you tr

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Jean-Claude Beaudoin
On Wed, Dec 9, 2020 at 4:36 AM Hans Hübner wrote: > Am Mi., 9. Dez. 2020 um 09:10 Uhr schrieb Jean-Claude Beaudoin < > jean.claude.beaud...@gmail.com>: > >> I would love to see languages with better support for redefinition. >>> Like unison, or darklang. Unhappily, >>> update-instance-for-redefin

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Didier Verna
Jean-Claude Beaudoin wrote: > My main stance here is to state that I have yet to see, in a > significant application, any use of functions > #'cl:make-instance-obsolete and > #'cl:update-instance-for-redefined-class and of the underlying > machinery that support the remorphing of instances follow

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Jean-Claude Beaudoin
On Wed, Dec 9, 2020 at 3:59 AM Alessio Stalla wrote: > About multithreading, *all *kinds of redefinition have an impact. If I > redefine a widely-used, low-level function, with hundreds of call sites – > will each thread immediately call the new one without the bug, or will some > still call the

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Hans Hübner
Am Mi., 9. Dez. 2020 um 09:10 Uhr schrieb Jean-Claude Beaudoin < jean.claude.beaud...@gmail.com>: > I would love to see languages with better support for redefinition. >> Like unison, or darklang. Unhappily, >> update-instance-for-redefined-class, while very cool, is *not enough*. >> > > My point

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Jean-Claude Beaudoin
On Wed, Dec 9, 2020 at 3:55 AM Marco Antoniotti wrote: > Hi > > I used CHANGE-CLASS some time ago to ensure that I could read new data and > reshape it. It was a much cleaner - and "built in" - solution than writing > ad-hoc code which should eventually be "generalized". > > I understand people

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Jean-Claude Beaudoin
On Wed, Dec 9, 2020 at 3:16 AM Nick Levine wrote: > > Can I ask why you invoke #'CL:CHANGE-CLASS on an object instead of > simply creating a new instance of the second class with adequate > initialization? > > Because you’d have to go find all the pointers to the old instance. Maybe > you don’t w

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Alessio Stalla
About multithreading, *all *kinds of redefinition have an impact. If I redefine a widely-used, low-level function, with hundreds of call sites – will each thread immediately call the new one without the bug, or will some still call the old one? Again, imposing a proper order would require protectin

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Marco Antoniotti
Hi I used CHANGE-CLASS some time ago to ensure that I could read new data and reshape it. It was a much cleaner - and "built in" - solution than writing ad-hoc code which should eventually be "generalized". I understand people get worked up about things they feel may be in their way of "efficien

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Michael Fiano
Hello there. I don't normally chime in on this list, but thought I could explain my usage of CHANGE-CLASS in a large Common Lisp project (~20k lines of code). Said application is a game engine, as anyone familiar with my work would probably have guessed as much (I have several, this being the l

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Nick Levine
> Can I ask why you invoke #'CL:CHANGE-CLASS on an object instead of simply > creating a new instance of the second class with adequate initialization? Because you’d have to go find all the pointers to the old instance. Maybe you don’t want to do that. Or maybe you don’t care, but that’s ok beca

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-09 Thread Jean-Claude Beaudoin
Hello Faré, I had you and ASDF somewhat in mind when I wrote the original post. On Tue, Dec 8, 2020 at 3:23 PM Faré wrote: > I once used update-instance-for-redefined-class in ASDF, when I was > trying to make a smooth upgrade from ASDF 1 to ASDF 2. The problem I > found is that proper support

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-08 Thread Jean-Claude Beaudoin
On Tue, Dec 8, 2020 at 8:02 PM Pascal Costanza wrote: > > The implementation of ContextL relies heavily on the CLOS MOP, and among > other things on runtime class redefinition and corresponding updates of > class instances. You can find the details how the class redefinition > machinery is used i

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-08 Thread Jean-Claude Beaudoin
On Tue, Dec 8, 2020 at 3:21 PM d...@refined-audiometrics.com < d...@refined-audiometrics.com> wrote: > I am interested to hear arguments in both directions. But you haven’t > outlined the alternative, other than to state that they exist. What are > these alternatives? > The main purpose of my or

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-08 Thread Jean-Claude Beaudoin
On Tue, Dec 8, 2020 at 4:17 PM Svante Carl v. Erichsen < svante.v.erich...@web.de> wrote: > Hi! > > It is used all the time while working on a live system (image). > > If you want raw performance, you can often substitute structs, if you > can live with the downsides: all objects from a class must

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-08 Thread Pascal Costanza
> On 7 Dec 2020, at 05:52, Jean-Claude Beaudoin > wrote: > > > Hello Pros of Common Lisp, > > Here is my attempt at starting a significant (and hopefully useful) debate on > a subject squarely about Common Lisp and its internals. > > My main stance here is to state that I have yet to see,

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-08 Thread Zach Beane
I see it and use it a lot. Maybe that's not significant to you, but it's significant to me. Zach On Tue, Dec 8, 2020 at 2:51 PM Jean-Claude Beaudoin < jean.claude.beaud...@gmail.com> wrote: > > Hello Pros of Common Lisp, > > Here is my attempt at starting a significant (and hopefully useful) deb

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-08 Thread Svante Carl v. Erichsen
Hi! It is used all the time while working on a live system (image). If you want raw performance, you can often substitute structs, if you can live with the downsides: all objects from a class must be thrown away on redefinition (which might be OK if you want to treat e. g. a production system as

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-08 Thread Faré
I once used update-instance-for-redefined-class in ASDF, when I was trying to make a smooth upgrade from ASDF 1 to ASDF 2. The problem I found is that proper support for class redefinition requires the cooperation not only of the underlying object system, but also of all the parts of the implementa

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-08 Thread d...@refined-audiometrics.com
I am interested to hear arguments in both directions. But you haven’t outlined the alternative, other than to state that they exist. What are these alternatives? I use these MOP functions indirectly whenever I perform a CHANGE-CLASS on objects, mimicking something akin to Smalltalk BECOME. And

Re: In CLOS, instance remorphing considered useless in practice?

2020-12-08 Thread Robert Goldman
Updating instances when classes are redefined is critical to interactive development with the REPL. If you want to see why it's so critical, try working with Python and modifying a class definition. You have to shut down the interpreter and start over, which is a huge pain if your system has

In CLOS, instance remorphing considered useless in practice?

2020-12-08 Thread Jean-Claude Beaudoin
Hello Pros of Common Lisp, Here is my attempt at starting a significant (and hopefully useful) debate on a subject squarely about Common Lisp and its internals. My main stance here is to state that I have yet to see, in a significant application, any use of functions #'cl:make-instance-obsolete a