fixing underscores in a trivial manner thanks to SmalllintChecker and Lukas!

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

fixing underscores in a trivial manner thanks to SmalllintChecker and Lukas!

Fernando olivero
Hi all, i just wanted to re post the fix underscore code Lukas posted a while ago.

I've just imported Connectors package into pharo, (i'm trying to get a minimal version working ), and stumbled upon the problem of the underscores..
but now thanks to SmallInt rules it was easy and fast to overcome this problem!

Thanks!!!!

Fernando


pd: From previous mail from lukas.


1. Load the code:

   Gofer new
       squeaksource: 'rb';
       package: 'AST-Core';
       package: 'Refactoring-Core';
       load.

2. Select the code (packages) you want to fix:

   environment := BrowserEnvironment new
       forPackageNames: #('Connectors-Base' 'Connectors-Lines and Curves').

3. Create the transformation rule:

   rule := RBUnderscoreAssignmentRule new.

4. Perform the search:

   SmalllintChecker runRule: rule onEnvironment: environment.

5. Perform the transformation:

   change := CompositeRefactoryChange new.
   change changes: rule changes.
   change execute
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: fixing underscores in a trivial manner thanks to SmalllintChecker and Lukas!

Stéphane Ducasse
http://book.pharo-project.org/book/TipsAndTricks/FixingUnderscores/

:)


On Apr 12, 2010, at 12:51 AM, Fernando olivero wrote:

> Hi all, i just wanted to re post the fix underscore code Lukas posted a while ago.
>
> I've just imported Connectors package into pharo, (i'm trying to get a minimal version working ), and stumbled upon the problem of the underscores..
> but now thanks to SmallInt rules it was easy and fast to overcome this problem!
>
> Thanks!!!!
>
> Fernando
>
>
> pd: From previous mail from lukas.
>
>
> 1. Load the code:
>
>   Gofer new
>       squeaksource: 'rb';
>       package: 'AST-Core';
>       package: 'Refactoring-Core';
>       load.
>
> 2. Select the code (packages) you want to fix:
>
>   environment := BrowserEnvironment new
>       forPackageNames: #('Connectors-Base' 'Connectors-Lines and Curves').
>
> 3. Create the transformation rule:
>
>   rule := RBUnderscoreAssignmentRule new.
>
> 4. Perform the search:
>
>   SmalllintChecker runRule: rule onEnvironment: environment.
>
> 5. Perform the transformation:
>
>   change := CompositeRefactoryChange new.
>   change changes: rule changes.
>   change execute
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: fixing underscores in a trivial manner thanks to SmalllintChecker and Lukas!

Lukas Renggli
It would be good to hardcode the version numbers and to tell that a
Pharo 1.0 image has to be used:

Gofer new
      squeaksource: 'rb';
      version: 'AST-Core-lr.67';
      version: 'Refactoring-Core-lr.122';
      load.

Pharo 1.1 won't be able to load underscore assignments anymore.

Lukas

On 12 April 2010 09:09, Stéphane Ducasse <[hidden email]> wrote:

> http://book.pharo-project.org/book/TipsAndTricks/FixingUnderscores/
>
> :)
>
>
> On Apr 12, 2010, at 12:51 AM, Fernando olivero wrote:
>
>> Hi all, i just wanted to re post the fix underscore code Lukas posted a while ago.
>>
>> I've just imported Connectors package into pharo, (i'm trying to get a minimal version working ), and stumbled upon the problem of the underscores..
>> but now thanks to SmallInt rules it was easy and fast to overcome this problem!
>>
>> Thanks!!!!
>>
>> Fernando
>>
>>
>> pd: From previous mail from lukas.
>>
>>
>> 1. Load the code:
>>
>>   Gofer new
>>       squeaksource: 'rb';
>>       package: 'AST-Core';
>>       package: 'Refactoring-Core';
>>       load.
>>
>> 2. Select the code (packages) you want to fix:
>>
>>   environment := BrowserEnvironment new
>>       forPackageNames: #('Connectors-Base' 'Connectors-Lines and Curves').
>>
>> 3. Create the transformation rule:
>>
>>   rule := RBUnderscoreAssignmentRule new.
>>
>> 4. Perform the search:
>>
>>   SmalllintChecker runRule: rule onEnvironment: environment.
>>
>> 5. Perform the transformation:
>>
>>   change := CompositeRefactoryChange new.
>>   change changes: rule changes.
>>   change execute
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: fixing underscores in a trivial manner thanks to SmalllintChecker and Lukas!

Stéphane Ducasse
done.

It is pier so everybody can edit it :)

Stef
On Apr 12, 2010, at 9:32 AM, Lukas Renggli wrote:

> Gofer new
>      squeaksource: 'rb';
>      version: 'AST-Core-lr.67';
>      version: 'Refactoring-Core-lr.122';
>      load.


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: fixing underscores in a trivial manner thanks to SmalllintChecker and Lukas!

Stéphane Ducasse
In reply to this post by Fernando olivero

On Apr 12, 2010, at 12:51 AM, Fernando olivero wrote:

