jack: (Default)
https://captaingames.itch.io/freeways

Yesterday andrew ducker's links got me addicted to this little game. Each level is a screen with some roads coming in and some going out, and you need to join them up so the traffic can flow freely. Some connections need high traffic and need direct connections. Sometimes there's small or medium levels of traffic but lots of connections.

It's really cute how the separate screens join together to make a city with coast and mountains and houses and industrial areas. When you do all the levels in the initial 3x3 grid it expands to 5x5, then 7x7. And maybe further, I don't know.

I don't really understand the score, it clearly correlates with how good the network is, but I don't know exactly what contributes to it.

It makes some real-world motorway engineering make more sense. There's lots of situations where roundabouts work really well. Sometimes there's a couple of really busy routes which need direct connections, but then everything else just needs to be connected *at all* so you can use normal cross-roads with no flyovers at all.

Some things are bizarre. Who designed this city so SOME roads drive on the left and some on the right?

A few of the screens have a menu item to open an aerial picture of a real-world junction with similar connections and see if you came to the same sort of solution. One was a diamond interchange, with a moderate traffic road crossing a high traffic road. Another was two low-traffic roads crossing, in the middle of some fields somewhere.

There doesn't seem to be an "undo" button, am I missing something? That's realistic for working with concrete, but with the interface so clunky it would be really nice.

Edit: Also, there's a directory called save but I can't find any option to save which disinclines me to play again. Anyone know where it's hidden?
jack: (Default)
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.
jack: (Default)
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.
jack: (Default)
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?
jack: (Default)
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.

spoilers )

Villains

Sep. 4th, 2017 10:58 am
jack: (Default)
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.

Books, tv

Aug. 30th, 2017 12:25 pm
jack: (Default)
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.
jack: (Default)
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.
jack: (Default)
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.

Spoilers )
jack: (Default)
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?
jack: (Default)
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...

Spoilers )
jack: (Default)
I went to Helsinki for worldcon.

It was lovely to see osos and liv.

I always find travel a little stressful but I have got better at not worrying. It's still feels like more of a hurdle than travelling locally, even if it shouldn't, but less so.

Helsinki was nice. I didn't do a lot of exploring, but some. I love water, and enjoyed going to another city based on the sea. Helsinki itself isn't on as many islands as Stockholm, but the harbour is covered with them and several tourist attractions are on one island or another.

We went to the zoo, and I went out to the island fortress Suomelina, both nice ferry rides. Suomelina was originally fortified by Sweden when Finland was part of Sweden, and later controlled by Finland and by Russia, with modern fortifications added to the older ones. The original fortifications are incredible to see, vast stone walls dozens of feet thick with tunnels at the bottom surrounding grassy courtyards, and at the main entrance, stone steps swooping down to the sea from a giant gate that frames the sun.

When we flew back, I realised what Liv had already told me, but not previously realised the extent of, that there really are continuous islands all the way from Finland to Sweden.

Zoo pictures are slowly being uploaded on twitter :)

Food was expensive but fairly easy. Few places had good vegetarian options already on the menu, but everyone I spoke to was eager to to be flexible and make up a cheaper price for a plate full of all the side dishes, without me needing to explain or anything.

Part of the expense is being in a foreign conference centre when the pound is getting weaker, but as I understand it, Finland *is* typically more expensive. I don't know enough about it, but my impression is, partly due to needing to import more food, and partly due to higher taxes and wages. But I wish people would acknowledge that latter part when complaining.

Worldcon was fun. Registration was incredibly quick with a computerised "scan barcode and print label" system, and everything was well organised apart from being over-full on the first two days.

Most of the panels I went to were decent but none stood out to me as amazing.

I loved seeing authors I cared about, at the steven universe panel, at the wild cards panel (and winning hugos). The quantum computing panel didn't tell me a lot about the theory but was fascinating for telling us about what computers had practically been built -- and apparently IBM have one you can run programs on online!!

I had a better balance between different sorts of things, I did some panels, some meeting people. I met up with people, but didn't feel like I was constantly missing out on fun things just round the corner. I got some books I was excited by but not too many.
jack: (Default)
Does anyone understand pilot wave theory even a little bit?

