Nov. 2nd, 2010

marnanel: (Default)
I wrote this sonnet for All Souls' Day, which is today, but I wrote it on 21st July 1997 in Bunhill Fields. "Bindweed" is a name for the plant which some call morning-glory and botanists know as convolvulus.

I saw the bindweed curl about your tomb
Whereon I set a rose, now short of breath,
And marked the similarity of death
Between your chance to live, its time to bloom.
For though your maker overflowed your hours
Yet still upon your blossom climbed the weed;
You noticed but did nothing; thus its seed
Cast round the earth, and choked your budding flowers.
But brazen trumpets round its conquering green
This bindweed blossom, in the rose's stead;
Just so, before you took this rosy bed
You sometimes woke and showed what might have been.
But now your chance is gone as chances go.
I've learned your lesson. Let me find the hoe.
marnanel: (Default)


In xzibit we have the concept of doppelganger pointers, which track the movement of "real" pointers on the other window. (Doppelganger pointers are usually shown with black insides, and "real" pointers with white insides, as in the diagram above.) The position of the doppelganger is transmitted over RFB in one direction, but since RFB sends this information only in that direction, the equivalent information in the other direction is sent over the xzibit control connection.

However, there is a problem.  In order to send the doppelganger information we have to track the movement of pointers, by receiving XMotionEvent events.  It turns out that XMotionEvent tracks the movement of doppelganger pointers as well as "real" ones.  This causes a feedback loop: the host user moves the pointer, the remote user sees their doppelganger, the remote user's doppelganger generates motion events, which moves the host user's doppelganger, which causes the remote user's doppelganger to move again, and so on for ever.

There are a few possible workarounds, but none seems very satisfactory.

We could stop using actual pointers for doppelgangers.  Instead, we could use shaped windows and move them about.  That would stop them generating XMotionEvent.  However, experimentation shows that this causes an unacceptable amount of flickering.  So it looks as though we're stuck with using actual pointers.

We could also discount motion events derived from doppelgangers.  This could be done by examining the event for some sort of flag (which doesn't seem to exist).  A better solution is to remember where we put the doppelganger, and ignore any motion event from those coordinates.  This is easily done for messages over the xzibit control connection.  However, doing this for messages using the RFB PointerEvent mechanism poses a greater problem.  We could:
  1. fork the gtk-vnc library and add a special case for doppelgangers.  This is the most efficient answer.  It is also a horrible bodge.
  2. ignore all RFB PointerEvents, and use the xzibit control connection in both ways, at the cost of sending all pointer events in one direction twice.  This is the simplest answer, but is horribly inefficient.
  3. run a simple filter over the RFB stream as we receive it, which removes any RFB PointerEvent messages at the place where we last put the doppelganger.  This is probably the cleanest solution, but is rather a hack.  It's also difficult to implement, since RFB messages are of variable length and require knowledge of each type in order to know where each one ends.  (A first approximation is simply to look for PointerEvent messages with the expected parameters anywhere in the stream, and hope that the five bytes we're looking for don't happen to occur embedded within another message.  It's unlikely that they will, but again, it's not an elegant solution.)
I don't much like any of these.  Tell me what you think.

Update: jojomojo points out xinput2's XIDeviceEvent which does have the mpx ID field.  This is very useful, but now I have to make gtk-vnc be aware of it.

marnanel: (Default)
That MP3 encoder
How was I to know
It was full of patents
From Microsoft and SCO
Now my code is tainted
I'm calling rms
Send lawyers, GNUs and money
And get me out of this.
marnanel: (Default)
A long day it had been without James, longer with the weather as bad as it was. Vicky stared into the unending droplets running down the windowpane and hoped that he would be home soon. In the empty kitchen behind her, the radio blared its mix of classic rock, predictable as the raindrops, keeping her mind steady, keeping it from worrying about what might happen to James on a night like this. It was closer for him to commute now that they had moved, but he had only travelled from work to the new house only twice now, and something deep inside her brain nagged at her that he might get lost, might take a wrong turn somewhere, might get into an accident on an unfamiliar road. Once more, she tried to hush the small voice; she walked back into the kitchen and turned up the stereo. The rock music was helping.

Their black cat, Storm, stalked into the room and glowered at Vicky. Storm, who had grown into a fair-sized moggy since they had found him as an abandoned kitten at an animal rescue centre, was the colour of a great thundercloud with a temperament to match. Still, he had been happy at their old house-- or if not happy, at least content with the run of the neighbourhood and the society of the cats around. He had clearly resented being uprooted and transplanted into the new house, however much more convenient it might be for his humans. Vicky reached over to pet him, but he leapt from her grasp into the darkening window, his green eyes reflected dimly against the rainy glass. His tail lay still but for the twitching end.

"I can't let you out, you know," said Vicky. "You'll only get drenched. Five minutes and you'll be clawing on the door wanting back in-- then you'll just be angrier than you started, and it'll be all my fault again."

Storm sneezed, as if in contemptuous answer. Vicky looked at him, and then out of the window at the downpour, and tried not to imagine James in their car aquaplaning across the road. A song on the radio faded out, and the news came on. It seemed full of transport bulletins: crashes and diversions and flooded roads. Vicky sighed.

"Storm, puss, puss," she said. "You want some cheese?" Cheddar had been Storm's favourite delicacy since kittenhood. She opened the fridge and he leapt down from the windowsill, all anger dissolved, twisting around her legs and mewing. Strange how easily cats' attention can be diverted, thought Vicky. I wish I knew how to divert my own.

She cut a sliver of cheese and fed it to the cat, who ate it delicately, then nuzzled her in thanks. For the first time since they had brought him to the new house, she heard him purring. Vicky closed the fridge and walked back to the window: the rain had stopped, and the clouds had already begun to clear.
marnanel: (Default)
There was the time Ed hired a camel for a week, so's he could learn to ride it ("just in case" he said). And the time he vanished for months on end and came back with Argentine stamps on his passport and a penguin's beak on a string around his neck. And then there was the time he opened a candy store just because he'd wished for it when he was a kid. That didn't last more than a couple of months, but it was just another Ed thing, and we all stood around and made admiring noises just the same. Helped him out, too, when it was needed: Rich and I painted the outside of that candy store, and we were well rewarded in gobstoppers, I can tell you.

Ed had a day job, or you'd probably better call it a "practice"; I don't well understand it, but it was something to do with intellectual property law. That was during the day. In the evenings he'd come home and work on improving his own intellectual real estate. Even when I knew him at school, Ed was one of those guys who can't stop learning during summer holidays, and he didn't lose the habit after school was finished. Somehow I think he was a little like that candy store, he wanted a mix of a little of everything. It was never just him, though; he needed to drag us into all his little projects. Not that we ever complained much.

You never got told much about what it was until you saw it. Some people, when they have news, they can't stop telling you about it, but not Ed; maybe it was the lawyer in him. You'd just be told that something new was up, and he'd like you to see it (he wouldn't mention lending a hand just yet), and could you be at his house at eleven, Saturday morning? Good? Okay then.

