Scripting with Pharo?

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

Scripting with Pharo?

Andrei Stebakov
Is it possible to start Pharo headless and execute some command (say to get some info from a web page)?

_______________________________________________
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: Scripting with Pharo?

Gaboto
What about coral?
http://scg.unibe.ch/wiki/projects/bachelorsprojects/coral

2010/5/12 Andrei Stebakov <[hidden email]>
Is it possible to start Pharo headless and execute some command (say to get some info from a web page)?

_______________________________________________
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: Scripting with Pharo?

Stéphane Ducasse
unfortunately I did not find the time to continue working on it but I would love to.

On May 12, 2010, at 9:50 PM, Gabriel Brunstein wrote:

> What about coral?
> http://scg.unibe.ch/wiki/projects/bachelorsprojects/coral
>
> 2010/5/12 Andrei Stebakov <[hidden email]>
> Is it possible to start Pharo headless and execute some command (say to get some info from a web page)?
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Scripting with Pharo?

Andrei Stebakov
I think that scripting support is essential for any interpreted language and if Pharo had it, its community would grow much faster.
Let's say, I learned now how to use HTML parsing in the GUI version of Pharo.
I went ahead and created my own class (or set of classes) in the image which can say retrieve a dollar rate from some bank web page.
Now I should be able to run Pharo in a "batch mode" saying something like... "./pharo -batch "DollarRateInfo :getAndSendEmail '[hidden email]".
This way I could schedule this command using cron to send me this dollar rate via email every day at 2 pm. Having this functionality I could really spend more time using Pharo for different needs and get better at using it.

I don't think it should be too hard to implement (please correct me if I am wrong). In the batch mode pharo would start in a "headless mode", read some input from a standard input (or from command line), execute it in a 'hidden' Workspace and send the output of the evaluation to the standard output.

Thank you,
Andrei


On Wed, May 12, 2010 at 4:15 PM, Stéphane Ducasse <[hidden email]> wrote:
unfortunately I did not find the time to continue working on it but I would love to.

On May 12, 2010, at 9:50 PM, Gabriel Brunstein wrote:

> What about coral?
> http://scg.unibe.ch/wiki/projects/bachelorsprojects/coral
>
> 2010/5/12 Andrei Stebakov <[hidden email]>
> Is it possible to start Pharo headless and execute some command (say to get some info from a web page)?
>
> _______________________________________________
> 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


_______________________________________________
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: Scripting with Pharo?

Igor Stasenko
its a bit heawyweight to use VM as command-line tool.
you could, intead run pharo in persistent mode,
and schedule the same piece of code to run periodically as background
process in it.

2010/5/12 Andrei Stebakov <[hidden email]>:

> I think that scripting support is essential for any interpreted language and
> if Pharo had it, its community would grow much faster.
> Let's say, I learned now how to use HTML parsing in the GUI version of
> Pharo.
> I went ahead and created my own class (or set of classes) in the image which
> can say retrieve a dollar rate from some bank web page.
> Now I should be able to run Pharo in a "batch mode" saying something like...
> "./pharo -batch "DollarRateInfo :getAndSendEmail '[hidden email]".
> This way I could schedule this command using cron to send me this dollar
> rate via email every day at 2 pm. Having this functionality I could really
> spend more time using Pharo for different needs and get better at using it.
>
> I don't think it should be too hard to implement (please correct me if I am
> wrong). In the batch mode pharo would start in a "headless mode", read some
> input from a standard input (or from command line), execute it in a 'hidden'
> Workspace and send the output of the evaluation to the standard output.
>
> Thank you,
> Andrei
>
>
> On Wed, May 12, 2010 at 4:15 PM, Stéphane Ducasse
> <[hidden email]> wrote:
>>
>> unfortunately I did not find the time to continue working on it but I
>> would love to.
>>
>> On May 12, 2010, at 9:50 PM, Gabriel Brunstein wrote:
>>
>> > What about coral?
>> > http://scg.unibe.ch/wiki/projects/bachelorsprojects/coral
>> >
>> > 2010/5/12 Andrei Stebakov <[hidden email]>
>> > Is it possible to start Pharo headless and execute some command (say to
>> > get some info from a web page)?
>> >
>> > _______________________________________________
>> > 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
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
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: Scripting with Pharo?

