?

Log in

No account? Create an account
About this Journal
Current Month
 12
3456789
10111213141516
17181920212223
24252627282930
Sep. 20th, 2017 @ 08:12 pm Bike light design
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.

You can also comment at http://jack.dreamwidth.org/1044386.html using OpenID. comment count unavailable comments so far.
About this Entry
jack
Sep. 15th, 2017 @ 11:08 am Avoiding make dependency errors when you remove a header file
Tags:
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.

You can also comment at http://jack.dreamwidth.org/1044143.html using OpenID. comment count unavailable comments so far.
About this Entry
jack
Sep. 14th, 2017 @ 10:40 pm Yuletide nominations
Tags: ,
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?

You can also comment at http://jack.dreamwidth.org/1043824.html using OpenID. comment count unavailable comments so far.
About this Entry
jack
Sep. 5th, 2017 @ 10:04 am Doctor Strange
Orientalism

People have commented on this much better than I can and I didn't have much to add. I avoided seeing it in the cinema, but after some debate decided I was interested to see what it was like.

I thought that overall it was less fail-tastic than I expected, despite the big failures right in the middle.

Good things

Many people got over-Cumberbatched, but "arrogant ass who becomes worthwhile arrogant ass" is a good role for him.

The reality bending stuff was very well done, it looked very natural as a "we have weird power of reality but the fighting is somehow a mix of sorcery and martial arts".

And the other-dimension stuff was psychedelic and quite freaky.

I actually got invested in his journey from arrogant doctor to desperate drop-out to apprentice to equal with the masters. Some of the medical scenes were legitimately tense.

The learning scenes were good too, it really captured the feel of learning sorcery/martial arts.

spoilersCollapse )

You can also comment at http://jack.dreamwidth.org/1043598.html using OpenID. comment count unavailable comments so far.
About this Entry
jack
Sep. 4th, 2017 @ 10:58 am Villains
Tags: , ,
I've been thinking about antagonists, or anti-heroes, maybe, people in general. Ones I liked as people, ones I liked the writing of, ones I didn't like, what worked well and what didn't.

And it occurred to me, what commonly works well, is that they have a sympathetic/plausible/justified motivation. But that they go too far or do bad things in the cause of it.

That most of what they think, what you'd see in a story from their point of view, is what you might agree with. That doesn't apply to everyone, some people genuinely spend all day doing horrible things, but there are several advantages to using a character like that, the audience finds it easy to sympathise with them, and so does the writer.

But the other half of the equation is that they do bad, unjustified things, but they usually don't *think* about whether they're ok, they're usually not "here is my complicated justification for why X is ok", they just take it as the way the world is.

You can recognise a spectrum. Some antagonists are not really better or worse than the protagonist, we just empathise with the protagonist because it's their story, the differences is that each just happen to be opposed by circumstance, their moral choices aren't very different. Some antagonists do clearly horrible things.

A common choice is a character who *usually* does bad things but isn't *right now*, and you can get invested in their story and then see if they redeem themselves, or if you get to know them before deciding they're still a horrible person even if you came to like them.

It can also be done inconsistently where the villain see-saws back and forth across "can the audience empathise" because the writer picks some things which are kinda bad and some things which are really horrible without regard to an overall arc.

The first couple of Game of Thrones books do this very well, most of the viewpoint characters I find very sympathetic, even if I hated some of them when reading about what they did from the outside.

An example prominent in my mind was Magneto. I recently saw someone saying "Magneto was right", and I thought that a lot after the first film I saw: that if he *could* fight back and do anything to prevent mutants being systematically contained and abused by society, that makes a lot of sense. It's possible Charles' approach is more likely to work, but it's possible Magneto's is (or more likely, both approaches together are more effective than either alone).

However, as I watched more movies that characterisation seems lost. It seems like in every single movie, Magneto's noble goals lead through a train of tortured reasoning, to "and then mass murder", or "and then genocide". And then the X-men get to be the 'good guys' without having to ask whether a more targeted campaign of violence they'd be wrong to oppose. I'm inclined to put that down to the characterisation suffering for the needs of the plot, because I like the character and don't want to condemn them. Or that it's pushing the message that "any violence leads to too much violence" which I *generally* agree with, but probably not for a minority fighting against their extermination. Or that Magneto has a character flaw where his justified hatred of non-mutants, leads to all his plans ending "and then a massive indiscriminate slaughter of non-mutants" which doesn't seem to actually help.

You can also comment at http://jack.dreamwidth.org/1042880.html using OpenID. comment count unavailable comments so far.
About this Entry
jack
Aug. 30th, 2017 @ 12:25 pm Books, tv
Tags: , , , ,
Russel's Attic #3

I think it was kaberett who put me onto these. Some people have not-exactly-supernatural-but-better-than-humanly-possible talent. Cas does maths, so well she can predict paths of bullets and other matrix-reminiscent stuff in real time. And works as a freelance "acquirer".