Prodded by several recent articles, I've been trying to follow what it says, and am still quite unsure of the realities.

The analogy usually presented is, if you have a small oil drop on the surface of water, and the water container is subject to a regular pattern of vibration, the water forms standing waves in shapes affected by the edges of the container and any obstructions in the surface of the water. And the oil drop tends to move across the surface of the water following the paths in those waves.

If you look solely at the oil drop, you can't tell which of two equal paths it would follow, but you can predict it will take one of them with equal probability, and predict its motion probabilistically. And if you couldn't see the standing water waves, you could deduce something in that shape exists.

You can even get some analogies for weird quantum behaviour like the an electron passing through two parallel slits and experiencing interference with itself: the water waves form possible channels for the oil drop, and the oil drop goes through one slit or the other, but ends up only at certain places on the far side.

However, the analogy to actual quantum physics is still unclear to me. Not whether it's true, but even what people are suggesting might happen.

Are people suggesting there's some underlying medium like the water? In that case, isn't there some propagation speed? The water waves exist in a steady state once all the obstructions are set up, but they don't respond to changes instantly. If the water trough were miles long, the oil drop would set off following water wave paths that existed at the point it passes through, not the paths corresponding to the obstructions that are going to be in place when the oil drop passes through them.

And yet, as I understand it, no-one expects a propagation delay in quantum experiments. People keep checking it out, but there never is: it always acts like an electron propagates just like it is itself a wave.

I agree, if there WERE some delay, if you changed the slits at this time, and got one result, and changed them at another time, and got another result, that would be massive, massive, evidence of something, possibly of something like pilot wave theory. But AFAIK proponents of pilot wave theory aren't advocating looking for such delays, and don't expect to find any.

Contrariwise, if this is just an analogy, and the quantum equivalent of the water waves (equivalent to the wave function in other interpretations of quantum mechanics) propagates at "infinite" speed, then... that is undetectable, indistinguishable from other interpretations of quantum mechanics. But it raises red-flag philosophical questions about what "infinite speed" means when all the intuition from special (or general) relativity indicates that all physical phenomena are local, and are influenced only by physics of nearby things, and "the same time" is a human illusion like the earth being stationary. Even if you don't expect to detect the pilot wave, can you write down what it should be in a universe where physics is local? Does that in fact provide a way to make QM deterministic and independent of observers, even if you change the reference frame? Because it doesn't sound like it will work.

FWIW, those are very superficial objections, I don't understand what it's saying enough to actually evaluate in depth. But I don't understand why these don't show up on lists of "common objections and rebuttals". Common objections have confident rebuttals in several places, and I've *seen* articles about them, but not understood well enough. Can anyone explain better?

Digression

I do agree, the idea that QM equations are an emergent property of something else, ideally a statistical interpretation of a deterministic underlying reality, would be very nice in clearing up a lot of confusion. But AFAIK, the closest candidate to that is Many Worlds, which doesn't appeal to many people who want to get away from QM unpleasantness.
jack: (Default)
OK, so. We want to allocate a large block of memory that is contiguous as physical memory. That means allocating physical memory in the kernel (as with kmalloc), and then later providing it to userspace software. Presumably then mapping it into virtual memory for use in userspace with mmap from physical memory in dev/mem, although we may be doing something different for reasons which aren't relevant here.

We happen to have a kernel driver already for other experiments with our specific hardware, so we have somewhere convenient to put this kernel code as needed.

This is running on a hardware board dedicated to a single task, so we have a few advantages. We would prefer to allocate a large chunk on start-up, and will have complete control over which programs we expect to use it, we don't need to dynamically manage unknown different drivers trying to get this memory, and we never intend to free it, and the board will only be used for this so we don't need to make sure other programs run ok. And there's no restriction on addresses, DMA and other relevant peripherals can access the entire memory map, so unlike x86 we don't need to specifically reserve *low* memory.

There are several different related approaches, and I went through a few rabbit holes figuring out what worked.

Option 1: __memblock_alloc_base()