Andrei Stebakov
In reply to this post by Gaboto
Thank you, I'll give it a try. See, maybe my philosophy is wrong, but I'd rather get better at one tool (where it's possible) than learn multiple different tools to do similar tasks.
I think Pharo has a potential to be if not a Swiss army knife like Python, but a very useful language for any programming tasks (scripting is one of them).
So far, as a newbie, I like what I see in Pharo and having a blast learning it. I am so thrilled, that just a thought that it could do scripting sends shivers down my spine :)

2010/5/12 Gabriel Brunstein <[hidden email]>
What about coral?
http://scg.unibe.ch/wiki/projects/bachelorsprojects/coral

2010/5/12 Andrei Stebakov <[hidden email]>
Is it possible to start Pharo headless and execute some command (say to get some info from a web page)?

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Scripting with Pharo?

Andrei Stebakov
In reply to this post by Igor Stasenko
Could you please give me an example of that usage?

On Wed, May 12, 2010 at 4:48 PM, Igor Stasenko <[hidden email]> wrote:
its a bit heawyweight to use VM as command-line tool.
you could, intead run pharo in persistent mode,
and schedule the same piece of code to run periodically as background
process in it.

2010/5/12 Andrei Stebakov <[hidden email]>:
> I think that scripting support is essential for any interpreted language and
> if Pharo had it, its community would grow much faster.
> Let's say, I learned now how to use HTML parsing in the GUI version of
> Pharo.
> I went ahead and created my own class (or set of classes) in the image which
> can say retrieve a dollar rate from some bank web page.
> Now I should be able to run Pharo in a "batch mode" saying something like...
> "./pharo -batch "DollarRateInfo :getAndSendEmail '[hidden email]".
> This way I could schedule this command using cron to send me this dollar
> rate via email every day at 2 pm. Having this functionality I could really
> spend more time using Pharo for different needs and get better at using it.
>
> I don't think it should be too hard to implement (please correct me if I am
> wrong). In the batch mode pharo would start in a "headless mode", read some
> input from a standard input (or from command line), execute it in a 'hidden'
> Workspace and send the output of the evaluation to the standard output.
>
> Thank you,
> Andrei
>
>
> On Wed, May 12, 2010 at 4:15 PM, Stéphane Ducasse
> <[hidden email]> wrote:
>>
>> unfortunately I did not find the time to continue working on it but I
>> would love to.
>>
>> On May 12, 2010, at 9:50 PM, Gabriel Brunstein wrote:
>>
>> > What about coral?
>> > http://scg.unibe.ch/wiki/projects/bachelorsprojects/coral
>> >
>> > 2010/5/12 Andrei Stebakov <[hidden email]>
>> > Is it possible to start Pharo headless and execute some command (say to
>> > get some info from a web page)?
>> >
>> > _______________________________________________
>> > 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
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
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: Scripting with Pharo?

Gaboto
In reply to this post by Andrei Stebakov
As I read there, Coral IS A PACKAGE FOR PHARO! so you would not be using another tool.
I don't know which is the state of Coral, if it works or not (based on the previous mail of Stephane)

2010/5/12 Andrei Stebakov <[hidden email]>
Thank you, I'll give it a try. See, maybe my philosophy is wrong, but I'd rather get better at one tool (where it's possible) than learn multiple different tools to do similar tasks.
I think Pharo has a potential to be if not a Swiss army knife like Python, but a very useful language for any programming tasks (scripting is one of them).
So far, as a newbie, I like what I see in Pharo and having a blast learning it. I am so thrilled, that just a thought that it could do scripting sends shivers down my spine :)

2010/5/12 Gabriel Brunstein <[hidden email]>

What about coral?
http://scg.unibe.ch/wiki/projects/bachelorsprojects/coral

2010/5/12 Andrei Stebakov <[hidden email]>
Is it possible to start Pharo headless and execute some command (say to get some info from a web page)?

_______________________________________________
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


_______________________________________________
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: Scripting with Pharo?

Andrei Stebakov
In reply to this post by Gaboto
Was trying to install Coral with "ScriptLoader new installer ss project: 'Coral'; install: 'LoadCoral'.df" command.

Gave me a MessageNotUnderstood along the process:

