About Box

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

Re: First impressions, was About Box

stepharo
Have a look at the chapter about command handler in Deep into Pharo
because you have all you need

You can script the loading and execution of expressions easily.

People like julien, damien at Pharodays started to resume a better DSL
for command descriptions.


Le 13/4/16 19:48, Alistair Grant a écrit :

> On Wed, Apr 13, 2016 at 05:55:22PM +0200, stepharo wrote:
>>> I'd be happy to, thanks.  Please let me know what I need to do to get
>>> involved (and remember that this is my hobby and I don't get as much
>>> time as I'd like, so my responses won't always be as fast as we'd like).
>> - start to see if you can write the scripts you want.
>> - identify missing functionality
>> - use OSSubprocess
> Sure...
>
> While the existing "st" handler has some uses, I think it will be a bit
> limited as I expect that most of the scripts I would write would end up
> being:
>
> 1. Load required packages
> 2. Maybe do some initialisation
> 3. Send (basically) a single message to start the real work
>
> Which means that I have to maintain a separate file that adds little
> value.
>
> As implied above, I'd like the "script" to be distributable as either
> one or two files and take advantage of:
>
> * OO design
> * Pharo's excellent development environment
> * SUnit
>
> I've hacked together a quick framework in which a "script" is actually a
> a Monticello package.  The package name is supplied on the command line
> along with some pre-defined options and anything else required by the
> script.  The package is loaded and a message sent to the class of the
> same name.  E.g.:
>
> pharo script.image cliscript WorkedHours Hours.xlsx
>
> would load ConfigurationOfWorkedHours, load the package, and
> send WorkedHours>>runWithHandler: theCliHandler.  (The example script
> then reads the Hours spreadsheet and calculates the total hours worked).
>
> Current help text...
>
>> ./pharo script.image cliscript --help
> CliScript enables running "Monticello" scripts.
>
> The script is identified by its package name.  CliScript looks for a
> configuration package with the same name in the local package cache,
> loads it, and sends the runWithHandler: message to the class with the
> same name.
>
> Command line parameters:
>
>    packageName  The package to load and execute.
>
> Command line options:
>
>    --debug  Halt at the start of the message
>    --log-transcript  Redirect transcript output to transcript.log
>
>
>
> I haven't had to use OSSubprocess yet, next steps include:
>
> * Read XSLX spreadsheets instead of having to export to CSV.
>    The script mostly does date and time calculations, I need to confirm
>    that they are working properly in Tabular.
> * Add logging (I haven't looked for any logging capability yet).
> * Ideally, implement the ODS support in the Tabular package (stretch
>    goal :-)).
>
>
> Thanks!
> Alistair
>
>


Reply | Threaded
Open this post in threaded view
|

Re: First impressions, was About Box

stepharo
In reply to this post by Damien Pollet-2


Le 14/4/16 01:52, Damien Pollet a écrit :
Heh. The last days I've had a look at Coral… my current goal is to remove the dependency to PetitParser from the argument parser, and to re-integrate that with the commandline handler system of the image. But that's only one part…

Yes it would be really nice.


On 14 April 2016 at 01:43, Ben Coman <[hidden email]> wrote:
On Wed, Apr 13, 2016 at 1:51 AM, Alistair Grant <[hidden email]> wrote:

> * I'm glad that being able to run headless mode is easy, as I'd like to
>   use Pharo for scripting.

I'm not sure of its status, but Coral was some experiments along this line...
https://www.youtube.com/watch?v=HLb_rMcNN6k

> * I'm still getting used to the idea of the entire ST environment being
>   in a single OS window, but at the moment I think I prefer VW's
>   approach where each ST window is a OS window, as it makes it easier to
>   work with other applications, e.g. if I want to look at an email or
>   web page while working within ST.

This will become more possible over time as some native window
management is being moved out of VM into the Image.

cheers -ben



Reply | Threaded
Open this post in threaded view
|

Re: First impressions, was About Box

alistairgrant
In reply to this post by stepharo
On Thu, Apr 14, 2016 at 08:37:39AM +0200, stepharo wrote:
> Have a look at the chapter about command handler in Deep into Pharo
> because you have all you need
>
> You can script the loading and execution of expressions easily.
>
> People like julien, damien at Pharodays started to resume a better DSL for
> command descriptions.

Thanks.  I had started reading Pharo by Example, but it looks like Deep
into Pharo is more up to date.

Thanks again,
Alistair

Reply | Threaded
Open this post in threaded view
|

Re: First impressions, was About Box

CyrilFerlicot


On Saturday, 16 April 2016, Alistair Grant <[hidden email]> wrote:

Thanks.  I had started reading Pharo by Example, but it looks like Deep
into Pharo is more up to date.


 
Thanks again,
Alistair


From my phone~~ 


--
Cheers
Cyril Ferlicot

Reply | Threaded
Open this post in threaded view
|

Re: First impressions, was About Box

alistairgrant
On Sat, Apr 16, 2016 at 01:43:29PM +0200, Cyril Ferlicot wrote:
> A new version of PBE is almost ready. You can find it at https://ci.inria.fr/
> pharo-contribution/view/Books/job/UpdatedPharoByExample/lastSuccessfulBuild/
> artifact/book-result/UpdatedPharoByExample.pdf .
> Other formats https://ci.inria.fr/pharo-contribution/view/Books/job/
> UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result

Are you looking for feedback?

Thanks,
Alistair


Reply | Threaded
Open this post in threaded view
|

Re: First impressions, was About Box

stepharo


Le 17/4/16 10:01, Alistair Grant a écrit :
> On Sat, Apr 16, 2016 at 01:43:29PM +0200, Cyril Ferlicot wrote:
>> A new version of PBE is almost ready. You can find it at https://ci.inria.fr/
>> pharo-contribution/view/Books/job/UpdatedPharoByExample/lastSuccessfulBuild/
>> artifact/book-result/UpdatedPharoByExample.pdf .
>> Other formats https://ci.inria.fr/pharo-contribution/view/Books/job/
>> UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result
> Are you looking for feedback?

Yes but mainly english typos because I do not have the energy to do more
and the book should get out.
By the end of the month.

Stef
>
> Thanks,
> Alistair
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: First impressions, was About Box

alistairgrant
On Sun, Apr 17, 2016 at 09:53:55PM +0200, stepharo wrote:

>
>
> Le 17/4/16 10:01, Alistair Grant a écrit :
> > On Sat, Apr 16, 2016 at 01:43:29PM +0200, Cyril Ferlicot wrote:
> > > A new version of PBE is almost ready. You can find it at https://ci.inria.fr/
> > > pharo-contribution/view/Books/job/UpdatedPharoByExample/lastSuccessfulBuild/
> > > artifact/book-result/UpdatedPharoByExample.pdf .
> > > Other formats https://ci.inria.fr/pharo-contribution/view/Books/job/
> > > UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result
> > Are you looking for feedback?
>
> Yes but mainly english typos because I do not have the energy to do more and
> the book should get out.
> By the end of the month.

OK, I'll look at this first (with limited time) and if I happen to see
anything will report back.

Thanks,
Alistair

12