Projects

Talks & Writings

Posts

reading: Machida-kun no Sekai

A little line I liked from 町田くんの世界 (Machida-kun no Sekai) by ANDOU Yuki:

I like the rain…On your days off and stuff, rain is a good reason not to go out, right? …It’s like it’s saying, “It’s ok for you to just be there,” or so I feel.

Original:

雨好き…休みの日とか雨って、外出なくていい理由になるでしょ。……そこにいていいよって言われてる気がする。

It comes from the end of volume 1, chapter 4.

reading: Alice and Therese’s Illusion Factory review

Title: アリスとテレスのまぼろし工場 (Arisu to teresu no maboroshi koujou) 1

Synopsis:

The film centers on third-year middle school student Masamune, who lives in a town where time has stopped because a sudden explosion at a steelworks factory has sealed off all exits to the town. In order to hopefully one day return to normal, the residents of the town are forbidden from changing, and they live out their gloomy everyday lives. Masamune’s enigmatic classmate [Mutsumi] leads him one day to the fifth blast furnace of the steelworks factory, and there they meet a girl who is wild like a wolf and who cannot talk. The meeting of Masamune and these two girls upsets the balance of the world. The unstoppable “love impulse” of the boys and girls who are tired of their everyday lives begins to destroy the world. (from Anime News Network)

My thoughts:

This novel is an adaptation of an as-yet unreleased film of the same title, scheduled to release in September 2023. The director, and the author of this novelization, is OKADA Mari, who worked on projects like Anohana: The Flower We Saw That Day, Maquia: When the Promised Flower Blooms, and O Maidens in Your Savage Season. In general, Okada tends towards emotionally charged drama, and this story is no different. The setup is perhaps confusing. It takes a good amount of time before we meet the “wild girl”, and even more time before we really find out what’s going on. I think that’s slightly to its detriment. However, the ending does tie things up nicely, and there are a lot of hints about what’s really going on throughout. Hopefully the film doesn’t take too long to release in America.

SPOILERS FOLLOW.


 

 

 

 

 

 

 

 

 

 

Masamune ends up naming the girl Itsumi (deriving her name from Mutsumi’s name, since the “mu” in 睦実 sounds like “six” and the “i” in 五実 is “five”), and Mutsumi and Masamune begin taking care of her. They find out some of the townspeople have actually known about her the whole time, seeing her as a “divine girl” who is connected to the existence of the town. One day, Masamune and the others decide to have a test of courage in a railway tunnel, and a half-confession turns into drama - then one of the girls suddenly sprouts growing cracks and is eaten by a wolf of smoke (I don’t know how to describe this; see 1:03 in the trailer above). This sets off a chain of events where they learn that their world is an illusion. Those who stop believing end up disappearing in this way. The ‘real world’ shines through those cracks; in the real world, the factory is abandoned and things are quite different. In fact, they eventually realize Itsumi is actually the daughter of the real-world Masamune and Mutsumi, and her real name is Saki (沙希). She ran away during the Bon Festival after a fight with her parents, and somehow ended up here, while her real-world parents desperately search for her for years. In the end, Masamune and Mutsumi try to find a way to send Saki back to the real world, in a desperate race before their illusory world meets its end. Saki doesn’t really want to go, having fallen in love with Masamune (although I don’t think this is romantic love). Masamune and Mutsumi end up together in the illusory world, too.

What wasn’t clear in my reading is how and why the illusory world came to be, and how Saki/Itsumi made her way there. I probably missed it since my Japanese is just awful. Also, I’m fairly certain the Alice and Therese in the title are never explained. They are only mentioned a single time in the actual novel:

そういえば、アリストテレスがこう言っていた。希望とは、目覚めている者が見る夢だと。

希望を見る資格のある少女を犠牲にしてなりたつこの希望のない世界に、なんの意味があるのだろうか?

I’m hoping the movie, together with actual subtitles, can clear all this up.

  1. The title translation is not confirmed. It appears the studio is calling it just “Maboroshi” in English. 

hardware: reMarkable 2 review

I’ve had a reMarkable 2 for a couple years now. Overall, I wouldn’t recommend it for reading.

It’s admittedly “my fault”: the device isn’t really meant for reading. I’d like it to support things like 2 pages at once in horizontal mode, or ePub 3 fixed layouts, which would make it perfect for reading manga. (The Kobo Sage, by the way, supports both of these, albeit on a smaller screen, where it’s not as useful.) But if you think you can make things work, don’t: a reMarkable is for taking notes and taking notes only.

travel: getting from Tokyo to Tottori by train

Tottori is the capital of Tottori Prefecture, Japan, on the western (northern) coast. It’s a little out of the way for most travelers, but I wanted to check it out. There’s a few notable attractions, like the sand dunes, and a museum full of sets of samurai armor.

Getting there is a bit of a pain, though. First, you have to take the Shinkansen from Tokyo to either Osaka or Kyoto Station, where you then change to the Super Hakuto limited express train. Unlike most trains tourists take, it’s not fully covered by the Japan Rail Pass. Part of the journey is covered, but in the middle, the train is technically run by a private operator, not the Japan Rail company. So you have to pay a small fee, on top of having the pass, to take the train.