What's lovely is her relationship with the few people she works with, the PI, the hacker, the office assistant, where she's instinctively opposed to human connections at all, but comes to value a few of them anyway. And Rio, the scary I'm-a-sociopath-but-happen-to-be-on-your-side character.

One of the side stories is "Rio adopts a puppy" and it's, um, very moving, in good ways, but also, without anything very gory happening, rather emotionally scary too.

In book #3, we finally have Cas interacting with research mathematicians, and learning her opinions on various maths research, and it's really quite cool. If you like books about freelance mercenaries and cutting edge mathematical research.

Shambling Guide #2: Ghost Train to New Orleans

A protagonist sucked into working for a publishing house run by a vampire, writing a travel guide for supernatural creatures, the second volume now visiting New Orleans. I enjoyed it, maybe more than the first book, as the worldbuilding has settled down a bit, and it doesn't feel like everything that they encounter came out of nowhere.

Good place

A recent sitcom about a woman who goes to the afterlife, "your notions of heaven and hell are not exactly correct, but there's a good place, and a bad place", and is in the good place by mistake. Or rather, it gets more complicated than that, but that's the premise.

If you like comedy that regularly mentions Kant and Hume, this is it :) The humour isn't very intense, but isn't very cringeworthy, but the relaxed humorous tone lets it explore what that afterlife might be like in ways a more serious attempt wouldn't be able to.

You can also comment at http://jack.dreamwidth.org/1042505.html using OpenID. comment count unavailable comments so far.
About this Entry
jack
Aug. 29th, 2017 @ 12:28 pm Scott on axiology, morality, and law.
http://slatestarcodex.com/2017/08/28/contra-askell-on-moral-offsets/

Axiology, morality and law

I'm not sure how standard this is? But Scott described a three-way breakdown between axiology, morality, and law. Axiology being "which actions are right and which are wrong". And morality being a set of rules for "which principles should you follow, such that you have correct axiology as often as possible"? Partly from a "I can't evaluate each situation from scratch" standpoint, and partly a "we need rules that let us coexist with other people even when we disagree" standpoint. And law being "which principles should be codified and imposed on people".

And if there's an overwhelming axiological imperative, that can override morality (eg. in general you shouldn't do something bad in order to promote a greater good, but if the good is REALLY REALLY REALLY good and you're REALLY REALLY REALLY sure, maybe you should make an exception and feel really bad about it later). And an overwhelming moral imperative can override the law.

But that it's definitely useful to have a law, even if it's not perfect, and to have a morality, even if there are cases where it doesn't work perfectly.

And many moral dilemmas are essentially, "do you have a precise cut-off for when a general principle should override the immediate benefit in a particular situation" (spoiler: no, if it was codified it would already be a principle).

Philosophy

I assume this is one of the cases where everyone who's read more philosophy than me says, oh yes, that's obvious, we just didn't explain it clearly before because you didn't know to ask. And also one of those where Scott's not exactly completely right, but brings up important principles I wasn't previously thinking about.

Offsets

Confusingly, this was brought up in the middle of a post about offsets which I thought was interesting but imperfectly explained.

He's talking about when you can make up for a bad thing by doing more good things.

He disagrees with someone elseweb, who says "you can do it for small bad things but not for big bad things". I'm with him so far.

He uses the example of carbon offsets, which is where I'm confused, because to me that's not offsetting the morality, that's offsetting the *action*. If you emit some carbon and then capture it again, I don't think you can cancel that out entirely before considering its moral weight at all. (Whether the carbon offset WORKS as advertised might be a trickier question.)

Then he goes on to say, you can't usually offset morality, because keeping moral rules is useful for its own sake (in cultivating the habit of doing so, in setting a good example, in a stable society), so if you break one, doing more good things is better, but doesn't really make it ok.

But he theorises that doing something forbidden by axiology but not covered by a more general rule in morality, *could* be offset by unrelated good actions. And that sounds like a reasonable guess but I'm far from sure.

You can also comment at http://jack.dreamwidth.org/1042384.html using OpenID. comment count unavailable comments so far.
About this Entry
jack
Aug. 22nd, 2017 @ 04:56 pm THE LIZARD PEOPLE OF ALPHA DRACONIS 1 DECIDED TO BUILD AN ANSIBLE
http://slatestarcodex.com/2017/08/09/the-lizard-people-of-alpha-draconis-1-decided-to-build-an-ansible/

Scott wrote another short story. As is usually the case, it's intriguing but there's also much to critique :) The aliens in the story develop great technology, and build an ansible out of negative average preference utilitarianism.

I have a lot of different thoughts inspired by this story. I don't think it's the sort of story where knowing what happens is a problem for reading it, but I will cut a detailed discussion just in case.

SpoilersCollapse )

You can also comment at http://jack.dreamwidth.org/1042173.html using OpenID. comment count unavailable comments so far.
About this Entry
jack
Aug. 21st, 2017 @ 05:13 pm My History Caffeine
Tags: ,
History