MessageNotUnderstood: Installer class>>squeaksource
Installer class(Object)>>doesNotUnderstand: #squeaksource
[] in Installer class>>doesNotUnderstand: #squeaksource
IdentityDictionary(Dictionary)>>at:ifAbsent:
Installer class>>doesNotUnderstand: #squeaksource
Installer class>>ss
UndefinedObject>>DoIt
Compiler>>evaluate:in:to:notifying:ifFail:logged:
[] in TextMorphForShoutEditor(ParagraphEditor)>>evaluateSelection
BlockClosure>>on:do:
TextMorphForShoutEditor(ParagraphEditor)>>evaluateSelection
TextMorphForShoutEditor(ParagraphEditor)>>doIt
[] in TextMorphForShoutEditor(ParagraphEditor)>>doIt:
TextMorphForShoutEditor(ParagraphEditor)>>terminateAndInitializeAround:
TextMorphForShoutEditor(ParagraphEditor)>>doIt:
TextMorphForShoutEditor(ParagraphEditor)>>dispatchOnKeyEvent:with:
TextMorphForShoutEditor(TextMorphEditor)>>dispatchOnKeyEvent:with:
TextMorphForShoutEditor(ParagraphEditor)>>keystroke:
TextMorphForShoutEditor(TextMorphEditor)>>keystroke:
[] in [] in TextMorphForShout(TextMorph)>>keyStroke:
TextMorphForShout(TextMorph)>>handleInteraction:

Installer class(Object)>>doesNotUnderstand: #squeaksource
[] in Installer class>>doesNotUnderstand: #squeaksource
IdentityDictionary(Dictionary)>>at:ifAbsent:
Installer class>>doesNotUnderstand: #squeaksource
Installer class>>ss
UndefinedObject>>DoIt
Compiler>>evaluate:in:to:notifying:ifFail:logged:
[] in TextMorphForShoutEditor(ParagraphEditor)>>evaluateSelection
BlockClosure>>on:do:
TextMorphForShoutEditor(ParagraphEditor)>>evaluateSelection
TextMorphForShoutEditor(ParagraphEditor)>>doIt
[] in TextMorphForShoutEditor(ParagraphEditor)>>doIt:
TextMorphForShoutEditor(ParagraphEditor)>>terminateAndInitializeAround:
TextMorphForShoutEditor(ParagraphEditor)>>doIt:
TextMorphForShoutEditor(ParagraphEditor)>>dispatchOnKeyEvent:with:
TextMorphForShoutEditor(TextMorphEditor)>>dispatchOnKeyEvent:with:
TextMorphForShoutEditor(ParagraphEditor)>>keystroke:
TextMorphForShoutEditor(TextMorphEditor)>>keystroke:
[] in [] in TextMorphForShout(TextMorph)>>keyStroke:
TextMorphForShout(TextMorph)>>handleInteraction:
doesNotUnderstand: aMessage

Oh well, probably some dependencies are missing...


2010/5/12 Gabriel Brunstein <[hidden email]>
What about coral?
http://scg.unibe.ch/wiki/projects/bachelorsprojects/coral

2010/5/12 Andrei Stebakov <[hidden email]>
Is it possible to start Pharo headless and execute some command (say to get some info from a web page)?

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Scripting with Pharo?

Andrei Stebakov
In reply to this post by Gaboto
Right, I just didn't get it on the first read...

2010/5/12 Gabriel Brunstein <[hidden email]>
As I read there, Coral IS A PACKAGE FOR PHARO! so you would not be using another tool.
I don't know which is the state of Coral, if it works or not (based on the previous mail of Stephane)

2010/5/12 Andrei Stebakov <[hidden email]>
Thank you, I'll give it a try. See, maybe my philosophy is wrong, but I'd rather get better at one tool (where it's possible) than learn multiple different tools to do similar tasks.
I think Pharo has a potential to be if not a Swiss army knife like Python, but a very useful language for any programming tasks (scripting is one of them).
So far, as a newbie, I like what I see in Pharo and having a blast learning it. I am so thrilled, that just a thought that it could do scripting sends shivers down my spine :)

2010/5/12 Gabriel Brunstein <[hidden email]>

What about coral?
http://scg.unibe.ch/wiki/projects/bachelorsprojects/coral

2010/5/12 Andrei Stebakov <[hidden email]>
Is it possible to start Pharo headless and execute some command (say to get some info from a web page)?

_______________________________________________
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


_______________________________________________
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: Scripting with Pharo?

Mariano Martinez Peck
It seems the wiki is outdated. Please try this to install it:

Gofer new
    squeaksource: 'Coral';
    package: 'LoadCoral';
    load.
   
