glass, a screen editor : Yr golygfa o Hescwm Uchaf, rhif 38

Programming for work and programming for fun are two very different things. There’s a big overlap, of course, in techniques, tools, and so on. But the motivation, the goals, they’re from different planets, different planes of existence.

After I finished my six year stroll through Software Tools in Pascal, I had a little period of inactivity. Not surprising really and while I wasn’t exactly bereft, the longer time went on the more I looked around for a new project.

Picking up Andy’s enthusiasm for Rust, I picked up the language by reimplementing Cell, a toy language of Andy’s devising and which I wrote a JavaScript version of a few years ago. We then worked (are working) together on an implementation of gunzip.

And now I’ve started something new, and pointless, and fun.


glass

A screen editor like they used to use in the 70s.

Earlier conversational editors like ed were written for a user base that were overwhelmingly using a teletype terminal.

Teletype Model 33

This is a Teletype Model 33, introduced in 1963. You sat in front of a nice chunky keyboard, and everything you typed, and all the output you generated, was noisily printed out in front of you on big sheets of fanfold paper. That’s one of the reasons ed's commands are so terse - ain’t nobody got time to wait for reams of output to be printed!

The invention of devices like this fundamentally changed the way programmers communicated with their computers. Before devices like this computers were programmed by wiring up circuits, by toggling the bits into memory, or by punching holes into special cards or tapes. You could, I’m told, literally bite the corrections into your program.

With a Teletype Model 33, you type something in, and lo! the computer could respond (almost) immediately by printing onto paper. You could interact with the computer in real time, you could issue commands and run programs and actually see the results. No longer did you have to write the program out by hand, punch a load of holes in a card, hand the cards to an operator, wait for them to process your cards, and then the next day or next week get a print out that said 'Syntax Error'. Now, you could get that syntax error straightaway. Absolutely revolutionary!

These were only discontinued in 1981, by the way, which is pretty remarkable.

Affordable high-end video displays came in around 1970, and by affordable I mean about $10000. The more every day VT52 launched in 1974, and that probably marked that beginning of the end for the teletypes.

The after image of those early devices is still with us

  • the /dev/tty on your Linux boxes

  • Ray Tomlinson chose @ as the email address separator - it was one of the symbols available on an ASR-33

  • The VT52 screen size was 24 rows by 80 columns

These days, of course, many of us are rocking two, three, or even more very large, very high resolution, true colour screens. Despite all that screen space, of the incredible computer power of our CPUs and GPUs, we’re still in the long, deep shadow cast by those mechanical teletypes.

Because we primary communicate with our computers through the medium of text.

A little while back, I wrote a little ed clone. To move with the times, now we do all have fancy graphical terminals, I’m writing glass[1], a full screen editor which will sit on top of ed and ed-alikes. It will provide modern facilities like being able to see more than one line at a time and moving the cursor around the file while still being resolutely ed underneath.

I’m using the same basic approach as Christopher Fraser described in his short 1979 paper, A Compact, Portable CRT-based Text Editor. Fraser describes s, a screen editor for PDP-11s layered over ed or Kernighan & Plauger’s edit[2]

Because memory safety is important in this age of proliferating zero-exploits, I’m writing glass in Rust. While it would run on a VT52 (assuming you could hook one up to your machine[3]), it runs happily in a terminal emulator, accommodating the various different sizes they can be. If I’m feeling keen, I might even add mouse support.


As I type this, glass runs up and you can start typing but that’s about it. Hey, little acorns, and all that.

glass

If you want to follow along with this nonsense, the code lives here, and I’m putting little updates into this Mastodon thread.


1. The name and project came to me in a flash during a conversation with Andy - bing! and it was there
2. Wheels within wheels. Modern versions of ed cite edit, while edit itself is inspired by the original ed.
3. Now I think about it, I probably do know some people who not only could, but probably do, do this.

Tagged glass-editor, code, and rust

October Linkfarm

  • Nautical Naughties - This is connected in some ways to staunch AI warrior Tim Sweeney, whose enthusiasms we have depicted in our thrice-weekly comic strip, Penny Arcade. Because Unreal Engine is moving to an AI-first workflow, and Steam requires that the use of AI tools be declared, everything made with the engine must wear a Scarlet Letter on their store page. He describes these as "abhorrent" and functionally a political statement. As I have said many times, a person’s politics are often what they don’t consider to be political. I don’t consider AI political. So… there you go, I guess. Until they’re ready to discuss the original sin of the training data, I’m done discussing it with them.

  • The delicious flavour with a toxic secret - Tonka beans have an intense flavour that chefs and food manufacturers have enthusiastically embraced. There’s just one problem – it contains a chemical that could, in large enough doses, kill you.
    Had a cake flavoured with Tonka this week. As the article suggests, there’s vanilla and warm spices - not unlike the smell of an old piece of piece of furniture or a leather-bound book. Complex, quite powerful, but not especially moreish. You’d need to be pretty determined to do yourself any harm, I reckon.

  • Separated Bike Lanes Means Safer Streets, Study Says - Cities that build protected lanes for cyclists end up with safer roads for people on bikes and people in cars and on foot, a new study of 12 large metropolises revealed
    Revealed is strong. We already knew this was true, because every time people study this stuff turns out that putting in separated bike lanes makes streets safer for everyone.

  • She made India fall in love with women’s cricket - now her era as captain is over
    Incredible cricketer and, of course, India’s other great captain Harmanpreet.

  • An Italian Farmer Found Some Unknown Seeds in His Attic and, With Nothing to Lose, Planted Them. The Result Was Almost Biblical - At six feet high, its plants were about twice as tall as commercial wheat. But the most remarkable feature came when it developed ears—the grain-studded parts at the top of the plant … the tall wheat grew a full seven ears, always in the same pattern: a long one with six shorties bunched up around it like little fingers.

  • Man granted first-of-its-kind religious exemption against mandatory AI use at work - “And offloading that labor, regardless of whether it’s taxing or not, is undercutting my ability to be a moral actor.” … While humanism is often a non-religious philosophy or a worldview, federal courts have ruled that it qualifies as a religion.

  • The Mad Tiger of Shinjuku: The Case for Tiger Jeet Singh
    I knew Tiger Jeet Singh was hugely popular in Japanese wrestling, but I had real idea why. This is a terrific little history.

