Shop OBEX P1 Docs P2 Docs Learn Events
P2 Taqoz V2.8: The Challenge: Make a Local Editor, so advantageous, that we will really use it? — Parallax Forums

P2 Taqoz V2.8: The Challenge: Make a Local Editor, so advantageous, that we will really use it?

This is some follow-up of https://forums.parallax.com/discussion/174049/thoughts-about-a-local-hybrideditor-for-forth-on-a-microcontroller#latest

When I write programs with Taqoz, I have P2 connected to a Windows PC and use the nice editor Notepad++. I then copy the program into the Tera Term. When the program gets longer, this procedure gets increasingly cumbersome and slower. Due to the limited serial buffer of Taqoz, problems start to arise and you have to load into a file on the SD card and then compile from SD card.

So, if there was an Editor in Taqoz, which had a certain "sufficient" level of comfort, perhaps you could really use this? The idea is still to have the PC with Teraterm, because web and pdf documents have to be accessible.

I have now begun to write this Editor. It is no longer a Block Editor but still has fixed length lines. And it does not spill over from line to line. When the file is saved then the fixed length of each line is converted to a line ending with CRLF. Taqoz has a file system with names and the FAT is compatible with Windows.
For my monitors a height of 48 of 54 lines and a width of 100 columns is much better than the old 16*64 screens. ( In my opinion, those old crammed screens have contributed a lot, that many people know Forth as write only language... )

The picture shows syntax highlighting and there is the feature to jump to the beginnings of definitions. In the upper part of the screen there is a list of the definitions as a table of contents, which can be used to jump very quickly. If a word is defined with PUB it will be printed in red in this table, which gives the possibility to structure.
The dictionary is used for the color too: If a word is not existent in the vocabulary, then it will be printed in yellow. So here we can have an advantage, that we are on the target machine. This feature is quite nice, because words with typos will be yellow too. In the picture, the inline assembler is yellow, because its vocabulary is not activated.

This is work in progress. I think, some sort of block copy will be needed and I am thinking about a feature which shows the first line of the definition of the word under the cursor. Jump to this definition and back again.
Also it seems feasible to display a relevant line from Bobs Forth Glossary.

Other thoughts, ideas?
Have fun, Christof

Comments

  • The FRED editor that Peter Jakacki wrote for both the TAQOZ (for the P2) and the Tachyon extension for Mecrisp (RP2040 on the Pico) seem to be pretty usable to me.
    Maybe just enhancing/adding to its features would suffice if these already present are not quite up to the challenge?
    It all boils down to one's needs and likes.

  • @Maciek said:
    The FRED editor that Peter Jakacki wrote for both the TAQOZ (for the P2) and the Tachyon extension for Mecrisp (RP2040 on the Pico) seem to be pretty usable to me.
    Maybe just enhancing/adding to its features would suffice if these already present are not quite up to the challenge?
    It all boils down to one's needs and likes.

    Oh, thank you! Will have a look at it!

  • @Maciek said:
    The FRED editor that Peter Jakacki wrote for both the TAQOZ (for the P2) and the Tachyon extension for Mecrisp (RP2040 on the Pico) seem to be pretty usable to me.
    Maybe just enhancing/adding to its features would suffice if these already present are not quite up to the challenge?
    It all boils down to one's needs and likes.

    Thanks again, @Maciek ! So, Peter did tackle the challenge for the sake of speed of the edit-compile-test cycle too. I did watch the youtube presentation of Forth2020 #25. I also tried to compile FRED.FTH but again Peter has changed at least several words of file.fth, now flat32.fth. (((Well, while it might lead to good solutions for Taqoz over the years, it is definitively a nightmare, to have an undocumented changing system, if you want to USE it. I have read that he now is working on V3 with the aim to change things which are now "fixed" kernel...)))
    Unfortunately I could not find the additional files for FRED like help.txt.... Peter has obviously kept the organisation in screens 128*32 = 4k, to be able to use small buffers for several open files. In my opinion a width of 128 is not really useful, if you want structured idented text. 64 is too small. On the other hand it is useful to be able to see more lines.

    In my opinion code like this is well worth several lines of visually structured code:

    I do now use the 4k monitor, which allows 107*74 line from which I use 65 lines * 100 colums for the text.
    Main focus was on methods to jump in the text:
    Jump to start of line and end of line
    Jump to next word
    Jump to next definition
    Display a list of all definitions and jump fast
    Search for a string, repeat search
    Set up to four markers, and cycle-jump between them
    Display the actual line as the 3rd line of screen or display this line at the center of the screen.

    For block copy the line numbers can be switched off and the text marking and text inserting of teraterm Alt-V using the mouse is used. In this way text can be easily exchanged with applications on the Windows system, eq Notepad++.

    All-in-all this has now started to be usable and fun to use....

  • MaciekMaciek Posts: 668
    edited 2023-11-27 17:53

    Unfortunately I could not find the additional files for FRED like help.txt....

    Here is the link to the FRED help file. It's called simply HELP.TXT. You'll find it easily. It's for the RP2040 version of FRED but still something.
    I haven't checked it against the TAQOZ version for possible differences.

    All-in-all this has now started to be usable and fun to use....

    As things stand now, I will gladly welcome another native TAQOZ Forth editor for the P2, if you ever decide to share it.
    I can't afford a 4k monitor rifgt now as for me it would mean buying a new PC or a capable laptop as well (and I can't justify the expense at this point).

    ... it is definitively a nightmare, to have an undocumented changing system, if you want to USE it.

    Oh yes, I with you on this one. That's why, among other reasons, I avoid using certain hostile, popular O$ whenever I can.

Sign In or Register to comment.