Recent books

Sep. 20th, 2017 06:20 pm
mindstalk: (Default)
[personal profile] mindstalk
Salt: A World History, Mark Kurlansky. Pretty engaging tome on the history of salt's use and extraction, and its legal or military entanglements. Trying to fund a government off of salt tax or monopoly has been common, and commonly hated, from Legalist China to British abuses in India. The US Civil War can partially be told as a history of fights over saltworks. The Chinese were drilling for brine and using by-product natural gas by 100 AD, and doing percussion drilling around 1100 AD, down below 3000 feet by 1835.

Eye of Cat, Roger Zelazny. Time-dilated alien-hunter Navajo, teleport booths, assassins, psi, Navajo shamanism... a weird book, I don't anticipate re-reading.

The Sharing Knife: [Beguilement and Legacy], Lois Bujold. I'd read this series in 2009, and am enjoying it again. Lakewalker powers and their fight against malices gives me RPG ideas, interacting with inspiration from Martin and Hobb and what I think of as "Wraiths and Rangers". Like much of Bujold, has many laugh-out-loud moments in an otherwise serious story.

Penric's Demon & Penric and the Shaman, Lois Bujold. Novellas set in her Five Gods universe, which I finally got paper copies of from the library. (Released as DRM ebooks, which I refuse to support.) Good, and funny, and I'd happily read more.

The Forgotten Beasts of Eld, Patricia McKillip. My first McKillip after all these years. Enjoyable, with a fairy-tale quality to the story and and writing.

Bike light design

Sep. 20th, 2017 08:12 pm
jack: (Default)
[personal profile] jack
For a while I had the impression my back bike light remembered whether it was on or not when you removed and replaced the battery. And I wondered how that worked. A push-button that moved a physical toggle between three positions seemed implausible. But so did some tiny bit of persistent memory. My best guess is that there was a capacitor which held charge for a short time.

Now, I think I was completely wrong. I think that when you put the battery in, it *always* comes on. I just assumed that it would usually be off and didn't actually check that was true. So I got the impression it was lit *sometimes* on battery-connect, and connected that to the state it had before the battery was removed.

Wow, it's really easy to manufacture evidence for something even when you think you're avoiding that.

Presumably the "power on lit" is so that loose connections don't turn it off. OTOH, that would mean if it has a loose connection when it's being carried about, it might come on and drain the battery. Or maybe no-one thought about it and this just happened to be the case. Or maybe there's a regulation? I don't know.

Choosing the ways

Sep. 20th, 2017 05:48 pm
gerald_duck: (quack)
[personal profile] gerald_duck
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…

Climate comms...

Sep. 20th, 2017 08:02 am
[personal profile] swaldman
This week, a new paper was published in Nature Geoscience that shows that the planet has not been warming quite as fast as most climate models have predicted, so far. There's a deficit of 0.3 degrees C. I'm no climate scientist, so I don't feel qualified to judge whether this methodology is good; it's passed peer review, but it'll be worth waiting a week or three to see whether any other relevant scientists disagree with the findings. This article has a dissenting view[1]. Either way, though, it changes little: If correct it gives a little more breathing room, and the point that is mostly being made is that it makes a 1.5C rise merely "challenging" rather than impossible... but we're still likely to breeze through and beyond that anyway, IMHO. It changes little in terms of the required actions.

So faced with that finding, how to communicate it without either causing the denialist community to go "THE MODELS ARE WRONG! WE TOLD YOU SO! IT'S ALL A HOAX!", or causing the more moderate politicians to go "Phew. We have time. We can ignore this and let the next government deal"? And at the same time not being perceived as hiding less alarmist news? The first author made an excellent effort in this article, which IMHO is a really good example of giving an honest and straightforward lay explanation of a scientific study.

Did it help? Not really. It's escaped the front pages for now, perhaps due to the ongoing series of natural disasters in the Carribean and central America, but the usual suspects have still written what you'd expect. Scientific American has a reserved and balanced take. The Guardian is more optimistic, but warns us that "politics is still not easy". The BBC presents so many views that it's not clear what, if anything, they are concluding. Both of these note the possibility that the original article's conclusions about 1.5C being easier to hit may be wrong. Meanwhile Dellingpole, in The Sun, is spinning this story as "I WAS RIGHT!", saying "a tiny bunch of ­scientists got their sums wrong and scared the world silly with a story about catastrophic man-made global warming." Meanwhile an MP who is a member of the Commons Science and Technology Committee - and also a trustee of the denialist GWPF - complains in the Mail that "There has been no word of apology, no sign of humility. Remarkably, they carry on preaching their diehard gospel. With their habitual arrogance, they argue that the lower levels of global warming mean that we now have even more time to implement their radical policies."