(Smalltalk at: #CoralLoader) load.


DISCLAIMER: I have no idea of it is working or not. It just load. And I am not even sure if loads completely correct

Cheers

mariano

2010/5/12 Andrei Stebakov <[hidden email]>
Right, I just didn't get it on the first read...

2010/5/12 Gabriel Brunstein <[hidden email]>
As I read there, Coral IS A PACKAGE FOR PHARO! so you would not be using another tool.
I don't know which is the state of Coral, if it works or not (based on the previous mail of Stephane)

2010/5/12 Andrei Stebakov <[hidden email]>
Thank you, I'll give it a try. See, maybe my philosophy is wrong, but I'd rather get better at one tool (where it's possible) than learn multiple different tools to do similar tasks.
I think Pharo has a potential to be if not a Swiss army knife like Python, but a very useful language for any programming tasks (scripting is one of them).
So far, as a newbie, I like what I see in Pharo and having a blast learning it. I am so thrilled, that just a thought that it could do scripting sends shivers down my spine :)

2010/5/12 Gabriel Brunstein <[hidden email]>

What about coral?
http://scg.unibe.ch/wiki/projects/bachelorsprojects/coral

2010/5/12 Andrei Stebakov <[hidden email]>
Is it possible to start Pharo headless and execute some command (say to get some info from a web page)?

_______________________________________________
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


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Scripting with Pharo?

Igor Stasenko
In reply to this post by Andrei Stebakov
Something like that:

process := [

[ [
     | now when |
     now := Time now.
     when := 1 hour + 24 minutes.  "past midnight"
     now = when
  ] whileFalse: [ 30 seconds asDelay wait ].

  ... do your stuff here .....

  2 minutes asDelay wait. "make sure we're not repeat the same thing
within same day"
] repeat

]  newProcess.

process name: 'My periodic stuff'.
process resume


2010/5/12 Andrei Stebakov <[hidden email]>:

> Could you please give me an example of that usage?
>
> On Wed, May 12, 2010 at 4:48 PM, Igor Stasenko <[hidden email]> wrote:
>>
>> its a bit heawyweight to use VM as command-line tool.
>> you could, intead run pharo in persistent mode,
>> and schedule the same piece of code to run periodically as background
>> process in it.
>>
>> 2010/5/12 Andrei Stebakov <[hidden email]>:
>> > I think that scripting support is essential for any interpreted language
>> > and
>> > if Pharo had it, its community would grow much faster.
>> > Let's say, I learned now how to use HTML parsing in the GUI version of
>> > Pharo.
>> > I went ahead and created my own class (or set of classes) in the image
>> > which
>> > can say retrieve a dollar rate from some bank web page.
>> > Now I should be able to run Pharo in a "batch mode" saying something
>> > like...
>> > "./pharo -batch "DollarRateInfo :getAndSendEmail '[hidden email]".
>> > This way I could schedule this command using cron to send me this dollar
>> > rate via email every day at 2 pm. Having this functionality I could
>> > really
>> > spend more time using Pharo for different needs and get better at using
>> > it.
>> >
>> > I don't think it should be too hard to implement (please correct me if I
>> > am
>> > wrong). In the batch mode pharo would start in a "headless mode", read
>> > some
>> > input from a standard input (or from command line), execute it in a
>> > 'hidden'
>> > Workspace and send the output of the evaluation to the standard output.
>> >
>> > Thank you,
>> > Andrei
>> >
>> >
>> > On Wed, May 12, 2010 at 4:15 PM, Stéphane Ducasse
>> > <[hidden email]> wrote:
>> >>
>> >> unfortunately I did not find the time to continue working on it but I
>> >> would love to.
>> >>
>> >> On May 12, 2010, at 9:50 PM, Gabriel Brunstein wrote:
>> >>
>> >> > What about coral?
>> >> > http://scg.unibe.ch/wiki/projects/bachelorsprojects/coral
>> >> >
>> >> > 2010/5/12 Andrei Stebakov <[hidden email]>
>> >> > Is it possible to start Pharo headless and execute some command (say
>> >> > to
>> >> > get some info from a web page)?
>> >> >
>> >> > _______________________________________________
>> >> > 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
>> >
>> >
>> > _______________________________________________
>> > Pharo-project mailing list
>> > [hidden email]
>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>> >
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko AKA sig.
>>
>> _______________________________________________
>> 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
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
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: Scripting with Pharo?

Andrei Stebakov
Thanks!

On Wed, May 12, 2010 at 5:38 PM, Igor Stasenko <[hidden email]> wrote:
Something like that:

