Dissecting George the Computer Robot

ge6

Robot George

danbri‘s trying to reverse-engineer Big Trak bots, reminded me I had an old bot to play with : Compurobot® George the Computer Robot from 1984.

Mine was a pressie, long time after that (charity shop?) but pre-Web, didn’t have a manual.

According to The Old Robots Web Site, he has a 4-bit microprocessor.

Curiosity fuelled, last night I opened him up. Two screws by his buttocks, on at the back of his neck, hidden by tape label.

Very neat construction.

dscn6185

Left, top: two LEDs. Left middle: incandescent bulb.

Right: resistive rubber keypad/board. Speaker, circuit board, battery compartment (1 x PP3, 4 x AA), 2 motors, gears, wheels.

The board’s typical 1980’s, single-sided, pre-surface mount, lots of discretes. I got into electronics at the end of the 70’s, so George’s tech is familiar.

dscn6175

No sign of his schematic online, boo.

2 chips, 20 3-legged devices – probably transistors (doubt anyone would bother with anything remotely exotic for something like this).

The big chip is marked MP 1342, Google didn’t know it. Presumably the microprocessor (I did find a similarly named brushless motor driver, but pretty sure that’s not the one).

The other chip is a 2212, a 0.5W audio amp. That figures, with the little speaker.

Looking underneath:

dscn6181

The keypad appears to go directly into the processor, I’m guessing the transistors will be motor & light drivers.

I forget, does the usual complementary pair motor driver need back-EMF protection? I’m looking at the diodes. If not then the trannies are probably set up as Darlingtons or somesuch, they definitely do need a back-wired diode.

Drawn a blank on the processor, but the Old Robots site does have some of the instructions (not full manual) :

Compurobot-z21

So…next steps (time permitting): I think I’ve got batteries, have a play. Find a minimal 4-bit processor emulator, see if I can replicate his functionality.

What would be nice would be to emulate the processor on an Arduino or similar (bit boring coding it up directly), build a George NG. Doable, surely? One day…

—-

PS. I did have batteries, so had a play. Lot of bad contacts there, bit of corrosion around batteries, power switch dodgy. But when power got through, made a hell of an 80’s electronic racket. Enough to scare a cat in Australia (I kid you not).

Still can’t quite make out the button functions properly, but after some fairly random button-pushing he did do some kind of sequence. Different noises, a crunchy effort at running his wheels (WD-40 time), lights flashing.

 

 

 

 

Advertisements

Intense

Damn that was weird.

First, huge apologies to anyone I might have chatted to in the past 18 or so hours, wow, I totally lost it.

I’d had to reduce my medication dose to zero over the space of about 5 days, run out of funds

Check this…

went to dentist a coupla days back. All promising. but the guy handed me a book, Le Macchine e lo Spirito Humano.

wtf?

in my bag had a survey paper on Deep Learning

back of this book, quotes Kurzweil

teeth recoverable, thanks

Small ideas, loosely coupled.

I recently got a little bit worried, spending most of many years advocating a timbl world view, don’t try anything clever with your software.

Damn you, stupid dannys. Just another kind of

foaf:Agent

I assume the schema.org has the same world view. You just cut everything down to a shared notion of communication we can understand. Something like HTTP.

Still true, innit.

Fielding still has a posse.

Contrast

Recently I had two poles apart ideas, both probably symptomatic of my recent mania, but please forget  their nativity, please look at them without that. Although I can only describe this way.

So one was “Always ON”. I’ve been a bit blabbly forever, enjoyed having a blog. Rare original ideas, but loving to tell people about the nice things I’d seen

Then concurrently I had two things going at my head at once. My lovely girlfriend had come back after some bad times, and I had a friend Julian staying. With the girlfriend, we would have those stupid rows, where you’d end up saying “I didn’t say that!”. So you wish you had a tape recorder to say, yes you did! She also suggested we get a dictafonic thing, record stuff to note down later.

Same time, I would see Julian doing his music stuff, and he’s do it all day. Seriously, he’s practice the same song for about 12 hours a day, and only tweak one little phrasing or a note somewhere from one day to the next. He’d often get worried about his progress, and I just wanted to say “listen!”. today – yesterday. Diffs.

The idea of Always ON. You record everything, audio, visual, fall back on a pen and paper. I’f you can’t do surround, just do audio. The dictaphone I got, bought something like a 16G card in it, with that, crappy voice compression stuff going on, that’s about a year’s worth of audio.

Why not video everything all the time? Record everything all the time? Share it all, show other people that we are human just like you. Ooops.

This is so obvious, and I know all those Californians have been there already. But when you start applying to your own life, thingz getz a bit weird.

The bits you, he, she or I might feel bad about. The relationship I have with this woman is about our interpretation of it, not the literals. Fairly sure I recorded a few rows, and no doubt inappropriate grunty noises at other times, then felt obliged to delete them. You just can’t do that. Not even if you are GCHQ, as if they’d ever ask first.

