convincing squeak to use LF instead of CR as the line separator...
JArchibald at aol.com
JArchibald at aol.com
Tue May 29 22:24:34 UTC 2001
=> 5/29/01 4:21:13 PM EDT, crosby at qwes.math.cmu.edu =>
<< First, squeak has a 'binary' format for changesets and projects. This
format is supposed to be portable between all of squeaks platforms. The
fact that this format is ASCII text with Mac line-ending conventions
doesn't change the fact that it is intended to be a binary output. >>
This is not quite correct. ChangeSets are in a form known as "chunk" form, a
text form described by Glenn Krasner, and described in the 'Green' book.
Unfortunately, no specific definition of line-ends was made in that
description. (It is of some small amusement to realize that the format was
developed by Glenn as somewhat of an after-thought. The intention of early
Smalltalk developers was to distribute Smalltalk function predominately by
means of images.). The source contained in .changes and .sources is in (two
different) moderately compressed forms, which though they are text (& binary)
based, break rather dramatically when the line-ends are messed with. With
ChangeSets, the problem is more pernicious than deadly.
The problem has been going on since the mid-80's, as soon as Intel and Mac
based Smalltalks were derived (perhaps even earlier), and individual
Smalltalkers began using platform specific editors to access the Chunk file
input/outputs. It is fairly standard in Smalltalk circle to fileOut a Class
or Class Category (or other large segment of a system) and print it out for
hard-copy study. These will all be in Chunk format.
Recent attempts to define requirements for Squeak submissions are an
administrative attempt to solve certain problems, but does not change the
LF/CR problems. A .tar.gz file can contain any of the possible line-ends. In
actual practice, creating new code from old code, a typical practice, simply
results occasionally in ChangeSets having all possible combinations of
line-ends within a single fileOut.
There has been more heat / less light to this topic than any other. It has
also endured longer than any other misery.
Regular use of 'remove line feeds' in FileList browsers should be done by any
who intend to made Chunk file submissions.
Cheers,
Jerry.
____________________________
Jerry L. Archibald
systemObjectivesIncorporated
____________________________
More information about the Squeak-dev
mailing list
|