T-Wimp at ROUGOL, Mon 20th Jan 2025
Pages: 1 2
|
The next meeting of the RISC OS User Group Of London is: T-Wimp, presented by Graeme Shrimpton Monday 20th January 2025, 7.45pm The Duke of Sussex Also online via Zoom from 7.30pm https://rougol.jellybaby.net/meetings/ For our first meeting of the new year we have a new speaker with new software to make it easier to create new software! Graeme will be demonstrating his new development tool T-Wimp, which allows you to create full multitasking desktop applications using a simple textual description and a few lines of BASIC. As well as talking about how and why he developed it, Graeme will create a complete application as a live demo of how simple it is. Our venue is right next to Waterloo Station and there is parking directly outside. Directions here – https://rougol.jellybaby.net/venue.html For any queries or to receive the Zoom link (same as previous months) contact us – https://rougol.jellybaby.net/contacts/ Bryan. |
|
NEW: (23rd Jan 2025) TWimp is now available at http://www.ro32.co.uk Monday 20th January, I will be presenting and live programming a full Wimp application using my new TWimp module thanks to Bryan and ROUGOL. The details of how to join are in the first post in this thread. It is not language specific. As long as the language you program in supports calling SWIs then TWimp should work. It certainly works with C, C++, Python, Lua, BASIC and even assembler. The demonstration will be using BASIC. Watch how a few lines of code you need to write to make a complex application. I hope to make the demo version of this module available alongside a very early reference manual around the time of the presentation. |
|
I regret that I was unable to attend the meeting as I had hoped, but I hear that T-Wimp was very well received. Graeme has written an excellent introduction/tutorial to T-Wimp for the rapidly incoming issue of Archive, so don’t miss that if you are at all interested. |
|
I hope there will be a video? Thanks My English level is not good enough to follow zoom meeting. |
|
It’s an excellent work! Plain and simple. First time in ages I felt excited about some development on RISC OS. The only “defect” TWimp has is that it should have been developed ages ago and made it part of RISC OS itself! Thank you Graeme for the work and the presentation. For who asked for the video I think Leo has recorded it, so there should be a video tutorial at some point on the ROUGOL site I think. |
|
And for those who didn’t attend the virtual meeting and don’t subscribe to Archive…?
I guess it would be nice if this development that causes excitement had some sort of web page to promote itself, rather than the all too often (in the RISC OS world) case of “there’s something mentioned somewhere but you need to know where to look”.
So, simple question to begin with: What’s T-Wimp? Is it like Psion OPL? VisualBasic |
|
http://www.ro32.co.uk/ Here’s what I have (the link). Video soon. |
|
It is very much like PySimpleGUI, which is a text based way of managing TKinter graphics in Python. |
|
It’s a set of SWIs that can be used from any programming language capable of (well) running a SWI to quickly create Wimp applications. It’s much more effective than the ToolBox in the sense that you can define menus and object behaviors in a window (or nested windows) trough a templating language. The definition format is human-readable and very intuitive. (I’m using a similar approach for desktop applications on my Ultima, but in my case, it’s required because Ultima deals with different desktop environments). Imagine this as a quick way to create a Template file that also defines the construction of nested windows, menus, panes (and even relative locations and events generation), along with a neat API in BBC BASIC (or RiscLua, Python, ASM, and C) to interact with objects and events. Honestly, it’s just a shame that Acorn, RO Ltd, Castle, and ROOL couldn’t come up with such a nice idea. It basically reduces Wimp application development time significantly. Again, the only defect I see is that it’s not part of RISC OS and wasn’t introduced a long time ago. As for the screenshot, what it does is fundamentally establish a new and more advanced way to create desktop templates and then generate a Wimp application with very few instructions in BBC BASIC (or the other aforementioned languages). This is how it should be in 2025 (yes, even for that old BBC BASIC). Once again, bravo to Graeme! An excellent piece of work. |
|
Thanks Andrew – got it. |
|
@Greame this is exactly the kind of exciting development we’d like to see shown at the RISC OS North exhibition :) Would you be interesting in coming and showing your software? If so, the contact details are contact at riscosnorth.uk Nice work on the software – I remember starting my desktop software life with Archway which was an old RISC OS 2 era attempt at simplifying desktop coding, much as you’re doing. It died out long ago, but software like this is essential in bridging the gap between single-tasking, full screen BASIC applications and the wild world of event-driven desktop applications. Like Rick, I looks forward to the video, but have already downloaded the demo. Question though – have you considered how people can release applications based on it without giving away the full, paid-for runtime module? |
|
Hello everyone. First, thanks to ROUGOL and Bryan for letting me present. This software is available at http://www.ro32.co.uk
Paolo has explained it well. It is a simple set of SWIs that allow you control the Wimp using text. That is the T in front of the Wimp, standing for Text. All of the main SWIs that a beginner needs are simple number and string input and output. No blocks or pointers, no handles. All of the items can have names instead of window handles, icon handles and menu pointers. Example code in BASIC to update an item you created with the name ‘the_thing’ to make it go grey (and it can be an icon, menu, window or even a multiple group of things you have called the_thing): SYS “TWimp_Update”,“the_thing”,“grey”
Information is slowly getting out. The website has the demo version with a PDF that is an early draft and is around 70 pages long. Archive magazine will contain an article that is essentially similar to the ROUGOL presentation for the first edition. The program is so large that the second Archive article will detail some things that are different from other places and may make your jaw drop wondering why this hasn’t been thought of before. Some of this information is in the PDF but the Archive article will break it down with an tutorial type explanation. Eventually the information will get out to everyone but I need to get people to see the basics first and I can take the articles in magazines down a different tutorial route from other places.
I’ve just added one (it is uncompressed and just over 8mb). This actually shows the program written for the ROUGOL presentation. The BASIC program, the text files used to define all the items, the !Run and !Boot files plus the program running. It shows a window that has the current time and allows you enter a note and save that note. The file info window is filled in automatically. It also shows a note loaded back in with the current time, the time the note was saved and the note. Both windows have the time updated from one line of code. We had a large number of windows with the time updating (requires the full version to make a large number of windows). All of that in one 1920×1080 screen: The actual ROUGOL application and TWimpDemo module version now can be downloaded from: That includes the sprites used.
There is an early reference manual in PDF format with the download. I hope to start getting tutorials on the website next month.
It was recorded and as far as I know will go up at some point.
It was released around the time of the show and search engines have not indexed it yet. Makes it a little difficult to find at the moment but that should improve soon.
There are plenty of people who are on these meetings that just listen in. In fact, that describes me about a year or eighteen months ago.
Although there is a remote possibility, I think there may be some challenges in attending. However, I’ll drop a message in the next week or so. |
|
for feedback purposes, I have got the TWimp example running with !armbob. Look here – https://colinmc.×10.mx/wimpbob.zip . Why Armbob? As a youth I fell in love with curly braces. |
|
Excellent. I was expecting the first examples to be in BASIC, C/C++ or Python so an ArmBob example is brilliant! |
|
It is just a replication of the very simple basic example included with the zip file, so a lot more to explore. I feel much more at home with Twimp than I do with templates and toolboxes. |
|
For those waiting for the TWimp video, it has been published: The demonstration starts around 5:30. Anyone using the demo version and wanting to follow along will need to change the TWimp_ SWI/SYS calls to TWimpDemo_ and you will be able to create a limited number of windows when the loading section is demonstrated. Otherwise, it is fully functional. There is also the download that contains the main application. |
|
Any idea of the video file size to download. |
|
Your preferred YouTube downloader will tell you this. Depends, also, upon the chosen format and frame size. |
|
I got 217MB.
|
|
I watched the video. I just wanted to drop a note in here and say: it’s absolutely amazing. It reminds me of Visual Basic (pre .NET) in some ways, although it’s actually better having the definitions in a plain text file, as it will play nice with source control systems. If only Acorn had knocked-up something like this instead of the Toolbox! I guess the ‘open’ nature of the TW definition file would scare some off, but frankly, we shouldn’t haver attitudes like that these days. I very much like the mentions of Style Guide compliance, as it’s so awful how much software just ignores it. I did wonder if the system needs some level of versioning, perhaps in the header of the definition file? You never know, there could be a need for a breaking change at some point. |
|
I’m at home now, so I can look at NewPipe: MPEG-4 144p → 74.43 MB There don’t appear to be any WebM/H.265/AV1 streams. Why the difference from Simon’s 217MB? It is because his audio is the 160kbps opus stream (48.66 MB) whereas my default is the 128kbps m4a (63.95 MB). I find music players tend to cope with m4a better than Opus because m4a is just a wrapper for what is usually AAC, while Opus is something entirely different. That being said, in the context of this particular video it probably doesn’t make any difference. For completeness, there’s also an m4a stream at 48kbps (24.10 MB) for the lower end devices. Maybe that and 360p could be played on RISC OS? ;) |
|
I await somebody pointing out that using control blocks and passing numerical values would be so much quicker to parse than all those strings, like it’s 1987 or something. ;)
Indeed. It’s a bit ridiculous how little code is needed for a functional application that does stuff. Like, I use C/DeskLib and I have written a thingy called SeaShell to make some boilerplate code that’s the “shell” if the application, all the tedious crap. D’you want to know how many lines of code it takes to start up, dump an icon on the iconbar, show a menu, handle the Quit option? So, yes, I agree. Acorn should have been thinking like this, not like Toolbox.
How do you mean open? The amount of inner-app workings that are exposed in this way? You know, what comes to mind for me is that it would make rather attractive options for internationalisation. Something that’s always a bit of a headache is “will this language fit into this icon?”, but if it’s T-Wimp making the windows on the fly, it might be a bit more forgiving of such things.
<side-eyes all those who still think about writing stuff in assembler>
Probably wasn’t helped that back in the day the Style Guide was a product that was sold and Acorn were…not terribly inclined to follow their own advice. Remember, there was a demand for PDF copies of the PRMs because some people simply didn’t have them, they had StrongHelp. So there may have been people who had simply never seen a copy of the Style Guide prior to that, and simply based how their application looks upon fitting in with how other apps look. |
|
I may add a TWimp_MiscOp,“version” or similar.
Exactly right. This is about the speed of the programmer, not the speed of the computer which are fast now. If a developer can spend half the time on a program, they can make more features or make twice as many. Not to mention those who don’t feel comfortable with all the bits, bytes, handles and memory management that is required just for a basic iconbar icon.
I didn’t show anything in the video to do with language translation but it does have it. The format to define language translations is likely to change because I am not happy with the way it is at the moment. What is working is that every string can end with a tag so you can use text:“Hello World”/HELLO and the tag for this is now HELLO. It looks up the tag and if it finds a translation for the current language it will be swapped. You can also read that tag back in with TWimp_Read,“ItemName”,“tag” TO tag$ so it doesn’t matter if that text contains a different language, the tag will still be HELLO. If the icon is writable, the tag is set to a blank string if the user edits it. When the format of how a dictionary is defined is implemented, there will be more information. The tags are working so those can be used now if you write something that you intend to release in different languages in the future. There is a way of positioning icons relative to other icons too or even groups of icons. That means you can create your labels down the left in a group with automatic icon widths that will depend on the language translation. Then you can position your display icons to the right of the entire group, that will be whichever icon is the longest. The window can also be auto-sized so your icons don’t run off the end of a window and if your window is too big for the users screen, scrollbars are normally added automatically. Language translation is possible and should be available later in the year. |
|
Yes, the fact that people can easily borrow bits of UI. Mind you, is that really any different to using FormEd or ResEd? Not much. I’d say that the Style Guide, and probably the Toolbox, came too late. 1993-95? Too late. Perhaps 1991-92, alongside RISC OS 3. Ideally earlier, starting whilst RISC OS 2 was taking off.
Nice to hear. Sounds like the key application plumbing is all there. Excellent job. |
|
Yellow buttons and big OK borders would have been mandatory, forever – yay! I did actually like the RISC OS 2 look and feel, I always left a little in some of my Applications, RISC OS 3 was a bit too grey and uniform. |
Pages: 1 2