From research and helpful friends, I found some relevant instructions online. One was from "Linux Device Drivers, 3rd edition", the section entitled "Obtaining Large Buffers", about using alloc_bootmem_low to grab kernel pages during boot. I'm not sure, but I think, this was correct, but the kernel started using memblock instead of bootmem as a start-up allocator?

From the code in the contiguous memory allocator (search the kernel source for "cma"), I learned that possibly I should be using memblock functions as well. I didn't understand the different options, but I used the same one as in the contiguous memory allocator code, __memblock_alloc_base and it seemed to work. I tried large powers of 2 and could allocate half of physical memory in one go. I haven't fully tested this, but it seemed to work.

There are several related functions, and I don't know for sure what is correct, except that what the cma code did worked.

This code is currently in a kernel driver init function. The driver must be compiled statically into the kernel, you can't load it as a module later. You could put the code in architecture specific boot-up code instead.

Option 2: cma=

fanf found a link to some kernel patches which tried to make a systematic way of doing this, based on some early inconsistently-maintained patch, which later turned into code which was taken up by the kernel. Google for "contiguous memory allocator". There's an article about it from the time and some comments on the kernel commit.

It's a driver which can be configured to grab a large swath of contiguous memory at startup, and then hand that out to any other driver which needs it.

You specify the memory with "cma=64MB" or whatever size on the kernel command line. (Or possibly in the .config file via "make menuconf"?) You need to do this because it allocates on start-up, and it doesn't know if it should have this or not.

It then returns this memory to normal calls to "alloc_dma_coherent" which is designed to allocate memory which is physically contiguous, but doesn't normally allocate such big blocks. I hadn't tested this approach because I didn't need any specific part of memory so I'd been looking at kmalloc not "alloc_dma_coherent", but a colleague working on a related problem said it worked on their kernel.

It may also do clever things involving exposing the memory to normal allocating, but paging whatever else is there out to disk to free it up when needed, I'm not sure (?)