> Hi all, i just wanted to re post the fix underscore code Lukas posted a while ago.
>
> I've just imported Connectors package into pharo, (i'm trying to get a minimal version working ),

excellent!
I'm interesting in a mini version of that ;)

> and stumbled upon the problem of the underscores..
> but now thanks to SmallInt rules it was easy and fast to overcome this problem!
>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Connectors minimal version into pharo

Fernando olivero
Great! Once i have something working i'll post the package in squeaksource.

I will try to remove the fsm dependency and try to avoid having so many extensions, and have a minimal functionality.
Connectors is a full blown system, i just need to draw simple constrained connection between morphs without the graph support.

Fernando


On Apr 12, 2010, at 2:00 PM, Stéphane Ducasse wrote:

>
> On Apr 12, 2010, at 12:51 AM, Fernando olivero wrote:
>
>> Hi all, i just wanted to re post the fix underscore code Lukas posted a while ago.
>>
>> I've just imported Connectors package into pharo, (i'm trying to get a minimal version working ),
>
> excellent!
> I'm interesting in a mini version of that ;)
>
>> and stumbled upon the problem of the underscores..
>> but now thanks to SmallInt rules it was easy and fast to overcome this problem!
>>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: fixing underscores in a trivial manner thanks to SmalllintChecker and Lukas!

Chris Muller-3
In reply to this post by Fernando olivero
Unfortunately, the valuable accounting information is wiped out by
this approach isn't it?

Yes, RB's Rewrite tool is great, but for this job, due deference
should be given to the original history and authorship, because our
politics of the "assignment syntax" is not meaningful to the original
software.

Just a friendly reminder that the FixUnderscores package is available
to do this with preservation..


On Sun, Apr 11, 2010 at 5:51 PM, Fernando olivero <[hidden email]> wrote:

> Hi all, i just wanted to re post the fix underscore code Lukas posted a while ago.
>
> I've just imported Connectors package into pharo, (i'm trying to get a minimal version working ), and stumbled upon the problem of the underscores..
> but now thanks to SmallInt rules it was easy and fast to overcome this problem!
>
> Thanks!!!!
>
> Fernando
>
>
> pd: From previous mail from lukas.
>
>
> 1. Load the code:
>
>   Gofer new
>       squeaksource: 'rb';
>       package: 'AST-Core';
>       package: 'Refactoring-Core';
>       load.
>
> 2. Select the code (packages) you want to fix:
>
>   environment := BrowserEnvironment new
>       forPackageNames: #('Connectors-Base' 'Connectors-Lines and Curves').
>
> 3. Create the transformation rule:
>
>   rule := RBUnderscoreAssignmentRule new.
>
> 4. Perform the search:
>
>   SmalllintChecker runRule: rule onEnvironment: environment.
>
> 5. Perform the transformation:
>
>   change := CompositeRefactoryChange new.
>   change changes: rule changes.
>   change execute
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: fixing underscores in a trivial manner thanks to SmalllintChecker and Lukas!

Lukas Renggli
> Unfortunately, the valuable accounting information is wiped out by
> this approach isn't it?

Sure, that's why we version code.

> Just a friendly reminder that the FixUnderscores package is available
> to do this with preservation..

It's broken, it only works 90%.

Lukas

--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: fixing underscores in a trivial manner thanks to SmalllintChecker and Lukas!

Chris Muller-3
> Sure, that's why we version code.

So I have to hunt around prior versions in the SCR just to discover
who *really* wrote some method and when?  Or, when debugging something
and suspecting a method indicating recently "changed", I dig around
the SCR, only to discover, "oh, actually Dan Ingalls' method really
didn't change since 1999 afterall, it was just the assignment operator
in 2010."  Invalid accounting info all over the image.  Sheesh, what a
shame..

>> Just a friendly reminder that the FixUnderscores package is available
>> to do this with preservation..
>
> It's broken, it only works 90%.

I've been using it for years with no problem.  What do you mean "broken?"

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Connectors minimal version into pharo

Carla F. Griggio
In reply to this post by Fernando olivero
Interesting! I was just about to try Connectors in Pharo too :P

I'd be happy to help if you need a hand.

On Mon, Apr 12, 2010 at 10:11 AM, Fernando olivero <[hidden email]> wrote:
Great! Once i have something working i'll post the package in squeaksource.

I will try to remove the fsm dependency and try to avoid having so many extensions, and have a minimal functionality.
Connectors is a full blown system, i just need to draw simple constrained connection between morphs without the graph support.

Fernando


On Apr 12, 2010, at 2:00 PM, Stéphane Ducasse wrote:

>
> On Apr 12, 2010, at 12:51 AM, Fernando olivero wrote:
>
>> Hi all, i just wanted to re post the fix underscore code Lukas posted a while ago.
>>
>> I've just imported Connectors package into pharo, (i'm trying to get a minimal version working ),
>
> excellent!
> I'm interesting in a mini version of that ;)
>
>> and stumbled upon the problem of the underscores..
>> but now thanks to SmallInt rules it was easy and fast to overcome this problem!
>>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project