Space Science Corner

The PHP Incident You Heard (Inaccurately) About On The News

Department of Oops

We are lesser without them

The 184 MPH Woman

how to read QR codes by hand (and make bad ones that work)

To quote m’colleague Pikesley, “watch an enthusiastic young person do Mischief with QR codes”


Tagged linkfarm, birmingham, ai, cycling, humanism, wrestling, colin-pillinger, mars, star-trek, hull, cricket, and twats-in-cars

JezCon-1 : Yr golygfa o Hescwm Uchaf, rhif 37

I’ve written before about how GeePaw Hill encouraged me to talk to my programming friends.

GeePaw and his crew get together for Friday Geek’s Night Out every Tuesday. Sometimes they look at piece of code someone brings, talk about a work situation, and “sometimes we just grouch about stuff”.

We get together for The Call every other Wednesday. We often talk about programming, but equally often we talk about growing vegetables, cooking, the state of repair or disrepair of our respective houses, rats in the wainscotting, commuting in London, and/or Judas Priest. Occasionally, it’s true, we just grouch about stuff too. There’s no agenda, nothing is in or out of scope, the call starts when it starts, finishes when it finishes, people can come late, leave early, not come, pop in now and again, whatever they like. It’s a lovely thing, and I enjoy it very much.

We have, naturally enough, a Slack as a side channel for the call. Not for snark, but for pictures, links, and other little follow-ups to what we happen to be talking about. Gradually we’ve added a few other people to the Slack, and into the call.

We know each other primarily through ACCU - its mailing lists, journals, and in particular the conference. Many of us serve or have served the organisation in various capacities, and we’ve pretty much all spoken at the conference itself at least once, some many times.

We are now at JezCon 1

It was with some sadness that I decided not to go to this year’s ACCU Conference. The conference has moved from Bristol to Folkestone, which is a bit of a trek, and I’d looked at the programme and just kind of noped out[1]. I’m sure if I had gone I’d have a good time, but factor in the long travel, the logistics of the new venue once you’re there, and all the various I-don’t-work-for-my-own-company-any-more manoeuvring, and it just didn’t grab me.

Turned out, I was not the only person on The Call ungrabbed. It was the topic of much discussion, some of it quite difficult. As we were lamenting not seeing each in the flesh, it was suggested we get together somewhere for dinner. We are geographically dispersed so we’d all have to travel. Thinking this dinner would be the following week I said I was game, but would need more notice, probably months of it.

The conversation then took a turn, and suddenly we were looking at big AirBnbs and plotting a conference of very own. Since this was apparently my idea[2], it was dubbed JezCon.

Me, in thoughtful mode, talking about my favourite PR

Last weekend, nine of us got together in big townhouse in Dudley (a much maligned town, only some of it deserved) for that conference, JezCon-1. We were due to be twelve, but one person took ill, one was overtaken by events, and another unexpectedly had to run a marathon.

There were all the trappings of a "real" conference - a swag bag with merch and stickers, a drinks reception on Friday, speakers' dinner on the Saturday, a conference lunch on the Sunday.

We had sessions too[3]. On Saturday, we had a mob programming exercise. On Sunday, I talked about my favourite PR, and we had a presentation/facilitated discussion about programming and what it’s for.

We didn’t have a hallway track, but we did have a kitchen track, a dining table track, a popping to the shop track, and quite a lot of sitting in the lounge track.

It was all pretty wonderful and I am - as I think we all are - lifted (although exhausted!) by being there.

Code, reflected in the glass of a photo of Marilyn Munroe

1. This is not to knock the programme at all. It’s world class. It just wasn’t what I was looking for.
2. Or my fault, I suppose. *cough*GeePaw*cough*
3. All of which I’m confident would have made the cut elsewhere.

Tagged jezcon, the-trade, and the-call
Older posts are available in the archive or through tags.


Jez Higgins

Freelance software grandad
software created
extended or repaired


Jez Higgins

Freelance software grandad
software created
extended or repaired


Jez Higgins

Freelance software grandad
software created
extended or repaired



Jez Higgins

Freelance software grandad
software created
extended or repaired


Jez Higgins

Freelance software grandad
software created
extended or repaired


Jez Higgins

Freelance software grandad
software created
extended or repaired