I was looking at the source code for this and borrowed the technique to allocate memory just for our driver. We may either go with that (since we don't need any further dynamic allocation, one chunk of memory is fine), or revert to using the cma later since it's already in the kernel.

I went down a blind alley because it looked like it wasn't enabled on my architecture. But I think that was because I screwed up "make menuconfig" not specifying the architecture, and actually it is. Look for instructions on cross-compiling it if you don't already have that incorporated in your build process.

Option 3: CONFIG_FORCE_MAX_ZONEORDER

This kernel parameter in .config apparently increases the amount of memory you can allocate with kmalloc (or dma_alloc_coherent?). We haven't explored this further because the other option seemed to work, and I had some difficulties with building .config, so I don't know quite how it works.

I found the name hard to remember at first. For the record, it means, ensure the largest size of zone which can be allocated is at least this order of magnitude (as a power of two). I believe it is actually 1 higher than the largest allowed value, double check the documentation if you're not sure.

Further options

There are several further approaches that are not really appropriate here, but may be useful under related circumstances.

* On many architectures, dma does scatter-gather specifically to read or write from non-contiguous memory so you shouldn't need this in the first place.

* Ensure the hardware can write to several non-contiguous addresses.

* Allocate the several blocks of the largest size kmalloc can allocate, and check that they do in fact turn out to be contiguous since kernel boot-up probably hasn't fragmented the majority of memory.

* Ditto, but just allocate one or several large blocks of virtual memory with malloc, and check that most of it turns out to be allocated from contiguous physical memory because that's what was available. This is a weird approach, but if you have to do it in userspace entirely, it's the only option you could take.
jack: (Default)
Logic Cassandra: No, don't bring the horse into the city! It has soldiers inside.
Trojans: Pshaw.
Logic Cassandra: Wait, I mean, sit on your hands all night, and nothing much will happen. No gods will give you a big pile of gold.
Trojans: Hah, no way you're putting one over on us. We'll sit here and take the gold, thanks.
Logic Cassandra: In fact, you're going to go on disbelieving everything I say.
Logic Cassandra: *level stare*
jack: (Default)
I voted in several more categories, but eg in long form dramatic presentation, I didn't have a lot to say so I'm not going to try to recap it here.

Novellas

Ballard of Black Tom was a very moving Lovecraft inspired story, from the perspective of a black new yorker, it paints a great portrait of his day to day life in 1920s (?) NY, and his initially minor dealings in mythos stuff. It was quite creepy once it started, but I've still to read the more lovecraftian ending of the story.

The Dream-Quest of Vellitt Boe was *also* a very good Lovecraft inspired story, set in the dreamlands, and the travels of a professor at the newest university college, the women's only college, through strange parts of dream, weird gods, and eventually maybe the waking world.

Penric and the Shaman is enjoyable in all the ways you'd expect it to be if you've read other Chalion stories by Bujold. It says a little about shaman/demon interactions which was only incidentally touched on before, and has slightly more of a role for a Father-worshipping figure. But it doesn't add a lot new.

A Taste of Honey, I still need to read, but the cover is *gorgeous* and there's some good male/male flirting on the first page. I'm not sure how that's going to turn out.

This Census-Taker. Interesting worldbuilding, I'm not sure where it's going, I still need to finish it.

Best Novelette

“The Art of Space Travel” about a small cast of characters living and working near Heathrow, against a backdrop of a second Mars colony mission, 30 years after the first tragic failed attempt. I loved the character stuff, and background matter-of-fact look at a possible mars mission, although I wished they'd tied together more closely: I wanted to know more about the disaster, and the next mission. The title refers to the name of a textbook.

“The Tomato Thief” by Ursula Vernon. All of her stories are pretty good, although I didn't love this as much as some of her others, despite being pretty good.

“Touring with the Alien”, an odd-job woman ends up with the role of taking reclusive alien visitors on a road trip to see some of earth. Interesting musings on free will etc even though I wasn't convinced where they ended up. Again, I loved the day-to-day interaction of the protagonist and the other characters.

“The Jewel and Her Lapidary”, interesting worldbuilding, but I need to see how this finishes up. Jewels were nobility of a hidden kingdom, who kept it secret safe and stable with various supernatural powers granted to them by gems, but could only be bestowed by Lapidary servants.

You’ll Surely Drown Here If You Stay” by Alyssa Wong. Something about a desert? It looked good but I couldn't get into it at all (sorry).
jack: (Default)
I've had several conversations about why "secondary" is such a loaded concept in poly relationships and feel like I'm slowly getting how people feel. But still, I feel there's a lot that's important to people I'm missing.

1. Not enough

It seems like many people are starting from the assumption that nobody *wants* to be a secondary, and the concept is basically synonymous with "I'll probably want more but I'll settle for what I can get". And yes, if that's how you feel, then that might be ok, but there is an inherent source of tension which is likely

I never had that assumption, only as I've met a wider variety of relationships have I started to understand it. It seemed to me, some people had many parallel relationships (either a small number of permanent partners who are equal priorities in organising your life whether or not they're different in other ways, or varied relationships each negotiated individually etc). Or they had one or two main partners, and other partners as well, usually people who themselves had many other partners, or had other major commitments, or otherwise were at a point in their life where a relationship *might* become much more, but they weren't looking for more, they were looking for something which fit their life right now, even if they had limited time and energy.

But if every relationship is "I fall deeply in love" then it makes sense that anything other than deep and permanent is really hard. Likewise, if you only have room for one relationship, it's a very painful choice to be with someone who wants to be with someone else more, if that's not what you want, and either "they need to have room for their relationship with you to grow" or "they need to realise that they may not be kind by having a relationship with you" may be issues.

With the benefit of hindsight, that looks to me like, "here's a form of relationship that suits some people but not others, don't choose it if it doesn't suit you". But if you have no experience of possible relationships, and the only model you have is "A and B are the love of each other's lives, and C is there too but is treated with absolutely zero respect", it's easy to fall into that model, and come out feeling like it should be burned to the ground.

2. Negotiating from a position of weakness

