Is there a way to store workspace 'gists' in Pharo?

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

Is there a way to store workspace 'gists' in Pharo?

Andy Burnett
From time to time I write a workspace script that I would like to keep. Obviously, I could save them to a file, but I was wondering if there was a way of saving them in the image, and browsing them in some friendly way?

Cheers
Andy
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to store workspace 'gists' in Pharo?

Tudor Girba-2
If you work with Pharo 4, they should already be saved in a play-cache folder.

Cheers,
Doru


On Mon, Nov 10, 2014 at 3:55 PM, Andy Burnett <[hidden email]> wrote:
From time to time I write a workspace script that I would like to keep. Obviously, I could save them to a file, but I was wondering if there was a way of saving them in the image, and browsing them in some friendly way?

Cheers
Andy



--

"Every thing has its own flow"
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to store workspace 'gists' in Pharo?

Peter Uhnak
There is also ScriptManager http://smalltalkhub.com/#!/~TorstenBergmann/ScriptManager
but I do not know if it works with GTPlaygrounds and it seems to have some issues with Morphic?

Peter

On Mon, Nov 10, 2014 at 3:56 PM, Tudor Girba <[hidden email]> wrote:
If you work with Pharo 4, they should already be saved in a play-cache folder.

Cheers,
Doru


On Mon, Nov 10, 2014 at 3:55 PM, Andy Burnett <[hidden email]> wrote:
From time to time I write a workspace script that I would like to keep. Obviously, I could save them to a file, but I was wondering if there was a way of saving them in the image, and browsing them in some friendly way?

Cheers
Andy



--

"Every thing has its own flow"

Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to store workspace 'gists' in Pharo?

Andy Burnett
In reply to this post by Andy Burnett
Doru said
<<<
If you work with Pharo 4, they should already be saved in a play-cache
folder.
>>

Great, I shall go and experiment.  

Cheers
Andy
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to store workspace 'gists' in Pharo?

stepharo
In reply to this post by Andy Burnett
Hi andy

I usually create a method and a class.
because script do not compose well.

Stef
From time to time I write a workspace script that I would like to keep. Obviously, I could save them to a file, but I was wondering if there was a way of saving them in the image, and browsing them in some friendly way?

Cheers
Andy

Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to store workspace 'gists' in Pharo?

Pierce Ng-3
On Tue, Nov 11, 2014 at 04:37:03PM +0100, stepharo wrote:
> I usually create a method and a class.
> because script do not compose well.

+1 although I don't practise this well. I use ScriptManager but when my images
proliferate it becomes messy to manage the scripts across images.

Pierce

Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to store workspace 'gists' in Pharo?

Andy Burnett
In reply to this post by Andy Burnett
Stef said:
<<
I usually create a method and a class.
because script do not compose well.
>>


Thanks, that sounds interesting. And, just for clarity, do you mean that you create a single class e.g. MyGists and then create methods for each of your useful snippets? Or, is there a benefit in creating a class per gist?

Cheers
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to store workspace 'gists' in Pharo?

stepharo
In fact I try to avoid utilities class by defining as few as possible but the mandatory/handy class side methods on the most relevant class.
My point is that if you script is useful then it can be an interesting method with some parameters and its "instantiation"  can be just a class side method
calling a method with the right parameters.

<<
I usually create a method and a class.
because script do not compose well.
>>


Thanks, that sounds interesting. And, just for clarity, do you mean that you create a single class e.g. MyGists and then create methods for each of your useful snippets? Or, is there a benefit in creating a class per gist?

Cheers