Fri Dec 5 04:55:06 PM CET 2025

deno and vite, part 1

Suddenly wanted to look at javascript again (and not because of the react vulnerability). First step though is to go small(-ish). So forget react, let's just start a new server. Which seems to be vite in this case somehow.

Creating a new project is just

deno run -A npm:create-vite-extra --template deno-vanilla

which prepares everything and starting is just

cd vite-project
deno task dev

The project name will be asked during deno run. The --template can be dropped too and be chosen from a TUI-like list.

Not really sure how URL routing works yet, but any .html file at topdir shows up in the web browser's top URL as well. In dev mode, vite inserts

<script type="module" src="/@vite/client"></script>

which probably helps auto reload the page when the source file is changed. It should be in <head> node if it's there otherwise it's directly under <html>. That's 1000 lines or 179kb, no way to actually read it.

In the .html file, src attribute of <script> tag is rewritten. src is local path while of course the real path has to be URL. The rest seems standard typescript.

One interesting bit is the import statement from javascript apparently can load css as well. We don't even need separate html tag for that. Or importing an SVG to a variable. The variable apparently contains the SVG embedded in the URL (with data: "protocol").


Tác giả: pclouds | Liên kết tĩnh

Thu Nov 6 05:14:38 PM CET 2025

Stort strömavbrott norr om Stockholm


Tác giả: pclouds | Liên kết tĩnh | Svenska

Mon Nov 3 09:03:33 PM CET 2025

Nail growth speed

Bumped the big toe on the door near the end of February. It was more like under the door while it was being pulled open. Big dark spot at the root of the toe nail after all the bleeding stopped. It's now November and that spot is nearly gone. So it takes approximately eight months to fully grow a toe nail.


Tác giả: pclouds | Liên kết tĩnh

Thu Oct 23 05:16:28 PM CEST 2025

Best day in four years

Finally got a first-hand rent contract after being in the queue for three years. That's honestly short compared to the horror stories about Stockholm housing. A little bit further away from the center. But eh, I never go there anyway.


Tác giả: pclouds | Liên kết tĩnh

Sun Oct 19 07:54:26 PM CEST 2025

Finally watched Avengers trilogy

I guess I was bored. It was.. ok? Had to skip a lot. All the special effects weren't that special. Still wondering if Mistborn could be made a movie. If only they let Thanos do his thing, things would have been much simpler.


Tác giả: pclouds | Liên kết tĩnh | Phim

Tue Oct 7 04:53:37 PM CEST 2025

Why would Paul Buchman, a film director, go on a trip to alien world?


Tác giả: pclouds | Liên kết tĩnh

Sun Oct 5 12:32:59 PM CEST 2025

It finally happens. I washed my own wallet


Tác giả: pclouds | Liên kết tĩnh

Wed Sep 24 04:48:01 PM CEST 2025

KIWAMI THREEEEEE

Daigo gets to get shot one more time. Hello hospital.


Tác giả: pclouds | Liên kết tĩnh | Game

Tue Sep 23 08:08:22 PM CEST 2025

Crazy Eddie

Science fiction explores ideas. In the Mote in God's Eye, the idea is population explosion.

In a universe far far away. Actually not that far. In a neighbor star system not very far away, one day there was a big flash in the sky. Many many years ago. In the present day, a probe was detected coming to towards a sun? Can't remember. A mission is set to intercept and capture. A dead alien is found. Big deal!

So the source is roughly located and a mission set out to meet the aliens for the first time. The "Moties". First surprise, all asteroids are sort of collected in an orbit that prevent collision, and definitely not collide with the Mote planet.

Second surprise is not really a surprise. Aliens are aliens. The first one is the opposite of symmetry. Sloped head, big one side. Only one ear. Left arm huge. Two (four?) small delicate right arms.

Humans are very "generic" and not specialized enough. This isn't even a new theme, with many alien species having a caste system like bees or ants. The moties are also highly specialized, not just body parts but subspecies. Any human individual can become anyone, but why waste many years and resources to train one human to be good at something, when you can evolve to be good at one thing?

Moties resources are limited and need to be used as efficient as possible. Hence the highly specialization The first one encountered is an Engineer, very good at engineering and can even remake a spaceship to fit any new situation. Yet not good at anything else, not even talking. Talking and negotiation is for Mediators. Farmers farm. Keepers keep. Masters decide. Warriors kill.

Except nobody knows about the warriors. Both sides are very cautious not to show their "bad side". The human side mostly hides the technologies that the Moties don't have. The moties hide the big secrets and make themselves look like a peaceful race.

But you can't be peaceful when you starve to death. Limited resources aren't the worst. The worst is you cannot stop reproduce. The big Motie secret: reproduce or die. A motie starts as a child, then becomes male and then female. Then she has to get pregnant within a few years, or she dies. Then she becomes male again, and female, and the cycle begins.

It's quite reasonable to evolve to reproduce, after all that's the "purpose" of the evolution. But evolution isn't a destination, more like a journey. You can evolve to be so good at reproduction that you exhaust resources and die out. Or worse, you can somehow stablize the cycles and suffer.

The Moties cannot stop reproducing. Eventually they the run out of resources. Fights break out. At some point, civilization collapses and back to stone age (if there's still stones). Rebuild everything again back to civilization. Collapse again. Four hundreds of thousands of years.

But never once did they break the cycles and go extinct. It's probably a close call a long long time ago with asteroids, that they moved all the asteriods "away" to a safe place. In contrast, humans have had many close calls, and probably will eventually break the cycles. The humans don't think about cycles. The Moties on the other hand, never ever stop thinking about the next cycle. Always be prepared, always make sure the next cycle will come.

But there's always Crazy Eddies who attempt to break the cycles, to end it all. They have never been successful. They're crazy.

Eventually the Motie's lies are showing cracks and the Empire thinks about possibilities. It's interesting that Military would plan based on capacity, not intent. While the scientists ignore capacity completely and count on good (and lied) intent.

The Moties are sort of trapped into the system. The only faster-than-light jump point is inside a star, or close enough that without a shield, ships won't survive. Without a shield, you can't really locate the jump point. But without a motivation to get inside a star, you don't really need to go invent a shield.

Which is good news because the Moties are a Galatic Plague. A race that is so good at reproduction and so efficient at utilizing resources. Once get out, they could occupy the entire galaxy. Especially with their Warriors.

You spend years training solders. They spend thousands of years evolving warriors. Super human would be an understatement. The warriors are so good at shooting that if it's one shot, one kill. There isn't any close combat scene, but that is probably just as quick and deadly.

Once the truth is out, there's only two possibilities: extermination or blockade. A very good thing that there's really only one way out of their system. Of course they would figure out shielding and fast-than-light drives once they know they exist. But they get disoriented after the jump, much more than humans, that just shooting them down is a lot easier. Which is a good news because a one on one fight with the Moties probably ends up badly.

Really engaging until two third of the book. It's a bit less interesting once the Lenin goes back instead of staying in the Motie star system. There's more politics. There's climax and the big reveal. But still it's not as exciting.

This is a reread after 13 years. I don't even remember that MacArthur is destroyed. I only remember Charlie and forget that there were three of them coming to the Empire. Also the fight and death of the three midshipmen. Could go for another reread. Four stars.


Tác giả: pclouds | Liên kết tĩnh | Sách

Tue Sep 16 07:08:41 PM CEST 2025

How could I forget they blew up MacArthur?

Yeah it's probably a decade since I last (and first) read it. But still! Good book. Good book. Fully deserves 4/5. Wait how did I not rate it before?


Tác giả: pclouds | Liên kết tĩnh | Sách