process := [

[ [
    | now when |
    now := Time now.
    when := 1 hour + 24 minutes.  "past midnight"
    now = when
 ] whileFalse: [ 30 seconds asDelay wait ].

 ... do your stuff here .....

 2 minutes asDelay wait. "make sure we're not repeat the same thing
within same day"
] repeat

]  newProcess.

process name: 'My periodic stuff'.
process resume


2010/5/12 Andrei Stebakov <[hidden email]>:
> Could you please give me an example of that usage?
>
> On Wed, May 12, 2010 at 4:48 PM, Igor Stasenko <[hidden email]> wrote:
>>
>> its a bit heawyweight to use VM as command-line tool.
>> you could, intead run pharo in persistent mode,
>> and schedule the same piece of code to run periodically as background
>> process in it.
>>
>> 2010/5/12 Andrei Stebakov <[hidden email]>:
>> > I think that scripting support is essential for any interpreted language
>> > and
>> > if Pharo had it, its community would grow much faster.
>> > Let's say, I learned now how to use HTML parsing in the GUI version of
>> > Pharo.
>> > I went ahead and created my own class (or set of classes) in the image
>> > which
>> > can say retrieve a dollar rate from some bank web page.
>> > Now I should be able to run Pharo in a "batch mode" saying something
>> > like...
>> > "./pharo -batch "DollarRateInfo :getAndSendEmail '[hidden email]".
>> > This way I could schedule this command using cron to send me this dollar
>> > rate via email every day at 2 pm. Having this functionality I could
>> > really
>> > spend more time using Pharo for different needs and get better at using
>> > it.
>> >
>> > I don't think it should be too hard to implement (please correct me if I
>> > am
>> > wrong). In the batch mode pharo would start in a "headless mode", read
>> > some
>> > input from a standard input (or from command line), execute it in a
>> > 'hidden'
>> > Workspace and send the output of the evaluation to the standard output.
>> >
>> > Thank you,
>> > Andrei
>> >
>> >
>> > On Wed, May 12, 2010 at 4:15 PM, Stéphane Ducasse
>> > <[hidden email]> wrote:
>> >>
>> >> unfortunately I did not find the time to continue working on it but I
>> >> would love to.
>> >>
>> >> On May 12, 2010, at 9:50 PM, Gabriel Brunstein wrote:
>> >>
>> >> > What about coral?
>> >> > http://scg.unibe.ch/wiki/projects/bachelorsprojects/coral
>> >> >
>> >> > 2010/5/12 Andrei Stebakov <[hidden email]>
>> >> > Is it possible to start Pharo headless and execute some command (say
>> >> > to
>> >> > get some info from a web page)?
>> >> >
>> >> > _______________________________________________
>> >> > 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
>> >
>> >
>> > _______________________________________________
>> > Pharo-project mailing list
>> > [hidden email]
>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>> >
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko AKA sig.
>>
>> _______________________________________________
>> 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
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
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: Scripting with Pharo?

Igor Stasenko
In reply to this post by Igor Stasenko
Sorry, that was not working code.. just to illustrate..
Here is working example (i hope)

process := [

[ | now when |

now := Time now asDuration.
when := 0 hours + 30 minutes.
when < now ifTrue: [ when := when + 24 hours ].
(Delay forDuration: when - now) wait.

  ... do your stuff here ...

] repeat.

] newProcess.

process name: 'My periodic stuff'.
process resume

On 13 May 2010 00:38, Igor Stasenko <[hidden email]> wrote:

> Something like that:
>
> process := [
>
> [ [
>     | now when |
>     now := Time now.
>     when := 1 hour + 24 minutes.  "past midnight"
>     now = when
>  ] whileFalse: [ 30 seconds asDelay wait ].
>
>  ... do your stuff here .....
>
>  2 minutes asDelay wait. "make sure we're not repeat the same thing
> within same day"
> ] repeat
>
> ]  newProcess.
>
> process name: 'My periodic stuff'.
> process resume
>
>
> 2010/5/12 Andrei Stebakov <[hidden email]>:
>> Could you please give me an example of that usage?
>>
>> On Wed, May 12, 2010 at 4:48 PM, Igor Stasenko <[hidden email]> wrote:
>>>
>>> its a bit heawyweight to use VM as command-line tool.
>>> you could, intead run pharo in persistent mode,
>>> and schedule the same piece of code to run periodically as background
>>> process in it.
>>>
>>> 2010/5/12 Andrei Stebakov <[hidden email]>:
>>> > I think that scripting support is essential for any interpreted language
>>> > and
>>> > if Pharo had it, its community would grow much faster.
>>> > Let's say, I learned now how to use HTML parsing in the GUI version of
>>> > Pharo.
>>> > I went ahead and created my own class (or set of classes) in the image
>>> > which
>>> > can say retrieve a dollar rate from some bank web page.
>>> > Now I should be able to run Pharo in a "batch mode" saying something
>>> > like...
>>> > "./pharo -batch "DollarRateInfo :getAndSendEmail '[hidden email]".
>>> > This way I could schedule this command using cron to send me this dollar
>>> > rate via email every day at 2 pm. Having this functionality I could
>>> > really
>>> > spend more time using Pharo for different needs and get better at using
>>> > it.
>>> >
>>> > I don't think it should be too hard to implement (please correct me if I
>>> > am
>>> > wrong). In the batch mode pharo would start in a "headless mode", read
>>> > some
>>> > input from a standard input (or from command line), execute it in a
>>> > 'hidden'
>>> > Workspace and send the output of the evaluation to the standard output.
>>> >
>>> > Thank you,
>>> > Andrei
>>> >
>>> >
>>> > On Wed, May 12, 2010 at 4:15 PM, Stéphane Ducasse
>>> > <[hidden email]> wrote:
>>> >>
>>> >> unfortunately I did not find the time to continue working on it but I
>>> >> would love to.
>>> >>
>>> >> On May 12, 2010, at 9:50 PM, Gabriel Brunstein wrote:
>>> >>
>>> >> > What about coral?
>>> >> > http://scg.unibe.ch/wiki/projects/bachelorsprojects/coral
>>> >> >
>>> >> > 2010/5/12 Andrei Stebakov <[hidden email]>
>>> >> > Is it possible to start Pharo headless and execute some command (say
>>> >> > to
>>> >> > get some info from a web page)?
>>> >> >
>>> >> > _______________________________________________
>>> >> > 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
>>> >
>>> >
>>> > _______________________________________________
>>> > Pharo-project mailing list
>>> > [hidden email]
>>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>> >
>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Igor Stasenko AKA sig.
>>>
>>> _______________________________________________
>>> 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
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
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: Scripting with Pharo?

Andrei Stebakov
In reply to this post by Mariano Martinez Peck
Installation worked well.
Something is still missing (docs for sure!) when I type "OSProcess thisOSProcess" and evaluate/print it it says "a WindowsProcess with pid nil".


2010/5/12 Mariano Martinez Peck <[hidden email]>
It seems the wiki is outdated. Please try this to install it:

Gofer new
    squeaksource: 'Coral';
    package: 'LoadCoral';
    load.
   