This is where it got complicated. Nowhere is it really explained how you pay that fee. The self-service ticket machine wouldn’t let me book a ticket, and the JR station attendant was pretty confused, too. After a lot of waiting in line, then waiting at the counter, she explained to me that you just pay the fee on board the train to the conductor. She then booked me reserved seats on the JR portions of the trip.

In the end, it was all pointless: it turns out that if you just sit quietly in the reserved car, the conductor won’t ever notice you or ask for the fee. So basically, I spent a few extra hours in Osaka station for nothing. Oh well!

reading: one’s place by ハルミチヒロ

A short story included in Rakuen le Paradis issue 38. The editors describe it thus:

オトナ女性二人と少女の過去・現在・未来。

Translated:

The past, present, and future of two women and a girl.

Basically, Miya has basically had two mothers ever since she was young, going with her mother to her mother’s friend Koyomi for meals. And now a teenager, Miya realizes what Koyomi feels for her mother may be more than just friendship.

The author, Harumi Chihiro, is quite good at these little dramas. Some other excellent choices from her include 彼岸 (Higan, or “Nirvana”) and カノン (Canon).

java: binding parameter values influences the result types you get from JDBC

JDBC lets you get the types of the parameters of a prepared statement, and the types of the result set, without actually executing the statement. That also works when you have bind parameters. But in this SQL statement, what are the types of the result set columns?

SELECT ?

The parameter could be literally anything! Even in this statement:

SELECT ? + 1

the types of the parameter and the result are arguably ambiguous (what if the parameter is NUMERIC? or DOUBLE PRECISION?).

It turns out the PostgreSQL JDBC driver, at least, just makes its best guess:

jshell> import java.sql.Connection;

jshell> import java.sql.DriverManager;

jshell> var conn = DriverManager.getConnection("jdbc:postgresql://localhost:5432/postgres?user=postgres&password=password");

jshell> var stmt = conn.prepareStatement("SELECT ?");
stmt ==> SELECT ?

jshell> var meta = stmt.getMetaData();
meta ==> org.postgresql.jdbc.PgResultSetMetaData@25bbf683

jshell> for (int i = 0; i < meta.getColumnCount(); i++) {
   ...>     System.out.println(meta.getColumnTypeName(i + 1));
   ...> }
text

Here you can see that PostgreSQL has just filled in “text” as its best guess as to the type. But of course, if you bound an integer, you’d get back an integer.

If you did have the actual parameter values, could you get the actual types of the result set columns, taking those parameter values into account? It turns out, yes, at least for the PostgreSQL JDBC driver! Just bind them and call getMetaData again:

jshell> stmt.setInt(1, 42);

jshell> meta = stmt.getMetaData();
meta ==> org.postgresql.jdbc.PgResultSetMetaData@401e7803

jshell> for (int i = 0; i < meta.getColumnCount(); i++) {
   ...>     System.out.println(meta.getColumnTypeName(i + 1));
   ...> }
int4

japanese: バタ臭い

A fairly hilarious discovery today while reading アリスとテレスのまぼろし工場: one way to call something “Western” is to describe it as batakusai (バタ臭い), literally “reeking of butter”. See Jisho or Kotobank.

To wit:

もともとゲームが好きだった正宗は、あるRPGのバタくさいイラストレーターの絵に衝撃をうけ、真似て描くうち絵が好きになっていたのだ。

python: "Expression of type '(enum)' cannot be assigned to declared type 'Literal[(enum member)]'"

mypy’s stubgen generates something like this for enums:

import enum
from typing import ClassVar


class StatusCode(enum.IntEnum):
    ALREADY_EXISTS: ClassVar[StatusCode] = ...

But pyright will complain:

error: Expression of type "StatusCode" cannot be assigned to declared type "Literal[StatusCode.ALREADY_EXISTS]"
    "StatusCode" cannot be assigned to type "Literal[StatusCode.ALREADY_EXISTS]" (reportGeneralTypeIssues)

The solution is to just delete the annotation. pyright will infer the right type, as you can see with reveal_type():

import enum


class StatusCode(enum.IntEnum):
    ALREADY_EXISTS = ...

reveal_type(AdbcStatusCode.ALREADY_EXISTS)
# information: Type of "StatusCode.ALREADY_EXISTS" is "Literal[StatusCode.ALREADY_EXISTS]"

c++: clang-tidy complains it can’t find common headers (especially under conda/conda-forge)

clang-tidy might complain it can’t find headers that it should be able to find as a matter of course:

c/driver/postgresql/connection.h:20:10: error: 'cstdint' file not found [clang-diagnostic-error]
#include <cstdint>
         ^~~~~~~~~

It turns out that clang-tidy needs to be able to resolve where the compiler looks for these standard headers, and if the compiler used is a symlink, it won’t find them. Details are in llvm/llvm-project#46804.

To fix it, use a compile_commands.json (e.g. for CMake, set CMAKE_EXPORT_COMPILE_COMMANDS=ON) and make sure that CC and CXX point to the actual compilers, not a symlink:

export CC=$(readlink -f ${CC:-$(which cc)})
export CXX=$(readlink -f ${CXX:-$(which cxx)})

cmake ...