[Pharo-project] Unix thing? Possible silent failure writing file.

Schwab,Wilhelm K bschwab at anest.ufl.edu
Mon Nov 15 14:28:27 CET 2010

You have the impression that I am asking you to do my work.  Not the case; I asked you whether a sequence of events was familiar - that's it.  The involvement of R and "adding a column" would mean a lot to those who use it.

I am not using any of the variations you list below, but I will look at the code behind them; it might offer some clue about any preparation that the newly opened file might need.

From: pharo-project-bounces at lists.gforge.inria.fr [pharo-project-bounces at lists.gforge.inria.fr] On Behalf Of Sven Van Caekenberghe [sven at beta9.be]
Sent: Monday, November 15, 2010 8:06 AM
To: Pharo-project at lists.gforge.inria.fr
Subject: Re: [Pharo-project] Unix thing? Possible silent        failure writing file.


On 15 Nov 2010, at 13:35, Schwab,Wilhelm K wrote:

> Apologies if this comes through as a repeat.
> What is so mysterious/non-responsive about telling you (read the initial email) that I was re-writing an existing file, nothing happened, no errors were reported, and that repeating it with an explicit truncation of the file after opening gave the expected behavior?

What others on this list are saying is that you have to provide _Concrete Code Examples_ independent from all decoration (it doesn't matter that you are using R and doing whatever with it). Making a good, short example that others can run will help you and others. You have to make at least the isolation effort first. Even better, you should look as deep into it as you can. Otherwise you will be ignored because you are asking others to do your work.

So, you should have written something like (but maybe this is not what you meant or were using/doing):

Shouldn't FileStream>>#fileNamed:do: raise an error when overriding ?

For example:

FileStream fileNamed: '/tmp/foo.txt' do: [ :stream | stream nextPutAll: 'First'; crlf ].


FileStream fileNamed: '/tmp/foo.txt' do: [ :stream | stream nextPutAll: 'Second'; crlf ].

"overwrites - but should fail IMHO"

FileStream oldFileNamed: '/tmp/foo.txt' do: [ :stream | stream nextPutAll: 'Third'; crlf ].


FileStream newFileNamed: '/tmp/foo.txt' do: [ :stream | stream nextPutAll: 'Fourth'; crlf ].

"raises error"



PS: And I also think you should make an Google Code Issue when you are sure there is a bug ;-)

More information about the Pharo-project mailing list