Saturday, January 24, 2015

Of the carry-over series, Gatchaman Crowds and House of Five Leaves remained stalled; but we did finish Chihayafuru 2; meanwhile the continued adaptation of Mushi-shi is one we carry forwards to this year, being about 2/3 the way through.

Chihayafuru 2 continued from where the previous series left off, through the next national tournament, but this time, rather than being a cut-off, there were a number of other plot strands introduced that left the series ending feeling rather ragged. Very much, if you liked the previous series, you'll like this.

Crunchyroll also picked up

JoJo's Bizarre Adventure

which so far (the first 2.5 parts) has been a very competentadaptation of the manga -- apart from certain issues of nomenclature. For example:

... clearly pronounced "Santana".

With JoJo providing Saturday morning cartoons for much of the year, I usually wanted a B-feature, so picked at a number of other series -- Saki: the Nationals which lacks the charm of the previous series (or even the Achiga side story), starting a bit too fan-servicey, and not having anything near the level of magical girl SFX in the games. It's not helped by bringing on a whole parade of essentially disposable opponents who get partly fleshed out, but not enough to care, possibly due to the 1 cour running time. Again, like Chihayafuru, this one ended a little more raggedly than the previous series, in the gap between the preliminary stages and the semi-finals, rather than at the end of a tournament. Verdict: Mostly harmless.

I also started Hoozuki no Reitetsu, which for a Japanese comedy skit series actually manages a level of dry wit; that will probably carry on through the year as the back-up feature for the next season JoJo.

And then I also watched 2013's

Sunday Without God

a very pretty series, with an intriguing premise -- God quit fifteen years before, and the whole process of birth and death broke down, leaving the dead walking around unless settled by specially designated Gravekeepers. Ai, the main character, is one of these -- but she's unusual in that she was born after the Departure.

So there's an introductory arc, involving Ai's long lost father, and his friend Yuri Dmitriyevich (Romanized, inevitably as Julie!) that starts to explore the workings of this strange new world, followed by an arc, where they are all aboard the Mystery Machine -- the intrusion of a Yuri's VW camper van into the bucolic setting is a bit jarring -- and visit a town of the deceased, where the last human infant is kept in suspension.

So, threads have been laid and things may be happening when BAM! Japanese high-school out of nowhere (two different schools at that). And it all started so well!

I suppose, like Sora no Woto, despite the written French, the Roman aqueduct and similar furnishings, it was set in Japan all along (with an L/R misspelling being a plot point and July 14th just another school-day, it really couldn't be Provence). Such a shame, because it had had a strong and novel start, before it fell into the pit of
>school
>slice-of-(after)life

I also picked up Q1's Wizard Barristers, which had a reasonably strong beginning with a (MC excepted) adult cast, being a sort of magical Perry Mason set-up. Alas, it turned out less like the promise of the intro and opening few minutes, and instead of staying episodic, grew a plot, which in the next to last episode seemed to have been purchased at the expense of the entire animation budget. Notable for the lamest magical circle appearing over a city ever, compensated only a little by the sexiest diabolus ex machina (sasuga, Japan!)

JoJo took a break for Q4, so at the end of the year I was casting around for something more to watch in the dark evenings. I tried a bit of Hanasku Iroha, which generally got praise, but found myself more irritated than amused by the teenagers and the quirky cast of adults, and of the few other series that had received positive word of mouth, nothing really motivated me. So I settled for some trashy magical girl action in the form of

Fate/kaleid liner Prisma☆Illya

and Fate/kaleid liner Prisma☆Illya 2wei. Now, I'd become aware of the whole Type-Moon Fate/Whatever franchise since I started browsing /a/ about a decade ago, but it had always struck me as a handful of neat ideas, buried in a whole welter of tedious chuuni nonsense; Prisma☆Illya takes the setting, sifts out the teen angst and hilariously bad ero-scenes (for the purposes of mana transfer, you understand), and replaces it with an irreverant and self-aware (Illya gets her magical girl training from watching anime) mahou shoujo set-up clearly in the post-Nanoha otaku-oriented mode.

As a consequence it veers from the light-hearted (in the day-to-day scenes) to being exactly as serious as it needs to be (in the main fights), but without damaging the suspension of disbelief. Entirely brain-off mode fluff, but entertaining fluff.

And then for Q4, the anime of the year out of nowhere, having flown stealth, by advertising itself as
>school
>slice-of-life
and getting reactions accordingly:

so it wasn't until mid to late season that I picked up on the "and now the suffering begins" chatter (as well as the wheelchair moe), and got into

Yūki Yūna wa Yūsha de Aru

The eponymous Yūna-chan is a member of her school Hero Club (Yūsha-bu); and for half an episode, it is all about the ostensible slice-of-life business of the club -- things like entertaining small kids and finding homes for kittens, just like in the preview

until the special club app on their phones goes off, and suddenly they're projected into the Otherworld to fight existential threats, whose nature and magnitude only slowly become apparent.

If Prisma☆Illya was a post-Nanoha magical girl, then Yūki Yūna is a post-Madoka one, where the business of even being a magical girl is a fraught one; the Heroes of the Yūsha-bu are more like the Heroes of Glorantha, but in a system where mystical powers are purchased by sacrifice of more than just nebulous points of POW that can be earned back in the next quest. Indeed, I would characterise the series, in D&D terms, as clerical girl rather than magical girl, which is a refreshing change from the more usual "arcane science" or rootless "magic; I don't have to explain jack".

And it's here that the school/slice-of-life/"cute girls doing cute things" false-flagging actually benefits the series; the cute and comfy bits of normal life provide the necessary contrast for the cumulating horrors of their secret roles -- in its sentimentality, this series works, in a way that the rather mannered and sterile presentation of Puella Magi Madoka Magica failed to do, to make me care for the characters and their plight (I've also probably read too much Greg Egan to get worked up about characters executing out of an Ndoli jewel or equivalent).

