eliminating or reducing use of "mutable" keyword?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

eliminating or reducing use of "mutable" keyword?

Rik-4
jwe,

I saw your recent changeset

changeset:   27709:0a84a7d0998d
user:        John W. Eaton <[hidden email]>
date:        Mon Nov 18 11:57:51 2019 -0500
summary:     don't declare figure::properties::toolkit as mutable

which removes an instance of the mutable keyword.

Should we make this a Task on Savannah?  The use of mutable seems very
occasionally necessary, but also very often a hack where it might be better
to re-think the code.

I used grep and found 53 instances of the word in libinterp/ and 8 in
liboctave/.  The ones in libinterp are clustered in the MeX interface which
probably isn't worth scrubbing.

Just a thought,
Rik

Reply | Threaded
Open this post in threaded view
|

Re: eliminating or reducing use of "mutable" keyword?

John W. Eaton
Administrator
On 11/18/19 3:03 PM, Rik wrote:

> jwe,
>
> I saw your recent changeset
>
> changeset:   27709:0a84a7d0998d
> user:        John W. Eaton <[hidden email]>
> date:        Mon Nov 18 11:57:51 2019 -0500
> summary:     don't declare figure::properties::toolkit as mutable
>
> which removes an instance of the mutable keyword.
>
> Should we make this a Task on Savannah?  The use of mutable seems very
> occasionally necessary, but also very often a hack where it might be better
> to re-think the code.
>
> I used grep and found 53 instances of the word in libinterp/ and 8 in
> liboctave/.  The ones in libinterp are clustered in the MeX interface which
> probably isn't worth scrubbing.

Yes, I think we should aim to remove all uses of mutable if possible.
In cases where it seems like it can't be removed, it would probably be
worth documenting and justifying why it is really needed.

jwe


Reply | Threaded
Open this post in threaded view
|

Re: eliminating or reducing use of "mutable" keyword?

Rik-4
On 11/18/2019 02:20 PM, John W. Eaton wrote:

> On 11/18/19 3:03 PM, Rik wrote:
>> jwe,
>>
>> I saw your recent changeset
>>
>> changeset:   27709:0a84a7d0998d
>> user:        John W. Eaton <[hidden email]>
>> date:        Mon Nov 18 11:57:51 2019 -0500
>> summary:     don't declare figure::properties::toolkit as mutable
>>
>> which removes an instance of the mutable keyword.
>>
>> Should we make this a Task on Savannah?  The use of mutable seems very
>> occasionally necessary, but also very often a hack where it might be better
>> to re-think the code.
>>
>> I used grep and found 53 instances of the word in libinterp/ and 8 in
>> liboctave/.  The ones in libinterp are clustered in the MeX interface which
>> probably isn't worth scrubbing.
>
> Yes, I think we should aim to remove all uses of mutable if possible. In
> cases where it seems like it can't be removed, it would probably be worth
> documenting and justifying why it is really needed.
>