(Smalltalk at: #CoralLoader) load.


DISCLAIMER: I have no idea of it is working or not. It just load. And I am not even sure if loads completely correct

Cheers

mariano


2010/5/12 Andrei Stebakov <[hidden email]>
Right, I just didn't get it on the first read...

2010/5/12 Gabriel Brunstein <[hidden email]>
As I read there, Coral IS A PACKAGE FOR PHARO! so you would not be using another tool.
I don't know which is the state of Coral, if it works or not (based on the previous mail of Stephane)

2010/5/12 Andrei Stebakov <[hidden email]>
Thank you, I'll give it a try. See, maybe my philosophy is wrong, but I'd rather get better at one tool (where it's possible) than learn multiple different tools to do similar tasks.
I think Pharo has a potential to be if not a Swiss army knife like Python, but a very useful language for any programming tasks (scripting is one of them).
So far, as a newbie, I like what I see in Pharo and having a blast learning it. I am so thrilled, that just a thought that it could do scripting sends shivers down my spine :)

2010/5/12 Gabriel Brunstein <[hidden email]>

What about coral?
http://scg.unibe.ch/wiki/projects/bachelorsprojects/coral

2010/5/12 Andrei Stebakov <[hidden email]>
Is it possible to start Pharo headless and execute some command (say to get some info from a web page)?

_______________________________________________
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


_______________________________________________
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


_______________________________________________
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: Scripting with Pharo?

Tudor Girba
Hi,

As far as I know, OSProcess does not work on Windows.

Cheers,
Doru


On 12 May 2010, at 23:54, Andrei Stebakov wrote:

> Installation worked well.
> Something is still missing (docs for sure!) when I type "OSProcess  
> thisOSProcess" and evaluate/print it it says "a WindowsProcess with  
> pid nil".
>
>
> 2010/5/12 Mariano Martinez Peck <[hidden email]>
> It seems the wiki is outdated. Please try this to install it:
>
> Gofer new
>     squeaksource: 'Coral';
>     package: 'LoadCoral';
>     load.
>
> (Smalltalk at: #CoralLoader) load.
>
>
> DISCLAIMER: I have no idea of it is working or not. It just load.  
> And I am not even sure if loads completely correct
>
> Cheers
>
> mariano
>
>
> 2010/5/12 Andrei Stebakov <[hidden email]>
> Right, I just didn't get it on the first read...
>
> 2010/5/12 Gabriel Brunstein <[hidden email]>
> As I read there, Coral IS A PACKAGE FOR PHARO! so you would not be  
> using another tool.
> I don't know which is the state of Coral, if it works or not (based  
> on the previous mail of Stephane)
>
> 2010/5/12 Andrei Stebakov <[hidden email]>
> Thank you, I'll give it a try. See, maybe my philosophy is wrong,  
> but I'd rather get better at one tool (where it's possible) than  
> learn multiple different tools to do similar tasks.
> I think Pharo has a potential to be if not a Swiss army knife like  
> Python, but a very useful language for any programming tasks  
> (scripting is one of them).
> So far, as a newbie, I like what I see in Pharo and having a blast  
> learning it. I am so thrilled, that just a thought that it could do  
> scripting sends shivers down my spine :)
>
> 2010/5/12 Gabriel Brunstein <[hidden email]>
>
> What about coral?
> http://scg.unibe.ch/wiki/projects/bachelorsprojects/coral
>
> 2010/5/12 Andrei Stebakov <[hidden email]>
> Is it possible to start Pharo headless and execute some command (say  
> to get some info from a web page)?
>
> _______________________________________________
> 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
>
>
> _______________________________________________
> 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
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
www.tudorgirba.com

"We are all great at making mistakes."






_______________________________________________
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: Scripting with Pharo?

Andrei Stebakov
Well, maybe partially. At least "OSProcess isWindows" or "OSProcess osVersion" report the correct info.

On Wed, May 12, 2010 at 6:28 PM, Tudor Girba <[hidden email]> wrote:
Hi,

As far as I know, OSProcess does not work on Windows.

Cheers,
Doru



On 12 May 2010, at 23:54, Andrei Stebakov wrote:

Installation worked well.
Something is still missing (docs for sure!) when I type "OSProcess thisOSProcess" and evaluate/print it it says "a WindowsProcess with pid nil".


2010/5/12 Mariano Martinez Peck <[hidden email]>
It seems the wiki is outdated. Please try this to install it:

Gofer new
   squeaksource: 'Coral';
   package: 'LoadCoral';
   load.

