“Do nemo it’s Christmas time at all?”
Rick Murray (539) 13908 posts |
Yes, it’s rather astonishing how well things that are not aerofoils nor particularly aerodynamic have the capacity to fly when enough oomph is applied.
Oh, well how marvellous that the ones out in the wild are less usefully documented than the one you present. …though the world being what it is, we’d probably have ended up with a compromise – middle endian! |
Steve Pampling (1551) 8198 posts |
Roof tiles, and my best friend’s bike1; February 16th 1962. 1 That bike wrecked a prize rose bed about a mile away. 2 I watched, fascinated, until my father pulled me away and down into the cellar. |
nemo (145) 2611 posts |
Rick requested
Well, the original creators forgot to, as it was “obvious” (in the context of network packets), and when Microsoft implemented them it was “obvious” (in terms of struct fields). And this is why interface design is hard – humans are bad at remembering to define the “obvious”.
Due to confusion about the field sizes (caused by mistaking digit grouping in the textual form for byte grouping in the binary form) some have labelled Microsoft’s little-endian field order (ie “GUID”) as “middle-endian”, which is gibberish. The 16 bytes comprise a 32b int, two 16b ints, and the rest are just bytes. Don’t get me started on how that affects sorting implementations – Microsoft accidentally have two incompatible ones – .Net doesn’t match Windows. |
nemo (145) 2611 posts |
Day #9: SharedPals (and also an upgrade for MetaSprite to 0.31 – same page) Any sprite can use the palette from another named sprite instead of having to repeat the whole thing. Requires MetaSprite of course. Written because somebody described some horrific hardwired hack employed by a RISC OS distribution I won’t mention, and I realised I wanted a general solution for sharing palettes between sprites. |
Steffen Huber (91) 1963 posts |
I like ISO9660 with its approach of “please them all” – “both endian” values! |
Grahame Parish (436) 483 posts |
Palindromic storage? |
nemo (145) 2611 posts |
Have you heard the (possibly apocryphal) story about 9660? I heard this at a dinner decades ago and at the punchline only me and the teller laughed (may have been Paul Reuvers) – don’t tell programming stories at dinner, people: The various companies had been struggling to reach a consensus on the standard so sent their engineers to a hotel for a long weekend with strict instructions to ratify the standard by the end. Late on the last day there was still deadlock – the big-endian processor people wanted the metadata in big-endian form; the little-endian proponents insisted that it must be little-endian. Ultimately, as Steffen says, both endiannesses were (optionally) included – recording all the information twice. However… They were all so busy disagreeing with each other about whether big- or little-endian was best… no one noticed that the fields weren’t word-aligned anyway (eg 32b DataLength is at +10 decimal). Committees FTW. |
nemo (145) 2611 posts |
Day #10: !LangTest Test your application’s localisation without rebooting, territory modules or owt. |
Rick Murray (539) 13908 posts |
That’s what I say to people at work when they open the door through to the stock area. When it is opened all the way, the handle is at exactly the right place to hit the lightswitch to the off position. Even better, they’ve just completely revamped the fire alarm system and someplace else there’s a door that opens right on to one of those break-glass red boxes. It’s only a matter of time.
Ah, but first one must define what “word” actually means. Remember, DCW (EQUW in BASIC) to allocate a “word” on a RISC OS machine using either BASIC or ObjAsm doesn’t do what one might assume for a 32 bit processor. Meanwhile LDRH/STRH (for halfword) does do what you’d assume for a 32 bit processor. It’s a bit of a mess, ain’t it? I’ll go get my coat… |
André Timmermans (100) 656 posts |
Reminds me of an anecdote in the reverse. Two decades ago a secretary at our enterprise came to us to try to wow us with a little magic trick. She had a set of cards with a list of numbers on it and said ‘think of a number between 1 and 99, show me the cards which contain that number and I will tell you which number you thought of’. I immediately noticed that the first number on each card were 1, 2, 4, 8, 16, 32 and 64 so everyone here can guess the list of numbers on each card. Poor little secretary, she was so disappointed when I told her to avoid showing that magic trick to programmers. |
nemo (145) 2611 posts |
Day #11: LongSpriteNames It is now possible to name a Sprite Requires MetaSprite, obviously. Provides three new SpriteOps because I can’t change the existing API that shortnames don’t have to be terminated at all if they’re 12 bytes long… that’s obviously not compatible with longnames so different SOPs required. I nearly implemented longnames on all SpriteOps if R0b7 set, but that seemed a bit greedy. I’m prepared to be bribed with chocolate though, which is not evidence of greed at all. |
nemo (145) 2611 posts |
I first saw one of those 50 years ago, and I’ve occasionally got them in Christmas Crackers since. When it came to surprising normals, you used to be able to count on binary. |
Stuart Swales (8827) 1367 posts |
Was it just me that misread the middle of that sprite name as robin williams at first glance? How much chocolate? I can offer a nine-pack of dark KitKat. |
Steve Pampling (1551) 8198 posts |
Count in binary… Six months in, he was the fastest way of calculating stuff on that vessel. Weird?
I’m sure that’s contraband in some states. 1 It’s a Armed Forces thing isn’t it? “Sorry, I’m afraid of heights” – pilot, “can’t hold a spanner the right way round” – mechanic/engineer |
nemo (145) 2611 posts |
Day #12: BreakAche Shift-Break will throw away all your work without so much as an apology… tame that keypress! Any attempt to Break results in an alarming noise and a 1½ second window during which the Break button will actually work, before going back to “BOO!” mode. Includes new version of BBCSound module because nostalgia is where the money is these days. |
nemo (145) 2611 posts |
Right currency, wrong denomination. |
Stuart Swales (8827) 1367 posts |
That will teach me to be more precise in future. |
nemo (145) 2611 posts |
Day 13: FilerCloser Choose from eight different things to do when shift-closing Filer windows in six different ways! How you remember which combination does what is your problem, mate. |
Martin Avison (27) 1508 posts |
FilerCloser looked interesting, so I gave it a go. It certainly seems useful, as I often need to clean up filer windows. However, I saw that when it starts, there are 18 ZeroPain logs generated. I fear that nemo has fallen into the BASIC trap that expressions in an IF statement are ALL evaluated – it does not stop if a false is found. So when F%=6 and E%=4, the following line tries to access address 4 in PROCexalloc…
and there are several other examples. This case may be benign, but would be better avoided. [This did give me an opportunity to try my ZPdebug application though – one drag of the log file and three clicks displayed the offending instruction, and two more clicks displayed it in StrongEd.] |
Steve Pampling (1551) 8198 posts |
FilerCloser looked interesting, so I gave it a go. It certainly seems useful, as I often need to clean up filer windows. The version on the page being v0.92 from 31st Dec 2023, I wonder whether v093 (or later) has the issues fixed. |
nemo (145) 2611 posts |
nemoBasic has early-termination forms of AND and OR precisely for scenarios where one cares:
But this is simply a case of me not caring (cos I don’t use 5). Please feel free to change that AND into an IF. Thank you, I’ll put it on my list. It’s a long list. Ah phooey |
nemo (145) 2611 posts |
Day #14: !MiniCal by popular demand. It’s a tiny calendar on your iconbar! You can choose your colours! That’s all it does! |
Rick Murray (539) 13908 posts |
Well, there’s an idea for the big entry of the final day – nemoBasic – so nobody else needs to care either. ;) |
nemo (145) 2611 posts |
Why does the high-vector build of Basic allow you to fail to read zero page? Why doesn’t it just read zero. Anyway.
…“benign”…
No, it’s realloc and the cut-n-paste exalloc – circa 1993. Thanks for spotting it. |
Rick Murray (539) 13908 posts |
Because stuff on RISC OS generally isn’t that smart. If you ask it to read memory, it’ll go ahead and read memory and if that memory doesn’t exist or is inaccessible in user mode, then it’ll go wrong. Luckily Martin was running ZeroPain, so it logged the access and faked something being at &0. Better than throwing an exception and stopping dead. This isn’t really a BASIC problem, it bites C programs that do stuff with pointers if those pointers are, at any point of being read, set to null. |