Little challenge for you

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

Little challenge for you

Stéphane Ducasse
Hi guys

I would love to be able to get the gofer expression automatically from the ui.
I click on a package and I ask load me expression and pouf I got a gofer expressions :)

Anybody wants to improve our tools?

Stef
Reply | Threaded
Open this post in threaded view
|

Re: Little challenge for you

Schwab,Wilhelm K
Stef,

This reminds me of a Dolphin feature called IDE extensions.  Presenters trigger an event (IIRC off of their class) when the open, and menus and commands trigger events when they are about to do something interesting.  One can then easily add to an opening menu to add commands to it.

As a silly but relaxing example, I had an extension that played a random sound clip when a debugger opens.  It was easy with extensions, because I simply watched Debugger class for #open:aDebugger or whatever it is called, and then play the clip.  I have library of short/satirical clips that can add humor to debugging sessions.  More pragmatically, I had tools to help with creating acessors, compound instance creation methods, etc.  It can be a very powerful feature, and all it takes is trigging some events to enable it.

Dolphin makes the (IMHO **HUGE**) mistake of enabling extensions as they load.  For the sake of building a new image from packages, the extensions should load and then be explicitly activated once a stable new image exists and has received a backup copy in case changes to the new system cause havoc with the operation of the extension.

As was quoted recently, "if your ideas are any good, you will have the cram them down people's throats." :)

Bill

________________________________________
From: [hidden email] [[hidden email]] on behalf of Stéphane Ducasse [[hidden email]]
Sent: Friday, March 23, 2012 6:09 AM
To: [hidden email] Development
Subject: [Pharo-project] Little challenge for you

Hi guys

I would love to be able to get the gofer expression automatically from the ui.
I click on a package and I ask load me expression and pouf I got a gofer expressions :)

Anybody wants to improve our tools?

Stef

Reply | Threaded
Open this post in threaded view
|

Re: Little challenge for you

Guillermo Polito
Stef,

This is polluted and ugly

category := 'Kernel'.

stream := String new writeStream.
MCWorkingCopy managersForCategory: category do: [ :wc |
    stream nextPutAll: 'Gofer it';cr.
    stream tab; nextPutAll: ('package: {1};'  format: { wc packageName });cr.
    wc repositoryGroup disableCache.
    wc repositoryGroup repositories
        select:   [ :repo | repo isKindOf: MCHttpRepository ]
        thenDo: [ :repo | stream tab; nextPutAll: ('repository: {1};'  format: { repo locationWithTrailingSlash });cr. ].
    wc repositoryGroup useCache.
    stream tab; nextPutAll: 'load.'.
].
stream contents.


And has the problem that if you have several repos for one category... the script has no sense :).
Guille

On Fri, Mar 23, 2012 at 11:37 AM, Schwab,Wilhelm K <[hidden email]> wrote:
Stef,

This reminds me of a Dolphin feature called IDE extensions.  Presenters trigger an event (IIRC off of their class) when the open, and menus and commands trigger events when they are about to do something interesting.  One can then easily add to an opening menu to add commands to it.

As a silly but relaxing example, I had an extension that played a random sound clip when a debugger opens.  It was easy with extensions, because I simply watched Debugger class for #open:aDebugger or whatever it is called, and then play the clip.  I have library of short/satirical clips that can add humor to debugging sessions.  More pragmatically, I had tools to help with creating acessors, compound instance creation methods, etc.  It can be a very powerful feature, and all it takes is trigging some events to enable it.

Dolphin makes the (IMHO **HUGE**) mistake of enabling extensions as they load.  For the sake of building a new image from packages, the extensions should load and then be explicitly activated once a stable new image exists and has received a backup copy in case changes to the new system cause havoc with the operation of the extension.

As was quoted recently, "if your ideas are any good, you will have the cram them down people's throats." :)

Bill

________________________________________
From: [hidden email] [[hidden email]] on behalf of Stéphane Ducasse [[hidden email]]
Sent: Friday, March 23, 2012 6:09 AM
To: [hidden email] Development
Subject: [Pharo-project] Little challenge for you

Hi guys

I would love to be able to get the gofer expression automatically from the ui.
I click on a package and I ask load me expression and pouf I got a gofer expressions :)

Anybody wants to improve our tools?

Stef


Reply | Threaded
Open this post in threaded view
|

Re: Little challenge for you

Stéphane Ducasse

On Apr 2, 2012, at 9:55 PM, Guillermo Polito wrote:

> Stef,
>
> This is polluted and ugly

:)

Probably each working copy should be able to propose it :)