(Smalltalk at: #CoralLoader) load.


DISCLAIMER: I have no idea of it is working or not. It just load. And I am not even sure if loads completely correct

Cheers

mariano


2010/5/12 Andrei Stebakov <[hidden email]>
Right, I just didn't get it on the first read...

2010/5/12 Gabriel Brunstein <[hidden email]>
As I read there, Coral IS A PACKAGE FOR PHARO! so you would not be using another tool.
I don't know which is the state of Coral, if it works or not (based on the previous mail of Stephane)

2010/5/12 Andrei Stebakov <[hidden email]>
Thank you, I'll give it a try. See, maybe my philosophy is wrong, but I'd rather get better at one tool (where it's possible) than learn multiple different tools to do similar tasks.
I think Pharo has a potential to be if not a Swiss army knife like Python, but a very useful language for any programming tasks (scripting is one of them).
So far, as a newbie, I like what I see in Pharo and having a blast learning it. I am so thrilled, that just a thought that it could do scripting sends shivers down my spine :)

2010/5/12 Gabriel Brunstein <[hidden email]>

What about coral?
http://scg.unibe.ch/wiki/projects/bachelorsprojects/coral

2010/5/12 Andrei Stebakov <[hidden email]>
Is it possible to start Pharo headless and execute some command (say to get some info from a web page)?

_______________________________________________
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


_______________________________________________
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

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

--
www.tudorgirba.com

"We are all great at making mistakes."







_______________________________________________
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: Scripting with Pharo?

David T. Lewis
In reply to this post by Tudor Girba
OSProcess is partially implemented on Windows, but the required
plugin is not normally distributed with Windows VMs. That is the
reason for "WindowsProcess with pid nil". The WindowsProcess object
is a proxy for the external Windows process, and the pid is nil
because the actual process could not be started (because of the
missing plugin).

http://wiki.squeak.org/squeak/708

Dave

On Thu, May 13, 2010 at 12:28:14AM +0200, Tudor Girba wrote:

> Hi,
>
> As far as I know, OSProcess does not work on Windows.
>
> Cheers,
> Doru
>
>
> On 12 May 2010, at 23:54, Andrei Stebakov wrote:
>
> >Installation worked well.
> >Something is still missing (docs for sure!) when I type "OSProcess  
> >thisOSProcess" and evaluate/print it it says "a WindowsProcess with  
> >pid nil".
> >
> >
> >2010/5/12 Mariano Martinez Peck <[hidden email]>
> >It seems the wiki is outdated. Please try this to install it:
> >
> >Gofer new
> >    squeaksource: 'Coral';
> >    package: 'LoadCoral';
> >    load.
> >
> >(Smalltalk at: #CoralLoader) load.
> >
> >
> >DISCLAIMER: I have no idea of it is working or not. It just load.  
> >And I am not even sure if loads completely correct
> >
> >Cheers
> >
> >mariano
> >
> >
> >2010/5/12 Andrei Stebakov <[hidden email]>
> >Right, I just didn't get it on the first read...
> >
> >2010/5/12 Gabriel Brunstein <[hidden email]>
> >As I read there, Coral IS A PACKAGE FOR PHARO! so you would not be  
> >using another tool.
> >I don't know which is the state of Coral, if it works or not (based  
> >on the previous mail of Stephane)
> >
> >2010/5/12 Andrei Stebakov <[hidden email]>
> >Thank you, I'll give it a try. See, maybe my philosophy is wrong,  
> >but I'd rather get better at one tool (where it's possible) than  
> >learn multiple different tools to do similar tasks.
> >I think Pharo has a potential to be if not a Swiss army knife like  
> >Python, but a very useful language for any programming tasks  
> >(scripting is one of them).
> >So far, as a newbie, I like what I see in Pharo and having a blast  
> >learning it. I am so thrilled, that just a thought that it could do  
> >scripting sends shivers down my spine :)
> >
> >2010/5/12 Gabriel Brunstein <[hidden email]>
> >
> >What about coral?
> >http://scg.unibe.ch/wiki/projects/bachelorsprojects/coral
> >
> >2010/5/12 Andrei Stebakov <[hidden email]>
> >Is it possible to start Pharo headless and execute some command (say  
> >to get some info from a web page)?
> >
> >_______________________________________________
> >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
> >
> >
> >_______________________________________________
> >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
> >
> >_______________________________________________
> >Pharo-project mailing list
> >[hidden email]
> >http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> --
> www.tudorgirba.com
>
> "We are all great at making mistakes."
>
>
>
>
>
>
> _______________________________________________
> 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: Scripting with Pharo?

Stéphane Ducasse
In reply to this post by Andrei Stebakov

On May 12, 2010, at 10:55 PM, Andrei Stebakov wrote:

> Thank you, I'll give it a try. See, maybe my philosophy is wrong, but I'd rather get better at one tool (where it's possible) than learn multiple different tools to do similar tasks.
> I think Pharo has a potential to be if not a Swiss army knife like Python, but a very useful language for any programming tasks (scripting is one of them).
> So far, as a newbie, I like what I see in Pharo and having a blast learning it. I am so thrilled, that just a thought that it could do scripting sends shivers down my spine :)

Yes I would love to have what you describe. This is why I started to
        - define a cool scripting syntax
        - it works
        - play with sh script to have the possibility to run script in headless or with debugger on problem.
So if you want to have a look (but this is preliminary).
Load CoralLoader
and do CoralLoader load
and you should have a look at the comments but this is a bit the mess.
If you want to help there is space for improvement.

Stef
_______________________________________________
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: Scripting with Pharo?

Stéphane Ducasse
In reply to this post by Gaboto

On May 12, 2010, at 11:08 PM, Gabriel Brunstein wrote:

> As I read there, Coral IS A PACKAGE FOR PHARO! so you would not be using another tool.
> I don't know which is the state of Coral, if it works or not (based on the previous mail of Stephane)

it works but on my machine.
So you have to create sh script by end to laucnh pharo on the command line....
But it works.

Stef


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