The Straylight Source Distribution ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For a long while now, I've been pontificating in comp.sys.acorn.programmer about how clever I am, and how I know how to do things properly. Most of the regular readers should now be thinking something along the lines of `This [mdw] chap seems to know what he's doing, although I've never seen any of his work. He's been going on about these libraries and things but we've never seen them or seen any software which uses them. It all seems a bit fishy.' Well, now's my time to put my money where my mouth is. Straylight is releasing all of its source code. Well, the interesting bits. The next question ought to be `why?' Why am I doing this? Well, there are two reasons, although they're both associated with Linux. The first reason is that I've `seen the light' of Free software, and want to do something about my heretical past as a Software Hoarder. I want to give my small contribution to the world, as Freely as the GNU and Linux teams are doing. And I want to show off a bit, too. The second reason is that I'm not doing much Acorn work at all any more. Akasha (my RiscPC) spends most of her time turned off now, in favour of Excessus (my Linux PC), and I don't have the time or the inclination to maintain this rather large chunk of source code any more, so I'm giving it all to the community which inspired it. It feels slightly like a sort of a swan song as I leave the Acorn world. I'll be releasing the code in dribs and drabs over the coming weeks, hopefully in a sensible order, so that all the software can be built with the parts already available. Unfortunately, most of it was never designed to be source distributed, so there's no guarantees against mutual dependencies. We'll work it out as we go along, hopefully. The main components are: * Some simple header files and libraries for assembling the code, and some trivial utilities used in the build processes. * BAS -- the Basic Assembler Supplement, which allows Basic programs to generate AOF object code. This is required for some of the other build tools. * SDLS -- the Straylight Dynamic Linking System. This is already well known, but not well used, I think. Maybe the sources will be interesting to someone. * Dynamite -- our dynamic-area heap manager module. Again, well known software, so maybe the sources will provide some interest. * Sculptrix -- Straylight's 3D border rendering module. I'm very proud of this code. Provided also is the source to version 1, which was a horrible hack made worse by poor modifications. Version 2 does more, at the same speed, in less space, and more maintainably. * STEEL -- the Straylight Extensive Event-driven Library. This is a grandiose name for a RISC_OSLib more-or-less rewrite. There are Issues involved here, which I'll try to resolve -- some of the source files aren't `pure' Straylight code, which could cause problems. I recommend against anyone using STEEL -- it's just needed by Glass, which is a jolly good piece of software. * Glass -- Straylight's template editor. It's actually the second template editor I've written, although I'm thoroughly ashamed of the first one. It's been around for ages, quietly circulating around a slowly increasing coterie of friends. I suspect many readers already have copies of Glass they shouldn't have. Well, as of this announcement, those copies become legal. I'd be interested in hearing how far this informal distribution had reached. * A pile of silly utilities. There's a mouse speed changer which tries to read the current speed using underhand methods (i.e., peeking around OS workspace). There's a rudimentary debugger Tim wrote which might be the start of something useful. * Sprinkle -- a little module exactly 256 bytes long which supports linked lists of sprite areas. * Constrain -- constrain the mouse pointer to a circle. This is used in one of Sapphire's custom controls. * Sapphire -- not an acronym, but a weak pun on STEEL. This is STEEL's successor. It's a comprehensive (I think) run-time support system and RISC OS library for applications written in assembler. There are a number of bits of Sapphire which are incomplete: -- There's a scripting language, SAIL, which is based on the work Straylight did on the Termite language. There may be complications on this code. -- There's an interface for C programs, but it's very messy. Many bits of Sapphire require more expressive syntax for declaring data structures than C provides. -- There was going to be a wonderful colour selector, but it never really got finished. The good bits in the current version are the RGB selector window (which is fully functional -- the RGB colour square custom control is my favourite bit) and the HSV colour circle, with its circular mouse constraint. -- The threading code needs to be rewritten, and the rest of the library ought to be properly multithreaded or locked. My favourite innovations are: -- The way filters work in the event manager. We never needed to change the way events got dispatched, because we got it right the first time. -- Custom controls in the dialogue box system. This one was my idea. -- The menu system. I like the way the same menu blocks can be used for normal and tearoff menus. (We designed the system together over a pub lunch, but Tim did all the implementation so lots of kudos for him.) -- The viewer code, and the background-redrawing gallery stuff. This was mine, although Tim had already done the listbox code on which it was based. There are a lot of good ideas in here (in my expert opinion) and some clever tricks too. I think that anyone maintaining a RISC OS library should look in here. It is, I hope, like Glass: an example of the benefits of the Second System Effect. * Sapphire example programs. There's a small number of these, to show how we expected people to write Sapphire programs. They're all lovingly crafted and perfectly formed. Oh, yes. Documentation for all of these is going to be patchy at best. The libraries are sort-of documented by their header files, and by the examples provided. That's all there'll be. On the matter of licensing: I'll apply the GNU Library General Public License to as much as I can, and the full General Public License to everything else. Software which is already OFFICIALLY available under a different licence may continue to be licenced under those terms; however, the existing licences only cover unmodified binaries, so if you make modifications to the software, you're bound by all the restrictions of the GPL. Well, thanks for taking the time to read all of this. It's been great working with RISC OS, but I think I've been doing it for too long. I'll still hang around Acorn newsgroups and flame people whom I think are being stupid. I will keep porting to RISC OS in mind as I continue to write, but as far as developing specifically for Acorn is concerned, that's all you get. It's 10:30 at night, I'm cold, and I've been typing this for too long. Goodbye. It's been great.