ARM coders are nuts
Pages: 1 2
h0bby1 (2567) 480 posts |
aaaa |
David Feugey (2125) 2709 posts |
It’s not very RISCOSish :) That’s why I always said that RISC OS is a toolbox. It gives you possibilities where other OS set rules. Windows 3 was the same, with many toolkits, languages and possibilities. And at any time you can go back to the DOS level. |
GavinWraith (26) 1563 posts |
Yes, but this can make it harder for beginners. When I ported Lua to RISC OS it was immediately apparent that Lua’s particular features (abstraction, information hiding, amongst others) would make it possible to write libraries that would hide much of the grubby detail of wimp programming. However, I held off from doing this for a long time; updating libraries can cause annoyance, so you have to get them right before you expose them for others to use. To concentrate on a particular feature of wimp programming, the allocation of a buffer for the data that is passed between task and window-manager, I found myself faced with a choice: should the allocation take place in the library code, so that it is hidden (and so, presumably, making life simpler), or should the user do it herself (so the library is more flexible)? In the end I plumped for the latter, because that fits better with the RISC OS approach. That is also partly because years of BASIC programming have taught me that DIM statements inside PROCs or FNs are bad news (make space-leaks). In fact RiscLua’s analogous dim function creates garbage-collectible buffers, which mitigates the problem, but I still think it is bad style to have dim used within library code. But others may think differently, and would make different design-decisions. |
Rick Murray (539) 13861 posts |
Code to support a feature currently in wide use. Has known vulnerabilities and is now being replaced by an alternative – various people dropping flash in favour of HTML5 use. Sadly, one of the benefits of Flash was that it was easy to block, not via scripting but just “don’t run plugins until I say so” which got rid of all of the annoying adverts and pages with a dozen videos all set to autoplay…
Yes and no. HTML5 had to develop the capabilities quickly in part due to iOS taking an “over my dead body” stance with Flash. And, it has been seen, that Flash’s update cycle and the generic browser’s update cycle are quite different – and as such working to eradicate Flash is potentially beneficial in the long term. But don’t think it is “more standard”. The video container and encoding is, in itself, patent encumbered. Google tried to make their own video but with H.264 being able to be decoded “mostly in hardware” these days, it is an uphill battle akin to finding OGG and FLAC support on cheap media players (answer – usually not as it isn’t supported by the hardware).
Name the alternative. Note well – unlike traditional languages, Java is intended to work on a “virtual machine” so the same Java application will work across all manner of different platforms. Older feature phones tended to support J2ME, modern smartphones support things like Dalvik which is Java-like. There was a Java runtime for RISC OS a billion years ago and it could run more or less the same code as a PC of the day.
Perhaps a logic exercise, but not anything the public will be interested in. Why? Because people use compilers and such to move away from those sorts of technicalities.
I wonder why ANSI/ISO have not defined a “safe mode” version of C with bounds checking and such. Yes, such programs might run a little bit slower, but given the ease of which it is possible to write gibberish to NULL pointers (and the complications of C pointers in general), it might help prevent many problems that otherwise don’t get caught until the system misbehaves.
There is no universal language.
Depending on his definition of “safe” code, it may be that he is the last person who should be writing an operating system. Assumptions are bad things. Failing to sanitise input is a bad thing. You shouldn’t go overboard or everything will be slow, but… https://www.riscosopen.org/tracker/tickets/398 shows what can happen if you don’t check the basics correctly.
That is because it is the only way. I do this – some of my modules take a pointer in a register and I cast it as a structure. Likewise, the Wimp API passes back a big structure in a register and that will need to be cast. The difference is from then on we can refer to things by structure elements, and try to avoid passing
Not quite. Any decent compiler will compile it, but the precise mapping of structure to underlying memory is “architecture dependent”. For instance, look at TurboC and you’ll see an
It is safe provided you understand that the code is platform specific. if you need to deal with multiple platforms, it gets harder. If not, dumping and loading arrays is a lot quicker.
It could be done with bitfields, but the trouble is that hardware tends to be read-sensitive, and how exactly a bitfield element is accessed is at the whim of the compiler. Probably better using assembler so you know exactly what is going on. |
Rick Murray (539) 13861 posts |
Say Hello to my little friend… General Protection Error It wasn’t until XP that Windows even bothered to sanitise attempts to directly bash on hardware addresses… |
Steve Pampling (1551) 8180 posts |
Numerous problems at work arise from the fact the “the same Java application” just won’t bloody work on the same platform without a specific version of antique Java runtime and then another java application won’t work without a different version of Java runtime installed. |
Rick Murray (539) 13861 posts |
Of course, there is theory and there is reality. It’s a bit like C being supposedly “portable”. It is, if you don’t mind a billion #ifdef parts, or cloning an alien library/API, or writing software that doesn’t really do much… |
Malcolm Hussain-Gambles (1596) 811 posts |
One command says it all about java, keytool. |
h0bby1 (2567) 480 posts |
aaaaa |
h0bby1 (2567) 480 posts |
aaaaa |
h0bby1 (2567) 480 posts |
aaaaa |
Steffen Huber (91) 1955 posts |
Actually, it was the “customer Windows” (3, 95, 98, ME) vs “corporate Windows” (NT, 2000, XP) thing. The NT line always used proper operating system techniques. XP was the first of the “good OS line” to reach consumers. |
Steffen Huber (91) 1955 posts |
In Ada (note: only one capital letter) you can do any unsafe stuff you want to do. Ada just makes it very clear that it is an unsafe operation, and default stuff is always safe. See “Unchecked_Conversion”, “Access_To_Address”, “Unchecked_Deallocation”, “Unrestricted_Access” etc. |
h0bby1 (2567) 480 posts |
aaaa |
David Feugey (2125) 2709 posts |
Of course, that’s why they are offers with limited features and strict rules, even under RISC OS. |
Rick Murray (539) 13861 posts |
Yeah… Just ask our current “leaders”. Des milliers de gens manifesté dans le nom de Charlie. Pour quoi, exactement? Pour plus de vigipirate? Pour plus des regles? Moi, j’ai un souci. Nous faire un manif pour le paix, la liberté, puis la liberté d’expression – dessins, religieux, tout. Mais ils? Je pense qu’ils interpré ce evenement comme raison pour mettre en place encore moins des liberté, encore moins des droits, toujours au lutte de contre les actes de terreur… |
h0bby1 (2567) 480 posts |
aaaa |
Pages: 1 2