gerald_duck: (duck and computer)
ZFS is a very promising filesystem that Sun developed for SunOS. When they released the source code it got ported to Linux. A lot of people speak very highly of it, so I decided to give it a go before committing to use it in a real installation.

To start with, I just tried a simple zpool on a removable hard drive. I played with datasets, volumes and snapshots and it all worked really nicely. I even played around with having qemu mount volumes from it. I was hugely impressed.

Then I decided I wanted to unplug the drive. I did zpool export and it said it was busy. I closed everything I could find. I tried zfs unshare, zfs unmount, lsof and so on. No offenders showed up. I tried zpool export -f — still no joy.

At this point, /proc/mounts was showing no ZFS-related filing systems. /dev no longer contained the ZFS-volume-related devices. I could see no sign of the zpool except via ZFS's own commands, which were still stubbornly refusing to export the pool.

Eventually, I gave up and simply pulled the drive. Oh boy was ZFS unhappy! Now every zfs or zpool invocation wedged so hard not even kill -9 could terminate it.

I tried rmmod zfs without any real expectation it would deign to terminate; I was not disappointed.

Eventually, I rebooted. But ZFS seemed to have got in such a pickle that it didn't shut down cleanly. Cue an extremely painful reboot process.


This makes me sad. On the one hand, ZFS is a lovely filing system with a lot of potential; on the other, bricking a system so hard at such slight provocation is almost unforgivable. )-8
gerald_duck: (loadsaducks)
I've just realised something; I probably could and should have realised it literally decades ago.

It has been said that Adam Young, who died in 1829 was "the last man who knew everything". Around that time, the exponential explosion in the sum of human knowledge eclipsed the capacity for any one person to know it all. No more polymaths.

As a parallel to that, for a few short years in the late nineties, I knew everything about the computers I used. I'd absorbed heaps of knowledge while hacking my way through my teens, then did a computer science degree, then learned more while I was out in industry.

I knew — roughly — how semiconductors worked.
I knew what every single gate did in my computer's CPU.
I'd worked with the people who wrote my OS's C compiler, and dabbled in its innards.
I had a complete understanding of all the operating system's capabilities and related APIs.
I'd read the RFC for every network protocol I used.
I knew how modems sent and received data over analogue phone lines.
I knew how a quadrature mouse, a keyboard, a CRT, a hard drive, worked.
I knew how Ethernet worked.

I knew everything.

Then it all started to slip away from me. Operating systems and applications became gigantic. CPUs became monstrously complex. Graphics started getting done by scary things like OpenGL, then transmitted digitally via interconnects rather more elaborate than SVGA. Hard drives started using preposterous tricks I couldn't pretend to understand in order to squeeze in more data. Optical mice arrived and worked by voodoo. Keyboards started being connected via USB. The Web became a maelstrom of protocols mutating as fast as venture capital could carry them. I've spent 25,000 hours programming C++, and I know how to use it inside out, but I no longer had more than a general idea what happens inside the compiler, even before clang came along and sprinkled additional magic on the situation. My data travels via gigabit Ethernet, wi-fi and DSL.

Now, the vast majority of what happens in my desktop PC is a mystery to me.

