Thursday 28 March 2013

Sinclair QL

I can't help adoring the Sinclair QL, despite its flaws. I never saw it back in the day, but having read Spectrum magazines I was vaguely aware of the QL. As a "business machine", it was awe-inspiring to a mere mortal, but also somewhat boring with its lack of games and entertainment.

Although it was marketed as a cheap alternative to other serious computers, it was still so expensive that I was just as likely to own one as I would an Cray X-MP. Now that I have one I can bring one more childhood fantasy to a closure...
Suprematist, constructivist, neo-plasticist... pick one.
The Sinclair QL is a very pretty object. Rick Dickinson's styling is deservedly award-winning. 80s designers were mining influences from early modernism, fundamental stuff like Van Doesburg, Rietveld and Mondrian. I think it also shows here, even if indirectly. The result is straightforward and stylish, yet somehow playfully geometric. None of this rounded-corners nonsense we have to bear today.

The integrated nature of QL strikes as somewhat odd, as Sinclair had previously promoted modularity to make home computing affordable. The cynic might say that was all a marketing ploy anyway, forcing people to build their "cheap" computer in a piecemeal fashion, ending up with an expensive kit with wobbly connectors. The approach also led to an undesirable diversity of peripheral standards.

With QL, pretty much everything that was sold separately for the Spectrum is found inside one casing: Two Microdrives and ports for serial, controllers and network. Happily, a cheap television set could still be used as a monitor.

OK, it might not be as good as a proper keyboard. But it looks so much more interesting this way! 
The execution was marred by the slow speed of the machine and the inclusion of the idiosyncratic storage format. Peripheral connections are mostly non-standard. Instead of a character display, there are only bitmap modes, which makes text display very slow. Also, there are still only 8 colours. The QL no longer suffers from the colour clash, but then again it does not benefit from the rapidness of a coarse character/attribute resolution.

BASIC, not so basic

Much has been written of the above flaws and I will not retread this territory further. I'll instead focus on using the QL with the built-in SuperBASIC, which is one of the more fascinating aspects of the computer. It is unusual to have a BASIC ROM in a machine touted as "serious" as the QL. To me the inclusion of BASIC shows that the QL design philosophy shares still more with the older generation of 8-bit home computers, rather than with the more serious machines and the16-bit generation of home computers that was to come after.

It was common in the early days to include a BASIC programming language in the home computer as the primary operating system. Some might think the BASIC scene of the 80s was one of the more laughable aspects of the home micros, but I'd say a BASIC in ROM is a pretty clever choice considering the limitations of the hardware. The BASIC home computer setup combines calculator, graphic notepad, data storage, text functions and of course, a programming learning environment. 

It's hardly original these days to point out that something may have become lost in the transition to graphical desktop oriented computers. But what was that something lost? Perhaps the example of QL points in this direction. The QL BASIC is not as simplistic as those included in the smaller computers. It has features that make me think this approach might have grown to become something more significant.

QL allows a glimpse to an alternate history that never really came to be: An era where graphical interaction becomes important, not via mouse and icons, but through keyboard, powerful procedural command sets that can be used to access line graphics and windowing in a hierarchical way.

What's so neat about SuperBasic's procedures is the ease and transparency the programmer can add to the existing command set. Let's imagine: The QL is turned on. The computer automatically boots up a BASIC program from the Microdrive, which activates a command set I have prepared earlier. (We'll assume an ideal world where the drives actually work).

The set gives me customized commands for defining objects in three-dimensional space. WALL, ROOM, CHAIR, DOOR procedures have been defined in this way, and can be used for fooling around. Each command draws the corresponding object directly to the screen, rendered from the chosen viewpoint. Should I want the objects to behave differently, I can of course change the contents in the procedure definitions.

Left: Drawing on-screen with the created procedures. Right: A "house" written in BASIC.

A more hierarchical space can be defined by writing a program listing that makes use of these procedures. I create a building out of rooms and corridors, after I have reached some idea how I want to position them. The rooms are adorned with windows and doors, and also contain objects such as chairs and tables. I can use the BASIC program to give the rooms some logic of their own. For example, changing the room dimensions might even re-arrange the furniture within.

If I get tired with the conventional furniture objects, I can redefine the procedures to do something more interesting. Furthermore, all graphical output in the objects is driven through one self-defined procedure which draws the necessary lines. By changing this principal procedure, the outcome of all the other commands also changes. Depending on how the line procedure is written, the view becomes three-dimensional, overhead or an elevation... or the lines and coordinates are randomized and distorted, producing more unconventional outcomes.

Left: Changing the perspective to a side-view. Right: Changed foreshortening and background colour.
In principle, the above could be made to happen with the QL. As a matter of fact, I have tried to demonstrate how this could begin to work, even though this work hardly represents the idealized vision above. But I also specifically did not want to plan too much ahead, as I wanted to experiment with the fluidness of this process. There's something to be said for a mixture of interpreted commands and a program listing, which tends to become lost in a compiled-only language.

The pictures here are a result of about an hours work. It shows to me that the environment is "graphical", despite all the command lines, much like in a good LOGO environment. Without any dedicated drawing package, the QL BASIC could be used to create a rudimentary setting for spatial design exploration. In my mind, here's something more at play than the rather limited idea of a "office desk metaphor" that Apple was peddling to their customers.

With the QL, the graphical component is not presented as a way to make the computing experience easier, but more expansive. Of course, this vision is demanding, as it requires at least some programming skill and some understanding of design exploration.

The video below shows the reality: The lines are extremely slow.


So it might not look much, but this is on a cheap-ish computer from 1984 and pretty much possible out-of-the-box. The BASIC environment becomes a way to access all that the computer does, and it can get pretty interesting with the graphics built-in. In similar vein, the ZX Spectrum already provided a programmable graphics pad. But it is the procedure definitions in a language interpreter setting that bring the QL experience to a whole new level, and at least in principle, the Microdrive allows a rapid retrieval of these command sets. It becomes as easy to type WALL 100,0 as it is to type line drawing commands.

Now, if I were more interested in writing novels or calculating spreadsheets, the QL BASIC might offer less openings out of the box. The truth is, the QL BASIC environment is not enormously flexible towards all kinds of interests. But who knows, what might have happened if this approach had become the mainstream. Instead, we now have computers mostly as platforms for launching applications that achieve fairly limited things. Programming tends to be accessed through counter-intuitive development environments, not very encouraging for direct approaches. (Although it has to be said that projects such as Processing and Python have somewhat helped change that.)

Highlighting different objects with a variety of colours. The TABLEs are made from LEGs and PLANEs,  whereas the PILLAR is a ROOM with a fixed width and depth.
All in all I have liked to play around with the QL Basic, perhaps more so than with other old computers. What I've been here trying to say is that there is an underlying design vision in the QL that continues to intrigue me, and not so much the somewhat flawed computer QL turned out to be. It's of course not fair to criticize a 30-year old piece of electronics, and I know the story of QL did not end with the Sinclair machine. Perhaps I'll be able to get a later version some day, and see how the story continued.

2 comments:

  1. IMO the QL is yet another example of how englishmen trusted their (wrong) intuition instead of checking a bit what was going on elsewhere. For the British market QL would probably have been fine, if there were no international competitors.

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete