How to add a new rule?

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

How to add a new rule?

Stephane Ducasse-3
Hi yuriy

We defined a new rule subclass of RBTransformationRule and we did not
get why the rule
was not taken into account.

We put an halt in another class such as ifNotNilDo: in
   - initialize (is there a cache)?
   - checkMethod:

and it did not stop.
We started to
    to watch your ESUG videos
    to read your PhD

but it did not help us.

Stef

Reply | Threaded
Open this post in threaded view
|

Re: How to add a new rule?

Uko2
Hi Stef.

First of all, please include my email in the recipients list. I’m committed to maintain the Rule infrastructure, but I rarely manage to read through Pharo dev. I was nice that Myroslava told me about this email.

Secondly I suppose that you are working on Pharo 7, because Pharo 6 mostly follows the old approach.

One thing that can cause a rule not showing up is caching, and although it should be automatically invalidated upon the addition of a new rule, you can manually clear it by searching for “Renraku” in settings and pressing the “Reset rule cache” button.

You should not subclass RBTransformationRule, you should subclass ReNodeRewriteRule. In fact if you check, there are no subclasses of RBTransformationRule.

Now about documentation. I suspect that my IWST presentation and the Renraku paper (Thesis chapter) are not enough, but the problem is that nobody tried to create rules and give me a feedback about that so far. As you are adding new rules, I think that this is a nice opportunity to write some kind of a booklet, because rules are really powerful and we should share the knowledge of how to create them (and we should also simplify the creation process).

Right now there is a “Renraku Quality Rules” help group in the main Pharo help browser that provides a brief description of how to create rules and run them. I think that this is a good starting point because I tried to put there the essential information needed to start with rule creation.

P.S. what would be nice is to generate booklets from Pharo help, because I does not make sense to have 2 sources of documentation.

Cheers.
Uko

> On 27 Jan 2018, at 16:19, Stephane Ducasse <[hidden email]> wrote:
>
> Hi yuriy
>
> We defined a new rule subclass of RBTransformationRule and we did not
> get why the rule
> was not taken into account.
>
> We put an halt in another class such as ifNotNilDo: in
>   - initialize (is there a cache)?
>   - checkMethod:
>
> and it did not stop.
> We started to
>    to watch your ESUG videos
>    to read your PhD
>
> but it did not help us.
>
> Stef
>


Reply | Threaded
Open this post in threaded view
|

Re: How to add a new rule?

Stephane Ducasse-3
Ok I will add your email next time.


On Sun, Jan 28, 2018 at 8:57 AM, Yuriy Tymchuk <[hidden email]> wrote:
> Hi Stef.
>
> First of all, please include my email in the recipients list. I’m committed to maintain the Rule infrastructure, but I rarely manage to read through Pharo dev. I was nice that Myroslava told me about this email.

Ok I will add your email next time.

> Secondly I suppose that you are working on Pharo 7, because Pharo 6 mostly follows the old approach.

I do not know since it was not on my machine but most probably pharo 70

>
> One thing that can cause a rule not showing up is caching, and although it should be automatically invalidated upon the addition of a new rule, you can manually clear it by searching for “Renraku” in settings and pressing the “Reset rule cache” button.

Ahhhhhh this is what we suspected.

> You should not subclass RBTransformationRule, you should subclass ReNodeRewriteRule. In fact if you check, there are no subclasses of RBTransformationRule.

This is strange because I remember that ifNotNilDo was a subclass.
But again is was on a machine with super small fonts :)

>
> Now about documentation. I suspect that my IWST presentation and the Renraku paper (Thesis chapter) are not enough, but the problem is that nobody tried to create rules and give me a feedback about that so far. As you are adding new rules, I think that this is a nice opportunity to write some kind of a booklet, because rules are really powerful and we should share the knowledge of how to create them (and we should also simplify the creation process).

Yes I would love to have a booklet on that. Do you want to join effort?


> Right now there is a “Renraku Quality Rules” help group in the main Pharo help browser that provides a brief description of how to create rules and run them. I think that this is a good starting point because I tried to put there the essential information needed to start with rule creation.

