pharo monkey issue updater

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

pharo monkey issue updater

Camillo Bruni-3
ever felt bored of waiting for your issue to be checked,
try now our new monkey checker script:

https://gitorious.org/pharo-build/pharo-build/blobs/master/pharo-shell-scripts/issueLoader.rb

best
ben & cami
Reply | Threaded
Open this post in threaded view
|

Re: pharo monkey issue updater

Sean P. DeNigris
Administrator
Camillo Bruni-3 wrote
try now our new monkey checker script:
Ah, thank goodness... Ruby (Smalltalk's kid brother) instead of a bash script ;-)
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: pharo monkey issue updater

Camillo Bruni-3

On 2012-06-29, at 17:36, Sean P. DeNigris wrote:

>
> Camillo Bruni-3 wrote
>>
>> try now our new monkey checker script:
>>
>
> Ah, thank goodness... Ruby (Smalltalk's kid brother) instead of a bash
> script ;-)

There is one RULE:

As soon as you need an IF statement, DUMP BASH AND GO RUBY!

I would love to use pharo for these tasks, but it simply is not ready yet :/

- missing backtics `ls -algh`
- crappy string escape modes '\n\t Fooo \''

I know you can get close to this using purely smalltalk syntax, but it's like
being incompatible with 99% of the languages currently in use :P

Reply | Threaded
Open this post in threaded view
|

Re: pharo monkey issue updater

Sean P. DeNigris
Administrator
Camillo Bruni-3 wrote
- missing backtics `ls -algh`
Yes, backticks make Ruby "Bash Scripting on Steroids". Whenever you need to issue commands, you can just drop it inside some `s unaltered. But the real fun begins with `ls #{rubyVariable}`, which is pretty darn readable and succinct (of course at the price of more syntax... the ruby way).
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: pharo monkey issue updater

Sven Van Caekenberghe
In reply to this post by Camillo Bruni-3

On 29 Jun 2012, at 17:57, Camillo Bruni wrote:

> - missing backtics `ls -algh`
> - crappy string escape modes '\n\t Fooo \''

What about

'ls -lah' executeAsOSProcess

and

'\n\t Fooo \''  withEscapes

which could become with variables

('ls {1}' format: { '/tmp/foo/' }) executeAsOSProcess

I just made up the selector names, maybe there are better ones.


Reply | Threaded
Open this post in threaded view
|

Re: pharo monkey issue updater

EstebanLM
I told Camillo more os less the same :)

'ls -la' systemTo: [ :stream | ]. "piped"
'ls -la>z' system. "non piped"

can do the work perfectly... don't need to crapy syntax to have the same power.
Being able to do something like:

'$myvar \n' seems more needed for me (also with some regexp there).

Esteban

On Jun 29, 2012, at 6:22 PM, Sven Van Caekenberghe wrote:

>
> On 29 Jun 2012, at 17:57, Camillo Bruni wrote:
>
>> - missing backtics `ls -algh`
>> - crappy string escape modes '\n\t Fooo \''
>
> What about
>
> 'ls -lah' executeAsOSProcess
>
> and
>
> '\n\t Fooo \''  withEscapes
>
> which could become with variables
>
> ('ls {1}' format: { '/tmp/foo/' }) executeAsOSProcess
>
> I just made up the selector names, maybe there are better ones.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: pharo monkey issue updater

Sean P. DeNigris
Administrator
In reply to this post by Camillo Bruni-3
Camillo Bruni-3 wrote
ever felt bored of waiting for your issue to be checked,
try now our new monkey checker script:

https://gitorious.org/pharo-build/pharo-build/blobs/master/pharo-shell-scripts/issueLoader.rb
I was confused by this announcement and the script itself. I thought it could be parameterized to be used on any image (e.g. locally on my machine), esp. since /.image (wasn't sure exactly what the $/ meant) is the first thing in the usage instructions. When I tried it, I found hard-coded values. So...
* cool monkey
* I don't know what we're supposed to do with the script, unless it's to show off that we've evolved from Bash to Ruby, which is cool :)
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: pharo monkey issue updater

Sean P. DeNigris
Administrator
In reply to this post by EstebanLM
EstebanLM wrote
'ls -la>z' system. "non piped"
That's clean enough, and very easy to implement...
ByteString>>system

        | process |
        process := PipeableOSProcess waitForCommand: self.
        ^ process output.

Of course, with the current implementation of OSProcess, it's very easy to hang the image that way, so we might want to #setNonBlockingOutput, or do our own polling...
Cheers,
Sean