The Trunk: Collections-fbs.514.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Collections-fbs.514.mcz

commits-2
Frank Shearar uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-fbs.514.mcz

==================== Summary ====================

Name: Collections-fbs.514
Author: fbs
Time: 26 April 2013, 9:30:07.501 pm
UUID: 26b584d4-1ad3-40b0-b9b1-d888e122116e
Ancestors: Collections-fbs.513

Revert the over-eager (attempt at a) fix.

=============== Diff against Collections-fbs.513 ===============

Item was changed:
  ----- Method: WriteStream>>nextChunkPut: (in category 'fileIn/Out') -----
  nextChunkPut: aString
  "Append the argument, aString, to the receiver, doubling embedded terminators."
 
  | i remainder terminator |
  terminator := $!!.
  remainder := aString.
  [(i := remainder indexOf: terminator) = 0] whileFalse:
  [self nextPutAll: (remainder copyFrom: 1 to: i).
  self nextPut: terminator.  "double imbedded terminators"
  remainder := remainder copyFrom: i+1 to: remainder size].
  self nextPutAll: remainder.
  aString includesUnifiedCharacter ifTrue: [
  self nextPut: terminator.
  self nextPutAll: ']lang['.
  aString writeLeadingCharRunsOn: self.
  ].
  self nextPut: terminator.
- self flush.
  !


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Collections-fbs.514.mcz

Eliot Miranda-2
Tghe problem is a missing flush.  Putting it in nextChunkPut: is a hack.  Putting it in clients is more work, but the correct place. So e.g.

classComment: aString stamp: aStamp
"Store the comment, aString or Text or RemoteString, associated with the class we are organizing.  Empty string gets stored only if had a non-empty one before."

| ptr header file oldCommentRemoteStr |
(aString isKindOf: RemoteString) ifTrue:
[SystemChangeNotifier uniqueInstance classCommented: self.
^ self organization classComment: aString stamp: aStamp].

oldCommentRemoteStr := self organization commentRemoteStr.
(aString size = 0) & (oldCommentRemoteStr == nil) ifTrue: [^ self organization classComment: nil].
"never had a class comment, no need to write empty string out"

ptr := oldCommentRemoteStr ifNil: [0] ifNotNil: [oldCommentRemoteStr sourcePointer].
SourceFiles ifNotNil: [(file := SourceFiles at: 2) ifNotNil:
[file setToEnd; cr; nextPut: $!. "directly"
"Should be saying (file command: 'H3') for HTML, but ignoring it here"
header := String streamContents: [:strm | strm nextPutAll: self name;
nextPutAll: ' commentStamp: '.
aStamp storeOn: strm.
strm nextPutAll: ' prior: '; nextPutAll: ptr printString].
file nextChunkPut: header]].
self organization classComment: (RemoteString newString: aString onFileNumber: 2) stamp: aStamp.
SystemChangeNotifier uniqueInstance classCommented: self.

needs to read

classComment: aString stamp: aStamp
"Store the comment, aString or Text or RemoteString, associated with the class we are organizing.  Empty string gets stored only if had a non-empty one before."

| ptr header file oldCommentRemoteStr |
(aString isKindOf: RemoteString) ifTrue:
[SystemChangeNotifier uniqueInstance classCommented: self.
^ self organization classComment: aString stamp: aStamp].

oldCommentRemoteStr := self organization commentRemoteStr.
(aString size = 0) & (oldCommentRemoteStr == nil) ifTrue: [^ self organization classComment: nil].
"never had a class comment, no need to write empty string out"

ptr := oldCommentRemoteStr ifNil: [0] ifNotNil: [oldCommentRemoteStr sourcePointer].
SourceFiles ifNotNil: [(file := SourceFiles at: 2) ifNotNil:
[file setToEnd; cr; nextPut: $!. "directly"
"Should be saying (file command: 'H3') for HTML, but ignoring it here"
header := String streamContents: [:strm | strm nextPutAll: self name;
nextPutAll: ' commentStamp: '.
aStamp storeOn: strm.
strm nextPutAll: ' prior: '; nextPutAll: ptr printString].
file nextChunkPut: header; flush]].
self organization classComment: (RemoteString newString: aString onFileNumber: 2) stamp: aStamp.
SystemChangeNotifier uniqueInstance classCommented: self.

i.e. file nextChunkPut: header => file nextChunkPut: header; flush

On Fri, Apr 26, 2013 at 1:30 PM, <[hidden email]> wrote:
Frank Shearar uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-fbs.514.mcz

==================== Summary ====================

Name: Collections-fbs.514
Author: fbs
Time: 26 April 2013, 9:30:07.501 pm
UUID: 26b584d4-1ad3-40b0-b9b1-d888e122116e
Ancestors: Collections-fbs.513

Revert the over-eager (attempt at a) fix.

=============== Diff against Collections-fbs.513 ===============

Item was changed:
  ----- Method: WriteStream>>nextChunkPut: (in category 'fileIn/Out') -----
  nextChunkPut: aString
        "Append the argument, aString, to the receiver, doubling embedded terminators."

        | i remainder terminator |
        terminator := $!!.
        remainder := aString.
        [(i := remainder indexOf: terminator) = 0] whileFalse:
                [self nextPutAll: (remainder copyFrom: 1 to: i).
                self nextPut: terminator.  "double imbedded terminators"
                remainder := remainder copyFrom: i+1 to: remainder size].
        self nextPutAll: remainder.
        aString includesUnifiedCharacter ifTrue: [
                self nextPut: terminator.
                self nextPutAll: ']lang['.
                aString writeLeadingCharRunsOn: self.
        ].
        self nextPut: terminator.
-       self flush.
  !





--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

[Job] Six months in S.F. Bay Area

Dan Ingalls
Folks -

We have an opening to improve and evolve the Lively Kernel web development framework.  For those who are not familiar with this work, you can visit the somewhat casual web site at http://Lively-Kernel.org, or a video demonstration at http://lively-kernel.org/videos/jsconf-live-web-2012.

The work is all in JavaScript, a language that you may have heard of, and it is actually very close to Squeak, once you get used to the Java-like syntax, and add our class library.  The environment and self-supporting development tools will be familiar to any Squeaker because the system uses a Morphic architecture with browser, inspector and other tools all written and accessible in the system itself.

The range of possible assignments is somewhat broad.  Examples in include development of a collaborative project management space, tasteful graphic redesign of Lively's widget library, experimental hookup of Lively to the open-source Virtual Worlds framework, completion of a nearly complete debugger in the style of Squeak, perfection of the system in the area of sketching and presentation tools.

Applicants should ideally be resident in the Bay Area, and be able to be present on-site at least a day a week.  In addition it will likely be necessary to spend 2-3 weeks on-site while they come up to speed in the project.

Please do not reply to the list, but rather directly to me.  You should include a resume, your self-assessed strengths and weaknesses, and any things you have actually built of which you are especially proud, and why.

Thanks

  - Dan