i now modelling a system logger (to replace .changes file), and since i having no better idea, i'll try to use object literals for it.
Igor do not open too many projects :). Please finish the others. We want athens We are working on that with ezequiel and martin will probably help to get started with his phd. It would be good if we could get rid of the ! !! delimiters for now ezequiel is just strong fuel objects but indeed having a textual format can be really important. Note that we will probably want to store complete refactorings so that we can reapply a logical changes or a set of physical modifications. Stef
The idea is to preserve chunk format, but use object-literals for meta-information:
logEntryExamples #(Method: ClassName instance "or class" 'category' 'author' (DateAndTime 'xxx') 'priorsourceId' ). #(TraitMethod: TraitName instance "or class" 'category' 'author' (DateAndTime 'xxx') 'priorsourceId' ). #(DoIt: 'author' (DateAndTime 'xxx') ). #(ClassComment: ClassName 'author' (DateAndTime 'xxx') 'priorsourceId' ).
So, in log, it will look like:
!#(Method: Object instance 'testing' 'Super Mario' (DateAndTime ' 2012-10-21T11:30:03.892+02:00') 'abra-ka-da-br-a' )! testSequenceIfNotEmptyDo
self empty ifNotEmptyDo: [:s | self assert: false]. self assert: (self nonEmpty ifNotEmptyDo: [:s | self accessValuePutInOn: s]) = self valuePutIn ! !
Note the colon ':' in first literal. This is to prevent collision with any existing (and future) class name. As i suggested earlier, obj-literal can have name resolution logic in front of basic one - (Smalltalk at: name) and of course, there must be an extension mechanism, which can register own resolvers.
I think it would be easy to extend chunk reading logic to detect that meta information stored as object-literal. Searching whole .sources file, i found only one occurrence of '!#' sequence and zero '!#('
If i do:
'#( 1 2 3) yourself' in workspace, it writes:
!
#(1 3 4 ) yourself!
(an empty line between ! and #( )
-- Best regards, Igor Stasenko.