misc changes, file prims, file unit test

Brian T. Rice water at tunes.org
Thu Aug 5 21:24:32 PDT 2004


I've applied the user-land code, except for making Read the default 
mode, and cleaned up a bit of the code for copying and comparing by 
adding ReadStream with: ReadStream do:.

Lendvai Attila wrote:

> this is too big for the list...
> 
> Hi!
> 
> file.slate is a not unit test for files.
> 
> ==============
> 
> Among some comments, additions, there are things that needs some
> blessing in 101misc.diff:
> 
> Changing the default file open mode to File Read. (if you open a file
> for writing, it updates the last modified time)

I think it's better to have the most capabilities enabled by default; 
I'm not dogmatic about this, but I'm not convinced otherwise yet.

I think one idiom that will make all this easier is to have a 
streamSessionDo: since we usually open a file to get a stream out of it. 
What has to happen for this to be easy is a little annoying for me and 
will take some time to work out, where the mode object is split from 
File and able to be used to get the right stream capability 
programmatically. So not until after 0.3.

> al@(File AbsoluteLocator traits) as: _@(File Locator traits)
> "TODO: is this the way?"
> [
>   al
> ]
> 
> The lack of this method prevented ('asd' as: File Locator) sessionDo: []
> because there was a call to it.

I added it for now. As below, String as: File Locator is what really 
needs to be fixed.

> Is there a way to check wether an 'class' is a subclass of another one?
> the default is: calls isReally:, which is false in this case, while an
> AbsoluteLocator is compatible with Locator.

is: and isReally: are designed to work with some prototypes to traits. 
Also, can you print out the exact code you used that got False when you 
think it should have been True?

This issue with the locators is kind of weird to me, too, and String as: 
Locator is a total hack-method, so a lot of this will likely change when 
I can focus on it.

> ====================
> 
> 101fileprims.diff + fileprims_extra_files.zip contain a preview of my
> changes to the c side build process and the file prims. I've implemented
> platform specific file.c for windows, unix, and and ansifile.c (mostly
> the old file.c) 
> 
> the zip file is to be extracted into the platform dir.
> 
> there's a #define to user ansi file prims, and it's turned on by
> default.
> 
> but as we talked it's only post 0.3
> 
> bye,
> 
> - 101
> 
> PS: someone with Visual C experience please take a look at the project.
> it's dog slow compared to the gcc compiled version, and the vm can not
> load the image if 'Global Optimizations' is turned on.

Try hosting it somewhere. If you don't have a place to do that, I can 
put up a temporary area on the Slate website, or you can use the wiki 
and upload files there.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: water.vcf
Type: text/x-vcard
Size: 208 bytes
Desc: not available
Url : /archives/slate/attachments/20040805/7423cad6/water.vcf


More information about the Slate mailing list