Reminder: Developer Meetup - Saturday, 12th August 2023
Andrew McCarthy (3688) 605 posts |
A quick heads up and a reminder that our next informal “Coding on RISC OS” fireside chat, online Zoom meetup is this Saturday, 12th August 2023, at 7:30 pm (18:30 UTC). If you are interested in coming along, DM me on ChatCube, Twitter or Toot, or send an email for the Zoom meeting credentials; see the link at the bottom of the page. The credentials will be the same if you’ve been before. If you are curious about the meetup, read this great article. Our friends at ROUGOL are providing hosting. Everyone’s welcome. Come and join in. |
Andrew McCarthy (3688) 605 posts |
Thank you to everyone who made it. Our next meetup is scheduled for the 30th of September, 2023. Of note. I enjoyed hearing Mark describe his adventures creating a personal time management tool and the challenges he faced returning to programming using BBC Basic. Mark explained how he used Chris Dewhurst’s excellent book “The Application Tutorial and Listings Book”. Seeing and hearing how Gavin uses Ovation Pro to produce books was also excellent- he’s created some nifty utilities. There were a couple of things that dropped out of the meeting- two tools by Harriet Bazeley, a front-end to GNU’s diff called SideDiff and TextSeek that different people suggested in response to a particular challenge raised at the meetup. Come and join. Everyone’s welcome. |
Gavin Crawford (560) 30 posts |
Thanks for chairing it Andrew, and thanks to ROUGOL/Bryan for the zoom hosting. It was a most enjoyable meeting. Glad you found it interesting about my book production work using Ovation Pro and my other tools and utilities – and thanks for your suggestions regarding my othe programming challange regarding converting files from the dark side! Regarding usful programming tools, another one I didn’t mention on the night, while discussing file handles and open files, was !ResRec by A.J. Pullan. I find it a usful tool to have handy when developing. It shows any file handles that are open and allows you to force them closed when your program has crashed and left something open. It also shows open network sockets, font handles and dynamic Areas – again allowing you to close them. Unfortunately, I’m not sure where it is currently available to download, so if anyone knows a link could they post it here for others who may wish to try it. Other file closing apps are available – this just happens to be my go-to utility when needed. Already looking forward to the next meeting! |
Chris Hall (132) 3554 posts |
a front-end to GNU’s diff called SideDiff Unfortunately SideDiff cannot cope with BASIC programmes – it shows the lines as numbered from 1 in increments of 1 rather than the true line numbers – so it identifies the comparisons but you have to guess the line number when editing them! The same fault is present in StrongEd which also cannot cope with BASIC programmes unless they are numbered from 1 in increments of 1 (which I never do as it is poor practice). Not sure how StrongEd would cope with a BASIC programme which has more than 65000 lines (all numbered as 0). Zap copes in both cases (so long as you don’t try to add a line between line 0 and line 0). |
Steve Fryatt (216) 2105 posts |
I’m not sure that’s really “cannot cope”. How many people actually use BASIC’s internal line numbers these days, anyway? Unless you’re using GOTO or GOSUB, it’s easier to edit with them removed and reference physical lines in the file, in which case SideDiff’s approach is exactly what you need. The increments of one requirement is very likely from the underlying Diff tool, and not SideDiff, anyway.
Ditto Edit, and presumably its other derivatives, surely? It’s also true of tools such as Tokenize when the physical BASIC line numbers aren’t visible. I diff all of my BASIC code as raw text (using graphical tools on Linux), so line numbers don’t feature anyway – it still works fine!
It’s not really good practice, though, as even BASIC will struggle to tokenise code like that. If you hit the line number limit, it’s probably BASIC’s way of reminding you that the LIBRARY keyword exists… :-) It also fails your requirement for identifying lines in the program… I’d be very interested to know how many BASIC programmers actually use line numbers for anything other than identifying lines these days. For this, the approach of renumbering on save (or build, in the case of the Tokenize approach) using an increment of 1 or 10 seems to be the most sensible. |
Rick Murray (539) 13840 posts |
The only reason I have for line numbers is ERL.
Just because BASIC can do something doesn’t mean it should be used… ;) |
GavinWraith (26) 1563 posts |
I can only speak for myself but I use propgram for what computers process and programme for what TV-viewers process. Not a weighty matter – just a suggestion. |
Rick Murray (539) 13840 posts |
In British English: A “program” is a set of instructions given to a computer, which likely derives from American English where the spelling “program” is used for every sense of the word 1. So while “computer programme” isn’t technically incorrect (since it’s the same word really), it would be quite unusual. 1 Interestingly, this averts the trope of Americans dumbing down the spelling, as sometime in the 19th century the British just decided they liked the French spelling more, and so “programme” came to be. https://craftofcoding.wordpress.com/2022/01/06/the-origins-of-the-word-program-in-computing/ |
Steve Pampling (1551) 8170 posts |
I have a suspicion that the Greek/Late Latin “programma” with a double “m” and the documented 1600’s use of programme might pre-date the 18th/19th century fascination with French language and culture. I would ask why people consider American to be dumbed down English, but then I read the news and, well, er, MAGA, at that point I wonder how I ever questioned. |
John WILLIAMS (8368) 493 posts |
If I search the entire works of Shakespeare for “gotten”, an “americanism” often criticised, I find 32 instances. If I search for either spelling of “program(me)”, I don’t find any instances of either. I do find it useful to have the two spellings used as Rick describes, as it is an extra clue to meaning in addition to the context. I also otherwise find the adoption of US spellings a pain, despite defending their use of “gotten”. Life and language change over time, and will become irrelevant when time overtakes me. |
Fred Graute (114) 645 posts |
StrongED copes just fine. Took the sources to Transient, combined them into a single file (about 4750 lines) and doubled that up a few times to get 76000 lines (2.5 MB). Tried to save it, StrongED warned that there are too many lines and offered to save with all lines numbered as 0. Accepted that and the file was saved without a problem. Closed the window and reloaded the file, all fine. Added a couple of lines and saved it again, still fine. But is it useful to have such a program? ‘Syntax error in line 0’, er…, which line 0?
Like Rick, only for errors. If I bother to look that is, mostly I just click in the throwback window that pops up. Much more convenient. |
André Timmermans (100) 655 posts |
It’s a long time since I wrote BASIC programs but I used them with RESTORE and for error reporting (ERL). |
Rick Murray (539) 13840 posts |
Proper RESTORE, or just RESTORE +0 to mean “data follows on the next line”? |
Rick Murray (539) 13840 posts |
Yes, it was used wonse upone a tyme in ðe olde dayes… The one that grates me (even as I sometimes use it myself, thanks mom!) is “have got”.
What handles that? I’m still annoyed that what BASIC reports is different depending on whether a program was run within the BASIC environment (rare) or externally (common). In the former case it’s a more helpful message with a line number. In the latter case it’s only the error message unless you do it yourself with ON ERROR. |
Steve Pampling (1551) 8170 posts |
Hmmm. “I have obtained a pen” (probably clearer for you if you phrase American style as “I have gotten a pen”) |
John WILLIAMS (8368) 493 posts |
I’m reminded of the pupil who put up his hand to say “Please, Sir, my pen’s run out!”, to receive the response,“Then run out after it , boy!”. But that would be so far off topic … |
Clive Semmens (2335) 3276 posts |
Surely, those are, rephrased for clarity, the following: Well, it could be either – and “I got a pen” might be more normal for “I have obtained a pen” than “I have got a pen”.
What’s that? |
Lauren Etc. (8147) 52 posts |
As an American, I think I’d only use both in a contraction, either “I’ve got a pen” or “I have a pen” or maybe “I got a pen”. But not “I have got a pen”. To steer it back to topic though, I’m actually going to try to be on the call on the 30th. |
Fred Graute (114) 645 posts |
mostly I just click in the throwback window that pops up. For applications in BASIC I tend to use AppBasic which comes with a module to report errors using throwback. For the assembler based applications I use a small BASIC file that I wrote myself. It’s loaded as a library and called from the ON ERROR handler. Reporter can also be used to have errors reported through throwback. All three methods result in a throwback window opening in StrongED where a simple click takes you to the file & line that caused the error. |
Chris Hall (132) 3554 posts |
I sometimes find that there are errors in more than one line. |