Hi Esteban,

On Sep 8, 2017, at 7:08 PM, Esteban Lorenzano <estebanlm@gmail.com> wrote:



On 8 Sep 2017, at 22:35, Peter Uhn��k <i.uhnak@gmail.com> wrote:

for example here

https://github.com/estebanlm/pharo-tonel/blob/master/src/Morphic-Core/Morph.class.st

but this is still WIP: for example timestamp needs to go to avoid conflicts.

If there is still time to change the syntax slightly I would get rid of the white space around the method source so instead of

Point class >> x: anInt1 y: anInt2
  [
    ^ self new setX: anInt1 Y: anInt2
  ]

specify it must be

Point class >> x: anInt1 y: anInt2
  [
    ^ self new setX: anInt1 Y: anInt2]

because trailing white space will only accumulate, something I see in Pharo and Squeak code.

Alternatively have the output add white space if required and the input remove any and all trailing white space.


and it also shows one downside --- up until now we didn't care much about how many methods are in class (because it was just another file), but now we have 10000 lines of code class.

I do not think this is a huge problem since the format is not intended to be for direct edition, but yes, this is a downside... no format will be perfect.

I don't think it's even a problem.  It's a benefit..  It's /much/ more convenient to be able to edit a single file than edit many different files if editing is required.  We already know the advantage it has in getting selectors out of file names :-)

The main issue with a file containing many methods is method order stability.  So sort by alphabetical order of method selector, not by protocol.


Esteban




On Fri, Sep 8, 2017 at 10:25 PM, Stephane Ducasse <stepharo.self@gmail.com> wrote:
From memory one class of class/trait and one for extension

In class/Trait

"class / trait comments


comment"

Special STON order for classes to minimic our logical order (ie
package tag add the end).

Class {

}

or

Trait {
   name: #T
}

+

Point class >> x: anInt1 y: anInt2
  [
    ^ self new setX: anInt1 Y: anInt2
  ]


+

STON for meta data

{category : "printing"}


Since I do not know STON all the above can be wrong but this is the idea.


Stef


On Fri, Sep 8, 2017 at 10:02 PM, Eliot Miranda <eliot.miranda@gmail.com> wrote:
> Hi All,
>
>> On Sep 8, 2017, at 9:44 AM, Stephane Ducasse <stepharo.self@gmail.com> wrote:
>>
>> Hi all
>>
>> At ESUG we discussed with Esteban, martin mcClure, Dale and (many many
>> others :), esteban designed a nice class file format. So that we will
>> not have 2Gb of space on harddisc, problems with long method names and
>> sluggish commits.
>
> Wow, that's great news!  It'll make it much easier to import from Pharo hit repositories.  Thank you, Esteban!
>
> Can someone post the grammar or a description of the syntax asap?
>
>>
>> He is waiting at Wien and is probably checking everything right now.
>>
>> It is a nice format because we will be able to use it to communicate
>> by emails using it. So readable, compact and I like it :)
>
> Lovely!  Details please :-)
>
>>
>> Stef
>>
>