That's not a problem that can possibly go away. And it's also presumably how most people have always felt about their computers. I need to learn to cope with this…
gerald_duck: (carcassonne)
(Long time no post! I've no idea how many people are still reading, but this is as good a place as any for me to post this so I can refer interested parties to it.)

I visited the UK Games Expo yesterday.

Things I bought


Arboretum, sort of a set-collecting card game, but with three or four very unusual twists. I've played it twice and want to play it more.

Paco Ŝako. Ignore all the cobblers about peace, friendship and collaboration: this is a Fairy Chess variant with three key features:
  • You never take pieces; if you move onto a square occupied by an enemy piece they become paired and either player may move the pair as a unit, according to the rules of their half of the pair.
  • You can move onto a square occupied by a union. In this case, you liberate your piece which was previously in the union and move it away from that square. If that in turn moves onto the space occupied by a second union then you get a chain reaction, which is both cool and a really alien concept to get one's head around after a lifetime of playing regular chess.
  • The pieces are specially designed to pair up nicely. They're beautiful and almost worth owning merely as a work of art.
The pieces are available in a variety of colours. After much deliberation, I opted for yellow and green, because they go together OK as a dark-light pair, and they're two colours of piece that I don't yet have in my Penultima set. (-8<

Half a dozen Fudge dice, also for Penultima.

A larger cloth bag for my Acquire set because, inexplicably, not all the tiles can fit in the supplied one.

The Oink Games version of Riner Knizia's classic Modern Art. It's so refreshing that Oink sells fully-fledged board games in the kind of tiny boxes normally reserved for card games. Strictly speaking, I didn't buy it at the show; I merely talked to people on their stand and confirmed licensing restrictions mean they can't sell it here. So I bought it from amazon.de while I was at the show.

Echidna Shuffle is adorable: a pick up and deliver game where you move huge plastic echidnae around the board. It's basically a kids' game, but I'm itching to have a go anyway. I didn't buy this myself, but I did persuade my friend Charlie to get a copy, which also works.

Things to try before I buy


Bärenpark: Compete to make beautiful zoo enclosures for bears. Looks like a thin thematic skin over a game of tesselating polyominoes. It's encouragingly well rated, and it's by Phil Walker-Harding of Imhotep and Sushi Go fame.

I am not a fan of Richard Garfield. Don't get me started on Richard Garfield. However, Bunny Kingdom is tolerably playable, with fewer glaring flaws than most of his stuff. I'd play it again. I'm not personally about to buy the In the Sky expansion, but it exists and might be interesting.

(As a side note, it appears I'm disproportionately likely to enjoy a game if it has "king" in its name: Castles of Mad King Ludwig, Joking Hazard, Kingdom Builder, Kingdomino, Kingdoms, Kingsburg. At a pinch, also Bunny Kingdom, Isle of Skye: from Chieftain to King and the venerable Kingmaker. Richard Garfield's outrage King of Tokyo is the notable exception - the game that meant I'll no longer buy based solely on reviews; the only game I've ever sold.)

Matt Leacock's Forbidden Island and Forbidden Desert are perfectly playable, good, solid co-operative games. His next game in the series is Forbidden Sky, which I was expecting to be merely more of the same. Now I've seen it in the flesh, though, it looks like a dramatically different game, with some interesting aspects to its physrep. I want to investigate further.

The Fox in the Forest has eye-catchingly beautiful artwork, and a reasonable BGG rating. So far, that's all I know about it; I hope the game itself is good, because I want to spend more time with those cards some day. (-8

I own and like Imhotep. It plays fine with two, but now Phil Walker-Harding has produced Imhotep: the Duel. I've looked at it in detail, and seems to be a solid and interesting game with considerable stylistic similarities to Imhotep. I want to play it. I might have bought it on spec, but I simply don't get enough opportunities to play two-player games these days.

From the description, Letter Jam sounded like a word version of Hanabi. It's currently late in prototyping and the rulebook isn't online because it's not finalised, but I managed to browse a draft: aside from being a co-op with the notion of having other players able to see your cards while you can't, it has nothing else whatever in common with Hanabi. It seems to test the ability to make long words using a specified subset of the alphabet, the ability to identify a word that has missing letters, and just a touch of solving 5-letter anagrams. Intriguing. I tend not to get bogged down actually playing the games at the Expo, but that's definitely one to try once it's properly available.

Continuing the Phil Walker-Harding theme, there is also Sushi Roll, a wonderfully-named dice game based on Sushi Go. That's all I know for now...

Tokyo Highway is a few years old, but I'd not encountered it before. And it's not especially well loved in the BGG ratings, either. But they had a hyuuge version of it at the show that I could hardly not notice - so congratulations to their marketing team. It's a very spatial game, which looks like it might be right up my street.

Dishonourable mention


I've no idea about the gameplay, but in all other respects Ticket to Ride: London annoys the hell out of me. The artwork has a vexing " 'allo Mary Poppins" quality to it, and is riddled with anachronisms. (This isn't just me being overly sensitive when it's my own country they're creating a pastiche of; the UK map's artwork was entirely tolerable.) The choice of locations, and of paths between locations, makes no sense whatever; I somehow doubt Alan Moon has ever visited London, or knows very much about it. Hohum.

Pandemic: Rapid Response isn't by Matt Leacock, and appears to have nothing in common with the rest of the Pandemic family of games. This means it's just some random real-time game of no especial interest, and I'm worried Z-Man may have begun to milk the format. )-8
gerald_duck: (quack)
A few weeks back, I was in Sweden. With family. Who are… a little more normal than I am.

Accordingly, we went to a play farm and a mediæval fishing village that has nice coffee shops, and Stockholm Gamla Stan and such-like. All genuinely fine places to visit, and all good fun.

But I find I'm accumulating a wish-list of stranger things to visit:

Starting with the most normal: the Nationalmuseum. Somewhat vexingly, it closed for a major refurbishment mere days before my visit in 2013. It then reopened mere days before my visit this year, but I couldn't squeeze it into my schedule. Soon, soon!

There are some self-driving shuttle buses in Kista, a northern suburb of Stockholm. I've never been in a self-driving road vehicle.

Out in the wilds north of Uppsala is Dragon Gate, a bizarre failed Chinese cultural centre, now semi-abandoned. This Twitter thread suggests it's probably strange enough to be worth a visit.

Meanwhile, Stockholm has been busy upgrading various motorway interchanges to the North of the city centre, dynamiting huge new holes in the ground for things and stuff. Allegedly, as part of these shenanigans they've installed some direction signs that are basically huge LED matrices and can be dynamically reconfigured to say whatever they like. I'm struggling to find any images of them, but if true it sounds awesome! (To me, as a road geek.)

Ytterby is the tiny village where gadolinite comes from: the ore in which seven new elements were discovered. One got named after Gadolin himself, one after Stockholm, one after Thule. The other four all got named after the village!

The Telefonplan Tower has a permanent art installation: lights in each floor that anyone can vary the colour of using their mobile phone.
gerald_duck: (Oh really?)
There's a lot of bile in the US on the subject of gun control right now, most of it relatively grim and uninteresting.

One particular aspect caught my eye, though. Firstly, some pro-gun people said things along the lines of "you aren't a gun user; you're not qualified to have an opinion on gun safety". To which some anti-gun people retorted "you don't have a uterus; you're not qualified to have an opinion on abortion".

Given that gun control and abortion do indeed seem to polarise along pretty much the same axis in the US, that response strikes me as largely fair.

But…

Would pro-abortion, anti-gun people be happy if the pro-gun, anti-abortion people said "OK, we hereby withdraw our stance on abortion. Now you can't complain about guns"?

What if they instead said "OK, yes, you can express a view on guns. Now you can't complain about our expressing a view on abortion"?

I have the impression many pro-abortion, anti-gun people feel they have every right to protest about guns, but think the pro-gun, anti-abortion people should shut up about abortion. Isn't that the mirror-image problem?


In reality, to quote Ben Goldacre, I think you'll find it's a bit more complicated than that. Some people are so heavily invested in an issue they find it difficult to take a dispassionate view; some people are so divorced from an issue they can't take an informed view.

On gun control, abortion and so many other issues, it would be nice if both sides could acknowledge this and move on.
gerald_duck: (ancient of days)
What's the difference between God and Satan?

Before I start, a brief digression on terminology.

Once upon a time, I labelled myself as "actively agnostic", meaning to emphasise that theology was an area I gave thought to rather than my being an indifferent and passive agnostic by default. I remain agnostic in all sorts of respects, many of which other Christians find quite surprising.

Later, I discovered the term "ignostic", and have used it for many years, even as a Christian. Now I know of theological noncognitivism, which may be a useful further refinement.

And yet, I'm a theist, a Christian. I recognise that it is by Grace not by reason that I know God but, more than that, I also recognise that it is more by Grace than reason that I feel I mean a similar thing by "God" as other theists mean. I retain a strong noncognitivist streak.


So… what is the difference between God and Satan?

I'm aware of several different theories in this area:
  • God created absolutely everything, including Satan. Deliberately.
  • God created everything except Satan, a second uncreated entity which now seeks to mar God's creation.
  • God and Satan together created everything, and are in conflict with one another with Satan as the lesser force.
  • God and Satan together created everything, and are in a conflict of equals.
  • God and Satan together created everything, and balance one another in cosmic harmony.
  • God created everything; Satan doesn't really exist but is God's privative
  • God created everything; Satan is a necessary emergent property of how Creation is configured.
And here's the thing: in different contexts, in different senses, to varying degrees, I agree with all of them.

For completeness, there are a few other theories that I reject:
  • God created absolutely everything including Satan; creating Satan was a mistake.
  • God created everything; Satan is an aspect or avatar of God.
  • God created Satan; Satan created everything else.
  • Satan created everything except God, a second uncreated entity which now seeks to mend Satan's creation.
  • God and Satan together created everything, and are in conflict with one another with Satan as the greater force.
  • …and Satan is going to win, so we should now support Satan in some diabolical Pascal's Wager.
  • God and Satan are in conflict and it is right that Satan should win.
  • God and Satan are in conflict and it would be more fun if Satan won.
  • God and Satan are morally equivalent; which way round you apply the labels basically depends on which tribe you're in.
  • God and Satan are 100% meaningless terms.

In large part, Satan is the Problem of Evil, dressed in red satin stockings and given a name. Lest I sound too dismissive, God is the sacred mystery of good, adorned with a bushy white beard and given a name. That Grace which lets me share a theological wavelength with other Christians about God also lets me share a theological wavelength about Satan.

But.

I look around me, and I see a lot of thinking about God and Satan that to me seems confused and inconsistent. This puts me in one of my perpetual quandaries: when someone manifests blind faith and woolly thinking, that can be both a great help to them personally and an unhelpful source of ridicule to rationalist atheists. I'll take a punt that people reading this lean more in the rationalist direction, so shall plough on…

When something we like happens, how do we decide if that was God's work, Satan's work, or a "fluke"? Is it a reward?
When something we dislike happens, how do we decide if that was God's work, Satan's work, or a "fluke"? Is it a punishment?

If one relies on the Bible, one reads James 1:17 which says "every good and perfect gift is from Heaven" and 1 John 1:5 which says "God is light; in him is no darkness at all". If we allow ourselves to fall into the trap of presuming that what we like is good and what we dislike is bad, that's enough to explain everything. Woohoo!

I'll now draw together a few contrasting quotations of at least tangential relevance:

There is no neutral ground in the universe. Every square inch, every split second is claimed by God, and counterclaimed by Satan.
— C.S. Lewis, The Screwtape Letters

Even what the enemy means for evil
You turn it for our good
— Keyes/Brown/Mooring, Sovereign Over Us

For he makes his sun rise on the evil and on the good, and sends rain on the just and on the unjust.
— Jesus, Matthew 5:45

Now there was a day when the sons of God came to present themselves before the Lord, and Satan also came among them. The Lord said to Satan, “From where have you come?” Satan answered the Lord and said, “From going to and fro on the earth, and from walking up and down on it.” And the Lord said to Satan, “Have you considered my servant Job, that there is none like him on the earth, a blameless and upright man, who fears God and turns away from evil?” Then Satan answered the Lord and said, “Does Job fear God for no reason? Have you not put a hedge around him and his house and all that he has, on every side? You have blessed the work of his hands, and his possessions have increased in the land. But stretch out your hand and touch all that he has, and he will curse you to your face.” And the Lord said to Satan, “Behold, all that he has is in your hand. Only against him do not stretch out your hand.”
— anon, Job 1:6-12a

We often talk of disasters "of biblical proportions" when images from some particularly horrible disaster hit our television screens and newspapers. We tend to reserve the phrase for the devastation caused by natural processes such as floods, storms, volcanic eruptions or earthquakes. Subconsciously, perhaps, we see these as "acts of God", as disasters which humans could do little or nothing to prevent. In one respect that is correct: if we live in a world made by the creator God, then, as the Bible makes clear, God is ultimately sovereign over everything that happens. He holds the universe, as it were, in the palm of his hand. Howver, in another respect the term "acts of God" for these disasters is wide of the mark, because as I document in this book it is almost always the decisions and actions of humans which turn an otherwise beneficial natural process into a disaster.
— Robert S. White, Who Is To Blame?


There are likeable things everyone enjoys, through common grace, and it's a mistake to think receiving those implies any favour from God. There are likeable things we receive which are signs of God's favour for us personally. There are likeable things which are given to us by Satan to tempt us. There are likeable things which are given to us by Satan to reward or reinforce bad behaviour. There are good deeds which superficially appear to go unrewarded.

There are dislikeable things which happen because God is angry with us. There dislikeable things which happen to us because other people did wrong. There dislikeable things which are done by Satan to deceive us. There are dislikeable things which are done by Satan to punish us for doing good. There are bad deeds which superficially appear to go unpunished.

And then there's the creation of the very concept of Bad Stuff, which many would ultimately, reluctantly, lay at God's door.

It's easy — ridiculously, perilously easy — to be careless in how we pigeon-hole each of life's events. It's also easy to denounce some other person or sect for which model of God and Satan they adopt on any particular occasion, to congratulate oneself on an allegedly more correct choice.

The path I try, fallibly, to follow returns to what God said to me when first I prayed: everything's simpler than that, yet much more complicated.

Complicatedly: I maintain an agnostic, noncognitivist tension between the various models of the relationship between God and Satan; we're trying to express an ineffable truth in human language and, what's worse, part of that ineffable mish-mash is fighting back, actively trying to deceive us into error. Maybe my agnosticism and noncognitivism are themselves erroneous; the best I can do by my own strength is to acknowledge that possibility to myself.

Simply: All around us, there is genuine goodness in plain sight. See it for what it is; enjoy it; nurture it; help it. Don't rely on your own strength for any of that. Lean on God. Talk to God.
gerald_duck: (lonely)
I'm seriously missing the good old Livejournal days. For the most part conversation was lively yet temperate and cogent.

I finally gave up and joined Twitter and Facebook; it has to be said that both are pretty grim in their respective ways.

While there's a certain art (or was until they doubled the length of tweets) to constructing something concise and pithy, to a first approximation Twitter appears to consist of:
  • Celebrities saying a few interesting things
  • Arseholes of every stripe screaming abuse at one another
  • Jokes and memes
  • A few friends saying things I disagree with and would like to discuss, but daren't tackle via Twitter

Meanwhile, Facebook is full of people who've friended everyone they know, and are now carefully trying to project a sanitised image of universal acceptability. They don't want to get political because their racist uncle bought an iPad last year, and they can't say anything too lewd because they don't want their boss's children reading about sex-toy wholesalers. Facebook's algorithms show you the stuff people hit "like" on the most, which rapidly descends to the lowest common denominator. Oh, and conversations are only threaded one layer deep, so… yeah.


Livejournal used to be a platform for having conversations with the people you wanted to have conversations with. Not your friends. Not your relatives. Not famous people. Debaters. Raconteurs. Conversationalists.

That's largely gone, now. The realisation of how much I feel the lack has only gradually crept up on me. Somehow, slowly but surely, posting stopped feeling like it was worth the bother. Result: I'm now staring at a six-month-long gap in my blog. )-8


A few weeks back, I was chatting to [livejournal.com profile] joebunny who remarked about my recent radio silence. I said some of what I'm saying here now. Three or four of us all agreed that we missed Livejournal. All it would take for blogging to flourish again is for people to blog again; I wonder if that could happen?
gerald_duck: (loonie)
Tesco has a guarantee that is cunningly crafted so as to appear to guarantee that you can't save money by shopping somewhere other than Tesco.

Even the small print looks fairly reasonable: provided you buy at least ten different items, they compare like-for-like prices on branded products (so not their own-brand stuff) with Sainsbury's, Asda and Morrisons. If you'd have paid less for your shopping elsewhere, they deduct the difference at the checkout.

Other supermarkets have similar schemes.

However, being a cynical soul, I have thought a little more carefully about the mechanics of the scheme and come to some conclusions.

If it worked like customers hope it does, it would be illegal

If the actual effect was to ensure that the big four supermarkets all charged the same price for everything, that would be an anti-competitive cartel and there would be trouble. (Actually, there wouldn't be trouble, because they'd bribe politicians until the trouble evaporated, but that's beside the point.)

You can still save money by shopping around

If you are buying A and B, where A is cheaper in Tesco and B is cheaper in Sainsbury's, the guarantee is that buying A+B will cost no more at Tesco. However, you could still potentially save money by buying A in Tesco and B in Sainsbury's.

You no longer necessarily save money by impulse-purchasing bargains

If you go into Tesco to buy A, which costs £1.50 there and £1 in Sainsbury's, you will only actually pay £1 in Tesco. However, if you see a glossy display of B which are reduced from £1.75 each to £1.25 each and decide to buy one despite it not being on your shopping list, in effect you just paid full price for a B.

Always buy two bottles of Innocent Smoothie

Innocent Smoothie tends to retail at £3 a bottle, but supermarkets often discount that to £4 for two. If you visit Tesco and spot that there's no promotion so only buy one bottle, you'll pay £3 for it.

If, however, you buy two bottles despite them not being on promotion, you'll pay £4 provided one of the other supermarkets has a current promotion.

I imagine Tesco depends heavily on people not thinking of that.

Good luck working out how to buy Jaffa Cakes

As I type, Tesco sells packs of 10 Jaffa Cakes for £1 (10p/cake). They also sell packs of 39 for £3.39 (8.6p/cake). However, there is a current promotion which means a pack of 20 is reduced from £1.89 to £1 (5p/cake).

So what do you do? You buy two 20-packs for £2, feeling both smug and bewildered that this is cheaper than per cake than buying a 39-pack, and that the 20-packs cost no more than a 10-pack. Simple. Obvious. Right?

Ah, but what if ASDA had a promotion and was selling 39-packs at half price, £1.70 (4.4p/cake)? If so, you've actually lost money by buying two 20-packs instead of a 39-pack. And here's the thing: perhaps Tesco deliberately created that apparently nonsensical discount on 20-packs to save themselves money by diverting people away from buying 39-packs while ASDA has the promotion?


I imagine Tesco is aware of all of this and has carefully programmed a computer somewhere at head office to be aware of it too…
gerald_duck: (quack)
Suppose you wish to designate an option to a piece of hardware. You could stick down a little EEPROM, but maybe you'd prefer to make links, or join PCB tracks, without any active componentry.

You have Gnd, and N configuration lines each with weak pull-up. How many different values can you represent?

The most utterly naïve solution would be to encode N options by tying one of the lines to ground.

The marginally less naïve solution — and one that's very widely used — is to encode 2N options by tying any subset of the lines to ground.

However, if the configuration lines are independently bidirectional you can also tie them to one another. Denoting a ground connection by 0, n/c by 1 and commoned groups of lines by A, B, C, etc. the options with 2 lines become: 00 01 10 11 AA. With 3 lines: 000 001 010 011 100 101 110 111 0AA A0A AA0 1AA A1A AA1.

With 4 lines, things explode rather:
  • 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 (=16)
  • AA00 A0A0 A00A 0AA0 0A0A 00AA, AAA0 AA0A A0AA 0AAA, AAAA (=11)
  • AA01 A0A1 0AA1 AAA1, AA10 A01A 0A1A AA1A, A1A0 A10A 01AA A1AA, 1AA0 1A0A 10AA 1AAA (=16)
  • AA11 A1A1 A11A 1AA1 1A1A 11AA (=6)
  • AABB ABAB ABBA (=3)
…for a total of 52 options.


More generally, the number of options is BN+1, where B denotes a Bell number. My maths is rusty, but it looks like that grows faster than exponentially with the number of pins.

Is this a technique people actually use? Is there some reason I'm overlooking why it's a bad idea?

I mean, OK, I'll probably just use an EEPROM, but…
gerald_duck: (freaky)
It appears I'm developing an electronics itch that I need to scratch in a few ways.

Now here's the thing: I've spent decades tinkering with software, including some that's quite low level. I've played a cameo rôle a couple of times in semiconductor design. I know my way around a circuit diagram.

But I'm painfully aware that to create a PCB, you need to know how to scatter lots of capacitative confetti. You need to create Gerbers. You need to tie a squillion and one wires to one another and not screw up. I've never done these things.

So. I have some questions...

Are free PCB design packages any good, or do I have to spend silly money on the professional stuff? In particular, is DesignSpark PCB any good? A few online reviews say it is, and it looks promising, but I'd rather not sink time into experimenting with it if there's something better.

Has anyone played with the Bitscope Micro as a cheap and cheerful oscilloscope and logic analyser? I'm fully aware it would suck for stuff running at modern speeds, but it looks like it'd be OK for retrocomputing, messing around with Raspberry Pi hats, etc.

Exactly how doomed am I if I want to get an SOIC soldered to a board? There are videos suggesting it's far from impossible, some even making it look easy, but at the very least I'd need a much finer tip for my soldering iron and some thinner solder. Alternatively, does anyone know of a specialist around Cambridge that would do prototyping quantities for sensible money? (In the first instance dropping some SO20 onto breakout boards so I can experiment a little.

FPGAs. Which brand? Altera? Xilinx? Lattice? Someone else? Right now, I'm looking at an Altera MAX 10, simply because it seems to have the right combination of price, package size, IO, gates, flash and RAM. Is this madness?

Is the optimisation in VHDL synthesis for FPGAs as mature as that in software compilers? To pick an example, if I design a block that has various outputs and then don't use one of them, will it prune away any logic only needed for that output?

How resilient are 3.3V parts in the face of signals from old 5V 8-bit micros. The MAX 10 specifies an absolute maximum (won't break; might not work; degrades life expectancy) DC input voltage of 4.12V and a recommended maximum DC input voltage of 3.6V . To me, that says I have to put transceivers between it and 5V logic, but at least one person (you know who you are) has said signal voltages are lower than Vcc in practice and it'll be fine. If true, that would save me a huge amount of hassle and expense, but I'm sceptical.

Suppose I want to measure the voltage and current on a 5V supply using a 3.3V ADC. Am I being naïve, or would this circuit do the job?


(The supply voltage would be twice the ADC1IN2 measurement; supply current would be 2×(ADC1IN2-ADC1IN1)×0.1 . With 12-bit ADCs, this would give a resolution of 16mA. The circuit would consume 1.2mW. It would be possible to mess about with comparators, but they'd cost more, and this is a nice-to-have toy because the FPGA has free ADCs, not the main point of the exercise.)

Can someone recommend a cheaper and/or more efficient 5V to 3.3V step-down converter than the Intel EP5388QI? Ideally, it share the Intel part's virtue of not needing a huge count of ancillary components. In my dreams, it would provide a current-sense output as a freebie.


More generally, it feels like — especially around Cambridge — there ought to be some Makespace equivalent for electronics, with a reflow oven and nice 'scopes and a few thousand cheap, standard components. It feels like there ought to be a community for where I could mess about with this kind of thing and stand a chance of having someone be able to see instantly why I just let the magic smoke out (again).

It doesn't look like there is, though. Any suggestions?
gerald_duck: (oreille)
It's been two months now since the One Love Manchester concert. I'm still going back and watching this video every few days. And I'm still crying every time I do.

I was already quite impressed by Ariana Grande. She seemed like a genuinely lovely person, though I was cynically aware that a bit of careful PR could curate a favourable public image. Her response to the Manchester bombing, however was hugely impressive, and evinced the kind of grace and compassion that's beyond fakery.

The decision by Parrs Wood school to release a charity single in the wake of the bombing was inspired, as was the decision for them to perform at One Love Manchester, on the same stage as an impressive hastily-convened lineup of international megastars.

In the normal course of events, if you catapulted a twelve-year-old from the relative obscurity of a school choir into an audience of fifty thousand at Old Trafford with tens of millions more around the world watching live on TV, and they started crying, that would be a pretty awkward moment. Not this time!

Ariana hugs her with sincere tenderness, and it works. The look in Natasha's eyes at the 2m31s mark is beautiful to see. What's more, the crowd feels exactly the same way, and is entirely supportive of both of them.

Natasha has since spoken to Manchester Evening News, and clearly views the experience extremely positively.

It's also clear that Ariana Grande has a prodigious talent. When I pause to think about what's going on there, she's performing one of the biggest gigs of her life at one week's notice, she's juggling her own emotions, she's looking out for Natasha and she still sings like that!

Gosh, yes.

2017-08-16 01:49 am
gerald_duck: (nazi)
Here's a tweet that gave me pause for thought: "Sounds like it comes down to a fear that if whites become a minority they'll be treated like they've treated minorities."

Yes. To somebody who assumes everyone else thinks and acts as they do, and knows (however little they'll acknowledge it to themself or others) deplorable things have been done to various minorities in the past and even current treatment of minorities is very shabby, the idea of those minorities suddenly coming into power over them would be terrifying. That does make a kind of sense.

In reality, that's not going to happen any time soon, if at all. Current projections are that "non-Hispanic White" people will stop being the majority in 2043, but it's absurd to suggest everybody would vote on racial lines in 2044. (Also, they'd remain the majority for a little longer amongst people of voting age.)

Equally, in reality, most people don't think and act like they do.

But they could be in for a nasty shock. They would do well to read the Lord of the Rings with particular reference to Saruman's fate. In the penultimate chapter, the Scouring of the Shire, having cornered Saruman the hobbits could easily kill him. That's what Saruman would do in such a situation, and it's what he expects:

I have already done much that you will find it hard to mend or undo in your lives. And it will be pleasant to think of that and set it against my injuries.'

'Well, if that is what you find pleasure in,' said Frodo, 'I pity you. It will be a pleasure of memory only, I fear. Go at once and never return!'

The hobbits of the villages had seen Saruman come out of one of the huts, and at once they came crowding up to the door of Bag End. When they heard Frodo's command, they murmured angrily:

'Don't let him go! Kill him! He's a villain and a murderer. Kill him!'

[…]

'I will not have him slain. It is useless to meet revenge with revenge: it will heal nothing. Go, Saruman, by the speediest way!'

[…]

Saruman turned to go, and Wormtongue shuffled after him. But even as Saruman passed close to Frodo a knife flashed in his hand, and he stabbed swiftly. The blade turned on the hidden mail-coat and snapped. A dozen hobbits, led by Sam, leaped forward with a cry and flung the villain to the ground. Sam drew his sword.

'No, Sam!' said Frodo. 'Do not kill him even now. For he has not hurt me. And in any case I do not wish him to be slain in this evil mood. He was great once, of a noble kind that we should not dare to raise our hands against. He is fallen, and his cure is beyond us; but I would still spare him, in the hope that he may find it.'

Saruman rose to his feet, and stared at Frodo. There was a strange look in his eyes of mingled wonder and respect and hatred. 'You have grown, Halfling,' he said. 'Yes, you have grown very much. You are wise, and cruel. You have robbed my revenge of sweetness, and now I must go hence in bitterness, in debt to your mercy. I hate it and you! Well, I go and I will trouble you no more.


To someone mired in evil, mercy and justice can hurt more than any violence. The alt-right fear us stooping to their level; maybe they should be more fearful that we will not.
gerald_duck: (carcassonne)
I've been thinking again about the deck of many things idea I mooted a couple of years ago.

Indeed, having transcribed the details from the sheet of paper with an ominous "MkVIIIb" scribbled in the corner, I find that the result is quite cool, actually. [LibreOffice .ods]

Having gone through a phase of throwing everything at the concept and seeing what would stick, I was in a mess with a monstrous number of cards. Then I realised playing cards don't have to be rotationally symmetric. My new plan is for cards where ¾ is given over to the top section and the remaining ¼ is separate thing, the other way up. With very minor exceptions, I've managed to arrange that each game uses exclusively tops, or exclusively bottoms; this means the back of the cards can also lack rotational symmetry, making it easy to get them all the same way up.

I'm semi-seriously pondering throwing this idea through the Kickstarter mill. Since this is just two double-decks of playing cards, once a snazzy design is complete manufacturing and fulfilment should be nearly zero risk.

Alternatively, I just cobble together something less pretty and make myself some decks at Printer's Studio.

The overall concept

Ignoring a few specials, and the bottom sections of cards, I've settled on twelve suits.

They are:

(The ▼▽ symbols are placeholders. They're supposed to represent round-bottomed shields, like Spanish heraldic ones.)

The suits would be represented by the background colours of the card top sections, with mainly white text. This is partly for fun, partly because the colours signify rather more than with a normal deck, partly so it's distinctive from the black-on-white bottom section of the card. I'm aware that would make it a little easier for other players to discern something about your cards if they glimpse one, but this isn't going to be used for tournament Bridge or casinos. (-8

As well as just being twelve miscellaneous suits for various purposes, the suits have various groupings that I'm hoping will be relatively intuitive:
  • Ignoring outline/solid, to get six larger suits:
    • Spades:
    • Clubs:
    • Hearts:
    • Diamonds:
    • Shields:
    • Circles:
  • By outline/solid:
    • Dark/solid:
    • Light/outline:
  • By shape of base/colourway:
    • Pedestal/black:
    • Pointy/red:
    • Rounded/blue:
  • A rainbow:

  • As a baseline expectation, each of those sets has the ranks 1-10 appearing once each. A painstakingly-chosen subset of them then have aces, jacks, cavaliers, queens, kings, zeros and/or ranks higher than 10, as required for the various games.

    Picture cards, of course, only need their image one way up. This should create a certain amount of extra space on them. On JQK, these are used to add the +2,Ø,⇄ symbols needed by UNO. Similarly, there are twelve jokers, each with an additional symbol in its top section.

    Below the rank and suit in each top corner, there will sometimes be a third index. This will be one of:
    • A repeater for the additional symbol on a picture card or joker
    • Action symbols for Red7 on rainbow-coloured 1,3,5,7
    • Suit values for playing Pit

    The bottom sections of cards are variously used for:
    • Numbers 0-104 (with 6 nimmt! scoring marks)
    • Pile base cards needed for The Game
    • Love Letter
    • Mahjong honours and bonuses
    • A full set of chess pieces in each of black and white
    • A couple of dozen unused (must try harder!)

    The specials

    As well as things fitting that regular pattern, there are 27 irregular cards across three groups:
    • A "suit" of ten rainbow cards, for Hanabi, but not with the normal 1-10 ranks.
    • An extra 1 in each of five special suits. For each of the suit pairs other than spades, this is a suit half-way in colour between light and dark, denoted by an outline symbol with a dot in the middle. This is also for Hanabi.
    • Twelve Jokers

    The games we play

    This quadruple deck, 216 cards, is sufficient to play: No Thanks!, The Game, 6 nimmt!, Twins, Pairs, Arboretum, Cockroach Poker, Red7, Love Letter, Parade, Battle Line, Coloretto, Hanabi, Five Crowns, Pit, The Great Dalmuti, UNO and Mahjong. In addition, it can form a simple 52-card deck, a 104-card double deck, a 104-card eight-suited deck, a 62-card 500 deck or a French Tarot deck. It can also be used to randomise 2d6, d%, dominoes or Chess pieces. At a pinch, it might even be possible, though ergonomically awkward, to use it to play dominoes or Chess.

    That's 18 games which normally need specialist decks, plus at least five varieties of deck, and a few little bonus features. And maybe I'll think of something to do with the remaining 26 bottom sections.

    As a finale, when I noticed everything fitted with one card to spare I decided that it made sense to have a round dozen jokers, not 11, and that the twelfth joker should be… a badger. This deck would be awesome for Mao!
    gerald_duck: (lemonjelly)
    After a hiatus, I have reluctantly concluded that Livejournal is broadly getting away with its imposition of new T&C. Certainly in the limited but significant sense that there's no way I'll ever recover the money I paid for a permanent account if I stop using it.

    Once I treat what I paid for a permanent account as a sunk cost, and given privacy is not an issue for me, it becomes clear that the known consequences of walking away are no worse than any possible consequence of leaving my Dreamwidth→Livejournal crossposting switched on. In that spirit, I've reluctantly accepted their new T&C.


    Alas, I fully expect that Livejournal is now even more of a desolate wasteland than it was four months ago when the shit hit the fan. Anyone still here?
    gerald_duck: (Daffy)
    Hmm. Livejournal requiring agreement to new T&C in order to continue using Livejournal. Shady, but there we go.

    However, here's the thing: I have a permanent account. By my understanding, that means I've paid them to continue providing me with service for as long as they remain a going concern, without requiring anything more of me, such as acceding to new T&C. Can I not nobble them?

    At the very least, it'd be nice to recover the fee I paid for a permanent account, if they're not going to provide me with an account permanently!
    gerald_duck: (Daffy)
    When I was an IT manager, I noticed something: although you could in theory upgrade CPU, graphics card, RAM, hard drive etc. in a PC, in practice it was normally simpler to repurpose it and buy a new one. What's more, it would normally be a few years before you wanted to upgrade it, by which time compatible stuff would be like hens' teeth and carry a price premium whereas something far shinier would be a fraction of the price. I gave up on PC upgradability.

    I'm now beginning to feel jaded about modular and expandable stuff in general.

    When I moved into this house, I decided that the dining room should be a library. I bought some IKEA Billy bookcases in a red-black colour that looked nicely traditional, went with my piano and contrasted with the flooring. Then I bought some more. Then I went to IKEA to buy even more, only to discover they'd discontinued that colour. I had to buy inferior ones from Argos instead.

    I also bought a Black and Decker Versapak cordless screwdriver, on the promise that this was their new standard in battery packs for power tools and they could be charged and used interchangeably with any other cordless stuff I bought from them. Guess how long that lasted.

    It is with a sense of grim inevitability, therefore, that I now want a couple more Keter open-fronted storage bins to stack with my existing ones and discover they're discontinued.
    gerald_duck: (Oh really?)
    I was window shopping in IKEA today, and made an impulse purchase of quite a nice looking cordless drill/screwdriver. I do have an ancient Black and Decker cordless screwdriver, but it's not a pistol-grip, it's not a drill and it uses obsolescent VersaPak NiMH batteries which make it pointlessly heavy.

    My decades-old mains hammer action power drill is still going strong and I'll continue using it for heavy-duty work, but I'm looking forward to having something cheap and cheerful with which to drill pilot holes, etc.

    Anyway, the instructions say "WARNING: RISK OF TRAPPING Do not hold the front sleeve of the chuck with one hand at the same time as you open or close the jaws of the chuck with the help of the drill/driver's motor." Provided you're not an idiot and you use a low speed and torque setting, is this a real problem? Trapping what, where? Are they just covering themselves, or am I being overly blasé about a significant risk?

    Of course, I'd already done that several times without incident before I bothered to read the instruction manual…
    gerald_duck: (whoops)
    This morning, I was woken early by a cold-caller. When I heard the doorbell ring, I grabbed my keys out of my jeans pocket, hurriedly donned my dressing gown and headed downstairs.

    Once I'd dealt with the unwelcome visitor, I decided to pop to the loo before returning to bed.

    Later, I woke up, performed my ablutions, got dressed and went to leave the house. At this point I discovered my keys weren't in my pocket. They weren't in the dressing-gown pocket, either. I wasted a good five minutes retracing my half-asleep meanderings as best I could but, apparently, unless I was somehow so totally confused I posted the keys out my letterbox or flushed them down the loo, they'd apparently vanished into thin air.

    Then I had a brainwave: I took the spare set, knowing that if I waited until this evening I ought to be able to find the keys courtesy of the tritium glow-stick fob.

    Sure enough, this evening I found the keys… in the back pocket of my jeans. I'm sure I checked there at least twice this morning. Grr.

    In other news, I now understand why my car's seat didn't feel quite as comfy as usual today.
    gerald_duck: (infra-red)
    So here's a dumb question, which I'm startled I've lived quite so many decades without asking before:

    When we cook food, which is needed: elevated temperature or an actual input of thermal energy?

    I'm sure in almost any cooking appliance a lot of the energy ends up as thermal loss, but if we made an oven out of something swanky like aerogel, then got food up to temperature, if we killed the heat would the food gradually cool down as it cooked, or retain its temperature?

    Wikipedia is being surprisingly unhelpful. My question may boil down (geddit?) to: "What are the thermodynamics of the Maillard reaction?"
    gerald_duck: (duck and computer)
    I am sorely vexed. If any of you understand these issues, or even know someone who does, I'd be very grateful for help from someone who's not going to suggest I do a factory reset, buy an iPhone, switch to cyanogen or whatever.

    Summary: The Facebook and Facebook Messenger apps have been playing up since I upgraded my Sony Xperia Z5 Compact to Android 7.0 . No other issues observed.

    The first annoyance is that the Facebook app crashes whenever I try to view a Facebook Instant Article (one of their pre-cached web pages denoted by the little lightning zap in a circle). Viewing normal web pages works fine.

    The second is that I can no longer upgrade Facebook or Facebook Messenger. Whenever I try, Google Play says:

    Can't install app

    "Facebook" can't be installed. Try again, and if the problem continues, get help troubleshooting. (Error code: -505)

    So I got help troubleshooting:
    • Storage availability? Ample.
    • Check my connection? It's fine. (Besides, the update downloads fine and the error occurs a few seconds after it begins to install.)
    • Force-close Play Store and clear the cache? No help.
    • Update Google Play Store? Up to date.
    • Restart my device? No help.

    Figuring Facebook Messenger is expendable, I tried uninstalling that then reinstalling. Which gave the same result as attempting to upgrade, except now I'm left without Facebook Messenger installed. For obvious reasons, I'm not keen to try that with the main Facebook app.

    Googling finds a few people with similar-ish problems, but no solution. This page says the issue is "Two or more apps with duplicate permissions" which seems by turns vague, unfortunate and likely a legitimate error of some kind. The suggested remedy requires my device to be rooted; it's not, and I'd rather not change that.

    Hohum. I can blunder on for now, but it would be good to get this sorted out. )-8