Writing to the std output
Hi, I need start my image, run a script and write some messages to the standard output. is there a way of writing to standard output? Saludos! Nico. blog: nicopaez.wordpress.com
Hola Nico, The "standard output" in most Smalltalks is usually considered the Transcript. You may use it in a method like this:
log: aString " Write aString to the transcript streamer "
Transcript cr; show: TimeStamp current; space; show: aString is that useful to you? Saludos 2011/4/3 Nicolás Paez <nicopaez@gmail.com>:
Hi, I need start my image, run a script and write some messages to the standard output. is there a way of writing to standard output?
Saludos! Nico. blog: nicopaez.wordpress.com
-- Hernán Morales Information Technology Manager, Institute of Veterinary Genetics. National Scientific and Technical Research Council (CONICET). La Plata (1900), Buenos Aires, Argentina. Telephone: +54 (0221) 421-1799. Internal: 422 Fax: 425-7980 or 421-1799.
if you refer to kind of UNIX stdout then you should try OSProcess I gues... On Sun, Apr 3, 2011 at 9:49 PM, Hernán Morales Durand < hernan.morales@gmail.com> wrote:
Hola Nico,
The "standard output" in most Smalltalks is usually considered the Transcript. You may use it in a method like this:
log: aString " Write aString to the transcript streamer "
Transcript cr; show: TimeStamp current; space; show: aString
is that useful to you?
Saludos
2011/4/3 Nicolás Paez <nicopaez@gmail.com>:
Hi, I need start my image, run a script and write some messages to the standard output. is there a way of writing to standard output?
Saludos! Nico. blog: nicopaez.wordpress.com
-- Hernán Morales Information Technology Manager, Institute of Veterinary Genetics. National Scientific and Technical Research Council (CONICET). La Plata (1900), Buenos Aires, Argentina. Telephone: +54 (0221) 421-1799. Internal: 422 Fax: 425-7980 or 421-1799.
Hi Hernan, I am know the Transcript and it not what I need. I need to integrate some my Smalltalk stuff other application, to more specific, I have an application that will call Smalltalk to perform certain operations and then the calling application needs to know the result of the operations. I could implement this using a file, but I want to avoid files if possible, that is why I want to write to the standard output. Saludos! Nico. blog: nicopaez.wordpress.com On Sun, Apr 3, 2011 at 4:49 PM, Hernán Morales Durand < hernan.morales@gmail.com> wrote:
Hola Nico,
The "standard output" in most Smalltalks is usually considered the Transcript. You may use it in a method like this:
log: aString " Write aString to the transcript streamer "
Transcript cr; show: TimeStamp current; space; show: aString
is that useful to you?
Saludos
2011/4/3 Nicolás Paez <nicopaez@gmail.com>:
Hi, I need start my image, run a script and write some messages to the standard output. is there a way of writing to standard output?
Saludos! Nico. blog: nicopaez.wordpress.com
-- Hernán Morales Information Technology Manager, Institute of Veterinary Genetics. National Scientific and Technical Research Council (CONICET). La Plata (1900), Buenos Aires, Argentina. Telephone: +54 (0221) 421-1799. Internal: 422 Fax: 425-7980 or 421-1799.
You have to add a new primitive I think ... Ben On Apr 3, 2011, at 10:14 PM, Nicolás Paez wrote:
Hi Hernan, I am know the Transcript and it not what I need. I need to integrate some my Smalltalk stuff other application, to more specific, I have an application that will call Smalltalk to perform certain operations and then the calling application needs to know the result of the operations. I could implement this using a file, but I want to avoid files if possible, that is why I want to write to the standard output.
Saludos! Nico. blog: nicopaez.wordpress.com
On Sun, Apr 3, 2011 at 4:49 PM, Hernán Morales Durand <hernan.morales@gmail.com> wrote: Hola Nico,
The "standard output" in most Smalltalks is usually considered the Transcript. You may use it in a method like this:
log: aString " Write aString to the transcript streamer "
Transcript cr; show: TimeStamp current; space; show: aString
is that useful to you?
Saludos
2011/4/3 Nicolás Paez <nicopaez@gmail.com>:
Hi, I need start my image, run a script and write some messages to the standard output. is there a way of writing to standard output?
Saludos! Nico. blog: nicopaez.wordpress.com
-- Hernán Morales Information Technology Manager, Institute of Veterinary Genetics. National Scientific and Technical Research Council (CONICET). La Plata (1900), Buenos Aires, Argentina. Telephone: +54 (0221) 421-1799. Internal: 422 Fax: 425-7980 or 421-1799.
On 4 April 2011 13:55, Benjamin <benjamin.vanryseghem.pharo@gmail.com> wrote:
You have to add a new primitive I think ...
there was a discussion about adding it to Cog VMs.. but i don't know details. It could be there out of the box... just need to find it :)
Ben
On Apr 3, 2011, at 10:14 PM, Nicolás Paez wrote:
Hi Hernan, I am know the Transcript and it not what I need. I need to integrate some my Smalltalk stuff other application, to more specific, I have an application that will call Smalltalk to perform certain operations and then the calling application needs to know the result of the operations. I could implement this using a file, but I want to avoid files if possible, that is why I want to write to the standard output. Saludos! Nico. blog: nicopaez.wordpress.com
On Sun, Apr 3, 2011 at 4:49 PM, Hernán Morales Durand <hernan.morales@gmail.com> wrote:
Hola Nico,
The "standard output" in most Smalltalks is usually considered the Transcript. You may use it in a method like this:
log: aString     " Write aString to the transcript streamer "
    Transcript cr;         show: TimeStamp current;         space;         show: aString
