[V3dot10] [ab] Why ruby?

Damien Cassou damien.cassou at laposte.net
Tue Feb 13 19:38:11 UTC 2007


Keith Hodges a écrit :
> stephane ducasse wrote:
>> I was rethinking about it and I think that if you are building an 
>> infrastructure tools (ie people will rely on it).
>> You should write it in squeak else people may not want to invest on it.
>>
>> Stef
>>
> Indeed I understand,
> 
> My aim is to keep the ruby end of things as simple as possible in order 
> to facilitate a future port into Gjallar.
> 
> However considering that squeak hardly supports the underlying os in any 
> significant way. I am thinking that it is actually quite difficult to do 
> this well until this aspect of squeak is improved.
> 
> For example only today I discover that squeak #exists test does not 
> check whether the directory is even writeable, indeed I cannot even find 
> an implementation of #isWriteable in the FileDirectory hierarchy.
> 
> I was envious of some of the infrastructure available in Gjallar, 
> especially their task scheduler, and mail interfaces. But I was unable 
> to get gjallar running on my machine since their linux port is very very 
> new.
> 
> Now, if you put "ruby Rio" into google and have a look at the first hit, 
> you will find what I think is a brilliant interface for io and file 
> stuff. Lets chuck FileDirectory and implement a Rio for squeak ;-)

Did you had a look at FileMan ? It is a prepared package of the 
squeak-dev image so you can install it easily (just open the script 
manager from the open menu, select "prepared packages", choose "FileMan" 
and click on the link at the bottom of the comment).

To get the file content:
'test.txt' asFileEntry textContents.

To write in a file:
'./' asDirectoryEntry at: 'newFile.txt' put: 'Content of the new file'

FileMan may not be complete, but new features can be added in my opinion.

-- 
Damien Cassou


More information about the V3dot10 mailing list