I filed a task here (https://savannah.gnu.org/task/index.php?15469) which
includes the lists of mutable instances I found in libinterp and liboctave.

--Rik

Reply | Threaded
Open this post in threaded view
|

Re: eliminating or reducing use of "mutable" keyword?

mmuetzel
In reply to this post by John W. Eaton
Am 18. November 2019 um 23:20 Uhr schrieb "John W. Eaton":

> On 11/18/19 3:03 PM, Rik wrote:
> > jwe,
> >
> > I saw your recent changeset
> >
> > changeset:   27709:0a84a7d0998d
> > user:        John W. Eaton <[hidden email]>
> > date:        Mon Nov 18 11:57:51 2019 -0500
> > summary:     don't declare figure::properties::toolkit as mutable
> >
> > which removes an instance of the mutable keyword.
> >
> > Should we make this a Task on Savannah?  The use of mutable seems very
> > occasionally necessary, but also very often a hack where it might be better
> > to re-think the code.
> >
> > I used grep and found 53 instances of the word in libinterp/ and 8 in
> > liboctave/.  The ones in libinterp are clustered in the MeX interface which
> > probably isn't worth scrubbing.
>
> Yes, I think we should aim to remove all uses of mutable if possible.
> In cases where it seems like it can't be removed, it would probably be
> worth documenting and justifying why it is really needed.
>

That change seems to have fixed the frequent segmentation faults of the Fedora buildbots, too.

Markus


Reply | Threaded
Open this post in threaded view
|

Re: eliminating or reducing use of "mutable" keyword?

John W. Eaton
Administrator
On 11/19/19 9:46 AM, "Markus Mützel" wrote:

> Am 18. November 2019 um 23:20 Uhr schrieb "John W. Eaton":
>> On 11/18/19 3:03 PM, Rik wrote:
>>> jwe,
>>>
>>> I saw your recent changeset
>>>
>>> changeset:   27709:0a84a7d0998d
>>> user:        John W. Eaton <[hidden email]>
>>> date:        Mon Nov 18 11:57:51 2019 -0500
>>> summary:     don't declare figure::properties::toolkit as mutable
>>>
>>> which removes an instance of the mutable keyword.
>>>
>>> Should we make this a Task on Savannah?  The use of mutable seems very
>>> occasionally necessary, but also very often a hack where it might be better
>>> to re-think the code.
>>>
>>> I used grep and found 53 instances of the word in libinterp/ and 8 in
>>> liboctave/.  The ones in libinterp are clustered in the MeX interface which
>>> probably isn't worth scrubbing.
>>
>> Yes, I think we should aim to remove all uses of mutable if possible.
>> In cases where it seems like it can't be removed, it would probably be
>> worth documenting and justifying why it is really needed.
>>
>
> That change seems to have fixed the frequent segmentation faults of the Fedora buildbots, too.

Unfortunately, I'm not so sure that it is fixed.  I still see a segfault
when creating figures for the manual in this build:

   http://buildbot.octave.org:8010/#/builders/11/builds/1274

jwe

Reply | Threaded
Open this post in threaded view
|

Re: eliminating or reducing use of "mutable" keyword?

mmuetzel
Am 19. November 2019 um 19:32 Uhr schrieb "John W. Eaton":

> On 11/19/19 9:46 AM, "Markus Mützel" wrote:
> > Am 18. November 2019 um 23:20 Uhr schrieb "John W. Eaton":
> >> On 11/18/19 3:03 PM, Rik wrote:
> >>> jwe,
> >>>
> >>> I saw your recent changeset
> >>>
> >>> changeset:   27709:0a84a7d0998d
> >>> user:        John W. Eaton <[hidden email]>
> >>> date:        Mon Nov 18 11:57:51 2019 -0500
> >>> summary:     don't declare figure::properties::toolkit as mutable
> >>>
> >>> which removes an instance of the mutable keyword.
> >>>
> >>> Should we make this a Task on Savannah?  The use of mutable seems very
> >>> occasionally necessary, but also very often a hack where it might be better
> >>> to re-think the code.
> >>>
> >>> I used grep and found 53 instances of the word in libinterp/ and 8 in
> >>> liboctave/.  The ones in libinterp are clustered in the MeX interface which
> >>> probably isn't worth scrubbing.
> >>
> >> Yes, I think we should aim to remove all uses of mutable if possible.
> >> In cases where it seems like it can't be removed, it would probably be
> >> worth documenting and justifying why it is really needed.
> >>
> >
> > That change seems to have fixed the frequent segmentation faults of the Fedora buildbots, too.
>
> Unfortunately, I'm not so sure that it is fixed.  I still see a segfault
> when creating figures for the manual in this build:
>
>    http://buildbot.octave.org:8010/#/builders/11/builds/1274

You're right. I spoke too soon.

Btw, the hg repo for the w64-64-stable buildbot seems to be corrupt. Could you please reset it?

Markus