Hmm. Yeah. Whether or not this study proves to be correct in its conclusions, we'll be hearing about it from denialist groups for the next 5 years or more. But I don't think there's anything that one can do about that; keeping quiet about such results would be far worse.


[1] AIUI nobody disputes the paper's direct findings so far, but some are doubtful about its import - some say that there is a natural cycle which has had a cooling influence in recent years, but will have a warming influence in future ones. Superimposed on the overall warming trend, this could apparently explain the discrepancy without changing the urgency of the problem.

English usage

Sep. 18th, 2017 07:24 pm
damerell: NetHack. (Default)
[personal profile] damerell
Note: food eaten between supper and breakfast is incorrectly referred to as a midnight snack. The correct term is "dark lunch".

"Drink Cup of Tea"

Sep. 17th, 2017 08:48 am
muninnhuginn: (Default)
[personal profile] muninnhuginn
Now, this --
Big pic... )-- is the game controller for me. Although, maybe, the tea button should be a larger one.
jack: (Default)
[personal profile] jack
Removing code is good! But everywhere I've worked has had a "pile of makefiles" build system, which have invariably had problems when you remove a file, because the .d files are still hanging around, and make chokes on a source file because it doesn't have the headers it needed last time, even though they're actually not necessary to actually build the file.

And it's a matter of culture whether it's "when you check out code, you often need to make clean or make undepend somewhere to get it to compile" or "when you check in code, you need to find a workaround to make it build cleanly even if you've removed files".

Do people with more recent build tools than "make" avoid this problem?

However, after thinking it through carefully I eventually decided on one of the ways to makefiles cope with this correctly.

The trick

You still do "-include $(OBJ_FILES:%.c=%.d)" or equivalent.

But when you produce a .d file with gcc (usually as a side effect of producing a .o file via -MMD), add an extra line at the end of the recipe, a perl script which edits the .d file in-place and replaces each "filename.o: header1.h header2.h..." with "filename.o $(wildcard: header1.h header2.h...)"

That way, if any dependency has *changed* a rebuild is forced as normal. But only dependencies that actually exist become dependencies within the makefile. (Deleting a header file doesn't trigger a rebuild, but it doesn't with the old system either since the .o file already exists.)

I can share the exact script if anyone wants to see.

transit and mode share

Sep. 14th, 2017 11:29 pm
mindstalk: (Earth)
[personal profile] mindstalk
I've been reading a bunch of kchoze posts the past couple days. This one is on the economics of transit, and transit efficiency.

'if transit is economically inefficient, why are third world cities dominated by transit and not by personal cars? Why do the Japanese pay 10% of their income on transport versus 20% for Americans and Canadians?'

There are some numbers, and discussion of cost per mile vs. cost per trip. But there's one thing which I sort of gut felt that he spells out: transit friendly cities are denser, so they're more walkable as well.

Let me spell that out. In a sprawling car-centric city, up to 100% of trips may be taken by car. Actual numbers are more like 90%. [Caveat: that's share of trips to work, not all trips.] But you'll never see a city that's 90% transit mode share. (Some cities listed do get up to 70% transit, but again, that's commuting to work.) A city that has lots of transit is a city with lots of walking, too, especially if uses are decently mixed.

(I'm sort of imagining a degenerate case where there's no point to walking around one's residential neighborhood, not even for groceries or school or church, and having to catch transit elsewhere...)

So the reasonable target is not getting transit share really high, but car share low, with the slack being taken up by a mix of transit, walking, and bikes.

This has an extra economic effect: in Sprawlville, the cost of cars (roads, parking, cars, gas...) can be spread over almost all trips. Naively, the cost per trip of transit is doing to have a smaller denominator, only 40% of trips rather than 100%, even though the other non-car trips are part of a coherent dense system that must include transit.

Yuletide nominations

Sep. 14th, 2017 10:40 pm
jack: (Default)
[personal profile] jack
I nominated for Yuletide. After lots of "how could I possibly choose", I decided that I might as well pick three works I liked and thought would make good fic, and not feel like I had to pick the BEST three. I can probably dredge up more obscure things I loved, and would really love to see fic from, but I find it hard to bring to mind things I've not thought of for ages.

There's lots of things I love, things like webcomics and webfiction which might deserve attention. I eventually chose three I thought would make good stories.

Elements (experiments in character design), the tarot-like cards showing a character for each chemical element. They're just so pretty, each looks like it tells a story. I was sad the physical cards seemed to be sold out and never for sale. They were nominated two years ago, and I was sad to see not last year.

And two webcomics, Leftover Soup (from Tailsteak, the author of the awesome 1/0, ooh, maybe I should submit that instead), and YAFGC (Yet Another Fantasy Gamer Comic, like Oglaf, very not safe for work, but sort of in a surprisingly wholesome way).

Did other people manage to nominate things?

I am also basking in the disconcertingly competent assumption that, I expect to be able to, just get a story done, without a whole lot of putting it off. I'm not at all used to signing up to something with a deadline and not assuming I'll panic but it's worth it!

I looked at my notes from last year for "what might I be interested in nominating next year". It was mostly the same sorts of things. Although one was, "Steven Universe, if it doesn't exceed the limit of number of works", I guess that must have happened now :) Although I find it really hard to predict. I went to look up Vorkosigan, the universe I was surprised was still eligible when I wrote for it two years ago, and it looks like there's more than a 1000 fics on ao3 from before that, am I misremembering how eligibility/search works?

