RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account
Forums → Community Support →

Editing Text Without Crashing.

Subscribe to Editing Text Without Crashing. 125 posts, 21 voices

Posts per page:

Pages: 1 2 3 4 5

 
Jan 12, 2021 10:46am
Avatar Rick Murray (539) 10556 posts

I was thinking that we could use Pimp and Ho. It describes the same type of relationship, with the added bonus of annoying those who are already annoyed about the connotations of the word slave.
Win! 👍

 
Jan 12, 2021 10:58am
Avatar Chris Hall (132) 2961 posts

The problem with Sun and planet is that it can be confusing to the Catholic church. Is ‘Ho’ another word for prostitute?

 
Jan 12, 2021 11:01am
Avatar Clive Semmens (2335) 2201 posts

True and Yes.

 
Jan 12, 2021 11:02am
Avatar Chris Hall (132) 2961 posts

Is the plural of Ho (which is a word that I have never heard of except in the context of laughter so it is a bit obscure) ‘Ho Ho’?

 
Jan 12, 2021 12:19pm
Avatar Rick Murray (539) 10556 posts

Slang (probably leftpondian) version of “whore”.

 
Jan 12, 2021 1:56pm
Avatar Chris Hall (132) 2961 posts

Surely then it should be spelled ‘who.’ but pronounced ‘ho’?

 
Jan 12, 2021 2:03pm
Avatar GavinWraith (26) 1162 posts

In Shakespeare’s day whore and hour sounded the same. So many puns no longer work. It is an old word. The w crept in by the usual route of false learning.

 
Jan 12, 2021 2:21pm
Avatar Chris Hall (132) 2961 posts

Surely if Shakespeare had meant his plays to be funny, he would have included jokes? (Didn’t do English Lit. at my grammar school so I have never read any Shakespeare. We concentrated on more important things, such as Latin which was still (until 1960 but we were not told that the requirement had ceased until after we had started learning it in 1967!) required to get into University, both of them. Only the top set were taught Latin, of course, as only the top few per cent were needed to go to University.)

 
Jan 12, 2021 2:24pm
Avatar Clive Semmens (2335) 2201 posts

He did, and he did.

 
Jan 12, 2021 3:41pm
Avatar Steve Pampling (1551) 6525 posts

In Shakespeare’s day whore and hour sounded the same. So many puns no longer work. It is an old word.

Gives a hole new slant to being paid the hourly rate. :)

 
Jan 12, 2021 7:08pm
Avatar David R. Lane (77) 562 posts

I have done an internet search using the search phrase “logical lines and physical lines” and several of the results say that physical lines are what you see on the screen and logical lines are statements that may stretch over several physical lines. None of these follow StrongED on this that has it the other way round.

 
Jan 12, 2021 8:17pm
Avatar Steve Pampling (1551) 6525 posts

I have done an internet search using the search phrase “logical lines and physical lines” and several of the results say that physical lines are what you see on the screen and logical lines are statements that may stretch over several physical lines. None of these follow StrongED on this that has it the other way round

Does it?

I query that statement as I have just repeated a check done the other day with the menu sequence (key shortcut F5) and irrespective of whether the displayed option says “Goto logical line” or “Goto physical line” when I supply a line number like 37 it always goes to physical line 37

The definition in the StrongHelp file associated with SE has a definition of Logical lines that differs from the one discussed here(and probably as described anywhere other than that SH file), but the Physical definition most definitely matches what we’ve been talking about. I count down physical lines on the screen and the line number matches the info in the bottom of the SE window.

 
Jan 13, 2021 12:12am
Avatar David R. Lane (77) 562 posts