Excellent we will read it.


> P.S. what would be nice is to generate booklets from Pharo help, because I does not make sense to have 2 sources of documentation.

Yes we are working on Pillar and we will get there. Now a booklet for
three or four pages of description is not worth.
So may be the inverse is better. What we could do is to extend the
help to display the pillar booklet inside the image. But slowing....


> Cheers.
> Uko
>
>> On 27 Jan 2018, at 16:19, Stephane Ducasse <[hidden email]> wrote:
>>
>> Hi yuriy
>>
>> We defined a new rule subclass of RBTransformationRule and we did not
>> get why the rule
>> was not taken into account.
>>
>> We put an halt in another class such as ifNotNilDo: in
>>   - initialize (is there a cache)?
>>   - checkMethod:
>>
>> and it did not stop.
>> We started to
>>    to watch your ESUG videos
>>    to read your PhD
>>
>> but it did not help us.
>>
>> Stef
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: How to add a new rule?

Uko2


Sent from my iPad

> On 28 Jan 2018, at 22:50, Stephane Ducasse <[hidden email]> wrote:
>
> Ok I will add your email next time.
>
>
>> On Sun, Jan 28, 2018 at 8:57 AM, Yuriy Tymchuk <[hidden email]> wrote:
>> Hi Stef.
>>
>> First of all, please include my email in the recipients list. I’m committed to maintain the Rule infrastructure, but I rarely manage to read through Pharo dev. I was nice that Myroslava told me about this email.
>
> Ok I will add your email next time.
>
>> Secondly I suppose that you are working on Pharo 7, because Pharo 6 mostly follows the old approach.
>
> I do not know since it was not on my machine but most probably pharo 70

If it is Pharo 6 then you can just follow the old smalllint strategy, but you may need to reset the cache.

>
>>
>> One thing that can cause a rule not showing up is caching, and although it should be automatically invalidated upon the addition of a new rule, you can manually clear it by searching for “Renraku” in settings and pressing the “Reset rule cache” button.
>
> Ahhhhhh this is what we suspected.
>
>> You should not subclass RBTransformationRule, you should subclass ReNodeRewriteRule. In fact if you check, there are no subclasses of RBTransformationRule.
>
> This is strange because I remember that ifNotNilDo was a subclass.
> But again is was on a machine with super small fonts :)
>
>>
>> Now about documentation. I suspect that my IWST presentation and the Renraku paper (Thesis chapter) are not enough, but the problem is that nobody tried to create rules and give me a feedback about that so far. As you are adding new rules, I think that this is a nice opportunity to write some kind of a booklet, because rules are really powerful and we should share the knowledge of how to create them (and we should also simplify the creation process).
>
> Yes I would love to have a booklet on that. Do you want to join effort?

Yes, but I need user experience. Because I already tried to document Renraku here and there but I don’t know what is not clear. Also I expect that Myroslava can join.

>
>
>> Right now there is a “Renraku Quality Rules” help group in the main Pharo help browser that provides a brief description of how to create rules and run them. I think that this is a good starting point because I tried to put there the essential information needed to start with rule creation.
>
> Excellent we will read it.
>
>
>> P.S. what would be nice is to generate booklets from Pharo help, because I does not make sense to have 2 sources of documentation.
>
> Yes we are working on Pillar and we will get there. Now a booklet for
> three or four pages of description is not worth.
> So may be the inverse is better. What we could do is to extend the
> help to display the pillar booklet inside the image. But slowing....
>
>
>> Cheers.
>> Uko
>>
>>> On 27 Jan 2018, at 16:19, Stephane Ducasse <[hidden email]> wrote:
>>>
>>> Hi yuriy
>>>
>>> We defined a new rule subclass of RBTransformationRule and we did not
>>> get why the rule
>>> was not taken into account.
>>>
>>> We put an halt in another class such as ifNotNilDo: in
>>>  - initialize (is there a cache)?
>>>  - checkMethod:
>>>
>>> and it did not stop.
>>> We started to
>>>   to watch your ESUG videos
>>>   to read your PhD
>>>
>>> but it did not help us.
>>>
>>> Stef
>>>
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: How to add a new rule?