Smart meter sagas

Sep. 13th, 2017 02:32 pm
[personal profile] swaldman
Scottish Power - through their subcontractors Actavo - wanted me to have a smart meter. They sent me a letter offering this, and asked me to call Actavo to arrange an appointment.

I did that. Actavo said that they couldn't do it because the meter was too high up (it's above a door).

Scottish Power kept on texting me, roughly once a week, asking why I hadn't contacted them (I had).

Eventually I contacted Actavo again to make the texts stop. This time they said they could do it. They arranged an appointment, saying an engineer would be there between 12pm and 4pm.

On the day, emptied the cupboard with the gas meter, waited in, and nobody showed. At 4:30pm I called them and they apologised profusely, offered me £30, and made a new appointment for the same times another day, saying that they had noted on the system that I had been let down and that it would definitely happen the next time. I put everything back in the cupboard.

The next appointment came, but no engineer did. At 4:10pm I called, and they said he was on his way and would be there in ~15 minutes.
He turned up at 5:15pm. He apologised and said that as he was meant to finish at 5 there was no way he could do the job, but he would have a look at the system and make sure it was possible. It was. He went away. I made another appointment. Realising that the problem is that the engineers are booked to be busy all through the day with no contingency[1] - so the last appointment is often missed - I booked a morning. I put everything back in the cupboard again.

On the third attempt the engineer did show up! He speedily removed my old meters and installed new ones, and then discovered that Scottish Power's comms system was down, and so was unable to commission them. He assured me that somebody would phone me to arrange a short appointment for commissioning.

So now, instead of my old dumbmeters, I have two new dumbmeters, which do exactly the same job as the old ones but with more blinkenlights. It's been two weeks since the last visit, and I have received no call about commissioning.

At this point I've given up being proactive. If they want my meter to be smart, they'll need to do something about it.


[1] Actavo have presumably decided that paying £30 compensation for missed appointments and allowing no contingency works out better for them than allowing time for things to go wrong. Sure, it pisses off Scottish Power's customers, but they're not Actavo's customers, so why should Actavo care?

Name five female...

Sep. 12th, 2017 06:26 pm
mindstalk: (Default)
[personal profile] mindstalk
Writers? Trivial for me.

Singers? Not hard.

Instrumental composers? Uh no, though I don't know that many composers period, especially living ones.

Visual artists? If comics and webcomics count, I can do it.

Painters? Haha no.

Electronics

Sep. 10th, 2017 11:09 pm
gerald_duck: (freaky)
[personal profile] gerald_duck
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?

Equifax breach and credit protection

Sep. 10th, 2017 02:13 pm
mindstalk: (CrashMouse)
[personal profile] mindstalk
Couple of similar articles on what to do after the breach: https://www.consumerreports.org/equifax/how-to-lock-down-your-money-after-the-equifax-breach/ and https://www.nytimes.com/2017/09/08/your-money/identity-theft/equifaxs-instructions-are-confusing-heres-what-to-do-now.html?_r=0

They skip checking if you're affected (answer: probably yes), and recommend putting security freezes and fraud alerts on your accounts. Big three, plus this other one, Innovis? Anyway, I tried.

Equifax: fairly easy for both. Claims it will pass the alert on to the other Big Two. Their idea of a freeze PIN is amateur hour bullshit.

Experian: freeze in place for $5. Option to provide your own PIN, or accept their random 10 digit one. Rejected my alert attempt.

TransUnion: failed to do anything, even by phone. Requires making an account to try things online; rejects 21 character account passwords.

Innovis: freeze and alert in place. I was not given a freeze PIN via webpage.

I also turned on my credit card's activity alerts, and got a ShopSafe number, basically a number you can use online with its own credit sublimit and expiration date. You can have many, so in theory you could have one for each vendor or subscription. My bank doesn't do activity alerts, which has me thinking about a different bank...
Page generated Sep. 21st, 2017 10:24 am
Powered by Dreamwidth Studios