On Sat, Oct 7, 2017 at 1:18 AM, Esteban Lorenzano <esteba...@gmail.com>
wrote:

> Hi all,
>
> I released Iceberg version 0.6. It includes a lot of small tweaks and
> fixes, but the most important inclusion is tonel file format which aims to
> replace file tree.
>
> What is Tonel? (https://github.com/pharo-vcs/tonel)
> Tonel is a file-per-class file format for monticello repositories. It’s
> purpose is to reduce the amount of files touched each operation, make the
> IO faster an compact the repositories database.
> It has also as an objective to offer an “easy-to-read” format, so people
> wanting to understand a chunk of code will recognise it easily.
> For testing, I migrated several of my projects to Tonel and I’ve been
> using it, you can see some as examples:
>
> https://github.com/estebanlm/MUDClient
> https://github.com/estebanlm/pharo-tonel (this was just an example and it
> has some minimal errors already fixed)
>

Tonel looks really nice - very clean and readable.

A question about the dual use of #category here...
    Class {
        #name : #MUDAliasCommand,
        #superclass : #Object,
        #instVars : [
                'keywords'
        ],
        #classVars : [
                'CommandParser'
        ],
        #category : 'MUDClient-Plugin-Alias-Parser'
    }
    { #category : #'instance creation' }
    MUDAliasCommand class >> fromString: aString [
        ^ self parse: aString
    ]

It would be nice to separate the semantics, changing one to either #package
or the other to #protocol. I thought we were leaving class categories
behind, so the following seems to provide a more consistent future...
      #package : 'MUDClient-Plugin-Alias-Parser'


Now because we live with this the next ten years, even though I'm mindful
that you're "done", I'm going to be annoying and ask consideration to fine
tune one thing, to move the open-square-bracket like this...
    { #category : #'instance creation' } [
        MUDAliasCommand class >> fromString: aString
    ^ self parse: aString
    ]

This would help adhoc copy-pasting from web repos into the Image.  Although
as Tonel currently stands it is trivial to delete one square bracket, it
would be more elegant not doing it when copy-pasting a dozen methods.

I hope for a future where new methods might be created directly from
Playground by doing...
    MUDAliasCommand class >> fromString: aString
  ^ self parse: aString

and further, if Opal could be made parse STON format and recognize the
back-to-back close-curly/open-square brackets**, you could copy-paste a
whole class from a Tonel web repo into Playground or the Browser to adhoc
install of a whole class. That would be magic!

** Actually this might be easier to identify than if they are separated.

On a minor note, "fromString: aString" is part of the method source, so it
conceptually it should be okay to have inside the square brackets.

Anyway, I understand if there are constraints against making this change,
being late to the party but some thoughts don't arise until there is a
practical example to reflect on and the final chance is imminent, so just
asking it be considered.

cheers -ben


P.S. in a world where Bloc can do arbitrary objects inline with text, the
"MUDAliasCommand class >>" part might show as one chunk to the left of
"fromString: aString".  The benefit for newcomers would be *explicitly*
showing which instance/class-side the method belongs to, rather than
relying on the implicit selection of the class-button which newcomers often
miss (I remember being caught on that a few times until I got my eye
attuned)

Reply via email to