Writing to the std output

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

Writing to the std output

Nicolás Paez
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
Reply | Threaded
Open this post in threaded view
|

Re: Writing to the std output

hernanmd
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 <[hidden email]>:
> 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.

Reply | Threaded
Open this post in threaded view
|

Re: Writing to the std output

Mariano Martinez Peck
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 <[hidden email]> 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 <[hidden email]>:
> 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: <a href="tel:%2B54%20%280221%29%20421-1799">+54 (0221) 421-1799.
Internal: 422
Fax: 425-7980 or 421-1799.




--
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: Writing to the std output

Nicolás Paez
In reply to this post by hernanmd
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 <[hidden email]> 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 <[hidden email]>:
> 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.


Reply | Threaded
Open this post in threaded view
|

Re: Writing to the std output

Benjamin Van Ryseghem (Pharo)
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 <[hidden email]> 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 <[hidden email]>:
> 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.



Reply | Threaded
Open this post in threaded view
|

Re: Writing to the std output

Igor Stasenko
On 4 April 2011 13:55, Benjamin <[hidden email]> 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
> <[hidden email]> 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 <[hidden email]>:
>> > 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.

Reply | Threaded
Open this post in threaded view
|

Re: Writing to the std output

Mariano Martinez Peck


On Mon, Apr 4, 2011 at 2:02 PM, Igor Stasenko <[hidden email]> wrote:
On 4 April 2011 13:55, Benjamin <[hidden email]> 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
> <[hidden email]> 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 <[hidden email]>:
>> > 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: <a href="tel:%2B54%20%280221%29%20421-1799">+54 (0221) 421-1799.
>> Internal: 422
>> Fax: 425-7980 or 421-1799.
>>
>
>
>



--
Best regards,
Igor Stasenko AKA sig.




--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: Writing to the std output

Marcus Denker-4
In reply to this post by Igor Stasenko

On Apr 4, 2011, at 2:47 PM, Mariano Martinez Peck wrote:



On Mon, Apr 4, 2011 at 2:02 PM, Igor Stasenko <[hidden email]> wrote:
On 4 April 2011 13:55, Benjamin <[hidden email]> 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



--
Marcus Denker  -- http://www.marcusdenker.de
INRIA Lille -- Nord Europe. Team RMoD.

Reply | Threaded
Open this post in threaded view
|

Re: Writing to the std output

David T. Lewis
In reply to this post by Mariano Martinez Peck
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 <[hidden email]> wrote:
>
> > On 4 April 2011 13:55, Benjamin <[hidden email]>
> > 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


Reply | Threaded
Open this post in threaded view
|

Re: Writing to the std output

Nicolás Paez
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 <[hidden email]> 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 <[hidden email]> wrote:
>
> > On 4 April 2011 13:55, Benjamin <[hidden email]>
> > 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



Reply | Threaded
Open this post in threaded view
|

Re: Writing to the std output

David T. Lewis
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 <[hidden email]> 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 <[hidden email]>
> > wrote:
> > >
> > > > On 4 April 2011 13:55, Benjamin <[hidden email]>
> > > > 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
> >
> >
> >

Reply | Threaded
Open this post in threaded view
|

Re: Writing to the std output

Mariano Martinez Peck
There are severa thread discussing this topic:

http://forum.world.st/template/NamlServlet.jtp?macro=search_page&node=1294836&query=OSProcess+windows


On Tue, Apr 26, 2011 at 4:36 AM, David T. Lewis <[hidden email]> 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 <[hidden email]> 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 <[hidden email]>
> > wrote:
> > >
> > > > On 4 April 2011 13:55, Benjamin <[hidden email]>
> > > > 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

Reply | Threaded
Open this post in threaded view
|

Re: Writing to the std output

Nicolás Paez
I saw this items sent by Marcus previously in this thread:


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 <[hidden email]> wrote:
There are severa thread discussing this topic:

http://forum.world.st/template/NamlServlet.jtp?macro=search_page&node=1294836&query=OSProcess+windows



On Tue, Apr 26, 2011 at 4:36 AM, David T. Lewis <[hidden email]> 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 <[hidden email]> 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 <[hidden email]>
> > wrote:
> > >
> > > > On 4 April 2011 13:55, Benjamin <[hidden email]>
> > > > 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
> >
> >
> >





Reply | Threaded
Open this post in threaded view
|

Re: Writing to the std output

Marcus Denker-4
In reply to this post by Mariano Martinez Peck

On Apr 26, 2011, at 9:38 PM, Nicolás Paez wrote:

> 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?

Yes. The idea is to check if the fix / enhancement makes sense and if yes, make a changeset / SLICE for the latest Pharo.

> is there any documentation about how to "Pharoed code" ?
>
No... I think there is no general valid strategy and the system is so large and everything is different.


--
Marcus Denker  -- http://www.marcusdenker.de
INRIA Lille -- Nord Europe. Team RMoD.