HNHacker News
TopNewBestAskShowJobs

stevefan1999

2,180 karma · joined July 1, 2017

submissionscomments
stevefan1999··on What's new in the .NET 11 runtime
The fact that when most devs look at C#, they can only see the silhouette of Microsoft is kind of making me mad sometimes, but I think it is understandable.

The corporate history of C# is undeniably strong, and even till this day in modern C#, they still have a lot of legacy components in it, like AppDomain, APM and MarshalByRefObject.

It is also unfortunately that C# has largely lost in the AI race, that it failed to gain tractions from AI developers despite heavy investments from Microsoft. Early AI stuff like Semantic Kernel actually included C# as its primary languages besides from Python. Nowadays it is not mentioned so much and the default is just Python but perhaps it really isn't a fair comparison due to the gravity of Python in AI as a whole.

Yet for another fact that even within Microsoft, Rust wins over C# for agentic development, is a clear indication that C# has lost a meaningful place in software development as its former parent started to berate it as well. TypeScript is rewritten in Go rather than C#, and consider the fact that Anders Hejlsberg made both C# and TypeScript...

Sure, maybe Bing and a large part of Azure and Xbox services still have heavily relying on it, probably because of ASP.NET Core and Orleans, but outside of the two Microsoft greenhouses, it is a free for all battle royale where C# don't even have a chance of being picked at due to being too weak.

I even tried to contribute a C# SDK to the Restate project, but the maintainers actively rejected it due to them not being familiar and refused the handover. They said they will consider if there are commercial fundings backing it, then they would starting to consider (that's even with money attached they would still think about it). This also shows how unpopular C#/dotnet is among open source development and failed to build hype. The same Restate project even have a Java SDK for it, so it is not like they can't handle C#, they just didn't like to.

The last few thing C# is good at is just Unity I'm afraid, and that is also dying too as Unity is also not doing so well lately.

stevefan1999··on RAM Altman: Linux Script Emails Sam Altman Daily How Much Unused RAM in Your PC
Here's the full transcript about Ram Altman's controversial take on RAM:

Sam Altman: Oh, I think there are all of these ways where the supply chain—it’s just super non-obvious. An example of this is people... A lot of people want local inference. And somehow, they assume that the problem is solved now. Because, we are going to have open-source models. We’re going to be able to run them on our computers. And so we’re not going to need all the stuff in the data center. But from a global allocation perspective, actually, it’s quite terrible to have everybody have a bunch of the world’s limited supply of DRAM sitting in their own computer. And, being used—

John Collison: Mm-hmm.

Sam Altman: 5% of the time. You want maximum utilization in the cloud if you’re trying to deal with this very supply constrained environment. And somehow everyone’s... Many people’s intuition is the opposite of that.

stevefan1999··on AI usage generates a fragile codebase
This is absolutely right because AI lacks Fingerspitzengefühl: https://architecturenotes.co/p/the-cost-of-ai-in-code-goodby...
stevefan1999··on An ode to livelyness analysis; SSA to registers
While this article is about SSA to registers, but I went through hell with SSA, here's some of my two cents:

1. phi node consturction is hard

If you think about it, the phi function actually requires you to know where the control is coming from, that means when you try to interpret it in the mental model, you need to memorize it or have some flags to indicate which contorl flow it is coming from. For a human, phi function is basically an oracle function with your mind and memory, because you can look around and deduce phi assignment naturally (usually with leap of faith), but the machines only follow rules and they don't have an oracle. So then:

2. SSA as a control flow problem

So a first principle solution to phi assignment, the standard text book solution, is turning the program into control-flow graph. This reduced the problem into the field of graph theory, that you want to find the predecessors for each phi node on the control-flow graph, until there is no more. An equivalent form of that is dominator graph, where the phi nodes are reduced to finding out the dominance frontier of the control flows, i.e. finding out where the incoming edges are. This algorithm, unfortunately, while direct, takes quadratic time, asymptotically speaking. During this time, you can also coalesce a continuous program instrucion node in the graph, if they formed a linked list somehow until there is another phi that forked the control flow, this is known as "basic block", so to speak.

But it turns out another way to solve this control flow problem, is by turning it "backward", or let's say, inverted.

