Programming IDE for RISC OS (CodeCube Cloverleaf project)
Steve Drain (222) 1620 posts |
Apart from any other 32-bit hiccups, it patches the BASIC module, which leads to it own problems, as Colin found. My own programming has been blighted by adopting ExtBASICAss, which also patched only particular versions of BASIC, however good it was otherwise. ;-( |
Stefan Fröhling (7826) 167 posts |
I made a mokeup of the possible IDE interface. |
Jean-Michel BRUCK (3009) 351 posts |
Hello, I often reuse existing code and found myself with lots of windows per Stefan , your mokeup looks like what I built, which shows me I was on the There are apps that work great to get this information: !WimpInfo, Thanks to Richard Walker:
For those who are interested, I can provide the source written in C / C ++ [xmltool]https://jeanmichelb.riscos.fr/XML.html Sorry, I tend not to finish my programs when they do what I asked them to. |
Steve Drain (222) 1620 posts |
I was interested in this, but I do not understand what it is. Could you explain more, please? Diderot looks pretty useful and I am going to explore how it might be helpful with my BASIC programming. I just use the filer and it does not make any real problems for me. Edit: And StrongED’s ListOfWindows. Maybe Fred could be persuaded to make the LoW act like a tree, or he will come here and tell me it already can. ;-) |
Fred Graute (114) 645 posts |
@Andrew McCarthy
Thanks, I see that now. Glad we agree on the Toolbox being better for beginners. :-)
Ah, yes, the C mode could do with a revamp. The Run icon seems to be set up for single file C programs (using GCC). The Makefile icon is more generic as it just run a project’s Make file. I’ll have a look and see what I can come up with. |
Fred Graute (114) 645 posts |
@Gavin Wraith
Not so much a premise but more of a desire. One of the main reason for creating AppLua was so that I could use it for Transient. When support for TrapDelete was added, Transient needed to keep track of where deleted objects came from so that they could be restored to that location. Although I did manage to do that in BASIC using memory blocks and indirection it’s a rather uneasy fit. Lua’s tables (or Python’s dictionaries) seemed a much better fit for the job. Transient is written in AppBasic but there was no AppBasic-esque environment for Lua, so I decide to have a go. By staying as close as possible to AppBasic I was hoping to keep the effort of moving Transient over to AppLua down. As well as creating a tool that was an easy next step for AppBasic programmers that needed a more versatile language.
This does pose a restriction, programs can’t be written as freely as they can in BASIC. Whether this can be overcome I don’t know, AppLua has been on the back burner for some time now. |
Fred Graute (114) 645 posts |
@Stefan Fröhling
There are no options for assembler in global or mode choices, only Dump mode has options for that.
The display font can be changed in the mode options. These can be reached by clicking Adjust (right mouse button) on the ‘tick’ icon on the toolbar (top of window). Or by Menu over a StrongED window, then last menu item > Open choices. The global font options can be accessed by Select (left mouse button) click on the ‘tick’ toolbar icon. These options are also available from the iconbar menu. In the manual this can be found under: Introduction > Configuring StrongED. There is also support for Interactive help which is the usual way to explore applications under RISC OS.
Yes, it can, although I don’t think that I’ve ever done it that way.
Adding support for the IDE is fine so long as StrongED can remain a single application. It’s just a hobby and I don’t want to maintain 2 versions.
Yes, StrongED is 100% ARM assembler.
Because that’s what it was designed for. Outline fonts were added very late on, and initially only for printing as most modern printers no longer support text mode printing. However, as printing on RISC OS is very similar to screen redraw I decided to try using outline fonts for screen redraw too. And it works surprisingly well but it’s not without issues.
No, just no. The data transfer protocol is difficult enough as it as. We don’t need yet another protocol to implement and maintain. The clipboard works fine for its original purpose (data transfer). It’s applications trying to track of the clipboard contents where problems show up. |
Fred Graute (114) 645 posts |
I’d have to investigate if and how LoW could be changed to display as a tree which would also show objects currently not loaded. If StrongED were a Toolbox application then the TreeView gadget would make this easier but it’s not. What I can tell you is that LoW is no longer limited to the (IMO ugly) system font. You can now use an outline font, same for LoF and throwback windows. :-) |
GavinWraith (26) 1563 posts |
The BASIC interpreter, when it comes across a function or procedure whose name it has not yet registered, scans the program for a DEF FN or DEF PROC statement that matches the name, to register it in the appropriate linked list for quick look up if it should be required again, or else raises an error if none is to be found. This is made possible because, in BASIC, function/procedure definitions are not the same as assignments. You cannot rename, or give another name, to a function or procedure. The name and the value are indissolubly wedded. The Lua interpreter, by contrast, if it encounters a variable-name that is neither that of a local variable nor in the current environment, simply assigns it the special value nil. On the face of it this would seem to make mutual recursion impossible. But there is a way round this if the values in question are both functions and local to the same chunk, or indices in the same table. In the first case
works because although g has the value nil when the interpreter first meets it, in the definition of f , by the time f is called, further on, g has been defined.
In the second case, works alright but only because the two functions are used as methods of the same table, x . This is a consequence of how the colon operator works. The variable self gets bound to x , so that by the time the functions are called each is within the scope of the other.
But, if the two functions do not belong to the same chunk, or the same table, if they were defined in different files for example, there is no way that they can call each other as far as I can see. AppBasic implicitly uses mutual recursion: the main part uses user-defined procedures, which in turn must use stuff defined in the main part (error-handlers, for example). I have not seen a way that Lua can handle that. I would be grateful to be shown wrong. An essential part of Lua is that functions are values like any other, and so a function definition is just an assignment of a value to a name. You can give a function as many different names as you like, or use it without giving it a name at all. For this reason, BASIC’s eager lookup behaviour is not feasible for Lua. |
Richard H (8675) 100 posts |
This. I would say this is the essence of a good plugin framework. Define an interface consisting of must-have and optional components, and then leave the developer of the plugin to develop it as he or she sees fit. As long as the interface doesn’t change, and the plugin implements all of the must-haves, the developer of the plugin can extend or expand its capabilities wherever the whimsy takes them, or not at all. |
Jean-Michel BRUCK (3009) 351 posts |
@Steve Drain
If attached an example to create an application a RISC OS desktop application. The program belongs to 7th software, thanks to them, but it illustrates the principle well. The file contains the development directory, conforming to DDE rules.
To come back to your question, a desktop application uses objects created with ResEd or WinEd. https://jeanmichelb.riscos.fr/Temp/BasicEx.zip Note: I like !StrongEd as it is, if you select an already open development file, !StrongEd brings it back to the foreground, which also works fine with the window list. — |
Steve Drain (222) 1620 posts |
That is the bit I do not see. In my tests and the example you have given the Res and Comp buttons are greyed out. As far as I can tell from the Help file, the names of components have to be already defined in a header file, or does Diderot create that? |
Richard Walker (2090) 431 posts |
I certainly agree with the idea of pushing some existing ‘standards’, such as the DDE-style folder structure. I know some don’t like the Toolbox, but it is better for beginners. Taking advantage of existing software like StrongEd will surely make this project more achievable? If anyone wants to start from zero, and basically build VB/VC++ for RISC OS, then fair play, but I think we will see multi-core usage before then! |
Jean-Michel BRUCK (3009) 351 posts |
Hello
Yes, Diderot is a simple information collector for the development of an application. This function could be fulfilled with ResEd, I don’t know where the development of the ToolBox is?
If you want to build an application the ToolBox is essential, and allows you to concentrate on the rest of the program. I agree the future is also multi-core and VFP with RISCOS. — |
Rick Murray (539) 13806 posts |
No it’s not. I would hazard a guess that the non toolbox software is still in the majority. So I hope this IDE will also support regular templates as well as Res files. Though, I will agree, this does depend a lot on the quality of your library. The one I use automates a lot of the Wimp dispatch plumbing, so when I last looked at the Toolbox (coverage circa 2000 or so) it didn’t really seem to offer much to justify making the transition. Yes, some generic dialogues are automatically handled. Now, if you want a dialogue like the standard one but with additional options, well, the toolbox wasn’t quite so helpful with things like that.
Yes, the quicker we can swap FPE for VFP, the better. |
Colin Ferris (399) 1809 posts |
For someone who likes maths :-) -a module converter -FPE to VFP for machines that have the appropriate hardware. |
Steve Drain (222) 1620 posts |
Ah! I see how it works now, with something similar for the Comp button. I was hoping for something automatic, so I think Diderot is not for me. ;-( By the way, officially, a location Res file should not be put in, say, a UK directory, but should have a numeric suffix for the Country number. This enters the whole morasse of Territories, so I will say no more. ;-) |
Stefan Fröhling (7826) 167 posts |
@Fred Graute
That is bad news as that would mean when we switch to 64 bit then we need to do another editor anyhow. @Richard Walker
Anything that is structured, clear and easy-to-use is welcome! Toolbox: But there should be options to make programs also without the toolbox. |
Steve Pampling (1551) 8155 posts |
I don’t see it as bad news per se. SE would be a plugin and if Fred hadn’t reworked the source by the time 64 bit was the only option you would just use a different plugin editor. |
Rick Murray (539) 13806 posts |
Zap. What, you think it’s a problem that Zap is also an impenetrable pile of assembler? That’s okay. By the time 64 bit becomes an issue, I’ll probably be gaga. |
Steve Pampling (1551) 8155 posts |
Yep, that was top of the list, as was the person that mentioned it :) |
Theo Markettos (89) 919 posts |
Bringing us back to IDEs: I think the thing to do would be to consult as to what users want, and what they want to do. Users I’d classify into several categories:
I’d then query what sort of programs each of those want to write, in what languages, and where they would appreciate an IDE to help them out. It might also be interesting to know what programming experience they have on other platforms. I think you would find opinions quite divergent between those groups. I think that’s important to identify because you may need different things to cater to different users. For example a My First Program interface might not much to offer the pro who is expecting Mission Control, and vice versa. Perhaps the things to focus on might be that which delivers something useful to each of those groups. Programmers will only invest the effort in learning your IDE (especially if they have to pay for it) if it offers a substantial improvement on what they already have. |
Steve Pampling (1551) 8155 posts |
+1 Although I would replace “Programmers” with “Users”
and
But that doesn’t mean it should adopt “My First Program” at the expense of usability for experienced folk. |
Rick Murray (539) 13806 posts |
I think that depends upon what you mean here. If you’re comparing with what’s on offer for a Windows and Linux, that’s a pretty high bar given the huge development efforts to create integrated and functional IDEs. It might be worth talking to those who create their RISC OS software on other platforms in able to make use of the advantages of those platforms, rather than enduring the limitations of the essentially command line tools… Sadly I’m used to the way the DDE works (could say I just don’t know any better…) but something that would be nice to have is local file version tracking. Every so often I dump the sources and resources into an archive as a snapshot of a given version of a program. But this isn’t terribly useful for making comparisons, and it is “when I remember”. |
Richard Walker (2090) 431 posts |
I like Theo’s idea… Consider the different use cases. If I had to pick one thing, it would be an integrated/visual source control interface (probably using git these days). That would create forks and PRs, and allow merging of PRs. A visual diff interface would help greatly, so we can clearly see what is in each potential PR. With a nice visual diff interface, then I see no reason why it couldn’t also diff two things on the file system (so people who refuse to embrace source control can still gain something). Coming up with a new language, or visual Toolbox code stub builder doesn’t excite me that much. I have used OSLibSupport in the past to write a simple Toolbox app, and thought it was OK. Code completion or documentation in tooltips would be more useful to me. |