So there I was, driving up to his house, a large house, in one of the parts of town that call themselves "good". There was no sign of Ed himself around the house, but before I parked I'd seen the thing, whatever it was, standing on the lawn just away from the gravel drive. I took it for a car, probably an unusual kind considering its size. A regular car that size would be cheaper than Ed would get excited about. Maybe a racer.

Rich wandered up to me as I was getting out of the car. "What the hell has he got himself this time?" he asked. His tone was the usual one where Ed was concerned: a kind of amused frustration.

"I dunno, some kind of car?"

"I was thinking it was a rocket-ship," he grinned. I walked over and took a closer look. It certainly wasn't what I'd guessed from a quick glance: its body was the size and shape of a cheap car, but it had no wheels I could see, and the back ended with row upon row of conical pipe ends, maybe four rows of three. I could see where Rich's impression of a rocket-ship had come from. On the front there was what looked like the big brother of one of those fans you stick in your room when the weather gets warm. The rest of the thing was roughly a cube, a mass of pipes and valves and other things you'd probably have to be a mechanic to understand.

"Yup," I called over my shoulder to Rich, "we'll be seeing Ed in space yet... and here he comes."

Ed had appeared from the house and was walking towards us, grinning all over his face. "Isn't she lovely?"

"What is she? ... it?"

Ed reached us. "She's a siren. You know, when there's an air-raid or a nuclear attack or a meltdown or a big fire or... stuff, and they'd have one of these babies on the roof of a big public building, like a school, and they'd start her up, and... waaaw!", he wailed in imitation. "Isn't she gorgeous?"

"A regular banshee," said Rich. "So what's it doing here?"

"I read that some guy died who owned this one. There's only ten of these in private hands in the world, you know. Most of them were scrapped when they weren't needed, or they're still up there rusting on the tops of buildings. Anyway, so I wrote to his executors, and they agreed to sell her to me!" He rubbed his hands together gleefully. "So, wanna be here for her maiden voyage?"

Rich was dispatched for a couple of gallons of petrol. Ed spent the twenty minutes pointing out all the features of the siren, most of which I forgot immediately, or at least haven't stayed in my mind between now and then. What I do remember was that the siren was built around an ordinary petrol engine, like in a large ride-on lawnmower, and that this engine's job was partly to run the fan which pushed the air through the pipes at the back to make the wailing noise, and partly to make the whole damn thing revolve. The revolving part seemed to fill Ed with the most glee. He gave the siren's side a gentle push to demonstrate, and the whole machine gently turned and continued turning for a surprisingly long while.

"You really gonna use this thing?" asked Rich, when he'd returned with the petrol can and had the whole thing explained to him all over again.

"What would be the point in buying it otherwise?" Ed unscrewed a cap on the side of the siren and poured in the contents of the can. "Now, ready? Cover your ears." He took hold of a cord and gave it a tug. The engine rumbled and turned over. For a quiet moment we stood there as he wrestled with the cord; then the engine roared and the silence was over.

The machine stood still for a moment with its engine running, then began to turn smoothly on its axis. The pipes at the back sighed gently, and the note held a moment as the back passed me; then, as the front came around, the note grew and filled the air until the engine could no longer be heard. The air seemed full of the sound, growing fuller and louder with every moment. Rich and I stumbled backwards from the machine, hands over ears. Birds rose, startled, from the trees around the drive, and the walls of the house bounced back the note and intensified it. And still the noise grew.

"Wonderful, isn't she?" shouted Ed. At least, it was something like that; if he'd screamed at the top of his lungs, I wouldn't have heard him.

"So how about turning it off?" I bawled back at him. Ed shook his head: he couldn't hear. I pointed at the spinning siren, now coming around again and blaring another load into our ears, and drew my finger across my throat. For a second, Ed's face showed he understood me; then he looked puzzled. I could read him as though he'd spoken the words: the damn fool didn't know how to turn the thing off.

Profile

marnanel: (Default)
Monument

January 2022

S M T W T F S
      1
2345678
9101112131415
1617 1819202122
23242526272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 19th, 2025 04:08 pm
Powered by Dreamwidth Studios