Stephane Ducasse-3
Ok vincent told me that he succeeded and we can use its example.
We can also ask benoit how he extended renaku.
I will set up a booklet.



On Mon, Jan 29, 2018 at 1:42 PM, Yuriy Tymchuk <[hidden email]> wrote:

>
>
> Sent from my iPad
>
>> On 28 Jan 2018, at 22:50, Stephane Ducasse <[hidden email]> wrote:
>>
>> Ok I will add your email next time.
>>
>>
>>> On Sun, Jan 28, 2018 at 8:57 AM, Yuriy Tymchuk <[hidden email]> wrote:
>>> Hi Stef.
>>>
>>> First of all, please include my email in the recipients list. I’m committed to maintain the Rule infrastructure, but I rarely manage to read through Pharo dev. I was nice that Myroslava told me about this email.
>>
>> Ok I will add your email next time.
>>
>>> Secondly I suppose that you are working on Pharo 7, because Pharo 6 mostly follows the old approach.
>>
>> I do not know since it was not on my machine but most probably pharo 70
>
> If it is Pharo 6 then you can just follow the old smalllint strategy, but you may need to reset the cache.
>
>>
>>>
>>> One thing that can cause a rule not showing up is caching, and although it should be automatically invalidated upon the addition of a new rule, you can manually clear it by searching for “Renraku” in settings and pressing the “Reset rule cache” button.
>>
>> Ahhhhhh this is what we suspected.
>>
>>> You should not subclass RBTransformationRule, you should subclass ReNodeRewriteRule. In fact if you check, there are no subclasses of RBTransformationRule.
>>
>> This is strange because I remember that ifNotNilDo was a subclass.
>> But again is was on a machine with super small fonts :)
>>
>>>
>>> Now about documentation. I suspect that my IWST presentation and the Renraku paper (Thesis chapter) are not enough, but the problem is that nobody tried to create rules and give me a feedback about that so far. As you are adding new rules, I think that this is a nice opportunity to write some kind of a booklet, because rules are really powerful and we should share the knowledge of how to create them (and we should also simplify the creation process).
>>
>> Yes I would love to have a booklet on that. Do you want to join effort?
>
> Yes, but I need user experience. Because I already tried to document Renraku here and there but I don’t know what is not clear. Also I expect that Myroslava can join.
>
>>
>>
>>> Right now there is a “Renraku Quality Rules” help group in the main Pharo help browser that provides a brief description of how to create rules and run them. I think that this is a good starting point because I tried to put there the essential information needed to start with rule creation.
>>
>> Excellent we will read it.
>>
>>
>>> P.S. what would be nice is to generate booklets from Pharo help, because I does not make sense to have 2 sources of documentation.
>>
>> Yes we are working on Pillar and we will get there. Now a booklet for
>> three or four pages of description is not worth.
>> So may be the inverse is better. What we could do is to extend the
>> help to display the pillar booklet inside the image. But slowing....
>>
>>
>>> Cheers.
>>> Uko
>>>
>>>> On 27 Jan 2018, at 16:19, Stephane Ducasse <[hidden email]> wrote:
>>>>
>>>> Hi yuriy
>>>>
>>>> We defined a new rule subclass of RBTransformationRule and we did not
>>>> get why the rule
>>>> was not taken into account.
>>>>
>>>> We put an halt in another class such as ifNotNilDo: in
>>>>  - initialize (is there a cache)?
>>>>  - checkMethod:
>>>>
>>>> and it did not stop.
>>>> We started to
>>>>   to watch your ESUG videos
>>>>   to read your PhD
>>>>
>>>> but it did not help us.
>>>>
>>>> Stef
>>>>
>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: How to add a new rule?

Uko2
Cool, let me know how it goes!

Sent from my iPad

