DeltaStreams small update

Klaus D. Witzel klaus.witzel at cobss.com
Thu Aug 23 13:56:25 UTC 2007


Thank you Michael for your 2c's :)

The format you suggested is so easy to translate into the XML-format that  
I had in mind, just by supplying an appropriate self (calls for a traits  
implementation ;-). Even the text body with its indentations and  
whitespace is taken care of.

Of course the other direction (XML to your 2c's) is a bit more complicated  
but doesn't look undoable.

Thanks again, will keep in mind you have a library for such things :)

/Klaus

On Thu, 23 Aug 2007 15:30:06 +0200, Michael wrote:

> Klaus D. Witzel wrote:
>> Hi Göran,
>>
>> I refer to your proposed Delta File Format, with your remarks Human  
>> readable? encoding , (utf8? BOM or no BOM?) (put encoding in header?)  
>> and the Method Source preamble.
>>
>> Can I suggest to consider a small XML-parseable format, which is so  
>> flat that it is easy to parse by just the two methods #upTo: and  
>> #scanTokens: (perhaps assisted by #replaceAll: $" with: $' and  
>> #utf8ToIso).
>>
>> This way Deltas could perfectly be used in other markedup docs, for  
>> example with xhtml. Also transport (http+friends) and transfer encoding  
>> can be handled by existing (hope so :) protocols. It would look like
>>
> VisualWorks has an XML file out format that is the default. It has  
> brought the product no discernable advantage except that it is aware of  
> packages, properties etc that were never added to the standard bang  
> fileout format (which was an oversight by someone at some point in the  
> past).
>
> At one point there was some fevered excitement over the idea of  
> presenting smalltalk xml fileouts using XSLT to make XHTML.. but at the  
> end of the day, the outcome was hardly spectacular - you could generate  
> something far more interesting directly from the image and make it  
> interactive with seaside, for example.
>
> As to human readable - well.. let's just say XML leaves a lot to be  
> desired there :) I'd much rather see pure message sends going on here,  
> eg:
>
> self encoding: #utf8.
> self class: 'SuperDeltaObject' superclass: 'Object' do: [
>     self instanceVariables: #(a b c).
>     self comment: 'uhm, what class comment ;-)'.
>     self method: 'with:do:' category: '--all--' timestamp: '8/23/2004  
> 14:41' author: 'st' body: [
>        ^this perform: that
>     ].
>     self classMethod: 'initialize' category: 'class initialization'  
> timestamp: '8/23/2004 14:42' author: 'st' body: [
>     ].
> ]
>
> I'm sure there would be plenty of debate on the actual methods used to  
> build things, mode versus scope and things like that.. all worthwhile.  
> But the beauty of it is that it doesn't introduce a non-smalltalk syntax  
> such as the bangs or xml.
>
> Just my 2c. I've got a library in VW that does most of this. I'm sure  
> the technique could be ported fairly readily.
>
> Michael
>> <?xml version="1.0" encoding="UTF-8"?><...  
>> st:xmlns="http://www.squeak.org/2007/deltaFileFormat">
>> <st:class name="SuperDeltaObject" superclass="Object" dialect="Squeak">
>>  <st:classcomment /> <!--uhm, what class comment ;-) -->
>>  <st:method selector="with:do:" category="--all--" timestamp="8/23/2004  
>> 14:41" author="st">
>> with: this do: that
>>  ^ this perform: that
>>  </st:method>
>>  <st:metaclass instvars="">
>>   <st:method selector="initialize" category="class initialization"  
>> timestamp="8/23/2004 14:42" author="st">
>> initialize
>>  </st:method>
>>  </st:metaclass>
>> </st:class></...>
>>
>> All the not explicitly mentioned attributes can have an intuitive  
>> default (like format="fixed" and instvars="", etc) and complex  
>> attributes (like oldinstvarorder="c b a") can be ignored by simple  
>> readers.
>>
>> It looks a bit wordy but, what do you think?
>>
>> /Klaus
>>
>> On Tue, 21 Aug 2007 03:01:45 +0200, <goran at krampe.se> wrote:
>>
>>> Hi all!
>>>
>>> Ok, managed to get some more code written tonight - but I am still on a
>>> low level here - matching up with ChangeSet etc. But if anyone wants to
>>> join in:
>>>
>>>     See details here: http://wiki.squeak.org/squeak/6001
>>>
>>> The first goal is to make DSDelta work as a "true log" capturing all
>>> changes in full detail.
>>>
>>> One question for you gurus out there - do we care about changing the
>>> ORDER of say instvars?
>>>
>>> regards, Göran
>>>
>>>
>>
>>
>>
>
>
>





More information about the Squeak-dev mailing list