Pharo-users
By thread
pharo-users@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- 6 participants
- 50351 messages
Re: [Pharo-users] Tree/Outliners of playgrounds, markdown inside comments and some quick medium size dreams for Pharo/Smalltalk
by Offray Vladimir Luna Cárdenas
Hi again,
I will be using this thread to update my advances and questions about
how to build an outliner in Pharo Smalltalk. If there is a better method
like starting a new thread for particular questions, or a less narrative
style, please let me know.
The idea is to use the tools provided by Moose to build a quick outliner
that can be extended to suit my needs on academical writing. This is
kind of a strange approach in the sense that I'm not following the
tutorials with a predefined problems (make a game and so) but trying to
start with a real (in the sense of closer) problem (making an outliner)
and to see which knowledge I need to solve this necessity. In that sense
is more like the Freire's alphabetization of adults in Brazil.
So, the things I have done so far was to search for a good model to
start with. Something already done that can be used as scaffolding for
my outliner. The Help System seems like a good start for an outliner (in
fact it is already one), so I have taken the Help-Core system and start
to use it as a base for my project.
After that I have used the Moose browsers to build a simple interface,
as seen here:
http://mutabit.com/offray/static/blog/output/galleries/objetos/ubakye-brows…
The part I want to deal with is this:
===============
explorer := GLMTabulator new
title: (mainTree header).
explorer column: #tree;
column: #body.
explorer transmit to: #tree; andShow: [:a |
a tree
display: mainTree children ].
explorer openOn: mainTree.
===============
So, instead of "display: mainTree children" I need something that takes
the get names (headers) of the two nodes and the contents in the right
panel. For that I think that I need to learn some iterators. I have
already a "header" method for the nodes. Any clue would be appreciated
and I will keep you posted on my advances.
Cheers,
Offray
On 07/21/2014 12:58 PM, Offray Vladimir Luna Cárdenas wrote:
> Hi Damien,
>
> Thanks for your answer. Comments below.
>
> On 07/21/2014 11:09 AM, Damien Cassou wrote:
>> On Sat, Jul 19, 2014 at 2:47 AM, Offray Vladimir Luna Cárdenas
>> <offray(a)riseup.net> wrote:
>>> The first idea that comes to mind is using STON for storage nodes and
>>> tree
>>> information, so I can interchange it with the flatland files world
>>> and keep
>>> it readable. Sounds that reasonable?
>>
>>
>> without more information, it is hard to stay. Try with STON and change
>> if that does not work :-). We have XML and JSON generators as well.
>>
>
>
> This is a kind of raw preview of I'm talking about:
>
> http://www.enlightenment.org/ss/e-53cd4f36f021e9.68569046.jpg
>
> Of course in this case, it is just a Help browser with a Playground
> window over it, but I would like to have something like Playgrounds
> inside the help browser. I was trying to build a custom browser with
> Glamour, but seems that Help Browser already has the machinery I'm
> looking for.
>
> So my first question is how to use the Help Browser class as a template
> for my outliner class? And can I put a Playground where the plain text
> is located right now?
>
>>
>>> The second thing I would like to do is to add pandoc's markdown inside
>>> comments, but I don't like the syntax of comments in Smalltalk because
>>> single quotes are fairly easy to find in light markup language like
>>> markdown. Is difficult to change it to create something more like python
>>> (with """) or Lua (with -[]- )?
>>
>>
>> There is only one syntax for comments in Pharo. Instead of Markdown,
>> you might want to have a look at Pillar which is implemented in Pharo
>> and can generate Markdown (and html, and pdf) :
>> https://github.com/pillar-markup/pillar-documentation/
>>
>>
>
> I have seen Pillar. Seems really interesting, but Pandocs markdown
> support academic citation in several formats and I have already long
> docs wrote on that format integrated in my workflow from Zotero and even
> there is a growing community working on Scholarly Markdown[1][2] so I
> would like to stick with it as much as I can for my own writing.
> That being said. I would like also a better integration between
> Smalltalk outliners and all the academic publication work flow,
> including working better with pandoc as a external library.
>
> [1] https://github.com/scholmd/scholmd/wiki
> [2] http://blog.martinfenner.org/2013/06/29/metadata-in-scholarly-markdown/
> [3]
> http://programminghistorian.org/lessons/sustainable-authorship-in-plain-tex…
>
>
> Thanks again, this conversation with people in the community is very
> valuable to me,
>
> Offray
>
>
July 27, 2014
Roassal2 orthogonal lines, attach points and self-lines.
by Peter Uhnák
Hi,
is there any support for orthogonal lines in Roassal2? I've seen something
similar (ROOrthoVerticalLineShape), however nothing of that sort in
Roassal2. I would imagine it to behave similarly to RTBezierLine - having
controllingElements to specify the corners. (While ROOrtholines did it
automatically I was looking for something more manual, so it can go in both
directions - thus the controllingElements).
Second thing I wasn't able to figure out is whether it is possible to
create line from element to itself. All *AttachPoint classes aren't really
able to cope with that. The best result I got was from Vertical/Horizontal
AttachPoints (combined with BezierLine), however I would like to be able to
specify which side it would start on and end on. Ideally not just middle of
sides, but arbitrary part of the shape (I imagine that might be hard for
non-rectangular shapes).
Thanks,
Peter
July 26, 2014
Re: [Pharo-users] [Tip] Image init scripts when working with PharoLauncher
by stepharo
> Cool, thanks! My script was getting too complicated, so I made it into a
> class with a MetaC config, and the script is now just a Gofer load. This has
> the additional benefit that the start up scripts for the Pharo loader never
> change (they're just Gofer loads) and so avoid the caching problems that can
> otherwise arise.
Yes this is the right way to manage scripts: turn them into classes :)
>
>
> Torsten Bergmann wrote
>> "Set password for Squeaksource"
>> (MCRepositoryGroup default repositories
>> select: [:each | (each isKindOf: MCHttpRepository)
>> and: [((each locationWithTrailingSlash includesSubstring:
>> 'www.squeaksource.com')
>> or: [each locationWithTrailingSlash includesSubstring:
>> 'http://ss3.gemstone.com/ss/'])]
>> ])
>> do: [:each | each user: 'squeaksourceuser'; password:
>> 'secretsqueaksourcepassword'].
>> ...
> I do something like this too. The shortcoming is that newly created repos
> are not authenticated. This should be in core built into the repo objects. I
> guess that's what the KeyChain stuff is about?
>
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Tip-Image-init-scripts-when-working-with-PharoLaunche…
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>
July 26, 2014
Re: [Pharo-users] Commandline
by Dale Henrichs
Oooooh! That might just do the trick for me...
Turns out that I've got one more problem in that the gsDevKit pharo vm
and/or gsdevkit image files can be installed in arbitrary locations ... for
this one I guess I need to consider installing pharo and pharo-ui in
/usr/local/ ... will work for Linux and Mac ... for Windows, I'm already
jumping through some ugly hoops...
Thanks Thierry and Sven!
Dale
On Fri, Jul 25, 2014 at 1:53 PM, Thierry Goubier <thierry.goubier(a)gmail.com>
wrote:
> You can try to get the current working directory this way:
>
> argumentsAsFileReferences
> |pwd |
> pwd := (Smalltalk os environment at: 'PWD' ifAbsent: [ Smalltalk os
> environment at: 'CD' ]) asFileReference.
> ^ self argumentsWithoutOptions collect: [ :each | pwd resolveReference:
> each asFileReference ]
>
> This works when passing arbitrary files as argument to a shell script
> doing an exec on arbitraryPath/pharo afterwards.
>
> (This is how GitFileTree-MergeDriver handles being called by git with file
> paths).
>
> Now, it would be necessary to fix that on the default .st loading :)
>
> Thierry
>
> Le 25/07/2014 22:05, Sven Van Caekenberghe a écrit :
>
> Yes, for some reason, the shebang (#!) machinery passes ./test2.st as
>> argument to pharo, which it seems can only be resolved if it is in the
>> image directory (as opposed to the current shell directory).
>>
>> I have no time to look at this now, but I vaguely remember that pharo
>> mixed the concept of current working directory and image directory (at
>> least in some places).
>>
>> On 25 Jul 2014, at 21:43, Dale Henrichs <dale.henrichs(a)gemtalksystems.com>
>> wrote:
>>
>> Sven,
>>> Without putting a test.st file in /Users/daleh/gsDevKitHome/pharo, I
>>> get the following (it works if I `cp ./test.st
>>> /Users/daleh/gsDevKitHome/pharo`):
>>>
>>> nehalem:junk daleh$ pwd
>>> /Users/daleh/junk
>>> nehalem:junk daleh$ cat test.st
>>> #!/Users/daleh/gsDevKitHome/pharo/pharo-vm/Pharo.app/Contents/MacOS/Pharo
>>> --headless /Users/daleh/gsDevKitHome/pharo/todeClient.image st --quit
>>> FileStream stdout nextPutAll: 42 factorial asString; cr.
>>> nehalem:junk daleh$ ./test.st
>>> FileDoesNotExist: File @ /Users/daleh/gsDevKitHome/pharo/test.st
>>> FileHandle>>streamError
>>> FileHandle>>readStream
>>> FileSystem>>readStreamOn:
>>> FileReference>>readStream
>>> FileReference(AbstractFileReference)>>readStreamDo:
>>> STCommandLineHandler>>installSourceFile:
>>> STCommandLineHandler>>installSourceFiles in Block: [ :reference | self
>>> installSourceFile: reference ]...etc...
>>> OrderedCollection>>do:
>>> STCommandLineHandler>>installSourceFiles in Block: [ sourceFiles do: [
>>> :reference | self installSourc...etc...
>>> BlockClosure>>ensure:
>>> STCommandLineHandler>>installSourceFiles
>>> STCommandLineHandler>>activate
>>> STCommandLineHandler class(CommandLineHandler class)>>activateWith:
>>> PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand:
>>> in Block: [ aCommandLinehandler activateWith: commandLine ]
>>> BlockClosure>>on:do:
>>> PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand:
>>> PharoCommandLineHandler(BasicCommandLineHandler)>>handleSubcommand
>>> PharoCommandLineHandler(BasicCommandLineHandler)>>handleArgument:
>>> PharoCommandLineHandler(BasicCommandLineHandler)>>activate in Block: [
>>> self handleArgument: (self arguments ifEmpty: [ ...etc...
>>> BlockClosure>>on:do:
>>> PharoCommandLineHandler(BasicCommandLineHandler)>>activate
>>> PharoCommandLineHandler>>activate
>>> PharoCommandLineHandler class(CommandLineHandler class)>>activateWith:
>>> PharoCommandLineHandler class>>activateWith: in Block: [ super
>>> activateWith: aCommandLine ]
>>> WorldState>>runStepMethodsIn:
>>> WorldMorph>>runStepMethods
>>> WorldState>>doOneCycleNowFor:
>>> WorldState>>doOneCycleFor:
>>> WorldMorph>>doOneCycle
>>> MorphicUIManager>>spawnNewProcess in Block: [ ...
>>>
>>>
>>>
>>> On Fri, Jul 25, 2014 at 12:29 PM, Sven Van Caekenberghe <sven(a)stfx.eu>
>>> wrote:
>>>
>>> On 25 Jul 2014, at 21:25, Dale Henrichs <dale.henrichs@gemtalksystems.
>>> com> wrote:
>>>
>>> Sven,
>>>>
>>>> I'm using Pharo3.0 and it appears that the .st scripts have to be
>>>> located in the same directory as the image and changes files ... I see
>>>> that you are using Pharo4.0 ...
>>>>
>>>> So is it possible to get Pharo3.0 to work on .st files in arbitary
>>>> directores?
>>>>
>>> Are you using the shebang or direct version ?
>>> In any case, I am always using absolute paths.
>>> Does that not work for you ?
>>>
>>> Dale
>>>>
>>>>
>>>> On Thu, Jul 24, 2014 at 7:42 AM, Sven Van Caekenberghe <sven(a)stfx.eu>
>>>> wrote:
>>>>
>>>> On 24 Jul 2014, at 16:34, phil(a)highoctane.be wrote:
>>>>
>>>> One question I have is how fast the load of an image and processing by
>>>>> an image is when compared with bash.
>>>>>
>>>> Obviously, it is slower, there is a whole image that needs to be
>>>> loaded, etc.
>>>>
>>>> $ cat test.st
>>>> #!/Users/sven/tmp/pharo4/pharo-vm/Pharo.app/Contents/MacOS/Pharo
>>>> --headless /Users/sven/tmp/pharo4/Pharo.image st --quit
>>>> FileStream stdout nextPutAll: 42 factorial asString; cr.
>>>>
>>>> $ time ./test.st
>>>> 1405006117752879898543142606244511569936384000000000
>>>>
>>>> real 0m0.644s
>>>> user 0m0.516s
>>>> sys 0m0.067s
>>>>
>>>> So about half a second overhead.
>>>>
>>>> Sven
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>
July 25, 2014
Re: [Pharo-users] Commandline
by Thierry Goubier
You can try to get the current working directory this way:
argumentsAsFileReferences
|pwd |
pwd := (Smalltalk os environment at: 'PWD' ifAbsent: [ Smalltalk os
environment at: 'CD' ]) asFileReference.
^ self argumentsWithoutOptions collect: [ :each | pwd resolveReference:
each asFileReference ]
This works when passing arbitrary files as argument to a shell script
doing an exec on arbitraryPath/pharo afterwards.
(This is how GitFileTree-MergeDriver handles being called by git with
file paths).
Now, it would be necessary to fix that on the default .st loading :)
Thierry
Le 25/07/2014 22:05, Sven Van Caekenberghe a écrit :
> Yes, for some reason, the shebang (#!) machinery passes ./test2.st as argument to pharo, which it seems can only be resolved if it is in the image directory (as opposed to the current shell directory).
>
> I have no time to look at this now, but I vaguely remember that pharo mixed the concept of current working directory and image directory (at least in some places).
>
> On 25 Jul 2014, at 21:43, Dale Henrichs <dale.henrichs(a)gemtalksystems.com> wrote:
>
>> Sven,
>> Without putting a test.st file in /Users/daleh/gsDevKitHome/pharo, I get the following (it works if I `cp ./test.st /Users/daleh/gsDevKitHome/pharo`):
>>
>> nehalem:junk daleh$ pwd
>> /Users/daleh/junk
>> nehalem:junk daleh$ cat test.st
>> #!/Users/daleh/gsDevKitHome/pharo/pharo-vm/Pharo.app/Contents/MacOS/Pharo --headless /Users/daleh/gsDevKitHome/pharo/todeClient.image st --quit
>> FileStream stdout nextPutAll: 42 factorial asString; cr.
>> nehalem:junk daleh$ ./test.st
>> FileDoesNotExist: File @ /Users/daleh/gsDevKitHome/pharo/test.st
>> FileHandle>>streamError
>> FileHandle>>readStream
>> FileSystem>>readStreamOn:
>> FileReference>>readStream
>> FileReference(AbstractFileReference)>>readStreamDo:
>> STCommandLineHandler>>installSourceFile:
>> STCommandLineHandler>>installSourceFiles in Block: [ :reference | self installSourceFile: reference ]...etc...
>> OrderedCollection>>do:
>> STCommandLineHandler>>installSourceFiles in Block: [ sourceFiles do: [ :reference | self installSourc...etc...
>> BlockClosure>>ensure:
>> STCommandLineHandler>>installSourceFiles
>> STCommandLineHandler>>activate
>> STCommandLineHandler class(CommandLineHandler class)>>activateWith:
>> PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand: in Block: [ aCommandLinehandler activateWith: commandLine ]
>> BlockClosure>>on:do:
>> PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand:
>> PharoCommandLineHandler(BasicCommandLineHandler)>>handleSubcommand
>> PharoCommandLineHandler(BasicCommandLineHandler)>>handleArgument:
>> PharoCommandLineHandler(BasicCommandLineHandler)>>activate in Block: [ self handleArgument: (self arguments ifEmpty: [ ...etc...
>> BlockClosure>>on:do:
>> PharoCommandLineHandler(BasicCommandLineHandler)>>activate
>> PharoCommandLineHandler>>activate
>> PharoCommandLineHandler class(CommandLineHandler class)>>activateWith:
>> PharoCommandLineHandler class>>activateWith: in Block: [ super activateWith: aCommandLine ]
>> WorldState>>runStepMethodsIn:
>> WorldMorph>>runStepMethods
>> WorldState>>doOneCycleNowFor:
>> WorldState>>doOneCycleFor:
>> WorldMorph>>doOneCycle
>> MorphicUIManager>>spawnNewProcess in Block: [ ...
>>
>>
>>
>> On Fri, Jul 25, 2014 at 12:29 PM, Sven Van Caekenberghe <sven(a)stfx.eu> wrote:
>>
>> On 25 Jul 2014, at 21:25, Dale Henrichs <dale.henrichs(a)gemtalksystems.com> wrote:
>>
>>> Sven,
>>>
>>> I'm using Pharo3.0 and it appears that the .st scripts have to be located in the same directory as the image and changes files ... I see that you are using Pharo4.0 ...
>>>
>>> So is it possible to get Pharo3.0 to work on .st files in arbitary directores?
>> Are you using the shebang or direct version ?
>> In any case, I am always using absolute paths.
>> Does that not work for you ?
>>
>>> Dale
>>>
>>>
>>> On Thu, Jul 24, 2014 at 7:42 AM, Sven Van Caekenberghe <sven(a)stfx.eu> wrote:
>>>
>>> On 24 Jul 2014, at 16:34, phil(a)highoctane.be wrote:
>>>
>>>> One question I have is how fast the load of an image and processing by an image is when compared with bash.
>>> Obviously, it is slower, there is a whole image that needs to be loaded, etc.
>>>
>>> $ cat test.st
>>> #!/Users/sven/tmp/pharo4/pharo-vm/Pharo.app/Contents/MacOS/Pharo --headless /Users/sven/tmp/pharo4/Pharo.image st --quit
>>> FileStream stdout nextPutAll: 42 factorial asString; cr.
>>>
>>> $ time ./test.st
>>> 1405006117752879898543142606244511569936384000000000
>>>
>>> real 0m0.644s
>>> user 0m0.516s
>>> sys 0m0.067s
>>>
>>> So about half a second overhead.
>>>
>>> Sven
>>>
>>
>>
>
>
>
July 25, 2014
Re: [Pharo-users] Commandline
by Dale Henrichs
Sven,
It was just that in your example you didn't mention that the .st file had
to be in the image directory and I was sorta hoping that there was a real
solution to that problem ...
It does mean that for gsDevKit I will still need to use bash wrapper files
for all scripts that may be copied to arbitrary locations on disk ... oh
well ...
If that problem gets fixed, I will convert gsDevKit to use pharo-based
scripts for almost everything:)
Dale
On Fri, Jul 25, 2014 at 1:05 PM, Sven Van Caekenberghe <sven(a)stfx.eu> wrote:
> Yes, for some reason, the shebang (#!) machinery passes ./test2.st as
> argument to pharo, which it seems can only be resolved if it is in the
> image directory (as opposed to the current shell directory).
>
> I have no time to look at this now, but I vaguely remember that pharo
> mixed the concept of current working directory and image directory (at
> least in some places).
>
> On 25 Jul 2014, at 21:43, Dale Henrichs <dale.henrichs(a)gemtalksystems.com>
> wrote:
>
> > Sven,
> > Without putting a test.st file in /Users/daleh/gsDevKitHome/pharo, I
> get the following (it works if I `cp ./test.st
> /Users/daleh/gsDevKitHome/pharo`):
> >
> > nehalem:junk daleh$ pwd
> > /Users/daleh/junk
> > nehalem:junk daleh$ cat test.st
> >
> #!/Users/daleh/gsDevKitHome/pharo/pharo-vm/Pharo.app/Contents/MacOS/Pharo
> --headless /Users/daleh/gsDevKitHome/pharo/todeClient.image st --quit
> > FileStream stdout nextPutAll: 42 factorial asString; cr.
> > nehalem:junk daleh$ ./test.st
> > FileDoesNotExist: File @ /Users/daleh/gsDevKitHome/pharo/test.st
> > FileHandle>>streamError
> > FileHandle>>readStream
> > FileSystem>>readStreamOn:
> > FileReference>>readStream
> > FileReference(AbstractFileReference)>>readStreamDo:
> > STCommandLineHandler>>installSourceFile:
> > STCommandLineHandler>>installSourceFiles in Block: [ :reference | self
> installSourceFile: reference ]...etc...
> > OrderedCollection>>do:
> > STCommandLineHandler>>installSourceFiles in Block: [ sourceFiles do: [
> :reference | self installSourc...etc...
> > BlockClosure>>ensure:
> > STCommandLineHandler>>installSourceFiles
> > STCommandLineHandler>>activate
> > STCommandLineHandler class(CommandLineHandler class)>>activateWith:
> > PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand: in
> Block: [ aCommandLinehandler activateWith: commandLine ]
> > BlockClosure>>on:do:
> > PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand:
> > PharoCommandLineHandler(BasicCommandLineHandler)>>handleSubcommand
> > PharoCommandLineHandler(BasicCommandLineHandler)>>handleArgument:
> > PharoCommandLineHandler(BasicCommandLineHandler)>>activate in Block: [
> self handleArgument: (self arguments ifEmpty: [ ...etc...
> > BlockClosure>>on:do:
> > PharoCommandLineHandler(BasicCommandLineHandler)>>activate
> > PharoCommandLineHandler>>activate
> > PharoCommandLineHandler class(CommandLineHandler class)>>activateWith:
> > PharoCommandLineHandler class>>activateWith: in Block: [ super
> activateWith: aCommandLine ]
> > WorldState>>runStepMethodsIn:
> > WorldMorph>>runStepMethods
> > WorldState>>doOneCycleNowFor:
> > WorldState>>doOneCycleFor:
> > WorldMorph>>doOneCycle
> > MorphicUIManager>>spawnNewProcess in Block: [ ...
> >
> >
> >
> > On Fri, Jul 25, 2014 at 12:29 PM, Sven Van Caekenberghe <sven(a)stfx.eu>
> wrote:
> >
> > On 25 Jul 2014, at 21:25, Dale Henrichs <
> dale.henrichs(a)gemtalksystems.com> wrote:
> >
> > > Sven,
> > >
> > > I'm using Pharo3.0 and it appears that the .st scripts have to be
> located in the same directory as the image and changes files ... I see
> that you are using Pharo4.0 ...
> > >
> > > So is it possible to get Pharo3.0 to work on .st files in arbitary
> directores?
> >
> > Are you using the shebang or direct version ?
> > In any case, I am always using absolute paths.
> > Does that not work for you ?
> >
> > > Dale
> > >
> > >
> > > On Thu, Jul 24, 2014 at 7:42 AM, Sven Van Caekenberghe <sven(a)stfx.eu>
> wrote:
> > >
> > > On 24 Jul 2014, at 16:34, phil(a)highoctane.be wrote:
> > >
> > > > One question I have is how fast the load of an image and processing
> by an image is when compared with bash.
> > >
> > > Obviously, it is slower, there is a whole image that needs to be
> loaded, etc.
> > >
> > > $ cat test.st
> > > #!/Users/sven/tmp/pharo4/pharo-vm/Pharo.app/Contents/MacOS/Pharo
> --headless /Users/sven/tmp/pharo4/Pharo.image st --quit
> > > FileStream stdout nextPutAll: 42 factorial asString; cr.
> > >
> > > $ time ./test.st
> > > 1405006117752879898543142606244511569936384000000000
> > >
> > > real 0m0.644s
> > > user 0m0.516s
> > > sys 0m0.067s
> > >
> > > So about half a second overhead.
> > >
> > > Sven
> > >
> >
> >
> >
>
>
>
July 25, 2014
Re: [Pharo-users] Commandline
by Sven Van Caekenberghe
Yes, for some reason, the shebang (#!) machinery passes ./test2.st as argument to pharo, which it seems can only be resolved if it is in the image directory (as opposed to the current shell directory).
I have no time to look at this now, but I vaguely remember that pharo mixed the concept of current working directory and image directory (at least in some places).
On 25 Jul 2014, at 21:43, Dale Henrichs <dale.henrichs(a)gemtalksystems.com> wrote:
> Sven,
> Without putting a test.st file in /Users/daleh/gsDevKitHome/pharo, I get the following (it works if I `cp ./test.st /Users/daleh/gsDevKitHome/pharo`):
>
> nehalem:junk daleh$ pwd
> /Users/daleh/junk
> nehalem:junk daleh$ cat test.st
> #!/Users/daleh/gsDevKitHome/pharo/pharo-vm/Pharo.app/Contents/MacOS/Pharo --headless /Users/daleh/gsDevKitHome/pharo/todeClient.image st --quit
> FileStream stdout nextPutAll: 42 factorial asString; cr.
> nehalem:junk daleh$ ./test.st
> FileDoesNotExist: File @ /Users/daleh/gsDevKitHome/pharo/test.st
> FileHandle>>streamError
> FileHandle>>readStream
> FileSystem>>readStreamOn:
> FileReference>>readStream
> FileReference(AbstractFileReference)>>readStreamDo:
> STCommandLineHandler>>installSourceFile:
> STCommandLineHandler>>installSourceFiles in Block: [ :reference | self installSourceFile: reference ]...etc...
> OrderedCollection>>do:
> STCommandLineHandler>>installSourceFiles in Block: [ sourceFiles do: [ :reference | self installSourc...etc...
> BlockClosure>>ensure:
> STCommandLineHandler>>installSourceFiles
> STCommandLineHandler>>activate
> STCommandLineHandler class(CommandLineHandler class)>>activateWith:
> PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand: in Block: [ aCommandLinehandler activateWith: commandLine ]
> BlockClosure>>on:do:
> PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand:
> PharoCommandLineHandler(BasicCommandLineHandler)>>handleSubcommand
> PharoCommandLineHandler(BasicCommandLineHandler)>>handleArgument:
> PharoCommandLineHandler(BasicCommandLineHandler)>>activate in Block: [ self handleArgument: (self arguments ifEmpty: [ ...etc...
> BlockClosure>>on:do:
> PharoCommandLineHandler(BasicCommandLineHandler)>>activate
> PharoCommandLineHandler>>activate
> PharoCommandLineHandler class(CommandLineHandler class)>>activateWith:
> PharoCommandLineHandler class>>activateWith: in Block: [ super activateWith: aCommandLine ]
> WorldState>>runStepMethodsIn:
> WorldMorph>>runStepMethods
> WorldState>>doOneCycleNowFor:
> WorldState>>doOneCycleFor:
> WorldMorph>>doOneCycle
> MorphicUIManager>>spawnNewProcess in Block: [ ...
>
>
>
> On Fri, Jul 25, 2014 at 12:29 PM, Sven Van Caekenberghe <sven(a)stfx.eu> wrote:
>
> On 25 Jul 2014, at 21:25, Dale Henrichs <dale.henrichs(a)gemtalksystems.com> wrote:
>
> > Sven,
> >
> > I'm using Pharo3.0 and it appears that the .st scripts have to be located in the same directory as the image and changes files ... I see that you are using Pharo4.0 ...
> >
> > So is it possible to get Pharo3.0 to work on .st files in arbitary directores?
>
> Are you using the shebang or direct version ?
> In any case, I am always using absolute paths.
> Does that not work for you ?
>
> > Dale
> >
> >
> > On Thu, Jul 24, 2014 at 7:42 AM, Sven Van Caekenberghe <sven(a)stfx.eu> wrote:
> >
> > On 24 Jul 2014, at 16:34, phil(a)highoctane.be wrote:
> >
> > > One question I have is how fast the load of an image and processing by an image is when compared with bash.
> >
> > Obviously, it is slower, there is a whole image that needs to be loaded, etc.
> >
> > $ cat test.st
> > #!/Users/sven/tmp/pharo4/pharo-vm/Pharo.app/Contents/MacOS/Pharo --headless /Users/sven/tmp/pharo4/Pharo.image st --quit
> > FileStream stdout nextPutAll: 42 factorial asString; cr.
> >
> > $ time ./test.st
> > 1405006117752879898543142606244511569936384000000000
> >
> > real 0m0.644s
> > user 0m0.516s
> > sys 0m0.067s
> >
> > So about half a second overhead.
> >
> > Sven
> >
>
>
>
July 25, 2014
Re: [Pharo-users] Commandline
by Dale Henrichs
Sven,
Without putting a test.st file in /Users/daleh/gsDevKitHome/pharo, I get
the following (it works if I `cp ./test.st
/Users/daleh/gsDevKitHome/pharo`):
nehalem:junk daleh$ pwd
/Users/daleh/junk
nehalem:junk daleh$ cat test.st
#!/Users/daleh/gsDevKitHome/pharo/pharo-vm/Pharo.app/Contents/MacOS/Pharo
--headless /Users/daleh/gsDevKitHome/pharo/todeClient.image st --quit
FileStream stdout nextPutAll: 42 factorial asString; cr.
nehalem:junk daleh$ ./test.st
FileDoesNotExist: File @ /Users/daleh/gsDevKitHome/pharo/test.st
FileHandle>>streamError
FileHandle>>readStream
FileSystem>>readStreamOn:
FileReference>>readStream
FileReference(AbstractFileReference)>>readStreamDo:
STCommandLineHandler>>installSourceFile:
STCommandLineHandler>>installSourceFiles in Block: [ :reference | self
installSourceFile: reference ]...etc...
OrderedCollection>>do:
STCommandLineHandler>>installSourceFiles in Block: [ sourceFiles do: [
:reference | self installSourc...etc...
BlockClosure>>ensure:
STCommandLineHandler>>installSourceFiles
STCommandLineHandler>>activate
STCommandLineHandler class(CommandLineHandler class)>>activateWith:
PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand: in
Block: [ aCommandLinehandler activateWith: commandLine ]
BlockClosure>>on:do:
PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand:
PharoCommandLineHandler(BasicCommandLineHandler)>>handleSubcommand
PharoCommandLineHandler(BasicCommandLineHandler)>>handleArgument:
PharoCommandLineHandler(BasicCommandLineHandler)>>activate in Block: [ self
handleArgument: (self arguments ifEmpty: [ ...etc...
BlockClosure>>on:do:
PharoCommandLineHandler(BasicCommandLineHandler)>>activate
PharoCommandLineHandler>>activate
PharoCommandLineHandler class(CommandLineHandler class)>>activateWith:
PharoCommandLineHandler class>>activateWith: in Block: [ super
activateWith: aCommandLine ]
WorldState>>runStepMethodsIn:
WorldMorph>>runStepMethods
WorldState>>doOneCycleNowFor:
WorldState>>doOneCycleFor:
WorldMorph>>doOneCycle
MorphicUIManager>>spawnNewProcess in Block: [ ...
On Fri, Jul 25, 2014 at 12:29 PM, Sven Van Caekenberghe <sven(a)stfx.eu>
wrote:
>
> On 25 Jul 2014, at 21:25, Dale Henrichs <dale.henrichs(a)gemtalksystems.com>
> wrote:
>
> > Sven,
> >
> > I'm using Pharo3.0 and it appears that the .st scripts have to be
> located in the same directory as the image and changes files ... I see
> that you are using Pharo4.0 ...
> >
> > So is it possible to get Pharo3.0 to work on .st files in arbitary
> directores?
>
> Are you using the shebang or direct version ?
> In any case, I am always using absolute paths.
> Does that not work for you ?
>
> > Dale
> >
> >
> > On Thu, Jul 24, 2014 at 7:42 AM, Sven Van Caekenberghe <sven(a)stfx.eu>
> wrote:
> >
> > On 24 Jul 2014, at 16:34, phil(a)highoctane.be wrote:
> >
> > > One question I have is how fast the load of an image and processing by
> an image is when compared with bash.
> >
> > Obviously, it is slower, there is a whole image that needs to be loaded,
> etc.
> >
> > $ cat test.st
> > #!/Users/sven/tmp/pharo4/pharo-vm/Pharo.app/Contents/MacOS/Pharo
> --headless /Users/sven/tmp/pharo4/Pharo.image st --quit
> > FileStream stdout nextPutAll: 42 factorial asString; cr.
> >
> > $ time ./test.st
> > 1405006117752879898543142606244511569936384000000000
> >
> > real 0m0.644s
> > user 0m0.516s
> > sys 0m0.067s
> >
> > So about half a second overhead.
> >
> > Sven
> >
>
>
>
July 25, 2014
Re: [Pharo-users] Commandline
by Sven Van Caekenberghe
On 25 Jul 2014, at 21:25, Dale Henrichs <dale.henrichs(a)gemtalksystems.com> wrote:
> Sven,
>
> I'm using Pharo3.0 and it appears that the .st scripts have to be located in the same directory as the image and changes files ... I see that you are using Pharo4.0 ...
>
> So is it possible to get Pharo3.0 to work on .st files in arbitary directores?
Are you using the shebang or direct version ?
In any case, I am always using absolute paths.
Does that not work for you ?
> Dale
>
>
> On Thu, Jul 24, 2014 at 7:42 AM, Sven Van Caekenberghe <sven(a)stfx.eu> wrote:
>
> On 24 Jul 2014, at 16:34, phil(a)highoctane.be wrote:
>
> > One question I have is how fast the load of an image and processing by an image is when compared with bash.
>
> Obviously, it is slower, there is a whole image that needs to be loaded, etc.
>
> $ cat test.st
> #!/Users/sven/tmp/pharo4/pharo-vm/Pharo.app/Contents/MacOS/Pharo --headless /Users/sven/tmp/pharo4/Pharo.image st --quit
> FileStream stdout nextPutAll: 42 factorial asString; cr.
>
> $ time ./test.st
> 1405006117752879898543142606244511569936384000000000
>
> real 0m0.644s
> user 0m0.516s
> sys 0m0.067s
>
> So about half a second overhead.
>
> Sven
>
July 25, 2014
Re: [Pharo-users] Commandline
by Dale Henrichs
Sven,
I'm using Pharo3.0 and it appears that the .st scripts have to be located
in the same directory as the image and changes files ... I see that you
are using Pharo4.0 ...
So is it possible to get Pharo3.0 to work on .st files in arbitary
directores?
Dale
On Thu, Jul 24, 2014 at 7:42 AM, Sven Van Caekenberghe <sven(a)stfx.eu> wrote:
>
> On 24 Jul 2014, at 16:34, phil(a)highoctane.be wrote:
>
> > One question I have is how fast the load of an image and processing by
> an image is when compared with bash.
>
> Obviously, it is slower, there is a whole image that needs to be loaded,
> etc.
>
> $ cat test.st
> #!/Users/sven/tmp/pharo4/pharo-vm/Pharo.app/Contents/MacOS/Pharo
> --headless /Users/sven/tmp/pharo4/Pharo.image st --quit
> FileStream stdout nextPutAll: 42 factorial asString; cr.
>
> $ time ./test.st
> 1405006117752879898543142606244511569936384000000000
>
> real 0m0.644s
> user 0m0.516s
> sys 0m0.067s
>
> So about half a second overhead.
>
> Sven
>
July 25, 2014