The difference of approach goes even further than that -- PMMM put its Easter Eggs in the form of a substitution cipher, an abstract puzzle that mostly served to reveal the names of the Witches; YūYūYū saves its Easter Eggs for showing (sometimes in a "blink and you'll miss it" manner), not telling, what is going on and how things work, all the way up until the epilogue -- touches like one of the girls stopping to don a hachimaki in addition to her magical garb before going into final battle; things which add to the story rather than distancing the viewer from it to solve a puzzle.

Verdict -- you should watch it, you should buy it : Studio Gokumi seem to be getting an unexpected but well deserved hit out of this one, and original series (rather than yet another harem variation adaptation) like this should be encouraged.

Friday, January 23, 2015

This one caught the team at work this week; after having in the past had many reports of "memory leaks" that turned out to be nothing more than the GC twiddling its thumbs while gigabytes of trash accumulated.

Symptom: Intermittent errors, in retail builds only, for some flavours of input, where threads just died; but the code looked sane.

A lot of painful debugging later got us to a method that looked like (stripped to the essentials):

which looks pretty innocent.

And it works most of the time -- until foo.CreateBar doesn't return immediately. And at that point the fact that foo becomes eligible for finalization just as soon as the call to foo.CreateBarbegins rises up to bite you, because you're now in a race with the GC. Notably, this is not like C++ where destruction happens only when control leaves the enclosing scope, and that is why it took a long time to figure out what was going on.

Knowing that this can happen, the point of all those odd GC related types and methods suddenly becomes apparent.

Sunday, January 11, 2015

Having been bitten again recently by some code which could contain null as a meaningful value, I set down and put together my own variation on this theme. Unlike the first hit I got for "c# option type", which when faced with the question of whether you could have a Just null, went with "Yes." that on the basis of an example with meaningful nulls (getting the first element if any of a sequence that might contain nulls), I'm going to say that the whole motivation for such a type is to avoid the trap of meaningful nulls, and if you occasionally need a transient Maybe<Maybe<T>>, that should represent an edge case which you'd expect to need handle with care anyway.

The constraints of the C# language mean that there isn't a perfect representation -- we need a struct to avoid any null values of the null-eliminating type, but that means we can't inherit to distinguish cases with and without value, or initialize fields, which means we have to explicitly do at runtime what we would do by virtual method calls.

Inside the struct, I just build on the well known dodge of using null-object IEnumerable-as-Maybe idea; which also allows us to access the vast number of Enumerable extension methods to augment the type. So we start out with

The first two serve to move the generic from the type to the function name; then we have a series of conversions that invert or augment ones that we already have. Analogues of any further Enumerable extension methods desired can now be written in the form AsEnumerable.EnumerableExtensionMethodReturningIEnumerable().ToMaybe() -- the one that I see as most likely to see heavy use being OfType<T>() to conditionally extract the value as a subtype.