[Oberon] SystemV - Viewer Scroll

Skulski, Wojciech skulski at pas.rochester.edu
Tue Mar 19 14:43:18 CET 2019


This discussion is interesting for a physicist. Time in physics theories can equally well flow in either direction. The motion as a function of T is equally good as the motion as a function of (-T). I would think that the situation is the same with Text display. Scrolling up or down should be equivalent. Why is the beginning of the Text any different from the end? If you can count from the beginning, you can equally well count from the end. If not then why not?

It seems intuitively obvious that we use the beginning as the starting point. After reading this discussion it may be worthwhile to explain why.

Wojtek
________________________________________
From: Oberon [oberon-bounces at lists.inf.ethz.ch] on behalf of Joerg [joerg.straube at iaeth.ch]
Sent: Tuesday, March 19, 2019 8:23 AM
To: 'ETH Oberon and related systems'
Subject: Re: [Oberon] SystemV - Viewer Scroll

Tomas

Forward scrolling: when you detected a line break, you know the line starts. You immediately can draw characters one by one until you detect the second line break. You reached the line end, and the line is drawn already (single pass)

Backward scrolling: when you detect a line break, you know it’s the line END. You cannot start displaying the character as you don't know neither the line start nor its length. First, you have to search for the second line break in backward direction. Then, you know the line start and can start drawing the characters of the line in a second pass in forward direction.

br
Jörg

-----Original Message-----
From: Oberon <oberon-bounces at lists.inf.ethz.ch> On Behalf Of Andreas Pirklbauer
Sent: Tuesday, March 19, 2019 12:31 PM
To: ETH Oberon and related systems <oberon at lists.inf.ethz.ch>
Subject: [Oberon] SystemV - Viewer Scroll

   > For backward scrolling, there are indeed other strategies thinkable
   > to find line breaks compared to the current implementation.
   > Jörg

For example…

(1) One is to read the source text twice - the first pass just counts the number of line endings and computes the total displacement dY, while the second pass (which is fast since it reads from the file buffer in memory) does the actual scrolling. This is the approach chosen in EO.

(2) I have also played with generalizing the Files.Read operation to allow reading in both directions (i.e. forward and backward) - then only one pass is needed, at the expense of making module Files more complex. But it doesn’t really speed up things much, given that in (1) an in-memory file buffer is accessed during the second read operation.



More information about the Oberon mailing list