Also I kept losing dictaphones, oh dear.

Always ON. Get everything recorded, so I won’t miss that bit of birdsound, for my ambient CD. If anything ever happens to  that woman I love, I’ll have this lovely history, warts & all, to refer back to.

I’ll come back to this, but imagine reality has a timeline.

So that is Always ON, an idea I guess I’ve been building up to for decades.

But in the space of a couple of hours travelling, I came up with the Contrast.

Always OFF.

Not some nihilist bullshit, but actually quite a positive idea.

I’d been down to pick my mother up from Pisa airport. She been flying, so was knackered, I’d been up early, after a manic phase, so I was a bit tired too.

We’d done all that “no seen you in ages” hugs things, she’d already told me a Friend of a friend had said my father had said I was depraved, over some rubbish I’d said on Facebook.

Forget that. I wanted to know how to make some nice conversation, mental huggies.

So, how are you getting on with your novel then?

She, like me, has struggled with such stuff forever. Both have the same kind of hangups, would prefer to teach other people how to write than actually doing something original. Oddly enough, me dad has done a novel, hopefully published one day.

I’m thinking how the plot & characters move, but couldn’t be arsed getting pen & paper out. As little FOAF (gloggle it!) faces. Pretty much sorted it all out in my head.

Hang on, all in my head. Like the novel I’ve written. My own little virtual world, just internal to my skull. Except…

Maybe a bit in the rest of my body. Might have been that Michael Mosly rang to say that if you add up all the neurons in a human digestive tract, it works about the same as a cat brain.

My point being that the things that happen in all the synapses, it is just as real as the rest of it. Eyes might deceive a bit, but this is the VM we’re in.

Slightly distracted there, but it is very like the Geoff Hinton thing, compress the whole of the human race’s texts down to about 4 bit, you can reconstruct it the other side. I reckon that’s how mammalian, possibly saurian/chicken sexuality works. It just gets compressed down, to tell the front end bits whether to expand or not. Go on, Sex and Deep Learning, that has to be 9 column inches in The Mail…

I do think our current notions of what the universe is like owes more to bad 1960’s science fiction. cf. Matrix. But in one form or another, we do exist as information, somewhere, sometime. Which is kinda nice for atheists like me, all those nice things that have happened still exist, if you give the universe a timeline. Even works for the dietary-botherers. Same universes.

None of the universes cares at all, but there is satisfaction to be to be had by being in a flash of existenz when you hand your doggies a handful of peanuts. Jua-du-arrrrr-vive, as the French pirates say.

Even your every thought is there. Don’t get paranoid otherwise I’ll tell you why my dad thinks I’m depraved.

We don’t need to be always on or always off. Many teenage philosophers have reached that understanding already. Without a hard life, then sitting under a tree for a while.

SPARQL templating for fun and profit

tldr: SPARQL with a simple templating language gets incredibly powerful.

Hateful WordPress, must get my own host back up + silly danny code up again soon (will be hyperdata.it this time around, remind me to make that live soon).

Lost half of this doc because WP doesn’t do Job One. Oh sorry, wrong link, but I believe DanC is a good church-goer, so not too far off the mark. This is the more practical Job One (ymmv).

So Mr. DuCharme, take browser stuff, pump it through templating.

GRAPH ~{here}~

No sure that’s the best syntax, but it’s just a little config thing to make Mustache templating (presumably others too) recognise a slightly different marker for placeholders. I chose that to save me getting confused because of SPARQL’s big use of Mustaches {} .

I was able to make an editable site without even thinking, a Wiki that we’ve been using internally, it just works. Just use SPARQL Update, use Mustache templating on the queries/updates. Can do anything from the browser, little bit of jQuery for shinies to help, it’s Ajax bits don’t take a lot of thought. Fuseki is a very nice bit of code (thanks AndyS, Jena team). I’m sure the OpenLink stuff is too, but I get a bit scared because that seems to try to do too much. Nice that it uses the same endpoint for query and update, Kingsley or one of his awesome crew will no doubt correct me there. We all know it’s not SPARQL stores aren’t quite RESTful, but these things do solve a lot of problems in a straightforward fashion. At least it’s not Ajax with the last letter standing for XML, been there, done that, nice idea but it doesn’t simplify things. Can only be hypermedia to do this kind of stuff, webbishness. I think that Turtle gets there, opening the door to hyperdata, but even that can be a struggle sometimes. Can only be hypermedia to do this kind of stuff. It does seem like an uphill struggle, but all you really need is links in there, even PDFs can do that, despite the painful proprietary angle. Konwabueno innit, need to make sure i18n is in there too. RDF tends to be pretty good on that front, is pretty much native, timbl ftw. I haven’t even tried some of the other graph data store, the name/pointer kinda stuff, worries me that, like JSON, they don’t have URLs as native (JSON-LD ftw there, though I did wish they’d have let me flip the syntax over, put the simple JSON first, schema stuff, disambiguation after, more likely to engage the poor old API builders, IMHO).