The other thing I had to say is, it's common for a relationship (not romantic, any form of association) to involve people with different amounts of power. Sometimes that's seriously unfair, as in a bad boss and an employee who needs the job: the boss has every opportunity to take advantage, to not just be unfair but to manipulate the interactions to their advantage by changing the rules all the time.

Sometimes it's completely fair, as in A wants to date B and B doesn't want to date A: then B deservedly has completely control over who they want to date, and they may reject A politely and compassionately (if A is not a jerk) or harshly (if A is a jerk, or if B is for that matter).

"Fair" doesn't mean "half and half". Although in most healthy ongoing relationships, jobs, romance, etc, both sides get comparable good things out of it.

A relationship can be unequal. Say, A has young children, another partner, and many other commitments. And they have a fortnightly date with B, whose commitments are a lot more flexible. That's just how their lives are, no-one is deliberately being unfair. But it does turn out, B has more flexibility than A, so they end up rearranging things more often.

Now here's the distinction. At the moment A doesn't really have the power to offer a lot more time to B. But they do have the power to make arrangements respectfully, by being clear in advance what commitments they can and can't make. By being honest about what time they have. By being upfront that occasionally emergencies will happen but that won't be a default. By not changing plans at short notice and expecting B to cope, can we emphasise that one.

Maybe B *could* cope with that if they had to, but if A forces them to for no reason, or for unfair reasons like, "My other partner is jealous if I spend ANY TIME WITH YOU AT ALL so rather than talking about it I'm just going to constantly jerk you around in the hope that eventually they're happy", then A is not treating B at all respectfully.

The reason I mention this particularly is that it seemed to be a common complaint from people familiar with certain sorts of history, that A had apparently logical reasons why they needed to constantly change stuff around. But it's possible for A to be unfront about what's not really changeable, while also being respectful and communicative about everything.

This is obvious in some relationships: most people with friends know that sometimes a friends' job or partner need them right now, and most friendships, if you move away your friend will usually stay with their job or family, not move with you. And that's just normal: almost all humans have many relationships and give different things to different ones. But it's also normal that friends are not jerks about it, and (a) don't constantly talk about how something else in their life is more important than you and (b) make time for you sometimes and don't just cancel all the time without telling you.

Postscript

Hopefully this is obvious, but this is, me trying to understand many thoughts I've heard from different places, and not about any particular relationships of anyone (especially not anyone I know). Hopefully that postscript isn't needed, but I know it's possible for me to post "thoughts on X" and people to worry "is this about me".
jack: (Default)
Quite a long time ago now, I read about the concept of inbox zero. For a long time I struggled with various productivity techniques. I sometimes temporarily achieved inbox zero, and I made big inroads against the habit of having all the urgent emails muddled in with everything else I'd ever received. Although that never quite became permanent.

However, now there maybe has been a permanent sort of shift. I think a combination of receiving less urgent emails, and of having a regular non-email based per-week todo list, and of generally being less stressed by all urgent things, have led to a point where I no longer *need* inbox zero. I generally only have a few emails needing attention, and those are starred. And other recent-ish email sits around in my inbox to a certain extent not doing much harm, but being handy if I need it.

And I'm sufficiently non-stressed that it's not usually something I need to *set aside time for*, but something I can do when I'm checking my email anyway. Any longer time commitments get put in a separate todo.

Non-email email (social network notifications, mailing lists, confirmations, etc, etc) gmail helpfully puts into a separate tab. Social network stuff I star anything I want to reply to, and empty it out every so often. Everything else I just glance at, and if it needs any response move to my main inbox and star it.

This has bad effects as well. Because it *usually* just works, if I get an urgent email and then suddenly go away, it can fall through the cracks. But that's hopefully ok, it's mostly how most people deal with tasks: they usually do it fine but occasionally miss something, instead of needing to be always perfect else they fail forever.
jack: (Default)
Every Heart a Doorway tells the story of a school for the recovery of children who've been subject to portal fantasy stuff, specifically people wanted to stay but were cast out for some reason. It's pretty good; I felt it could have embraced the premise *better*, but it still did a pretty good job.

I have lots of different thoughts about this.

Returning from portal fantasy

