I have just created a couple of small playground scripts that do some useful data wrangling. The chances are that I will reuse them from time to time, but with tweaks. Does version 6 Have some way to store them? I think I am after a sort of scripts catalogue.
|
Have a look at Script Manager. ----------------- Benoît St-Jean Yahoo! Messenger: bstjean Twitter: @BenLeChialeux Pinterest: benoitstjean Instagram: Chef_Benito IRC: lamneth Blogue: endormitoire.wordpress.com "A standpoint is an intellectual horizon of radius zero". (A. Einstein) From: Andy Burnett <[hidden email]> To: "[hidden email]" <[hidden email]> Sent: Saturday, November 25, 2017 12:35 PM Subject: [Pharo-users] How do you store and manage small programs? I have just created a couple of small playground scripts that do some useful data wrangling. The chances are that I will reuse them from time to time, but with tweaks. Does version 6 Have some way to store them? I think I am after a sort of scripts catalogue.
|
In reply to this post by Andy Burnett
I use github and Package Browser, Package Browser is for intalling packages from inside image. For small code snippets I use Gist which supports Smalltalk syntax. For example On Sat, Nov 25, 2017 at 7:35 PM Andy Burnett <[hidden email]> wrote:
|
In reply to this post by Andy Burnett
Hi Andy,
On 25/11/17 12:34, Andy Burnett wrote: > I have just created a couple of small playground scripts that do some > useful data wrangling. The chances are that I will reuse them from > time to time, but with tweaks. Does version 6 Have some way to store > them? I think I am after a sort of scripts catalogue. You can try Grafoscopio[1]. It allows you to store, give context, document and organize your scripts as interactive notebooks, intertwining text + code and export them to PDF and HTML (via Pandoc). [1] http://mutabit.com/grafoscopio/index.en.html Cheers, Offray signature.asc (849 bytes) Download Attachment |
re Script Manager "We would recommend users to switch to QuickAccess which is a better script manager than this tool." QuickAccess here's a video and everything https://pharoweekly.wordpress.com/2015/11/06/quickaccess/ For QA I also have a startup script that installs it on first startup, and then reloads its state on every startup (so the scripts are shared between images) for "maybe-sometimes-useful-scripts" or when I just want to write a code memo for myself, I tend to use gist ( https://gist.github.com/peteruhnak ) Peter On Sat, Nov 25, 2017 at 6:51 PM, Offray Vladimir Luna Cárdenas <[hidden email]> wrote: Hi Andy, |
In reply to this post by Andy Burnett
On 26 November 2017 at 01:34, Andy Burnett <[hidden email]> wrote:
One way is to create a package and add your scripts on the class-side of a class MyDataWrangling. Then save the package with Monticello. cheers -ben |
In reply to this post by Andy Burnett
Hi Andy
As you saw there are plenty of solutions. Now what I learned is that it is often better in the long to have a little object because suddenly it opens your mind and you realise that you can teach him something more. So I often find myself realising that I created some class methods and that it was stupid better have a real little object because it can do more and in particular for open new path So now I do not use scripts but plain little classes with nice little printOn: methods and arguments to get customized. Stef On Sat, Nov 25, 2017 at 6:34 PM, Andy Burnett <[hidden email]> wrote: > I have just created a couple of small playground scripts that do some useful > data wrangling. The chances are that I will reuse them from time to time, > but with tweaks. Does version 6 Have some way to store them? I think I am > after a sort of scripts catalogue. |
In reply to this post by Andy Burnett
Andy,
I use the filesystem for it. Let‘s say you have a directory called „scripts“. If you inspect ‘scripts‘ asFileReference you get kind of a browser of the files in there. If the have the file extension .st syntax highlighting is enabled if you look at it. You can create new scripts there,too. I like that the most because the scripts are not in the image anymore and the probability to loose them is lower. I have a scripts folder in my home directory (global) and one in the project folder (project specific). And inspectors to bith location are opened by the script that prepares a new image. Norbert > Am 25.11.2017 um 18:34 schrieb Andy Burnett <[hidden email]>: > > I have just created a couple of small playground scripts that do some useful data wrangling. The chances are that I will reuse them from time to time, but with tweaks. Does version 6 Have some way to store them? I think I am after a sort of scripts catalogue. |
On 26 November 2017 at 20:36, Norbert Hartl <[hidden email]> wrote: Andy, nice trick cheers -ben
|
In reply to this post by Stephane Ducasse-3
On 26 November 2017 at 13:07, Stephane Ducasse <[hidden email]> wrote:
> Hi Andy > > As you saw there are plenty of solutions. > > Now what I learned is that it is often better in the long to have a > little object because suddenly > it opens your mind and you realise that you can teach him something more. > > So I often find myself realising that I created some class methods and > that it was stupid > better have a real little object because it can do more and in > particular for open new path > > So now I do not use scripts but plain little classes with nice little > printOn: methods and arguments > to get customized. +1 And if you create a class method to do the most common operation(s), you can add the "<script>" pragma and a button appears in the browser to run the operation. Cheers, Alistair |
QuickAccess is also a great option. On Mon, Nov 27, 2017 at 11:16 AM, Alistair Grant <[hidden email]> wrote: On 26 November 2017 at 13:07, Stephane Ducasse <[hidden email]> wrote: |
In reply to this post by alistairgrant
On 27 November 2017 at 11:16, Alistair Grant <[hidden email]> wrote:
> On 26 November 2017 at 13:07, Stephane Ducasse <[hidden email]> wrote: >> Hi Andy >> >> As you saw there are plenty of solutions. >> >> Now what I learned is that it is often better in the long to have a >> little object because suddenly >> it opens your mind and you realise that you can teach him something more. >> >> So I often find myself realising that I created some class methods and >> that it was stupid >> better have a real little object because it can do more and in >> particular for open new path >> >> So now I do not use scripts but plain little classes with nice little >> printOn: methods and arguments >> to get customized. > > +1 > > And if you create a class method to do the most common operation(s), > you can add the "<script>" pragma and a button appears in the browser > to run the operation. Often better than a printOn: is to create a #gtInspectIn: method, allowing you to display tables, graphs, etc. as appropriate in the inspector. Actually, this has worked so well that I haven't written a "real UI" for anything I use in my personal environment, which includes downloading media, all my note keeping, tracking finances, etc. Cheers, Alistair |
In reply to this post by philippeback
Wow - I never noticed that extension - that’s amazing.
|
On Mon, Nov 27, 2017 at 1:06 PM, Tim Mackinnon <[hidden email]> wrote:
|
In reply to this post by Stephane Ducasse-3
Yes. Plenty of solutions, from just open your Playground in a scripts
folder, to QuickAccess, to objects, to embedding scripts into more complete data narratives. They serve different purposes, so explore them and see which ones serves better your taste and user case. Cheers, Offray On 26/11/17 07:07, Stephane Ducasse wrote: > Hi Andy > > As you saw there are plenty of solutions. > > Now what I learned is that it is often better in the long to have a > little object because suddenly > it opens your mind and you realise that you can teach him something more. > > So I often find myself realising that I created some class methods and > that it was stupid > better have a real little object because it can do more and in > particular for open new path > > So now I do not use scripts but plain little classes with nice little > printOn: methods and arguments > to get customized. > > Stef > > On Sat, Nov 25, 2017 at 6:34 PM, Andy Burnett > <[hidden email]> wrote: >> I have just created a couple of small playground scripts that do some useful >> data wrangling. The chances are that I will reuse them from time to time, >> but with tweaks. Does version 6 Have some way to store them? I think I am >> after a sort of scripts catalogue. > |
In reply to this post by philippeback
Super cool tshirt!
Stef On Mon, Nov 27, 2017 at 1:18 PM, [hidden email] <[hidden email]> wrote: > It is useful for presentations. > > https://www.youtube.com/watch?v=JhmmoEtAq20&t=269s > > Phil > > On Mon, Nov 27, 2017 at 1:06 PM, Tim Mackinnon <[hidden email]> wrote: >> >> Wow - I never noticed that extension - that’s amazing. >> >> On 27 Nov 2017, at 10:56, [hidden email] wrote: >> >> QuickAccess is also a great option. >> >> https://pharoweekly.wordpress.com/2015/11/06/quickaccess/ >> >> On Mon, Nov 27, 2017 at 11:16 AM, Alistair Grant <[hidden email]> >> wrote: >>> >>> On 26 November 2017 at 13:07, Stephane Ducasse <[hidden email]> >>> wrote: >>> > Hi Andy >>> > >>> > As you saw there are plenty of solutions. >>> > >>> > Now what I learned is that it is often better in the long to have a >>> > little object because suddenly >>> > it opens your mind and you realise that you can teach him something >>> > more. >>> > >>> > So I often find myself realising that I created some class methods and >>> > that it was stupid >>> > better have a real little object because it can do more and in >>> > particular for open new path >>> > >>> > So now I do not use scripts but plain little classes with nice little >>> > printOn: methods and arguments >>> > to get customized. >>> >>> +1 >>> >>> And if you create a class method to do the most common operation(s), >>> you can add the "<script>" pragma and a button appears in the browser >>> to run the operation. >>> >>> Cheers, >>> Alistair >>> >>> >> >> > |
Administrator
|
Stephane Ducasse-3 wrote
> Super cool tshirt! Ha ha ha +1!! ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Cheers,
Sean |
In reply to this post by Andy Burnett
Wow! What a great collection of answers. Thanks everyone, I learned a lot from that relatively simple question. I have installed QuickAccess - that's very cool. And, I have also tried the <script> pragma. Having the button is very nice. I will also try out Grafoscope. I have been playing with Mathematica Notebooks, and I think something similar within Pharo would be wonderful. Cheers Andy Yes. Plenty of solutions, from just open your Playground in a scripts folder, to QuickAccess, to objects, to embedding scripts into more complete data narratives. They serve different purposes, so explore them and see which ones serves better your taste and user case. Cheers, Offray On 26/11/17 07:07, Stephane Ducasse wrote: > Hi Andy > > As you saw there are plenty of solutions. > > Now what I learned is that it is often better in the long to have a > little object because suddenly > it opens your mind and you realise that you can teach him something more. > > So I often find myself realising that I created some class methods and > that it was stupid > better have a real little object because it can do more and in > particular for open new path > > So now I do not use scripts but plain little classes with nice little > printOn: methods and arguments > to get customized. > > Stef > > On Sat, Nov 25, 2017 at 6:34 PM, Andy Burnett > <[hidden email]> wrote: >> I have just created a couple of small playground scripts that do some useful >> data wrangling. The chances are that I will reuse them from time to time, >> but with tweaks. Does version 6 Have some way to store them? I think I am >> after a sort of scripts catalogue. > |
Hi Andy, I don't want to sound presumptuous, but I think that we can do
even better that Mathematica notebooks with the Pharo ecosystem.
Grafoscopio, for example, is just starting (yes, its first commit
was 3 years ago, but the development has been pretty sparse at the
beginning and it was my first Pharo/Smalltalk "app") and we can do
stuff that is difficult (or impossible) to do in platforms like
Jupyter or Mathematica. For example, we adapted Grafoscopio for
making the open sourced the Data Driven Journalism Handbook
(DDJH), Spanish version[1], and we have a single self contained
~600Kb file that is able to produce a 13 Mb pdf of 300+ pages
document with beautiful layout and design[2]. The self referential
properties of the Pharo environment give us a pretty flexible DOM,
and as you can see (in the screenshot below), all the commands to
produce the Grafoscopio Manual or the DDJH are *inside* the
notebook, so the way you tweak Pandoc to produce a particular PDF
is expressed in plain Smalltalk, without relying on any external
JSON or any other external format config files. And this is just
the beginning if you consider reproducible research, because the
image metaphor is an excellent way to preserve all computation
state of any research output, including data and code, as told in
the Panama Papers post on Data continuum environments[2a] and how
we can package that in "pocket infrastructures". See, for example,
my 10 years old research simulation and dynamic presentation,
opening without any problem, a moth ago[3], using Etoys. [2] http://mutabit.com/repos.fossil/mapeda/uv/mapeda.pdf [2a] http://mutabit.com/offray/blog/en/entry/panama-papers-1 [3] https://twitter.com/offrayLC/status/927313455543091200 So, if this is just what a (no son long) newbie can do while he is also doing the PhD research and writing, without any funding from academia, government or private sector, mostly in a hackerspace of the "Global South", just imagine what we can do, for interactive notebooks and reproducible research, with bigger community engagement and funding. Despite of the Pharo alternative being "under the radar", interactive notebooks, reproducible research and long lasting digital artifacts, virtual research environments are a hot topic today and in the upcoming future[4][5][6] and with things like the ones showed and the one upcoming (GT Documenter, Pharo 7, Iceberg Git/Fossil integration), we can have a privileged position in that developing ecosystem. [4] https://khinsen.wordpress.com/2015/09/ [5] http://opendreamkit.org/ [6] http://blogs.sub.uni-hamburg.de/ifla-newsmedia/wp-content/uploads/2016/04/Boss-Broussard-Challenges-Facing-the-Preservation-of-Born-digital-News-Applications.pdf Pharo/Smalltalk can take us further that any current platform and now is a empowering medium for prototyping such visions. Cheers, Offray On 27/11/17 19:10, Andy Burnett wrote:
|
In reply to this post by NorbertHartl
Hi Norbert,
I tried this in a 6.1 image but I only get a normal inspector. What do I miss? Bernhard > Am 26.11.2017 um 13:36 schrieb Norbert Hartl <[hidden email]>: > > Andy, > > I use the filesystem for it. Let‘s say you have a directory called „scripts“. If you inspect > > ‘scripts‘ asFileReference > > you get kind of a browser of the files in there. If the have the file extension .st syntax highlighting is enabled if you look at it. You can create new scripts there,too. > I like that the most because the scripts are not in the image anymore and the probability to loose them is lower. > > I have a scripts folder in my home directory (global) and one in the project folder (project specific). And inspectors to bith location are opened by the script that prepares a new image. > > Norbert > >> Am 25.11.2017 um 18:34 schrieb Andy Burnett <[hidden email]>: >> >> I have just created a couple of small playground scripts that do some useful data wrangling. The chances are that I will reuse them from time to time, but with tweaks. Does version 6 Have some way to store them? I think I am after a sort of scripts catalogue. |
Free forum by Nabble | Edit this page |