Beware that despite it being a Recc, different stores have slightly different conventions for query/update URLs, not all support simple POSTing/PUTing of an RDF format (Fuseki does, and it’s even now got an Apache security mechanism available, thanks small gods).

With the project I was , am, working on I wound up doing rather a crude regex hack to shift the prefixes to the top, drop the @ from prefixes and add a dot (or the other way around, I forget which, another slight non-intuitive thing I’m afraid, just have to get over it, there was probably a good reason, like most W3C specs, ymmv again, but I couldn’t be arsed looking at the proper syntax def, sorry, not entirely i18n’d that phrase, but one does need simple answers, not that huge hornet buzzing around in autumn).

Only really posting to point Bob DuCharme at this idea, hoping to prompt maybe another book from him… (mine Gott, looks like you can even rent the pages, though I I suspect Bob’s got most of the material online somewhere anyway).

So, I love the SPARQL Protocol and RDF Query Language (naming recursion pretty much halts at RDF, the Resource Description Framework) . If you do code anywhere near the web, you should know it.

Before SPARQL arrived, I hated it. I’d had a few years in a sysadmin job which involved lots of SQL. Anything that looked like that quasi-relational nonsense, run a mile. (Looks like the Database Debunkers have gone offline, but check out anything by a guy called Date, or just that original paper which tells proper relational, I forget it’s author, but that makes sense, even though it’s a bit mathsy).

Thing is, RDF is a graph structure, so you can project it in every kinda way. Can look like a graph, a tree or even tables. Or just triple after triple. All the way down.

But when it did arrive, and I played, it turned out to be awesome. So much so I named a lovely cat for it (ok, not exactly, SPARQL is SPARQL, the lovely moggie was Sparql, see what I did there, syntax monsters?).

I can’t remember if there was actually a vote on it, but I know I favoured the approach to a query language as proposed by Uche & co. Pointerish things, taking you through the graph. But what was accepted seemed a monstrosity that looked painfully like SQL :

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name
WHERE {
   ?person foaf:name ?name .
}

But please take it from me, it’s a lot better than it looks.

Sorry I ran out of steam on this post. But if you got this far I’m sure you can think it through. Create SPARQL queries using a simple, well-tested templating thingy (like Mustache) to fill in the blanks, like graph name (just use the namespace, no?). Is very easy to get creative with simple queries and updates (SPARQL 1.1). These templating thingys support conditionals and basic loops etc. I did wind up with loads of cruft, because it was so easy to try things. And I nearly didn’t get remotely near the requirement spec when I got confused over FROM and FROM NAMED (isn’t very intuitive, IMHO agin, get the wrong SPARQL store config (easily done) and it just stops working).

Yeah, take that, and hopefully you can run with it, yet another IMHO.I have been around this stuff a long while, so there’s at least a 50/50 chance of it working

Web APIs are an Anti-Pattern

[draft – publish early/often…]

I know this sentiment has been expressed elsewhere, but I thought I should add my €0.02 (if I haven’t already). In short, most Web APIs aren’t Webby. If you need to call it an API you’re probably doing something wrong

fielding-has-a-posse

Thing is, APIs over HTTP continue to proliferate yet the vast majority have a fundamental flaw : they’re inherently incompatible. If you wish to say, programmatically post to Twitter and post to Facebook, you currently have to build separate blocks of code for each, each converting from your internal representation.

There is quasi-standardization. It’s typical to use standard HTTP methods (often limited to GET and POST) and use JSON as the payload. This is often described as being RESTful. Nothing could be farther from the truth.

ref. ProgrammableWeb

The key bits that are missing are Identification of resources and Hypermedia as the engine of application state.

[TODO fill this out]

ref. Mike Amundsen, hypermedia

JSON is a very nice way of representing data. However for the Web, it lacks a crucial requirement: native support for links. It’s not hypermedia. But it can be made hypermedia fairly transparently using JSON-LD.

HTML is the definitive hypermedia, but its support for arbitrary data (the kind that APIs in general may wish to pass around) is rather clunky, see RDF-A, microdata, microformats.

The answer : just use HTTP (with your preferred representation(s)).

The inimitable Paul Downey (@psd) expresses this well by flipping it on it’s head: Web APIs Are Just Web Sites.

[TODO – mention Hydra –  plus hydra-middleware – via @bergi_bergos ]

I’m biased by having used RDF for a long time, my preferred approach is to :

  • use RDF representations internal to the app
  • expose a Turtle representation (using content negotiation) alongside those of HTML etc.