Wow! I have just pressed F5 when the input focus was this reply thinking the input was to the StrongED window. So I have to start all over again. :-((

I have a BASIC program of over 500 statements including some blank lines. The StrongED window has a wrap width of 80 with many statements wrapped over more than one line. I enter 37 in the Goto field in the Goto window (F5) with the Goto physical line option and it goes to statement line 37, but with the logical line option it goes to statement line 29. The difference of 8 being due to there being 8 statement lines preceding that each occupy 2 physical lines on the screen. These results seem the wrong way round to me. Statement line 29 is on physical line 37 and statement line 37 is on physical line 45.
I have also tested the current line field in the goto wondow (F5) which shows the problem more clearly. Putting the cursor first on physical line 24 corresponding to statement line 16, then pressing F5, the Goto window with the Goto Physical Line option says that the current line is 16, but with the Logical line option it says that the current line is 24 – exactly the wrong way round. It would be interestting to know what you get performing the same experiment.

As regards the line number in the bottom of the StrongED window, this matches the statement number in my case, not the physical line number.
Since our experiences are different, all I can think is that either we have different versions of StrongED, mine is 4.69f11, or something is wrong with my settings.

 
Jan 13, 2021 8:15am
Avatar Steve Pampling (1551) 6525 posts

I have a BASIC program of over 500 statements including some blank lines. The StrongED window has a wrap width of 80 with many statements wrapped over more than one line.

“Wrapped lines” is the SE definition.

Since our experiences are different, all I can think is that either we have different versions of StrongED, mine is 4.69f11, or something is wrong with my settings.

v4.70a14

 
Jan 13, 2021 11:55am
Avatar David R. Lane (77) 562 posts

I am getting the error “Couldn’t connect to server” when trying to get version 4.70 of StrongED from www.stronged.iconbar.com.

Logical and Physical line numbers in Zap (v1.48) accord with my expectations. Note that in this case the physical line number will always be greater than or equal to the logical line number. It’s the other way round in my version of StrongED.

 
Jan 13, 2021 4:05pm
Avatar Grahame Parish (436) 330 posts

The Iconbar site was down for a while today – seems to be back now.

 
Jan 13, 2021 4:26pm
Avatar Steve Pampling (1551) 6525 posts

There was a network outage that took out some systems in the central NHS for a short while, failed over to alternates so pretty brief.
Incident update is due 16:30 (allegedly)

 
Jan 14, 2021 1:28pm
Avatar David R. Lane (77) 562 posts

I have now downloaded alpha version 4.70a13 (11/10/18) and it behaves the same way as my previous version as regards line numbering. I ‘hid’ my older version 4.69f11 including StrED_cfg, copied in this alpha version and re-booted the computer to make sure no previous settings could affect my test.

I didn’t see on the website your version 4.70a14. So, are you a tester?

 
Jan 14, 2021 3:42pm
Avatar Steve Pampling (1551) 6525 posts

I didn’t see on the website your version 4.70a14. So, are you a tester?

As much as anyone else is…

From the StrongED main page, choose the link in the paragraph about Test releases to go here

Edit: Note I gave the first landing page as that’s the route Fred prefers

 
Jan 14, 2021 10:37pm
Avatar Fred Graute (114) 547 posts

I have done an internet search using the search phrase “logical lines and physical lines” and several of the results say that physical lines are what you see on the screen and logical lines are statements that may stretch over several physical lines. None of these follow StrongED on this that has it the other way round.

When I implemented line numbers in StrongED I also researched “logical lines and physical lines”. I’ve just done another quick scan and the result is much the same as back then: a physical line is terminated by an end-of-line sequence (lf, cr or combination thereof).

This means that a physical line is determined by what’s in the file, not what’s on the screen. StrongED refers to such lines internally as TextLines.

The term ‘logical lines’ is where the search results and StrongED differ. The results speak of a logical line when it’s a program statement that should be seen as a single line even when it’s split across two or more physical lines.

An example of a logical line is a C function definition that has many parameters. To aid readability some of those parameters are placed on the following line. This keeps the physical lines short so they don’t have to be softwrapped as that makes things less easy to read.

StrongED uses the term ‘logical lines’ for lines as shown on the screen where long physical lines may have been split into multiple display lines by the wrapping logic. Internally these are called WrapLines.

At the time of implementation I did ask on the StrongED mailing list what users preferred: Zap’s style or StrongED’s current style. The latter came out as a slight favourite so that’s what I went with.

An alternative mentioned was to use the internal terms TextLines and WrapLines. This would avoid any confusion over the term ‘logical lines’. Perhaps I should take that idea into consideration again.

Hopefully that sheds some light on StrongED’s line numbers.

BTW there is no difference in line numbering (terms) between 4.69 and 4.70!

 
Jan 15, 2021 4:37pm
Avatar David R. Lane (77) 562 posts

When I implemented line numbers in StrongED I also researched “logical lines and physical lines”. I’ve just done another quick scan and the result is much the same as back then: a physical line is terminated by an end-of-line sequence (lf, cr or combination thereof).

That isn’t what I have read in 5 different websites found by using search phrase “logical lines and physical lines”. Not one of them uses this terminology the StrongED way. The websites were Wikipedia, codeSansar, ibiblio, ProjectCodeMeter and StackOverflow – these were the ones listed first using DuckDuckGo search engine. Most spoke only of Python, but Wikipedia also gave examples in the C programming language. In every case the physical number of the line was greater than or equal, greater when after wrapped lines, to the logical line number. So StrongED seems to be alone in this.

The website that Rick Murray cites doesn’t support his interpretation. The section “Logical lines and physical lines” includes the following.
“Physical lines are the lines in appearance that are made on account of the line breaks on the screen. It is called a “physical” line, because it results from the physical limit of a screen. On the other hand, the lines ALTAIR handles are logical lines. Logical lines treat a linefeed code as an end of line. It is called a “logical” line, because it results from a logical end."

That the web references are mainly to Python should matter to us as this is the programming language of the times and is being promoted on the Raspberry-Pi for Linux and for RISC OS. Isn’t this language the one schools are promoting?

 
Jan 15, 2021 5:40pm
Avatar Rick Murray (539) 10556 posts

The website that Rick Murray cites doesn’t support his interpretation.

Which part doesn’t support it?

To me, a physical line is a line as it appears on the screen.

On the other hand, a logical line is a line that ends at a logical end point. While the description in the linked site specifies that a linefeed is the end of a logical line, this is a very simplistic version.

I have no problem if a sequence of 192 characters (text or HTML) is wrapped into three physical lines. It is simple and acceptable.

However, I wish to point out in the sphere of programming, one can consider the following to be a single logical line:

  if ( ( ( this == that ) ||
         ( something == somethingelse ) ) &&
         ( this != somethingelse ) )
printf("This \
is \
a \
single \
line \
to \
the \
compiler.\n");

I don’t expect StrongEd (or anything on RISC OS) to consider such things as single logical lines as the file parsing can get complicated in a hurry.

Physical lines are the lines in appearance that are made on account of the line breaks on the screen.

Yeah, that’s spectacularly badly worded – saying that a logical line ends with linebreaks, and saying the same thing about physical lines is…gibberish.

Better to say that physical lines are made in appearance by the physical properties of the screen (how many characters across). Linebreaks don’t apply here, how the editor places the cursor to the start of the next line is an implementation detail that shouldn’t be a part of this description.
bq. Most spoke only of Python

Yeah, adding “-python” to the search string helps…a bit.

I think the many references to Python are because whitespace matters in Python.

This means that a physical line is determined by what’s in the file, not what’s on the screen.

Uh… isn’t this back to front? What’s in the file is supposed to be the logical line, with the editor formatting it into physical lines according to whatever method (wrapping etc).

 
Jan 15, 2021 7:30pm
Avatar David R. Lane (77) 562 posts

@Rick
Much of what you have said actually agrees with what I have said! The rest might be interesting, but is not relevant to my posts. You don’t say where the last quote comes from, but it isn’t from me.

 
Jan 15, 2021 8:12pm
Avatar Rick Murray (539) 10556 posts

You don’t say where the last quote comes from, but it isn’t from me.

It is from Fred, the post above yours! ;-)

 
Jan 15, 2021 9:12pm
Avatar GavinWraith (26) 1162 posts

In the early days of computing some servers used to strip spaces from the end of lines in text files [guess whose – and let us not get into what a text file or a line is]. So programming language designers soon realised that using white space or layout for semantic purposes was not to be recommended. Send the text of your program over the internet, and it ends up meaning something different. Despite this, in the early days of functional programming, some languages, and in particular Haskell, used layout (the offside rule ) to indicate block structure. This was ameliorated by allowing a semicolon as an end-of-statement marker. Python followed suit.

There is only one place in Lua where the notion of a line of text is used: in the io.lines iterator which reads in lines of text from a file.

The physical v logical stuff is mostly just words. I hate text editors that try to keep lines of one kind as lines of the other, so that you have to scroll the window horizontally to see the rest of the line, and you can never see the whole of it. Hard and soft linebreaks seem a better solution to me, especially if there is colour to explain the difference.

Pages: 1 2 3 4 5

Reply

To post replies, please first log in.

Forums → Community Support →

Search forums

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Description

Community-provided support for all users of RISC OS.

Voices

  • Rick Murray (539)
  • Chris Hall (132)
  • Clive Semmens (2335)
  • GavinWraith (26)
  • Steve Pampling (1551)
  • David R. Lane (77)
  • Grahame Parish (436)
  • Fred Graute (114)

Options

  • Forums
  • Login
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Beast theme is based on Beast's default layout

Valid XHTML 1.0  |  Valid CSS

Powered by Beast © 2006 Josh Goebel and Rick Olson
This site runs on Rails

Hosted by Arachsys