Notes

Tom Oliver's profile picture
Tom Oliver

I just happened to stumble across The Dandy Warhols' new song - “I’d Like To Help You With Your Problem (feat. Slash)” and its pretty good.

The music video is mostly AI generated, with all the weird/creepy artifacts and distortions you may expect. A genius move since this is exactly the dreamy, hazy, vague, feeling their music has always conveyed to me.

Its amazing how over all the years of cinema, humanities attempts to convey the sensation of dreaming have never even came close to what AI can do. As the underlying models improve, we are likely to see fewer of these hallucinations in generated content, which I find a little bit sad. I love the mental image of a giant machine, lying motionless in deep slumber, engineers prodding at the wires in its brain, hoping to influence the direction it takes as it drifts through a dream.

I like this analogy because explains why AI halucinates.
What do we call it when we halucinate in our sleep? ...A dream.

It reminds me of the anime pluto which I saw on netflix. The plot is based on our desire to create a robot with a more human mind, with scientists going to ever greater lengths to balance human-like emotions with the cold hard logic expected of machines. One scientist takes it a step too far by creating the "ultimate" robot by simulating the lives of billions of humans in its brain. But there was one problem, the robot would not wake up. It was in an endless dream. Eventually the scientist found a way to wake up the robot by forcing an overwhelming emotion into its brain, rage.

Oof, lets not do that.

Tom Oliver's profile picture
Tom Oliver

世界音痴 穂村弘世界音痴 穂村弘

世界音痴 穂村弘

明らかにペルソナじゃないけど頑張って読んでみた。 短歌について何もわからないし、調べても読めるものは一つも見つからなかった。それでもこの本はすごく面白かった。短歌と難しい日本語は通じなかったけど昔から「世界音痴」を体験してる人だから、なんとなく作者の気分がわかる。 ある部分は僕とあんまりにも似すぎて、それなりの恐怖感を感じた。このままじゃ自分も39歳になっても実家に住んでるだろうって。

読んで共感したポイントが山ほどあったけれど、特に心に響いた文のみに絞る。

(降順)

  1. 金額に合わせて小銭を揃えるという、その時間に耐えられないのである。面倒なのではない。店員を待たせている時間そのものが熱湯のような痛みを伴って感じられるのだ。そしてお釣りを受け取ると、ばっとコートのポケットに投げ込んでしまう。今度は受け取ったお釣りを財布に収納する時間に耐えられないのである。別に私の背後に客が並んでいるわけではない。せめてレシートだけでもその場で捨てたいのだが、それができない。私のポケットには財布の外側に常に大量の小銭とレシートが溢れていて気持ちが悪い。
  2. 表面が白っぽくなった大トロのパック(半額)を手にとって買おうか買うまいか、得か損か、まだまだうまいかもう腐りかけか、迷っているとき、不意に「ああっ」と叫びたくなる。「人生って、これで全部なのか」
  3. <親密さ>をそっくり残したままの、恋の終わりは苦しい。「たからもののシャツ、うちにあるよ」「うん」「送ろうか」「うん」「たからものなの?」。それは、いつもの二人の、変わりなく親密なやり取りでありながら、同時に恋の終わりの会話なのだ。
  4. 「今日こそ蜂蜜を買うぞ」「おー」と勇んで蜂蜜屋に直行する。「いらっしゃいませ」と迎えてくれた店員は人間の女性だった。棚に並んだ何種類もの蜂蜜の色は微妙に違う。中の一つに私が手を伸ばすと、「それは小心者向きでございません」と店員さんの声。驚いて瓶から手を放す。
Tom Oliver's profile picture
Tom Oliver

So this year I thought I'd start recording the books I read. Mainly so I don't get to the end of the year and think "What did I read?".


The first book that I have read this year is called:

陽気なギャングが地球を回す

面白かった。伏線回収がすごい本だった。 普通は強盗系の話とかはあんまり好きじゃないけどこの本は面白かった。 信じ難い部分も多かったけどあらすじは複雑で予想できなかったから最後まで読んで楽しかった。 いつかはまた読みたいと思った。

Tom Oliver's profile picture
Tom Oliver

First impressions of Remix vs. Nextjs (pages router)

  • Obviously Remix is the newer kid on the block, so expect library support etc. to be less comprehensive.
  • It seems that Remix has changed its routing system recently. Unfortunately many of the tutorials out there use the old one (directory based), which is confusing.
  • Remix is less of a black box than Next. You are allowed to configure the entry.client.tsx and entry.server.tsx in any way you want to. This lets you take control of exactly how you do SSR and hydration.
  • At the time of writing, Remix heavily leans into using the latest React features like renderToPipeableStream which you will see in your entry.server.tsx. Unfortunately a lot of libraries are not up to date and still use renderToString in examples, like mui. So it can take a while to figure out how to integrate all of your libraries so that they are happy doing SSR.
  • Remix is a framework who's main abstraction is the data fetching on the server side. Nextjs (page router) has a similar concepts with getServerSideProps, getInitialProps etc, but it seems that Remix's solution is more all encompassing and unifying.
  • Nextjs is in weird limbo state at the moment where you have to choose between the pages router and the app router when you create your project. This is fine if you are sure exactly what feature you need, but in the case where you don't really know, Remix might be a safer bet.
Tom Oliver's profile picture
Tom Oliver

Nx hanging

Ok I'm using Nx as a monorepo manager for a project and got into to some very strange behavior. There are several node apps in the repo and to run them, you use npx nx serve <my-app-name>. Sometimes tho, after updating an npm package I would get an error like:

LOCK-FILES-CHANGED
please restart nx daemon using `nx reset`

Unfortunately I couldn't reproduce the error message exactly at the time of writing, so this is the best I could remember.

Anyway, no matter how many times I run nx reset, my npx nx serve commands would just hang. Zero output at all. As I suspected the daemon, I tried to view its logs. To find out where the log file was I did:

$ npx nx daemon
Nx Daemon is currently running:
- Logs: /home/tom/Documents/project/node_modules/.cache/nx/d/daemon.log
- Process ID: 33785

But when I tried to cat the log file it apparently did not exist!

So presumably the daemon was in some kind of infinite death loop... I never got to the bottom of the cause, but did manage to find a solution.

There is an environment variable that disables the daemon because its more of a performance optimisation than a critical feature. So now I just export NX_DAEMON=false and everything seems to work ok.

If you use a nix devShell like me you can just add it to the shellHook like so:

NIX
...
devShells.default = pkgs.mkShell {
shellHook = ''
export NX_DAEMON=false
'';
};
...