3. SSA is closely resembled to continuation passing style in functional programming

It turns out SSA has a functional equivalence to what we call A-Normal Form, which works by predefining variables and all the scopes beneath that shares the same scope (if you think about it, which is also dominance relationship, but designated), so there is some kind of push-pop structure, aka stack relationship, turning it into a continuation of a series of let expressions, then this is easily representable using tree-shaped algebraic data types in a depth-first manner (been through it in Rust enums, looks pretty nice actually), and so you can easily pass the control flow as data, and I believe that is also where basic block, again, naturally emerge, because instead of just assigning variables, why don't you just encircle a block of variables, and take that as a "function pointer" (in a more pedantic sense, a function closure with global id) that is effectively unique and immutable?

And because it is "continuation of a series of let expressions", you can easily turn ANF into CPS too by turning each let expression into a call/cc lambda, which finally closes the SSA->ANF->CPS saga.

(And because of that, a far cousin of SSA is algebraic effect, due to its relationship with delimited continuation, which is also a way to break down control flow into resumable blocks like you see in basic-block SSA. Almost the same idea, but for different context, effect systems are more focused on things like async/await and coroutine, where another contender in this area is ST-monad)

So...you need to know the previous location of control flow for determining what path this phi goes, and the fact that it is quadratic using dominance frontier, and ANF construction isn't really intuitive or easy to do it in first place, are there any ways smarter than quadratic?

3. phi node construction is (relatively) easy, if you don't mind missing out on the best performance

It turns out there is a way to do it in linear time, albeit if you think about it, there is a greedy solution to the SSA assignment problem, the idea is from the paper https://c9x.me/compile/bib/braun13cc.pdf.

I'd try my best to explain what I read with this paper few months before, but it really does sound arcane to me initially, until one night after shower it kind of clicked:

a. initialize a hash set to memorize the "seen" variables and instructions

b. if there current variable is not assigned, occupy it and assign it to "seen" set

c. use tarjan's algorithm to isolate the instructions and phis into its own section if they formed cycles, turning them into essentially strongly connected components

d. do a topological sort on the strongly connected components, forming a partial order

e. prune the extra phis in the sorted components, leveraging the partial order as dominance

That's it. It uses memoization, SCC and topological sort, but while some parts of it uses dynamic programming, the overall solution here is still a greedy one. In fact, if you further take a similar idea in register allocation, that technique is called Linear Scan Register Allocation, which is what this article is about.

