The Trunk: ST80-nice.220.mcz

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

The Trunk: ST80-nice.220.mcz

commits-2
Nicolas Cellier uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-nice.220.mcz

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

Name: ST80-nice.220
Author: nice
Time: 27 October 2016, 2:43:25.251747 am
UUID: e617501e-764e-4c9c-8c0c-a2a559e84940
Ancestors: ST80-tfel.219

Remove an old Transcript show: remnant from horrorful text selection debug session.

=============== Diff against ST80-tfel.219 ===============

Item was changed:
  ----- Method: CharacterBlockScannerForMVC>>crossedX (in category 'stop conditions') -----
  crossedX
  characterIndex == nil ifFalse: [
  "If the last character of the last line is a space,
  and it crosses the right margin, then locating
  the character block after it is impossible without this hack."
+ characterIndex > text size ifTrue: [
- characterIndex > text size ifTrue: [Transcript cr; show:'here'.
  lastIndex := characterIndex.
  characterPoint := (nextLeftMargin ifNil: [leftMargin]) @ (destY + line lineHeight).
  ^true]].
  ^super crossedX!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: ST80-nice.220.mcz

Karl Ramberg
Should the comment be changed here? Or is it still a hack ?

Best,
Karl

On Thu, Oct 27, 2016 at 2:43 AM, <[hidden email]> wrote:
Nicolas Cellier uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-nice.220.mcz

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

Name: ST80-nice.220
Author: nice
Time: 27 October 2016, 2:43:25.251747 am
UUID: e617501e-764e-4c9c-8c0c-a2a559e84940
Ancestors: ST80-tfel.219

Remove an old Transcript show: remnant from horrorful text selection debug session.

=============== Diff against ST80-tfel.219 ===============

Item was changed:
  ----- Method: CharacterBlockScannerForMVC>>crossedX (in category 'stop conditions') -----
  crossedX
        characterIndex == nil ifFalse: [
                "If the last character of the last line is a space,
                and it crosses the right margin, then locating
                the character block after it is impossible without this hack."
+               characterIndex > text size ifTrue: [
-               characterIndex > text size ifTrue: [Transcript cr; show:'here'.
                        lastIndex := characterIndex.
                        characterPoint := (nextLeftMargin ifNil: [leftMargin]) @ (destY + line lineHeight).
                        ^true]].
        ^super crossedX!





Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: ST80-nice.220.mcz

Nicolas Cellier
Hi Karl,
Hack sounds like a good name to me.
You can't imagine what a nest of stateful twisted tricky code modified during 30 years I had to patiently untangle...
But it's very hard to remember all the details 3 years after...
Fortunately, we have an electronic memory to assist us:
If I dig thru the [The Trunk] commits threads in the mailing list it seems that on 2 October 2013:
- the hack was already named "hack" before Graphics-nice.243.mcz
- it was in generic code (for both Morphic/ST80) but dedicated to ST80 only
- so I ported it back to a ST80 specific scanner in ST80-nice.152.mcz

So, despite my initials and my opinion, the name "hack" here is not my own production, just a copy/paste ;)
Now that trunk MC server also has a longer memory, you can see the text already present in CharacterBlockcanner>>crossedX version ar 12/15/2001.
And I would not be much surprised that most code in this area comes from Xerox era, and Dan Ingalls himself.


2016-10-27 11:04 GMT+02:00 karl ramberg <[hidden email]>:
Should the comment be changed here? Or is it still a hack ?

Best,
Karl

On Thu, Oct 27, 2016 at 2:43 AM, <[hidden email]> wrote:
Nicolas Cellier uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-nice.220.mcz

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

Name: ST80-nice.220
Author: nice
Time: 27 October 2016, 2:43:25.251747 am
UUID: e617501e-764e-4c9c-8c0c-a2a559e84940
Ancestors: ST80-tfel.219

Remove an old Transcript show: remnant from horrorful text selection debug session.

=============== Diff against ST80-tfel.219 ===============

Item was changed:
  ----- Method: CharacterBlockScannerForMVC>>crossedX (in category 'stop conditions') -----
  crossedX
        characterIndex == nil ifFalse: [
                "If the last character of the last line is a space,
                and it crosses the right margin, then locating
                the character block after it is impossible without this hack."
+               characterIndex > text size ifTrue: [
-               characterIndex > text size ifTrue: [Transcript cr; show:'here'.
                        lastIndex := characterIndex.
                        characterPoint := (nextLeftMargin ifNil: [leftMargin]) @ (destY + line lineHeight).
                        ^true]].
        ^super crossedX!









Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: ST80-nice.220.mcz

Karl Ramberg
OK :-)
Some of the layout stuff is really painful to debug

Best,
Karl

On Thu, Oct 27, 2016 at 11:04 PM, Nicolas Cellier <[hidden email]> wrote:
Hi Karl,
Hack sounds like a good name to me.
You can't imagine what a nest of stateful twisted tricky code modified during 30 years I had to patiently untangle...
But it's very hard to remember all the details 3 years after...
Fortunately, we have an electronic memory to assist us:
If I dig thru the [The Trunk] commits threads in the mailing list it seems that on 2 October 2013:
- the hack was already named "hack" before Graphics-nice.243.mcz
- it was in generic code (for both Morphic/ST80) but dedicated to ST80 only
- so I ported it back to a ST80 specific scanner in ST80-nice.152.mcz

So, despite my initials and my opinion, the name "hack" here is not my own production, just a copy/paste ;)
Now that trunk MC server also has a longer memory, you can see the text already present in CharacterBlockcanner>>crossedX version ar 12/15/2001.
And I would not be much surprised that most code in this area comes from Xerox era, and Dan Ingalls himself.


2016-10-27 11:04 GMT+02:00 karl ramberg <[hidden email]>:
Should the comment be changed here? Or is it still a hack ?

Best,
Karl

On Thu, Oct 27, 2016 at 2:43 AM, <[hidden email]> wrote:
Nicolas Cellier uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-nice.220.mcz

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

Name: ST80-nice.220
Author: nice
Time: 27 October 2016, 2:43:25.251747 am
UUID: e617501e-764e-4c9c-8c0c-a2a559e84940
Ancestors: ST80-tfel.219

Remove an old Transcript show: remnant from horrorful text selection debug session.

=============== Diff against ST80-tfel.219 ===============

Item was changed:
  ----- Method: CharacterBlockScannerForMVC>>crossedX (in category 'stop conditions') -----
  crossedX
        characterIndex == nil ifFalse: [
                "If the last character of the last line is a space,
                and it crosses the right margin, then locating
                the character block after it is impossible without this hack."
+               characterIndex > text size ifTrue: [
-               characterIndex > text size ifTrue: [Transcript cr; show:'here'.
                        lastIndex := characterIndex.
                        characterPoint := (nextLeftMargin ifNil: [leftMargin]) @ (destY + line lineHeight).
                        ^true]].
        ^super crossedX!













Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: ST80-nice.220.mcz

timrowledge

> On 27-10-2016, at 2:30 PM, karl ramberg <[hidden email]> wrote:
>
> OK :-)
> Some of the layout stuff is really painful to debug

This turns out to be incorrect. In fact *all* that layout stuff is really painful to debug.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: BFM: Branch on Full Moon