is that useful to you?
Saludos
2011/4/3 Nicolás Paez <nicopaez@gmail.com>:
Hi, I need start my image, run a script and write some messages to the standard output. is there a way of writing to standard output?
Saludos! Nico. blog: nicopaez.wordpress.com
-- Hernán Morales Information Technology Manager, Institute of Veterinary Genetics. National Scientific and Technical Research Council (CONICET). La Plata (1900), Buenos Aires, Argentina. Telephone: +54 (0221) 421-1799. Internal: 422 Fax: 425-7980 or 421-1799.
-- Best regards, Igor Stasenko AKA sig.
On Mon, Apr 4, 2011 at 2:02 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 4 April 2011 13:55, Benjamin <benjamin.vanryseghem.pharo@gmail.com> wrote:
You have to add a new primitive I think ...
there was a discussion about adding it to Cog VMs.. but i don't know details. It could be there out of the box... just need to find it :)
I don't know why I remember some Cog extensions in StandardFileStream or something like that that could directly write to the standard output...but maybe I am just dreaming. Anyway wouldn't OSProcess do the job?
Ben
On Apr 3, 2011, at 10:14 PM, Nicolás Paez wrote:
Hi Hernan, I am know the Transcript and it not what I need. I need to integrate some my Smalltalk stuff other application, to more specific, I have an application that will call Smalltalk to perform certain operations and then the calling application needs to know the result of the operations. I could implement this using a file, but I want to avoid files if possible, that is why I want to write to the standard output. Saludos! Nico. blog: nicopaez.wordpress.com
On Sun, Apr 3, 2011 at 4:49 PM, Hernán Morales Durand <hernan.morales@gmail.com> wrote:
Hola Nico,
The "standard output" in most Smalltalks is usually considered the Transcript. You may use it in a method like this:
log: aString " Write aString to the transcript streamer "
Transcript cr; show: TimeStamp current; space; show: aString
is that useful to you?
Saludos
2011/4/3 Nicolás Paez <nicopaez@gmail.com>:
Hi, I need start my image, run a script and write some messages to the standard output. is there a way of writing to standard output?
Saludos! Nico. blog: nicopaez.wordpress.com
-- Hernán Morales Information Technology Manager, Institute of Veterinary Genetics. National Scientific and Technical Research Council (CONICET). La Plata (1900), Buenos Aires, Argentina. Telephone: +54 (0221) 421-1799. Internal: 422 Fax: 425-7980 or 421-1799.
-- Best regards, Igor Stasenko AKA sig.
-- Mariano http://marianopeck.wordpress.com
On Mon, Apr 04, 2011 at 02:46:01PM +0200, Mariano Martinez Peck wrote:
On Mon, Apr 4, 2011 at 2:02 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 4 April 2011 13:55, Benjamin <benjamin.vanryseghem.pharo@gmail.com> wrote:
You have to add a new primitive I think ...
there was a discussion about adding it to Cog VMs.. but i don't know details. It could be there out of the box... just need to find it :)
I don't know why I remember some Cog extensions in StandardFileStream or something like that that could directly write to the standard output...but maybe I am just dreaming.
Anyway wouldn't OSProcess do the job?
Yes of course. Specifically for debugging support, see the #trace, #trace: and #debug: methods. Handy if you are trying to debug something that might drop you into an emergency evaluator. It also is running from the VM, so it avoids timing confusion related to Smalltalk process scheduling and flushing the ouput stream. Dave
Hi, I am trying to follow the advice using OSProcess but I get an error message saying: "process accessor module not available" I am running on Win7, could that be the problem? Saludos! Nico. blog: nicopaez.wordpress.com On Mon, Apr 4, 2011 at 1:38 PM, David T. Lewis <lewis@mail.msen.com> wrote:
On Mon, Apr 04, 2011 at 02:46:01PM +0200, Mariano Martinez Peck wrote:
On Mon, Apr 4, 2011 at 2:02 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 4 April 2011 13:55, Benjamin <benjamin.vanryseghem.pharo@gmail.com> wrote:
You have to add a new primitive I think ...
there was a discussion about adding it to Cog VMs.. but i don't know details. It could be there out of the box... just need to find it :)
I don't know why I remember some Cog extensions in StandardFileStream or something like that that could directly write to the standard output...but maybe I am just dreaming.
Anyway wouldn't OSProcess do the job?
Yes of course. Specifically for debugging support, see the #trace, #trace: and #debug: methods. Handy if you are trying to debug something that might drop you into an emergency evaluator. It also is running from the VM, so it avoids timing confusion related to Smalltalk process scheduling and flushing the ouput stream.
Dave
Yes, the OSProcess plugin is not distributed with Windows VMs, so this will not work on Windows. Dave On Mon, Apr 25, 2011 at 10:34:51PM -0300, Nicol?s Paez wrote:
Hi, I am trying to follow the advice using OSProcess but I get an error message saying: "process accessor module not available"
I am running on Win7, could that be the problem?
Saludos! Nico. blog: nicopaez.wordpress.com
On Mon, Apr 4, 2011 at 1:38 PM, David T. Lewis <lewis@mail.msen.com> wrote:
On Mon, Apr 04, 2011 at 02:46:01PM +0200, Mariano Martinez Peck wrote:
On Mon, Apr 4, 2011 at 2:02 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 4 April 2011 13:55, Benjamin <benjamin.vanryseghem.pharo@gmail.com> wrote:
You have to add a new primitive I think ...
there was a discussion about adding it to Cog VMs.. but i don't know details. It could be there out of the box... just need to find it :)
I don't know why I remember some Cog extensions in StandardFileStream or something like that that could directly write to the standard output...but maybe I am just dreaming.
Anyway wouldn't OSProcess do the job?
Yes of course. Specifically for debugging support, see the #trace, #trace: and #debug: methods. Handy if you are trying to debug something that might drop you into an emergency evaluator. It also is running from the VM, so it avoids timing confusion related to Smalltalk process scheduling and flushing the ouput stream.
Dave
There are severa thread discussing this topic: http://forum.world.st/template/NamlServlet.jtp?macro=search_page&node=129483... On Tue, Apr 26, 2011 at 4:36 AM, David T. Lewis <lewis@mail.msen.com> wrote:
Yes, the OSProcess plugin is not distributed with Windows VMs, so this will not work on Windows.
Dave
On Mon, Apr 25, 2011 at 10:34:51PM -0300, Nicol?s Paez wrote:
Hi, I am trying to follow the advice using OSProcess but I get an error message saying: "process accessor module not available"
I am running on Win7, could that be the problem?
Saludos! Nico. blog: nicopaez.wordpress.com
On Mon, Apr 4, 2011 at 1:38 PM, David T. Lewis <lewis@mail.msen.com> wrote:
On Mon, Apr 04, 2011 at 02:46:01PM +0200, Mariano Martinez Peck wrote:
On Mon, Apr 4, 2011 at 2:02 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 4 April 2011 13:55, Benjamin < benjamin.vanryseghem.pharo@gmail.com> wrote:
You have to add a new primitive I think ...
there was a discussion about adding it to Cog VMs.. but i don't know details. It could be there out of the box... just need to find it :)
I don't know why I remember some Cog extensions in StandardFileStream or something like that that could directly write to the standard output...but maybe I am just dreaming.
Anyway wouldn't OSProcess do the job?
Yes of course. Specifically for debugging support, see the #trace, #trace: and #debug: methods. Handy if you are trying to debug something that might drop you into an emergency evaluator. It also is running from the VM, so it avoids timing confusion related to Smalltalk process scheduling and flushing the ouput stream.
Dave
-- Mariano http://marianopeck.wordpress.com
I saw this items sent by Marcus previously in this thread: http://code.google.com/p/pharo/issues/detail?id=3669 http://code.google.com/p/pharo/issues/detail?id=3241 Their status is "FixedWaitingToBePharoed", I would like to work on them so, what should I do? try to do a file in and make it run? is there any documentation about how to "Pharoed code" ? Saludos! Nico. blog: nicopaez.wordpress.com On Tue, Apr 26, 2011 at 4:00 PM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
There are severa thread discussing this topic:
http://forum.world.st/template/NamlServlet.jtp?macro=search_page&node=129483...
On Tue, Apr 26, 2011 at 4:36 AM, David T. Lewis <lewis@mail.msen.com>wrote:
Yes, the OSProcess plugin is not distributed with Windows VMs, so this will not work on Windows.
Dave
On Mon, Apr 25, 2011 at 10:34:51PM -0300, Nicol?s Paez wrote:
Hi, I am trying to follow the advice using OSProcess but I get an error message saying: "process accessor module not available"
I am running on Win7, could that be the problem?
Saludos! Nico. blog: nicopaez.wordpress.com
On Mon, Apr 4, 2011 at 1:38 PM, David T. Lewis <lewis@mail.msen.com> wrote:
On Mon, Apr 04, 2011 at 02:46:01PM +0200, Mariano Martinez Peck wrote:
On Mon, Apr 4, 2011 at 2:02 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 4 April 2011 13:55, Benjamin < benjamin.vanryseghem.pharo@gmail.com> wrote:
You have to add a new primitive I think ...
there was a discussion about adding it to Cog VMs.. but i don't know details. It could be there out of the box... just need to find it :)
I don't know why I remember some Cog extensions in StandardFileStream or something like that that could directly write to the standard output...but maybe I am just dreaming.
Anyway wouldn't OSProcess do the job?
Yes of course. Specifically for debugging support, see the #trace, #trace: and #debug: methods. Handy if you are trying to debug something that might drop you into an emergency evaluator. It also is running from the VM, so it avoids timing confusion related to Smalltalk process scheduling and flushing the ouput stream.
Dave
-- Mariano http://marianopeck.wordpress.com
participants (6)
-
Benjamin -
David T. Lewis -
Hernán Morales Durand -
Igor Stasenko -
Mariano Martinez Peck -
Nicolás Paez