[squeak-dev] The Trunk: System-cmm.610.mcz

Chris Muller asqueaker at gmail.com
Sun Oct 27 23:38:15 UTC 2013


On Sun, Oct 27, 2013 at 3:33 PM, Nicolas Cellier
<nicolas.cellier.aka.nice at gmail.com> wrote:
> And yet another, shouldn't we rather integrate the excellent work that
> Camillo Bruni did in Pharo?
>
> See System-CommandLine at
>
> MCHttpRepository
>     location: 'http://smalltalkhub.com/mc/Pharo/Pharo30/main'
>     user: ''
>     password: ''

Not sure.  The 4 methods I added are not a REPL.  That's not something
I myself need, but a sophisticated command-line interface to Squeak
sounds neat and novel.  I don't think I've ever really fully
understood the case where I'd want to _interact_ with Smalltalk via a
command-line (on an on-going, ad-hoc basis).  It seems like I always
either want full GUI interaction, or simple job control that can
properly respond to errors and nothing more..


> 2013/10/27 Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
>>
>> Another question, why do: ?
>> I find this a false polymorphism and its usage is rather hard to trace...

Normally since the scripts are external, they won't be traceable
anyway.  However, since I'm just now starting to include my scripts in
the image (so they have benefit of being _documented_ and under MC's
control), perhaps #run: would be better..

>>
>>
>> 2013/10/26 <commits at source.squeak.org>
>>
>>> Chris Muller uploaded a new version of System to project The Trunk:
>>> http://source.squeak.org/trunk/System-cmm.610.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: System-cmm.610
>>> Author: cmm
>>> Time: 26 October 2013, 2:17:09.114 pm
>>> UUID: a27149c5-0fd6-4bef-a34a-57db707aec83
>>> Ancestors: System-dtl.609
>>>
>>> Consider valueWithAllPossibleArguments: special enough to inline, for
>>> now.
>>>
>>> =============== Diff against System-dtl.609 ===============
>>>
>>> Item was changed:
>>>   ----- Method: SmalltalkImage>>do: (in category 'command line') -----
>>>   do: aBlock
>>> +       [ [ (aBlock numArgs = 1 and: [ self arguments size > 1 ])
>>> +                 ifTrue: [ aBlock value: self arguments ]
>>> +                 ifFalse: [ aBlock valueWithEnoughArguments: self
>>> arguments ] ]
>>> -       [ [ aBlock valueWithAllPossibleArguments: self arguments ]
>>>                 on: ProgressInitiationException
>>>                 do:
>>>                         [ : pie | "Don't want to log this notification."
>>>                         pie defaultAction ] ]
>>>                 on: Notification , Warning
>>>                 do:
>>>                         [ : noti | StandardFileStream stdout
>>>                                  nextPutAll: DateAndTime now asString ;
>>>                                  space ;
>>>                                  nextPutAll: noti description ;
>>>                                  cr.
>>>                         noti resume ]
>>>                 on: SyntaxErrorNotification
>>>                 do:
>>>                         [ : err | StandardFileStream stdout
>>>                                  nextPutAll: err errorCode ;
>>>                                  cr.
>>>                         self haltOrQuit ]
>>>                 on: Error
>>>                 do:
>>>                         [ : err | err printVerboseOn: StandardFileStream
>>> stderr.
>>>                         self haltOrQuit.
>>>                         err isResumable ifTrue: [ err resume ] ]!
>>>
>>>
>>
>
>
>
>


More information about the Squeak-dev mailing list