[Pharo-project] Convention to build cmd-line interfaces with Pharo?

Stéphane Ducasse stephane.ducasse at inria.fr
Sun May 15 14:57:39 CEST 2011


look into 1.3 because we made it better so that you can pass something that is not an cs or st and that 
you can specify who should handle it and not get the system barking dummily at you.

Sref

On May 15, 2011, at 11:13 AM, Stefan Marr wrote:

> Hi:
> 
> Is there any convention/standard approach to build nice cmd-line interfaces with Pharo?
> 
> The first road block I encountered is the assumption that the first argument to the image on the command line is a document/script. Which fires an exception if it is not actually a loadable document.
> 
> I did not see any way to disable that other than to deinstall Autostart (Autostart>>deinstall).
> 
> That is fine for me, but might have unintended consequences.
> The ProjectLauncher>>startUpAfterLogin is the actual place where that assumption is hard coded.
> And, well, I don't know what the consequences are of disabling Autostart and as a consequence ProjectLauncher.
> 
> So, are there other ways to get to a clean command-line interface?
> 
> What I want eventually is the following:
> 
> 
> $ squeak-vm.sh Pharo-1.2.image --help
> SMark Benchmark Framework, version: SMark-StefanMarr.12
> 
> Usage: <vm+image> SMarkHarness [runner] [reporter] <suiteOrBenchmark>
>                               [iterations [processes [problemSize]]]
> 
> Arguments:
> runner             optional, a SMarkRunner class that executes the benchmarks
> reporter           optional, a SMarkReporter class that processes
>                              and displays the results
> suiteOrBenchmark   required, either a SMarkSuite with benchmarks,
>                              or a benchmark denoted by Suite.benchName
> iterations         optional, number of times the benchmarks are repeated
> processes          optional, number of processes/threads used by the benchmarks
> problemSize        optional, depending on benchmark for instance number of
>                              inner iterations or size of used data set
> 
> Bye the way, Squeak 4.1 exhibits the same behavior, but I did not notice anything alike in our 3.9 image, there is works just fine.
> 
> Best regards
> Stefan
> 
> -- 
> Stefan Marr
> Software Languages Lab
> Vrije Universiteit Brussel
> Pleinlaan 2 / B-1050 Brussels / Belgium
> http://soft.vub.ac.be/~smarr
> Phone: +32 2 629 2974
> Fax:   +32 2 629 3525
> 
> 




More information about the Pharo-project mailing list