Programming IDE for RISC OS (CodeCube Cloverleaf project)
David J. Ruck (33) 1629 posts |
To be honest I think we’d get much further faster by not writing/porting an IDE for RISC OS, but rather take one that runs on Linux and concentrate on getting it to remote debug code running on a RISC OS machine. The reason being anyone sensible doing development already has a separate RISC OS machine to test code on, as RISC OS is so easy to crash. |
Steffen Huber (91) 1949 posts |
You do a Language Server Protocol Client and have already C, Lua and Python covered (multiple solutions already available). And countless others of course. Then you integrate it into Zap and StrongED. Sounds easy :-) |
Steve Pampling (1551) 8155 posts |
Z |
Steve Pampling (1551) 8155 posts |
Nah, still has the core of evil in it. |
Steve Fryatt (216) 2103 posts |
WinEd already contains a very early chunk of code referred to as “IDE”, which appears to be a set of Wimp messages which it can send instead of editing windows directly. Or, at least, that’s where I think it was supposed to be headed. It didn’t seem to do much, so I disabled it before creating the 3.23+ releases. I think it also could be backwards, as it seems to be about palming off the template editing work on to a third-party, whereas I’d expect WinEd to do that and tell the third-party what it’s doing. That said, I wonder if there’s any mileage in pursuing the idea. A system of standardised Wimp messages through which a template or resource editor could inform an IDE that the user wanted to create a click event handler for an icon called “No” in a window called “Are You Really Sure About That” could have some potential, for example — although it would need some care to ensure that it was language agnostic. |
Steve Drain (222) 1620 posts |
@Rick
Thinking only of BASIC and the Toolbox, this is an idea that has haunted me for a long while, but I do not think it could work quite so easily. The Wimp is event-driven and you can have several events associated with an icon. Even if you could get over the problem below, you would end up having to parse the possible events with a CASE structure – ugh!. There are also the events that are not associated with icons to deal with. The problem that makes this tricky is not having a namespace for icons. These are uniquely numbered in a window, but references to, and function names for, icons will be like ‘MainWindow4’, which is somewhat cryptic. The project I have had simmering for a year or so, Oobi (Object-oriented BASIC Interface) uses the Help field in ResEd to define names by tagging “_name” to the help string. This is found during initialisation and then removed. I have a version of ResEd with modified Help messages to prompt this. The programmer (that’s me!) still has to write the event function code, but it will be of the form: DEFFNChoices_Save_Selected PROCSetOptions PROCWriteChoices("<Choices$Write>.Crunchie.Choices") =FALSE
This is something I can whole-heartedly agree with. ;-) However, getting BASIC and the Toolbox to do this is not easy. If you are brave enough you can see Oobi in action by looking at the front-end ‘!RunImage’ to Crunchie. This is a work-in-progress and Oobi uses a lot of ‘magic’. ;-) I do not think AppBasic gets there, but Joe’s superb documentation makes it really very useful. I can provide all the information for Oobi, but I will never be able to match Joe. |
Steffen Huber (91) 1949 posts |
Going back to the original start of the discussion.
I don’t think a “comprehensive programming IDE” is a realistic target within say a few man-years of effort. It is true that the existing toolchains are not really easy to use. But we can make it much more usable by providing comprehensive beginner-friendly documentation and project templates. So, a first and universally useful step would be to decide on a lib that you want to base that documentation on, write some tutorials, provide skeleton projects, document best practice for structuring projects and putting them into a VCS and building them, package up all the necessary tools to follow those tutorials, and THEN think about better integration into something that might be as useful as an IDE on other platforms. On the BBC BASIC side there is (at least) DrWimp, AppBasic and WimpWorks. There was an effort called DrWimpC to bring DrWimp (and therefore all of its great documentation and examples) to the world of C, but I think it is no longer available – the web server seems to be dead at the moment. |
Steve Pampling (1551) 8155 posts |
A framework in which to plugin various elements is a realistic short term goal though, is it not? |
Stefan Fröhling (7826) 167 posts |
@David J. Ruck
I was told that GCC created ELF files and that UCDebug uses ELF files too. So I was thinking that should be compatible. @Fred Graute About menu structure I need to investigate first what we need or what is the standard in other IDEs. I have one issue with the menu structure configuring for example the display font used. There is no info in the documenation how to achieve it. After asking around Micheal Grundlitz informed me that it can be done over the menu shown when click menu on the bottom bar. (The contextual menu system of RISC OS backfires here). If you know where to find the feature then it is cool but if not…. I think settings/choices should be available from the main menu or RISC OS style from the toolbar menu.
It would be nice if we can work together to make StrongED part of our IDE. Maybe you can improve key features of StrongED that benefits also the original StrongED and we do the integration into the IDE.
This statement is a little troubling if I understand it right. The UI should initiate actions by the program by procedures/functions or is StrongED written in ARM assembler?! About „80s Stylish“: @Steffen Huber
Nice listing of features needed in a modern IDE so that would be definitively the long term goal to achieve. @Rick Murray,
Yes that is how the IDE should work like. @Richard H @Ron Briscoe @Steve Pampling
Agreed! @Steve Fryatt
Well that looks that we need to make a big cut about the RISC OS Clipboard system. If it is unfixable how it is now then we have startover and make the best one that is out there. And all maintained program can implement the new system and for the old ápps the old clipboard should be still present.
That RISC OS is open source is the reason why I am doing this here. As I don‘t need to wait or pray that someone does something. I can do it by myself if I want. But I cannot give the results just for free as I need to pay my bills. I am not in pensions and probably never will be. WinEd might be used and modified to function as Windows editor. @Steve Drain @GavinWraith
Yes that is why we should to channel the efforts of good RISC OS programmers in projects that bring the maximum benefits for the RISC OS community. By the way I have read from you about an idea of a 3D filer implementation. I would like to know how you imagine that to work. @David J Ruck bq. I disagree, an IDE is for anyone who wants to actually write programs, rather than faff about. Those of us which have been in the business for 30 years, really don’t want to be stuck using stuff which every other platform had left behind in the 1990s. I agree! :-D @Rick Murray
StrongEd doesn‘t do that?
I agree. Sounds similar Delphi did it.
That should be possible that the IDE then only is used for managing the project files, compiling and debugging. @Richard H
Only if the editor like Zap would support the needed integration. Loading of files for editing should not be the problem but more to start compiling by keyboard shortcut etc. @DavidS
That might be possible but I am not going to promise that at this stage. @Richard H @David J. Ruck
well yes and no. Crashing of RISC OS is a problem. That should be fixed somehow at the next major overhaul… @Steve Drain |
Steffen Huber (91) 1949 posts |
If “various” is “two or three”, if you don’t want to provide beginner-friendly docs, and the “framework” is only a handful of lukewarm ideas on where you might go, and “short term” means 6 months – perhaps. The ideas on how to develop software for RISC OS are “all over the place”. BASIC or Assembler or C or C++ or Lua or Python, on RISC OS or on a different platform, use a VCS or not, use CI/CD infrastructure or not, provide proper packages or simply zip up the app, put it into !Store or on your website, use the Toolbox or plain WIMP, use a third-party lib (DeskLib? Desk? OSLib? TBX? AppBasic? DrWimp? WimpWorks?) or roll-your-own, TemplEd or WinEd (and this is probably the easiest decision!), StrongED or Zap… Most active developers (yes, all five of them!) have spent a lot of time to optimize their way of working. Those workflows all differ quite fundamentally, and if you ask any of them, how much work it would be to bundle it all up and document it so a different developer could use it, I am sure the estimates of effort would be “multiple man-months”. There is a reason why there are so many workflows for software development no matter where you look – like e.g. number of build tools for Java…or number of different VCSes…or number of different editors…it is not a RISC OS problem, it is an IT problem. But because we are so few developers (probably less than 0.1% compared to say Gnome-on-Linux), you end up with one fundamentally different process per developer. And I don’t have the slightest idea on how to make significant improvements to the situation without first providing a few basic tools that you need anyway to be able to build upon something that is tried and tested. Even if the whole RISC OS community suddenly decides to favour only one environment and process and way of doing – e.g. “develop on Linux with GCCSDK, Git, Jenkins, RPCEmu, TBX and integrate all the tooling that it supports seamless integration between dev environment and test environment” – it would be an uphill struggle. Especially if you think about new developers and/or beginners. |
alban read (2898) 20 posts |
I feel like RISC OS has been a lot less prone to crashing fatally of late than it used to be. |
Stefan Fröhling (7826) 167 posts |
<script src="https://platform.twitter.com/widgets.js" charset="utf-8" async></script> |
Steve Pampling (1551) 8155 posts |
Still difficult to get people to acknowledge the benefit of the Zero page work, and the consequentially enforced updates of quite a few buggy bits of software. |
Stefan Fröhling (7826) 167 posts |
@ Steve Fryatt As I understand right it is also possible to use the GNU GPL to produce commercial software from it. |
Steffen Huber (91) 1949 posts |
The GPL does not prohibit you from taking money from anyone. However, you must distribute the full source code with it (or at least give access to the source code), and everyone is free to pass on the stuff under the GPL to anyone else, so the possibilities to earn money from GPLed software in RISC OS world (where you usually sell the software and not services around software) are quite limited. |
GavinWraith (26) 1563 posts |
|
David J. Ruck (33) 1629 posts |
That sounds a bit like Acorn’s “Rooms” software. It’s so long ago I can’t be sure that I didn’t imagine such an awful concept. |
Steve Pampling (1551) 8155 posts |
That sounds like something from a science fiction story I read years ago, virtual reality interface on a library etc. That involved bleeding edge super-computers. I don’t think the RPi can really match that title. |
Rick Murray (539) 13806 posts |
And….you’ve just reinvented The Wimp Game. ;-)
That depends upon what you mean by “years ago”? A microwave likely has more processing power than the computers that took our species to Luna. A tricked out watch has more processing power than an entire school campus in the 6502 era. So, to put this into context… https://en.wikipedia.org/wiki/Cray_X-MP A Cray supercomputer from the first half of the eighties. 64 bit quad processor running at around 110MHz, 400 MIPS, 800 MFLOPS, 128MiB RAM… costing $15M (about $40M in today’s money) and eating an insignificant 345kW. The Pi2 can crunch 4,744 MIPS at 1GHz. You can get about 100 MFLOPS from a single core, so potentially 400 MFLOPS from the machine. That might only sound like half a Cray, but then we’re missing the secret weapon. The Pi’s GPU is measured in GFLOPS. The smallest earliest Pi had twice the memory of the Cray. It probably takes closer to 345mA than 345kW, and it costs more like $40 than $40,000,000. But either way, I think a bog standard Pi2 could hold its own against an early ’80s supercomputer. And the Pi4, modern games console, average PC could probably trounce any Cray from the ’80s. So, yeah, I think the Pi can hold its head up if the story to which you refer was written >= ~ 35 years ago. |
Steve Pampling (1551) 8155 posts |
As I recall it was talking about quantum computers, might not be there yet. I hadn’t actually registered where the Pi was relative to the venerated old Cray – all that and people spend half their time using it for Tetris variants and “c u b4 t?” |
Stefan Fröhling (7826) 167 posts |
@Steffen Huber GPL das muß ich mir mal genauer angucken… wäre ein Problem |
Stefan Fröhling (7826) 167 posts |
@GavinWraith 3D filer I was imagining something different, more technical style…like:
b) old files view
c) biggest files view
Clicking on a box then will show all infos about a file |
Julie Stamp (8365) 474 posts |
People are talking about something Visual Basic-esque (which sounds a good idea) and improving debugging (which sounds a good idea too), but UCDebug will be no good for debugging BASIC. Is there an existing interactive debugger for BASIC? Also are you aware of the problems involved with single-stepping Wimp tasks? |
Steffen Huber (91) 1949 posts |
There was BasDT by Dick Alstein, see the thread here: https://www.riscosopen.org/forum/forums/5/topics/11961 I never used it, so cannot comment on how powerful it was. |
Steve Drain (222) 1620 posts |
What do you need when you have got Actually, do you need it interactive when you have |