Hacker News .hnnew | past | comments | ask | show | jobs | submit | more functional_dev's commentslogin

Such a simple trick, but effective!


Right, the default boxes into heap, but unions are different. Some languages pack them as a flat struct (tag + payload, no allocation).

Here is visual layout if anyone is interested - https://vectree.io/c/memory-layout-tagging-and-payload-overl...


That is not what C# has just added to the language though. These union types so far are just wrappers over an `object` field which gets downcasted.

F# offers actual field sharing for value-type (struct) unions by explicitly sharing field names across cases, which is as far as you can push it on the CLR without extra runtime support.


Backwards compatibility point is interesting.

Found this visual breakdown of IPv4 -> IPv6 transition.

Dual stack and tunneling sections show how much complexity came from not having a clean migration path - https://vectree.io/c/ipv4-vs-ipv6-address-architecture-nat-a...


But there is a clean migration path to v6: you deploy it. How much cleaner can you get?


100% true, but method still matters


I am with you here.. there is actually name for why companies do this. They are not pushing app because it is better, but because browser tab cannot lock you in.

Mapped it out here if curious - https://vectree.io/c/enshittification-how-digital-platforms-...


This confused me at first as well.. inactive experts skip compute, but weights are sill loaded. So memory does not shrink at all.

I found this visualisation helpful - https://vectree.io/c/sparse-activation-patterns-and-memory-e...


100%

There is genuine demand for physical AI in Japan, there are not enough humans to hire.

I bet, EU will start long debates wether to automate or not :) Japan already skipped that part


exactly, the simplicity is its beauty!

A single data structure (tables), no built in OOP (you build it with metatables).

Coroutines instead of threads.

I was curious and explored it in detail here - https://vectree.io/c/lua-language-design-metatables-coroutin...


or rather "move when?"

Moving 1,400 tonnes might take years. The window to act is closing.


Window is not closing.. the stonk market would go to zero. Any doubt about being able to move assets out of the US would cause a run on US stonks.

Also the US has fairly strong private property rights.


We've seen time and again that rights and laws mean shit to the current administration.


My point is: Blocking withdrawal of financial assets from the US would be wall street ending.

No foreign investors would put money into US stonks.

It's not impossible, sure, but probably worse than the great depression.


Agreed, it takes decades to build manufacturing expertise.. lose demand for a few years and all is lost

Throwing more money at it does not work either, you need skilled workforse

Same is happening in EU with shipbuilding


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: