FileSystem differences between Pharo-2.0 and Pharo-1.4

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

FileSystem differences between Pharo-2.0 and Pharo-1.4

Dale Henrichs
I'm starting a port of FileTree to Pharo-2.0 and I'm planning on using Pharo-1.4 (summer) to do the actual port, since I can't run my development environment in Pharo-2.0 (chicken and egg problem).

I'm wondering if there are any significant differences between the FileSystem implementations on the two platforms that I should be aware of...

Dale

Reply | Threaded
Open this post in threaded view
|

Re: FileSystem differences between Pharo-2.0 and Pharo-1.4

Camillo Bruni-3
in pharo 1.4 #fileStream and #fileStreamDo: & Co are not working properly...
You'll still have to use something like
    FileStream fileNamed: reference fullName
otherwise it should more or less work.


On 2012-08-08, at 18:36, Dale Henrichs <[hidden email]> wrote:

> I'm starting a port of FileTree to Pharo-2.0 and I'm planning on using Pharo-1.4 (summer) to do the actual port, since I can't run my development environment in Pharo-2.0 (chicken and egg problem).
>
> I'm wondering if there are any significant differences between the FileSystem implementations on the two platforms that I should be aware of...
>
> Dale
>


Reply | Threaded
Open this post in threaded view
|

Re: FileSystem differences between Pharo-2.0 and Pharo-1.4

Dale Henrichs
Cami,

How about writeStream* and readStream* are those working? It looks like you used those variants in your FileTree pull request...

Thanks,

Dale

----- Original Message -----
| From: "Camillo Bruni" <[hidden email]>
| To: [hidden email]
| Sent: Wednesday, August 8, 2012 10:06:18 AM
| Subject: Re: [Pharo-project] FileSystem differences between Pharo-2.0 and Pharo-1.4
|
| in pharo 1.4 #fileStream and #fileStreamDo: & Co are not working
| properly...
| You'll still have to use something like
|     FileStream fileNamed: reference fullName
| otherwise it should more or less work.
|
|
| On 2012-08-08, at 18:36, Dale Henrichs <[hidden email]> wrote:
|
| > I'm starting a port of FileTree to Pharo-2.0 and I'm planning on
| > using Pharo-1.4 (summer) to do the actual port, since I can't run
| > my development environment in Pharo-2.0 (chicken and egg problem).
| >
| > I'm wondering if there are any significant differences between the
| > FileSystem implementations on the two platforms that I should be
| > aware of...
| >
| > Dale
| >
|
|
|

Reply | Threaded
Open this post in threaded view
|

Re: FileSystem differences between Pharo-2.0 and Pharo-1.4

Camillo Bruni-3
nope they won't work either...
I changed all of that in 2.0's FS overhaul. Maybe we should port these changes back to 1.4 to support a working version of FS there.

All the stream selectors in 1.4 create a FSFileStream or so, which is a incomplete reimplementation of FileStream. They might work for a very limited set of operations, but AFAIK there is a big mem leak of low level file handlers which eventually will crash the VM.

Porting the changes back to 1.4 for the FileStream subpart should be a 0.5h task (for me ;)).

If esteban agrees to include these changes in 1.4 I am willing to create a patch :)


On 2012-08-08, at 19:32, Dale Henrichs <[hidden email]> wrote:

> Cami,
>
> How about writeStream* and readStream* are those working? It looks like you used those variants in your FileTree pull request...
>
> Thanks,
>
> Dale
>
> ----- Original Message -----
> | From: "Camillo Bruni" <[hidden email]>
> | To: [hidden email]
> | Sent: Wednesday, August 8, 2012 10:06:18 AM
> | Subject: Re: [Pharo-project] FileSystem differences between Pharo-2.0 and Pharo-1.4
> |
> | in pharo 1.4 #fileStream and #fileStreamDo: & Co are not working
> | properly...
> | You'll still have to use something like
> |     FileStream fileNamed: reference fullName
> | otherwise it should more or less work.
> |
> |
> | On 2012-08-08, at 18:36, Dale Henrichs <[hidden email]> wrote:
> |
> | > I'm starting a port of FileTree to Pharo-2.0 and I'm planning on
> | > using Pharo-1.4 (summer) to do the actual port, since I can't run
> | > my development environment in Pharo-2.0 (chicken and egg problem).
> | >
> | > I'm wondering if there are any significant differences between the
> | > FileSystem implementations on the two platforms that I should be
> | > aware of...
> | >
> | > Dale
> | >
> |
> |
> |
>


Reply | Threaded
Open this post in threaded view
|

Re: FileSystem differences between Pharo-2.0 and Pharo-1.4

Stéphane Ducasse

On Aug 8, 2012, at 7:35 PM, Camillo Bruni wrote:

> nope they won't work either...
> I changed all of that in 2.0's FS overhaul. Maybe we should port these changes back to 1.4 to support a working version of FS there.
>
> All the stream selectors in 1.4 create a FSFileStream or so, which is a incomplete reimplementation of FileStream. They might work for a very limited set of operations, but AFAIK there is a big mem leak of low level file handlers which eventually will crash the VM.
>
> Porting the changes back to 1.4 for the FileStream subpart should be a 0.5h task (for me ;)).
>
> If esteban agrees to include these changes in 1.4 I am willing to create a patch :)

thanks camillo
I think that this is a good move.

>
>
> On 2012-08-08, at 19:32, Dale Henrichs <[hidden email]> wrote:
>
>> Cami,
>>
>> How about writeStream* and readStream* are those working? It looks like you used those variants in your FileTree pull request...
>>
>> Thanks,
>>
>> Dale
>>
>> ----- Original Message -----
>> | From: "Camillo Bruni" <[hidden email]>
>> | To: [hidden email]
>> | Sent: Wednesday, August 8, 2012 10:06:18 AM
>> | Subject: Re: [Pharo-project] FileSystem differences between Pharo-2.0 and Pharo-1.4
>> |
>> | in pharo 1.4 #fileStream and #fileStreamDo: & Co are not working
>> | properly...
>> | You'll still have to use something like
>> |     FileStream fileNamed: reference fullName
>> | otherwise it should more or less work.
>> |
>> |
>> | On 2012-08-08, at 18:36, Dale Henrichs <[hidden email]> wrote:
>> |
>> | > I'm starting a port of FileTree to Pharo-2.0 and I'm planning on
>> | > using Pharo-1.4 (summer) to do the actual port, since I can't run
>> | > my development environment in Pharo-2.0 (chicken and egg problem).
>> | >
>> | > I'm wondering if there are any significant differences between the
>> | > FileSystem implementations on the two platforms that I should be
>> | > aware of...
>> | >
>> | > Dale
>> | >
>> |
>> |
>> |
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: FileSystem differences between Pharo-2.0 and Pharo-1.4

Sean P. DeNigris
Administrator
In reply to this post by Camillo Bruni-3
Camillo Bruni-3 wrote
in pharo 1.4 #fileStream and #fileStreamDo: & Co are not working properly...
Cami, are you sure? I've been using #fileStreamDo: in 1.4, and it seems to eventually send:
  openFileStream: path writable: writable
        | fullPath |
        fullPath := self stringFromPath: path.
        "redirect over the default implementation"
        ^ writable
                ifFalse: [ FileStream readOnlyFileNamed: fullPath ]
                ifTrue: [ FileStream fileNamed: fullPath ]
which returns aFileStream

Sean
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: FileSystem differences between Pharo-2.0 and Pharo-1.4

Camillo Bruni-3
>
>>
>> in pharo 1.4 #fileStream and #fileStreamDo: & Co are not working
>> properly...
>>
>
> Cami, are you sure? I've been using #fileStreamDo: in 1.4, and it seems to
> eventually send:
>  openFileStream: path writable: writable
> | fullPath |
> fullPath := self stringFromPath: path.
> "redirect over the default implementation"
> ^ writable
> ifFalse: [ FileStream readOnlyFileNamed: fullPath ]
> ifTrue: [ FileStream fileNamed: fullPath ]
> which returns aFileStream
>
> Sean

ah ok, so then maybe it's only writeStream / readStream | do?

Reply | Threaded
Open this post in threaded view
|

Re: FileSystem differences between Pharo-2.0 and Pharo-1.4

Sean P. DeNigris
Administrator
Camillo Bruni-3 wrote
ah ok, so then maybe it's only writeStream / readStream | do?
I think so...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: FileSystem differences between Pharo-2.0 and Pharo-1.4

Dale Henrichs
In reply to this post by Camillo Bruni-3
Cami,

Given that I am using Pharo-1.4 FileSystem to develop for Pharo-2.0 it would be very useful to have equivalent functionality...especially if it won't take to long for you to provide it ...

When you have a new version of FileSystem available for Pharo-1.4 let me know ...

Dale
----- Original Message -----
| From: "Camillo Bruni" <[hidden email]>
| To: [hidden email]
| Sent: Wednesday, August 8, 2012 10:35:54 AM
| Subject: Re: [Pharo-project] FileSystem differences between Pharo-2.0 and Pharo-1.4
|
| nope they won't work either...
| I changed all of that in 2.0's FS overhaul. Maybe we should port
| these changes back to 1.4 to support a working version of FS there.
|
| All the stream selectors in 1.4 create a FSFileStream or so, which is
| a incomplete reimplementation of FileStream. They might work for a
| very limited set of operations, but AFAIK there is a big mem leak of
| low level file handlers which eventually will crash the VM.
|
| Porting the changes back to 1.4 for the FileStream subpart should be
| a 0.5h task (for me ;)).
|
| If esteban agrees to include these changes in 1.4 I am willing to
| create a patch :)
|
|
| On 2012-08-08, at 19:32, Dale Henrichs <[hidden email]> wrote:
|
| > Cami,
| >
| > How about writeStream* and readStream* are those working? It looks
| > like you used those variants in your FileTree pull request...
| >
| > Thanks,
| >
| > Dale
| >
| > ----- Original Message -----
| > | From: "Camillo Bruni" <[hidden email]>
| > | To: [hidden email]
| > | Sent: Wednesday, August 8, 2012 10:06:18 AM
| > | Subject: Re: [Pharo-project] FileSystem differences between
| > | Pharo-2.0 and Pharo-1.4
| > |
| > | in pharo 1.4 #fileStream and #fileStreamDo: & Co are not working
| > | properly...
| > | You'll still have to use something like
| > |     FileStream fileNamed: reference fullName
| > | otherwise it should more or less work.
| > |
| > |
| > | On 2012-08-08, at 18:36, Dale Henrichs <[hidden email]>
| > | wrote:
| > |
| > | > I'm starting a port of FileTree to Pharo-2.0 and I'm planning
| > | > on
| > | > using Pharo-1.4 (summer) to do the actual port, since I can't
| > | > run
| > | > my development environment in Pharo-2.0 (chicken and egg
| > | > problem).
| > | >
| > | > I'm wondering if there are any significant differences between
| > | > the
| > | > FileSystem implementations on the two platforms that I should
| > | > be
| > | > aware of...
| > | >
| > | > Dale
| > | >
| > |
| > |
| > |
| >
|
|
|

Reply | Threaded
Open this post in threaded view
|

Re: FileSystem differences between Pharo-2.0 and Pharo-1.4

Camillo Bruni-3

On 2012-08-09, at 03:31, Dale Henrichs <[hidden email]> wrote:

> Cami,
>
> Given that I am using Pharo-1.4 FileSystem to develop for Pharo-2.0 it would be very useful to have equivalent functionality...especially if it won't take to long for you to provide it ...
>
> When you have a new version of FileSystem available for Pharo-1.4 let me know ...

tomorrow I have a long train ride to do, so I will most probably fix by tomorrow evening.