One of the biggest is probably that, it's written as if people being cast out is a central feature of secondary worlds, whereas originally I think it's more like, the authors didn't think about it much either way, they just tacked on a happy ending even if it didn't really make sense in the book.

But as liv points out, many people found portal fantasies incredibly moving as children because they wanted to escape somewhere else from where they were, and returning was horrible, and this story serves very very well as an emphatic rejection of that trope.

Funnily enough that was never me. Lots of my friends overcame a lot of childhood problems, but though I was nerdy and bad at making friends, my parents were great, and I never wanted to get away from here, even if I was drawn to the idea of going somewhere where my strengths could blossom. I got some of that by going into maths and programming.

Flaws

I enjoyed this more than most of the other Seanan Mcguire I've read, even the Mira Grant. I think the strengths were similar, but the bits where "the characters go where the plot says, completely disregarding logic, common sense, emotion, characterisation, survival, or physical possibility" were much less prominent.

At least to me -- I know some people didn't find that a problem in any of her books, and some people were bothered by it in this one. But there are going to be *some* rants in the spoiler section.

I wasn't bothered by some things that bothered other people. To me, the variety of sexualities etc didn't feel shoehorned in, except occasionally (and I was pleased it was there). I wasn't bothered by shifts in narration from tight third to omniscient (I actually quite like little omniscient asides).

Strengths

The diversity of characters. The description of the secondary worlds: the harsh "high logic" faerielands; the "high nonsense" nonsense worlds; the ones with rhymes, the underworlds, etc etc. It is all very memorable.

Random thoughts

I know I can be too optimistic here, and it can be impossible to stop bullying, but I also just despair at how it's taken for granted in so many situations fictional and real. Here there's a fairly small group of children, with several adults present full time. Can't they at least TRY to prevent at least physical attacks? And ideally violent threats?

Spoilers )
jack: (Default)
The android game I wrote last month is available for download (see bottom of this post).

Gameplay

It's a variant on an augmented reality match three game. Physically walk around to change which square is highlighted with a light grey background. Click that square to place the next tile there. The next tile is shown at the bottom of the screen. Match three of the same type in a row, and they vanish forming a new type. Then try to match three of *those*. When you reach hearts, match three hearts of any colour and they vanish entirely (but give lots of score).

For instance, three fish next to each other in a line make an octopus, three octopuses make a whale, three whales make a blue heart, three hearts of any colour vanish entirely. And similarly for the three other starter animals.

Only vertical and horizontal. But if you make a line of four, or two crossing lines of three, they all vanish. They only give one new tile, but you get more points.

It would be trivial to play if you could just click on a square, but it's surprisingly addictive when you play it walking about.

Be careful not to walk into the middle of roads! It's surprisingly easy to make that mistake when you're concentrating on your location in the game.

The screen wraps round, so you can always keep walking in one direction rather than walk in the opposite direction. It's best to start by figuring out which compass direction corresponds to which direction on the grid :)

Tips: When you complete an octopus, think about where you're going to put the fish to make the next octopus next to the first one.

Details

If you open the .apk file on an android device, it should ask if you want to install it. You can only do so if you agree to install apps which come from me not the play store. I think that should work but I don't know for sure.

It is very early stages. It seems to work on one or two devices, but I haven't tested it more extensively than that. It will hopefully be ok, but I don't know for sure. I would appreciate knowing everyone who tried it, just whether it ran ok or not, and if the game itself seemed to work.

It still has some UI from the open source OpenSudoku game I based the code on. Don't pay any attention to the menus or help.

File:

https://www.dropbox.com/s/md5sjt25xe3eean/emojilution-debug.apk

(Let me know if the link doesn't work. You should *not* need a dropbox account to use it, but you may have to scroll to the bottom of the screen to continue to download without one.)

Feedback

I would appreciate knowing everyone who tried it, just whether it installed ok or not, and if the game itself seemed to work.

Lots of things are known to be unfinished, so don't waste energy enumerating what's missing in menus etc. Do let me know anything that seems to prevent me playing the game. Do ask if it doesn't run or it's not obvious what to do. Comments on what's fun and what isn't are very much appreciated!

Thank you!