And if you combine both Linear SSA construction and Linear Scan Register Allocation, the whole codegen now turns from a quadratic algorithm plus NP-Complete problem (by reducing RA into graph coloring, see Chaitin's algorithm), into much faster algorithms down the line. This is very important, because many Just-In-Time compiler I believe used this combo, and is how you get fast baseline JIT compiler in practice.

stevefan1999··on Zebkit – Chromium as an embeddable library
I'm pretty impressed on the sophisticated agentic engineering side of it, what is your methodology in using Claude, say like what is your initial prompt and the thinking process? Any recommended skills or plugins?
stevefan1999··on Outlook.com is rejecting email from domains without DMARC
Well, if we can get a more relaxed email self hosting experience with the DMARC enforcement, I'd say it is a good trade-off in exchange with freedom of speech, rather than accepting the risk of spamming.

These days, hosting a proper mail server isn't really that hard, thanks to Stalwart https://stalw.art/. I did it to my Talos Linux cluster located on LA and utilizing idle resources. It is pretty great

stevefan1999··on Every Windows 11 app should kill Electron, and Discord just showed why
Well, why not just move on from Windows and transition to Linux, as I did with CachyOS earlier few days ago. Doesn't even want to look back on Windows now since everything is so smooth and uses half the memory I needed compared to the equivalent in Windows! The only quirk I have is the xe driver that after suspension and resume the GPU may go haywire and I have to restart SDDM but I switched from S3 to S2 sleep and the problem seems to be worked around. I'm using an Arc Pro B50 so not sure if that's buggy on Linux whatsoever but it is metric tons better in Windows.
stevefan1999··on Anthropic IPO buyers see valuation as low as $1.1T
Good drop. Should be less than a trillion amid current midterm fallout. The chances of more AI regulations are coming.

Colossus 1 & Colossus 2 are located on Tennessee and Mississippi, and Anthropic rents both of them earlier this year.

Now that Democrats are surely going after Trump and Elon Musk and the sidekicks, and both Tennessee and Mississippi turned blue as well, this directly impacts the way Anthropic to source cheap compute and data in the future due to uncertainty around the continuation of SpaceX data centers. And other data center buildouts are likely to be paused for things like power grid connection and environmental impacts and land purpose evaluation, the compute capacity constraints are likely going south, too.

Worse, the proposals around superintelligence is exactly what Anthropic is looking for: slow the fuck down. Now they got the killshot they long desired for, it obviously makes a dent in the capability and capacity of their AI, hence a drop in valuation. I think $800-900B is somewhere I would say okay, and $600-700B is really where it is fair, considering the long term outlook for Anthropic is looming with a greater AI massacre caused by political factors.

stevefan1999··on Nvidia tells data center operators to limit business to Chinese customers
The title is too long, and I couldn't rephrase it in a short period of time
stevefan1999··on Nvidia RTX Spark encrypted firmware slows inference speed to 35% on Linux
This reason alone is why I rather stay on Strix Halo
stevefan1999··on AI is forcing us to pay off 40 years of technical debt
And you know how are those technical debts created in the first place? More than 40 years of negligence in IT infrastructure.
stevefan1999··on Show HN: MarkovChat – Meet people who share your intellectual interests
So how do you know if it was a chat bot or not on the other side
stevefan1999··on US tech giants' hidden AI debt swells 90% to $3.2T in 6 months
Yeah those are total obligations fueled by funding on bond market, which in turn is debt or an IOU
stevefan1999··on US tech giants' hidden AI debt swells 90% to $3.2T in 6 months
One question: how do you know it is 3.2T if it is deemed hidden
stevefan1999··on Intel stock collapse worsens as $3.5T chip rout spreads
A fraction of the entire world's servers are running Xeon and it is definitely important.

And keep in mind that Intel literally still holds the rights to issue x86 licenses.

stevefan1999··on Spain train crash: 'At least 10 dead' in high-speed collision
Just a few days ago Spain is still in riot mode. The next protest is going to be on 31th October apparently.

This is gonna add fuel to the fire, and as I lived in East Asia (Hong Kong to be specific) I'm kind of curious why it all happened around the eurozone lately.

France, Albania, Belgium, Spain, Greece, UK and Serbia recently (although it is not eurozone but closely related anyway as part of the great Balkans). What's left? Germany and Poland I guess?

Anyhow it really reminds me of the First World War

stevefan1999··on Raspberry Pi Zero 3W and Pi 4 Model A spotted in device trees
I still have no idea why Raspberry Pi is still supporting broadcom who is still very hostile to Linux and open source to this day. No more binary blobs!
stevefan1999··on "I'm on a war footing": Terry Tao and the crisis in math
So you mean a combine harvester should make you work more, not less?
stevefan1999··on Parser Combinators
I love parser combinators so much. Those are possible because parsing itself exhibits monadic structure, it forms transition monoid, of its more well known name as the semiautomaton in the world of CS.
stevefan1999··on Banks are now trying to offload the AI data center debt they just underwrote
As someone who's in it's late 20s now, I always thought the idea of selling IOUs, debts, loans and invoices for cash is batshit crazy to me to be honest.

I never knew my loan and others loan could be packaged together as a financial product, the most famous one being the Mortgage backed securities (MBS), and then repackaged with other MBSes together to make a tranches of debts/loan known as Collateralized Debt Obligation (CDO).

Both MBS and CDO, plus Gaussian Copula that is being used to price CDO, not realizing the implied volatility is actually higher than expected that poisoned the whole scheme, contributed heavily into the unwinding of the 2008 Great Financial Crisis and is what killed Lehman Brothers, and set the powder keg to detonate the Eurodollar crisis 3 years later.

Yet it has been 20 years. 20 fucking years. The banks and the governments around the world hasn't fucking changed. Those CDO money ended up in private credit and Special Purpose Vehicles (SPV) which both of them is in its pending doom.

I can't fathom to imagine how fucked would this financial tsunami would be.

stevefan1999··on 500B tokens later: Letting AI agents decompile a first-person shooter
Reverse engineering dynamic dispatches like vtable and fat pointers/slices and traits would be hell. Different padding and compiler settings also contribute a lot.

One of the few problem is that the decompiler is not always reliable. That forces you to go read the assembly, and it is not apparent to decipher the right kind of feng shui, not even from human before the LLM era. I used to play CTFs and my conclusion is exactly that.

This is extremely apparent when there are self-modifying code (e.g. JIT) is involved. You need a stepping debugger to read the right control flow, because the code will diverge based on the instruction pointer and regions you jumped into. At this point static analysis like IDA and Ghidra stopped working.

stevefan1999··on IRCv3
I know, but it doesn't seems to be in the RFC yet. RFC creates specs and agreements between the protocol and it makes it officially acceptable for clients to start consider respecting it.

I'm running a Matrix server using https://github.com/matrix-construct/tuwunel as an alternative to IRC, but I missed the lean-and-mean of IRC since Matrix is full on event driven delivery like XMPP/Jabber.

stevefan1999··on Nitter: Update Oct 10th seeking funding and legal help
IANAL but unfortunately the law isn't really in Nitter's favor, as Elon could easily win the fight that Nitter can be considered as a read-only scrapping mirror, which itself makes total sense why Elon tries to C&D it since it is a loophole for other AI companies, probably especially OpenAI, to read the feeds for free.

tl;dr Elon's ground can easily be that there is an official paid service that let's you read the feeds unrestricted (this will be a good counter-challenge however IMO) while Nitter tried to run around it. So the First Amendment defense from Nitter should be shit outta luck

stevefan1999··on IRCv3
I really hope IRC supports WebSocket transport
stevefan1999··on The Forgetful CPU (Linux on M4)
Pretty much soon. Nuvia's design has been incorporated into 8 Elite and X Elite/Plus series. It was generational leaps ahead of 8 Gen 3, where 8 Elite is already close to Apple M1.

I'm looking for a cheap 8 Elite phone to root it and run a special kernel module that let me run LXC containers and run arbitrary Linux ARM64 program. And run a couple of services on it, maybe I can port Kubernetes whatsoever

stevefan1999··on MongoDB CEO resigns to join Meta
MongoDB is a natural choice if you are working with denormalized deeply hierarchical data structure like JSON. It is also natural to JavaScript devs since the shell itself is JavaScript. This makes it super effective on modern web framework although I recently switched to Drizzle
stevefan1999··on MongoDB CEO resigns to join Meta
Citus on Postgres used to have similar feature; Dead after Microsoft acquisition
stevefan1999··on The internet discovers TLA+. Now what?
I indirectly use TLA+ through https://github.com/quint-co/quint. I added instructions that "before you implement any feature, please use Quint to model it and make sure no counterexample for the system as a whole, reiterate the design with Quint as well and make sure your documents and implementation follows the formal model and docs".

The result, while takes much longer, is quite magical. A lot of transaction and atomic bugs were found and fixed just by having such simple instruction alone.

However, sometimes it is not all magical especially around external resources. Cloudflare, unfortunately, sometimes have hiccups on D1 and KV with timeout, which is more or less a force majeure.

Fortunately, that means I will have to model the action as a binary event, that the transaction may not complete as we would have thought guaranteed, and by add extra guard around it, so that the state would have to be retried.

I was able to workaround it like that so far. Keep in mind the more conditions and constraints, the beefier your CPU might need since it is on the scale of NP

stevefan1999··on How did AMD Ryzen get 50% faster in two years?
Intel has a cache-as-ram (CAR) mode / Non-Eviction Mode, which is what you wanted but it is only available before DRAM is brought up via core initialization. Not sure about AMD.
stevefan1999··on Python Workers are now generally available
Indeed. I still remember deploying GAE apps with Java WAR and Python Django as a kid 13 years ago. Then Heroku and now fly.io and Render. For me I went Docker and Kubernetes. Back then GAE has a really good free tier, so I used it to deploy a HTTP proxy to bypass school network
Page 1 of 31Next →