As a teenager I never drank tea or coffee. I must have tried them at some point, but never felt the desire.

At university I started drinking both. I can't remember exactly, I remember having them as a ritual something to do when hanging out with friends. IIRC I drank instant coffee, and real coffee tasted too bitter.

And I think I reached a point where I needed coffee and got dopey and too tired to get up without it, either at university, or after I started working. Unrelated to the caffeine (I assume?) I also had student-y programmer-y sleep patterns, always wanting to sleep a bit later. I don't know how much that was inbuilt physiology and how much it was putting things off, including going to bed and doing things in the morning.

At some point, I started drinking real coffee for preference, and instant coffee tasted bad.

When I started dating Liv, I drank a lot more tea, because we'd usually make a pot together. And I started to feel like coffee was too abrupt, and tea gave a slightly slower caffeine release, and gradually switched to drinking tea almost entirely: I'd happily drink coffee if it was served somewhere, but didn't usually drink it at home or at work.

When I started dating ghoti, I started drinking coffee again, because she drank coffee more often and I liked companionably drinking the same thing. I started with mostly instant coffee, and to date, still mostly drink instant coffee, although I also like real coffee when I have it.

Now I tend to switch, drinking instant coffee at home (because it's quicker), tea at work (because I want a break from the screen to faff around in the kitchen for 10 min), and whichever I feel like if I drink something out.

I never really learned to like espresso based coffee, espressos taste much too strong, and all the mixed drinks taste weird. I used to like mochas occasionally. I usually like plain black tea with milk, or plain coffee, with milk.

Except when I'm abroad, I generally drink whatever's common locally if I'm ok with it at all.

I don't track how much I drink. It's probably quite a lot, because I drink it whenever I feel like, not at fixed times. But I used to feel like it was doing something weird, when I'd be completely wrecked when I *didn't* have caffeine, whereas now, I definitely need some, but if I get a drink within an hour or so of getting up, I don't feel completely zombified until then.

So I used to toy with the idea it'd be healthier to give up (ie. awakeness juice was just borrowing future awakeness and immediate gains were offset in future losses). But now it feels like, the status quo is doing ok.

ADHD

A couple of people have commented that they have ADHD or suspect they possibly have subclinical ADHD or something related, specifically that mild stimulants make them feel calmer, even right before sleeping.

That's very me. I've never tried to avoid late-night caffeine have haven't noticed it having any affect on my sleep. Which inclines me to think the status quo is possibly fine.

Away

The one big inconvenience in needing caffeine used to be when I'm away, especially at a con in a conference centre, but also, just anywhere on holiday where I'm out all day and don't have decent tea or coffee facilities where I'm staying.

I found it a big faff needing a certain amount of coffee or tea, but that not always syncing up with when I want to sit down and "have a coffee". And a crapshoot whether there'd be somewhere providing bog-standard coffee or tea cheap, or if the only source was a fancy coffee place. Especially if I'm in a rush, or it's all in a foreign language, or whatever.

At some point, I experimented with bringing caffeine pills. I'd studiously avoided them before since having caffeine without the ritual of drinking it seemed like it would only exacerbate the feedback loop of taking more and more to make up for potential caffeine-crashes. I still avoid them when I'm *not* away somewhere.

But I actually found it really helpful, it basically solved the problem for me. I usually need a couple of actual hot drinks throughout the day, usually one or two in the morning with breakfast and one sometime during the day. But otherwise, having a couple of pills in the interim, either physiologically or placebo-y, made me feel fine. I also remember to drink liquid. It made the whole thing a lot simpler.

I can't help other people though, especially tea drinkers in places where there's not much tea.

Questions

Which bits of those experiences resonate with you and which don't?

Most of my friends seem to default to tea *or* coffee, even though I remember by parents drinking one or the other depending on the circumstances. Do other people drink both at different times?

What is the relative caffeine in a cup of tea, a cup of coffee, and caffeine pill?

Does that status quo sound sensible or is there something else you'd recommend?

You can also comment at http://jack.dreamwidth.org/1041905.html using OpenID. comment count unavailable comments so far.
About this Entry
jack
Aug. 20th, 2017 @ 11:44 pm Arrival ranting
Tags: , ,
So, Arrival (the film, adapted from the Ted Chiang story). I didn't have a lot to say about it. Aliens, were great. Linguist, was great. Kind-of-sympathetic kind-of-antagonist military were a bit gratuitous, but generally good. But I did have thoughts about a few specific things.

And, yes, I'm annoyed it wasn't EVEN MORE like a Ted Chiang story than it was, but please do adapt as many Ted Chiang stories as you can. The tower-of-babel one would be amazing...

SpoilersCollapse )

You can also comment at http://jack.dreamwidth.org/1041536.html using OpenID. comment count unavailable comments so far.
About this Entry
jack