2011/7/18 Stéphane Ducasse <stephane.duca...@inria.fr>

> But I cannot  recompile the method I fileout.
> Can you?
> May be this is because I did not use the filelist and I copied and pasted
> from the file veronica sent me.
>
>
An alternative format not using escape sequence would be to define the end
of chunk on line, like in a shell script:

cat > myfile << END
here is
my own data
END

The chunk could be chosen by default and changed only if present in method
source (or class comment or whatever).

Particularly, if you want to transcribe class comments unaltered (that is
without quoting of any form), you can't rely on any syntax to delimit the
comments, there is none.


> > this is not because people were not using a decent syntax to fileout and
> that after they hacked the system that this is not a bug.
> > Yes, it is by no way meant to be human written and does not decently meet
> the requirements for scripting.
> > For exchanging code, the chunk format is a bit poor too, but it is
> manageable with a good change list tool (not the squeak one).
> > And remember, it was (and is still) used for logging system changes in
> the change log.
> > And it is very efficient for that.
> > With chunk format, you don't need quoting the code (except exclamation
> mark itself of course), and that's an important feature
> > IMO, this format served its purpose very decently.
> > Well, you can tell me the Squeak hacks to identify authors and timestamp
> are awfully implemented, I can only agree, but the basis are very simple.
> TSTTCPW.
>
> I think that it would deserve a new pass. Because "very simple" is not true
> when you look at the complexity = invoking the scanner to get some
> information and then poking around to know if this is a comment or a class
> definition.
>
>
Yes.
The format is mainly like this:
1) metadata
2) source

If metadata is missing or incomplete, then the tools have to try to decode
the source (generally a do-it).
This is particularly true in Squeak for a variety of actions
(I don't have an image handy, but I think removing renaming a class etc...
are in this category).


> > But you can.
> > You can browse the code, can't you ? go and see in .sources or .changes,
> you'll see a doubled !
> > You can fileOut, then fileIn, no problem.
>
> I spent some days a couple of year ago in the filein fileout because I
> wanted to load all the code of squeak starting from sq10 -> 3.9 and
> I can tell you that the allButLast first .... kind of expressions to skip
> over ' or ! to me indicate a problem because saving a element of program
> should not be like that and this is why the format of the fileout is not
> good.
> Of course it works but it does not mean that this is good.
>
> Stef
>

Totally agree, as I said before, I don't like the implementation because it
hardly readable, maintainable, and is very inefficient...
Especially the handling of Squeak meta additions (timestamp, author).
But the format by itself is very simple.
I don't buy the terms "good" as an absolute reference, it must be relative
to the requirements.
Expose your requirements, then we'll can say which format is good or not.

Nicolas

Reply via email to