Adopt Zap
Pages: 1 2
Julie Stamp (8365) 474 posts |
What should go in an ‘Adopt Zap’ bounty? Here’s some ideas to start off with. The main goals are that users suffer less data loss, and that ROOL can include Overview
Technical details Debugging versions of the internal heap functions that can detect errors such as A ‘ZapBash’ tool could be devised to check for corruption. Deliverables
|
Rick Murray (539) 13840 posts |
Don’t bother asking me, I’m more than happy to see my favourite editor (sorry Fred ;) ) continue. Use my little tweaks and patches in whatever way is useful. What might be harder is tracking down everybody from the past.
I think this is the most recent of mine. http://heyrick.eu/random/zapsrc20200620.zip I’m a little vague on this…because I’m sitting out in the sunshine. ;)
I wouldn’t worry too much about wrong characters here and there. They may be side effects of other issues. To me, the major things are:
Given that we aren’t using 8MHz processors any more, would there be any mileage in a collaborative project to write something that behaves in a manner similar to Zap, but written in a high level language, fully documented, etc? For me, the things I like about Zap are:
|
David Pitt (3386) 1248 posts |
From long ago, Status of Zap |
Steve Pampling (1551) 8170 posts |
StrongED, since the correct configuration will make it behave pretty much any way you want. At which point the question would be – how open to a committee development model is Fred? |
Stuart Swales (8827) 1357 posts |
Two households, both alike in dignity, |
Rick Murray (539) 13840 posts |
Isn’t that written in assembler? The idea was to wean ourselves off the joy of LDMFD. ;)
I’d start with an HTML colourisation that actually works… In case Fred is thinking “huh?”, go to HTML mode in both editors and type in Note also the behaviour as you enter the text In StrongEd, it seems that there is a core colouriser with some extra “group” colour values bolted on. So numbers are numbers, punctuation is punctuation, and that’s it. Even worse, the colourisation isn’t too bad when entering But add that final So… yeah. Applying code colourisation to HTML really doesn’t work; and that behaviour with the There’s other stuff (like some love for the disassembly mode), but that’ll do for now. |
Fred Graute (114) 645 posts |
Having some idea of what’s needed in creating a text editor, might it be better to first see if there something that could be ported to RISC OS with relative ease?
That’s correct, if put a little harshly.
Because of the core colouriser StrongED does not notice contexts specific to the language it’s colouring. You can add colourisation of HTML attributes but then they’ll always be coloured, not inside tags only.
I did not create the HTML mode so don’t know why it was done this way. It can be changed by replacing the ‘EndOfTag’ to ‘EndAlways’ in the HTML ModeFile.
Open the Global Choices (eg from the iconbar menu), go to the ‘Misc’ section and tick the ‘Colours section in mode choices follows cursor’ option. After that the ‘Colours’ section of the Mode Choices will automatically select the element that the cursor is in.
What more love does Dump mode need? StrongED 4.70a14 is largely on par with what Zap’s Code mode offers. |
Chris Hall (132) 3554 posts |
Please start a bounty and I’ll contribute to it. Zap is available from !Store in any case but it would be nice to have Zap included as part of the ROOL distro. |
Rick Murray (539) 13840 posts |
Obviously part of the planning stage would be to see if there’s something that exists that could be used, though I fear that RISC OS might be a little…alien. ;)
Sorry. Tact and subtlety are…attributes other people have to allow them to avoid saying what they mean.
Ah, that’s what I thought. It’s StrongEd doing the colouring, rather than the individual modes.
Alternatively, maybe permit the modes to alter the colour options text so it says what it is, rather than a number of anonymous groups?
I’ll look sometime soon, comparing with the latest StrongEd, and get back to you. |
Steve Drain (222) 1620 posts |
I am sure Fred will be along in due course, but SE already offers two ways apart from the anonymous groups. First, turn on Interactive Help and hover over a Group entry in the Colour menu and you will see the first few items in the SyntaxGroup definition. Second, the writer of a mode can add to or create a Messages file with Group tokens. The corresponding messages will be used as the Colour menu entries. SE is a very complex piece of software with many, many options that may not be fully exploited. Designing SyntaxGroup colouring may need a lot of work, but you can do it for all sorts of files, not just those the author(s) have thought of, which is how Zap works, doesn’t it? |
David J. Ruck (33) 1635 posts |
The editor is such a crucial component, I doubt if there is anything that could be ported as is. It to be 100% RISC OS UI, and have lots of RISC OS specific features such as various file modes. That’s not to say that components such as 3rd party syntax highlighting libraries couldn’t be used, but there would be no relative ease. |
Steffen Huber (91) 1953 posts |
Start with Scintilla and see how far you get. https://www.scintilla.org/ It needs a very new C++ compiler (the dev branch uses C++17), so no, Norcroft won’t cut it…
I’m not so pessimistic – the majority of the work for an editor is outside the UI. Apart from filemodes BASIC (which is nearly trivially supportable via available Tokenizers and Detokenizers) and ARM Disassembly, I see very little RISC OS specific stuff to do. A bit of specific encoding support possibly. But still…adding a RISC OS backend to Scintilla is of course not exactly trivial. But it likely needs a lot less work than e.g. adding support for all the programming languages and encodings nowadays taken for granted on other platforms to StrongEd and/or Zap. |
Andrew McCarthy (3688) 605 posts |
An Adopt Zap bounty would get my support; go for it. ;) The main goal is to enable the ROOL hosting of Zap, enabling them to distribute the core Zap and key modes in RISCOSpi, with sources available under appropriate Would there be any mileage in initially using the auto-builder environment for the source code, then on the release of a git client, GitLab or GitHub? |
Fred Graute (114) 645 posts |
@Steve P
Contributions have always been welcome, especially (suggested) code changes. In my 20+ years as maintainer however there’s only been one person that has actually submitted code. Zap appears to be in a similar position. Although there have been some valiant efforts to keep it running on modern CPUs, no one has taken on the role of maintainer. One of the main advantage I see in have other people working on the code would be bouncing off ideas. Most of the easy stuff has been now and incorporating new features is getting more difficult. Looking at things from a different perspective often helps. |
Fred Graute (114) 645 posts |
@Rick
Modes in StrongED are essentially elaborate configuration files that control how the central core behaves. As Steve D points out that makes creating new modes for StrongED easy but at the cost of less flexibility. If the core doesn’t support it then you’re out of luck.
That’s right. I’m currently considering if (some basic) support for contexts could be added.
Steve D already answered this so I’ll just add that the author of the HTML mode didn’t use the Messages file to provide names for groups. Possibly because the mode was created before I added support for group names. Easily fixed though. What more love does Dump mode need? Any kind of feedback would certainly be welcome, and should help to improve Dump mode even further (the current version is already a bit further along than the one in 4.70a14). |
Alan Williams (2601) 88 posts |
At the risc of getting flamed down completely, personally I think it would be better to start a SrcEdit bounty. Block cursor and syntax colouring would be off to a good start to replace Zap/pi400 for me which crashes randomly and without notable patterns. Its been driving me nuts that tripple click to select a line is broken in Ricks Zap updates. |
Chris Mahoney (1684) 2165 posts |
It’s briefly crossed my mind but I’m not sure whether there are enough SrcEdit users to justify it! Plus I don’t know how to do it :) |
Rick Murray (539) 13840 posts |
FTFY. ;) |
Rick Murray (539) 13840 posts |
Plus, being based on the Edit code, SarcEdit will mark control codes like [00][0D][09] etc. SrcEdit is so far behind Zap/StrongEd that it might be a better proposition to create something new rather than work out how to paste new features into thirty five year old code…? |
Ronald (387) 195 posts |
Running an editor usually means it will also provide the Taskwindow. Zap is not good at taskwindows, I cured one problem of it throwing an error window whem clicking on the window near the cursor in column 1. It took a bit to work out, but setting the left margin to 2 characters was good, but to save that it is a job and a half. You have to first save ‘this mode’, then a second time just below with defaults. Menus could be a lot better. |
Stuart Swales (8827) 1357 posts |
Time to fess up – I end up editing mostly using Visual Studio, just tweaking code on the RISC OS systems. Never got on well with either Zap or StrongEd, so am a 100% SrcEdit (from DDE) person. But I wouldn’t put any more features into that, just fix the damn redraw!
Large binary files? SrcEdit has been screwing up initial redraw of modest text files for me for at least 2014. But doesn’t crash or corrupt the text.
Curious – pasting a line using Ctrl-V containing multiple whitespace (leading, internal and trailing) from either (and to either) an Edit document or TaskWindow works fine here. Edit 1.75 / RO 5.29 (01-Feb-2022) [this is a pretty vanilla system, with no extraneous helpers loaded at boot like line editor module, deep keys etc.] |
Grahame Parish (436) 481 posts |
Port Notepad++ ? That’s my Win/Linux (WINE) editor of choice. Linux has a native version – notepadqq – that might be port-able. |
Ronald (387) 195 posts |
TaskWindow works fine here. Edit 1.75 / RO 5.29 Good to hear, I have Edit 1.75 but both my Iyonix and RiscPCEmu are on RO 5.28 and earlier. |
Steffen Huber (91) 1953 posts |
Nah, that’s not the correct solution. After all, Notepad++ is based on Scintilla as its main editor core. And we all know that platforms need editor wars. So start with porting Scintilla, and implement AT LEAST two editors based on it. |
Grahame Parish (436) 481 posts |
;-) |
Pages: 1 2