> On 29 Jan 2018, at 21:12, Stephane Ducasse <[hidden email]> wrote:
>
> Ok vincent told me that he succeeded and we can use its example.
> We can also ask benoit how he extended renaku.
> I will set up a booklet.
>
>
>
>> On Mon, Jan 29, 2018 at 1:42 PM, Yuriy Tymchuk <[hidden email]> wrote:
>>
>>
>> Sent from my iPad
>>
>>> On 28 Jan 2018, at 22:50, Stephane Ducasse <[hidden email]> wrote:
>>>
>>> Ok I will add your email next time.
>>>
>>>
>>>> On Sun, Jan 28, 2018 at 8:57 AM, Yuriy Tymchuk <[hidden email]> wrote:
>>>> Hi Stef.
>>>>
>>>> First of all, please include my email in the recipients list. I’m committed to maintain the Rule infrastructure, but I rarely manage to read through Pharo dev. I was nice that Myroslava told me about this email.
>>>
>>> Ok I will add your email next time.
>>>
>>>> Secondly I suppose that you are working on Pharo 7, because Pharo 6 mostly follows the old approach.
>>>
>>> I do not know since it was not on my machine but most probably pharo 70
>>
>> If it is Pharo 6 then you can just follow the old smalllint strategy, but you may need to reset the cache.
>>
>>>
>>>>
>>>> One thing that can cause a rule not showing up is caching, and although it should be automatically invalidated upon the addition of a new rule, you can manually clear it by searching for “Renraku” in settings and pressing the “Reset rule cache” button.
>>>
>>> Ahhhhhh this is what we suspected.
>>>
>>>> You should not subclass RBTransformationRule, you should subclass ReNodeRewriteRule. In fact if you check, there are no subclasses of RBTransformationRule.
>>>
>>> This is strange because I remember that ifNotNilDo was a subclass.
>>> But again is was on a machine with super small fonts :)
>>>
>>>>
>>>> Now about documentation. I suspect that my IWST presentation and the Renraku paper (Thesis chapter) are not enough, but the problem is that nobody tried to create rules and give me a feedback about that so far. As you are adding new rules, I think that this is a nice opportunity to write some kind of a booklet, because rules are really powerful and we should share the knowledge of how to create them (and we should also simplify the creation process).
>>>
>>> Yes I would love to have a booklet on that. Do you want to join effort?
>>
>> Yes, but I need user experience. Because I already tried to document Renraku here and there but I don’t know what is not clear. Also I expect that Myroslava can join.
>>
>>>
>>>
>>>> Right now there is a “Renraku Quality Rules” help group in the main Pharo help browser that provides a brief description of how to create rules and run them. I think that this is a good starting point because I tried to put there the essential information needed to start with rule creation.
>>>
>>> Excellent we will read it.
>>>
>>>
>>>> P.S. what would be nice is to generate booklets from Pharo help, because I does not make sense to have 2 sources of documentation.
>>>
>>> Yes we are working on Pillar and we will get there. Now a booklet for
>>> three or four pages of description is not worth.
>>> So may be the inverse is better. What we could do is to extend the
>>> help to display the pillar booklet inside the image. But slowing....
>>>
>>>
>>>> Cheers.
>>>> Uko
>>>>
>>>>> On 27 Jan 2018, at 16:19, Stephane Ducasse <[hidden email]> wrote:
>>>>>
>>>>> Hi yuriy
>>>>>
>>>>> We defined a new rule subclass of RBTransformationRule and we did not
>>>>> get why the rule
>>>>> was not taken into account.
>>>>>
>>>>> We put an halt in another class such as ifNotNilDo: in
>>>>> - initialize (is there a cache)?
>>>>> - checkMethod:
>>>>>
>>>>> and it did not stop.
>>>>> We started to
>>>>>  to watch your ESUG videos
>>>>>  to read your PhD
>>>>>
>>>>> but it did not help us.
>>>>>
>>>>> Stef
>>>>>
>>>>
>>>>
>>>
>>
>