> category := 'Kernel'.
>
> stream := String new writeStream.
> MCWorkingCopy managersForCategory: category do: [ :wc |
>     stream nextPutAll: 'Gofer it';cr.
>     stream tab; nextPutAll: ('package: {1};'  format: { wc packageName });cr.
>     wc repositoryGroup disableCache.
>     wc repositoryGroup repositories
>         select:   [ :repo | repo isKindOf: MCHttpRepository ]
>         thenDo: [ :repo | stream tab; nextPutAll: ('repository: {1};'  format: { repo locationWithTrailingSlash });cr. ].
>     wc repositoryGroup useCache.
>     stream tab; nextPutAll: 'load.'.
> ].
> stream contents.
>
>
> And has the problem that if you have several repos for one category... the script has no sense :).
> Guille
>
> On Fri, Mar 23, 2012 at 11:37 AM, Schwab,Wilhelm K <[hidden email]> wrote:
> Stef,
>
> This reminds me of a Dolphin feature called IDE extensions.  Presenters trigger an event (IIRC off of their class) when the open, and menus and commands trigger events when they are about to do something interesting.  One can then easily add to an opening menu to add commands to it.
>
> As a silly but relaxing example, I had an extension that played a random sound clip when a debugger opens.  It was easy with extensions, because I simply watched Debugger class for #open:aDebugger or whatever it is called, and then play the clip.  I have library of short/satirical clips that can add humor to debugging sessions.  More pragmatically, I had tools to help with creating acessors, compound instance creation methods, etc.  It can be a very powerful feature, and all it takes is trigging some events to enable it.
>
> Dolphin makes the (IMHO **HUGE**) mistake of enabling extensions as they load.  For the sake of building a new image from packages, the extensions should load and then be explicitly activated once a stable new image exists and has received a backup copy in case changes to the new system cause havoc with the operation of the extension.
>
> As was quoted recently, "if your ideas are any good, you will have the cram them down people's throats." :)
>
> Bill
>
> ________________________________________
> From: [hidden email] [[hidden email]] on behalf of Stéphane Ducasse [[hidden email]]
> Sent: Friday, March 23, 2012 6:09 AM
> To: [hidden email] Development
> Subject: [Pharo-project] Little challenge for you
>
> Hi guys
>
> I would love to be able to get the gofer expression automatically from the ui.
> I click on a package and I ask load me expression and pouf I got a gofer expressions :)
>
> Anybody wants to improve our tools?
>
> Stef
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Little challenge for you

Guillermo Polito
Hehe, yes.  I only managed to see how to build the script, :P.

On Mon, Apr 2, 2012 at 10:13 PM, Stéphane Ducasse <[hidden email]> wrote:

On Apr 2, 2012, at 9:55 PM, Guillermo Polito wrote:

> Stef,
>
> This is polluted and ugly

:)

Probably each working copy should be able to propose it :)

> category := 'Kernel'.
>
> stream := String new writeStream.
> MCWorkingCopy managersForCategory: category do: [ :wc |
>     stream nextPutAll: 'Gofer it';cr.
>     stream tab; nextPutAll: ('package: {1};'  format: { wc packageName });cr.
>     wc repositoryGroup disableCache.
>     wc repositoryGroup repositories
>         select:   [ :repo | repo isKindOf: MCHttpRepository ]
>         thenDo: [ :repo | stream tab; nextPutAll: ('repository: {1};'  format: { repo locationWithTrailingSlash });cr. ].
>     wc repositoryGroup useCache.
>     stream tab; nextPutAll: 'load.'.
> ].
> stream contents.
>
>
> And has the problem that if you have several repos for one category... the script has no sense :).
> Guille
>
> On Fri, Mar 23, 2012 at 11:37 AM, Schwab,Wilhelm K <[hidden email]> wrote:
> Stef,
>
> This reminds me of a Dolphin feature called IDE extensions.  Presenters trigger an event (IIRC off of their class) when the open, and menus and commands trigger events when they are about to do something interesting.  One can then easily add to an opening menu to add commands to it.
>
> As a silly but relaxing example, I had an extension that played a random sound clip when a debugger opens.  It was easy with extensions, because I simply watched Debugger class for #open:aDebugger or whatever it is called, and then play the clip.  I have library of short/satirical clips that can add humor to debugging sessions.  More pragmatically, I had tools to help with creating acessors, compound instance creation methods, etc.  It can be a very powerful feature, and all it takes is trigging some events to enable it.
>
> Dolphin makes the (IMHO **HUGE**) mistake of enabling extensions as they load.  For the sake of building a new image from packages, the extensions should load and then be explicitly activated once a stable new image exists and has received a backup copy in case changes to the new system cause havoc with the operation of the extension.
>
> As was quoted recently, "if your ideas are any good, you will have the cram them down people's throats." :)
>
> Bill
>
> ________________________________________
> From: [hidden email] [[hidden email]] on behalf of Stéphane Ducasse [[hidden email]]
> Sent: Friday, March 23, 2012 6:09 AM
> To: [hidden email] Development
> Subject: [Pharo-project] Little challenge for you
>
> Hi guys
>
> I would love to be able to get the gofer expression automatically from the ui.
> I click on a package and I ask load me expression and pouf I got a gofer expressions :)
>
> Anybody wants to improve our tools?
>
> Stef
>
>