HNHacker News
TopNewBestAskShowJobs

emmanueloga_

2,861 karma · joined November 16, 2013

Software Engineer @ Crunchyroll

https://emmanueloga.com

https://lobste.rs/~emmanueloga

https://mastodon.gamedev.place/@EmmanuelOga

https://bsky.app/profile/emmanuel-oga.bsky.social

submissionscomments
emmanueloga_··on Beyond Elk: Lightweight and Scalable Cloud-Native Log Monitoring
a "no brown M&Ms" razor!
emmanueloga_··on What every developer needs to know about in-process databases
That sounds great!
emmanueloga_··on What every developer needs to know about in-process databases
The article suggests running Kuzu in a FastAPI frontend for network access. A caveat: production Python servers like Uvicorn [1] typically spawn multiple worker processes.

A simple workaround is serving HTTP through a single process language like Go or JavaScript, since Kuzu has bindings for both. Other processes could access the database directly in read-only mode for analysis [2].

For better DX, the ideal would be Kuzu implementing the Bolt protocol of Neo4J directly in the binary, handling single-writer and multi-reader coordination internally. Simpler alternative: port the code from [3] to C++ and add a `kuzu --server` option.

--

1: https://fastapi.tiangolo.com/deployment/server-workers/#mult...

2: https://docs.kuzudb.com/concurrency/#scenario-2-multiple-pro...

3: https://github.com/kuzudb/explorer/tree/master/src/server

emmanueloga_··on JSX over the Wire
From my perspective, the article seems primarily focused on promoting React Server Components, so you could mention that at the very top. If that’s not the case, then a clearer outline of the article’s objectives would help. In technical writing, it’s generally better to make your argument explicit rather than leave it open to reader interpretation or including a "twist" at the end.

An outline doesn't have to be a compressed version, I think more like a map of the content, which tells me what to expect as I make progress through the article. You might consider using a structure like SCQA [1] or similar.

--

1: https://analytic-storytelling.com/scqa-what-is-it-how-does-i...

emmanueloga_··on JSX over the Wire
Hey, thanks for sharing your thoughts! I appreciate you putting this out there.

One bit of hopefully constructive feedback: your previous post ran about 60 printed pages, this one's closer to 40 (just using that as a rough proxy for time-to-read). I’ve only skimmed both for now, but I found it hard to pin down the main purpose or takeaway. An abstract-style opening and a clear conclusion would go a long way, like in academic papers. I think that makes dense material way more digestible.

emmanueloga_··on Show HN: Coroot – eBPF-based, open source observability with actionable insights
I looked into eBPF-based observability tools for k8s some time ago and found at least four tools that look incredibly similar: Pixie, Parca, Coroot, and Odigos. There are probably others I missed too. Do you have any thoughts about this?

From a user perspective, having several tools that overlap heavily but differ in subtle ways makes evaluation and adoption harder. It feels like if any two of these projects consolidated, they’d have a good shot at becoming the "default" eBPF observability solution.

emmanueloga_··on Show HN: Zig Topological Sort Library for Parallel Processing
For those that have not implemented toposort or don't remember it: 1) only directed graphs without cycles can be topologically sorted (DAGs) 2) there can be more than one topological order and 2) reverse post order of depth first traversal from every unvisited node shields a topological order.

In JavaScript:

    function toposort(graph = { a: ['b', 'c'], b: ['d'] }) {
      const order = [];
      const visited = new Map();
      
      function dfs(node) {
        const status = visited.get(node);

        if (status === 1) throw new Error("Cycle found.");
        if (status === 2) return;

        visited.set(node, 1); // In progress.
        const adjacent = graph[node] ?? [];
        for (const neighbor of adjacent) dfs(neighbor);
        visited.set(node, 2); // Done.

        order.unshift(node); // Reverse post order.
      }

      for (const node in graph) {
        if (!visited.has(node)) dfs(node);
      }

      return order;
    }
emmanueloga_··on OpenAI adds MCP support to Agents SDK
I'm surprised this was announced in a random tweet instead of a blog post with a release roadmap or something like that.
emmanueloga_··on Three Hundred Years Later, a Tool from Isaac Newton Gets an Update
Awesome thank you for the clarification!
emmanueloga_··on Three Hundred Years Later, a Tool from Isaac Newton Gets an Update
I spent way too long figuring this one out, so this is what I got:

An improvement on [1], which I vaguely remember using with pen and paper to find minimums of differentiable functions. The original algorithm runs "on a loop" (iteratively) and utilizes the first and second order derivative of a function (f', f''). From the article:

> Newton did it for degree 2. He did that because nobody knew how to minimize higher-order polynomials

The improved version looks a lot more complex but seems to sacrifice simplicity to converge faster to the minimum when implemented as a program.

Trivia: a "single loop" of the Newthon method is famously used in Quake's Fast InvSqrt() implementation [2].

--

1: https://en.wikipedia.org/wiki/Newton's_method

2: https://en.wikipedia.org/wiki/Fast_inverse_square_root#Newto...

emmanueloga_··on Walt Disney's MultiPlane Camera (Filmed Feb. 13, 1957) [video]
...and it's a hunk of steel that must weigh a few tons and is built to withstand an extinction-level disaster. I mean, even for the '30s, it seemed a little bit excessive. I understand it had to be somewhat heavy for stability and all, but I suspect it could have been made more lightweight.
emmanueloga_··on Optimistic Locking in B-Trees
I wonder about the angle of the article, starting with "B-Trees stand the test of time" ending with "everything else has seriously diminishing returns".

I never ask myself why we still use hashmaps or heaps or whatnot, so makes me wonder if this is really an article about why Cedar does not use something else? (LSM-trees the elephant in the room?)

emmanueloga_··on Why fastDOOM is fast
That's cool, I don't know how popular canvas heavy apps are these days, what kind of apps are you working with?

I used to work on a set top box app, and for some of the features, replacing the whole page with a single canvas was the only way to get steady FPS.

emmanueloga_··on Why fastDOOM is fast
This is why it pays out to turn on "Paint Flashing" [1] in the web console, even if just from time to time.

--

1: https://web.dev/articles/simplify-paint-complexity-and-reduc...

emmanueloga_··on Show HN: Breakout with a roguelite/vampire survivor twist
Nice game!

I found myself putting my finger directly into the paddle many times. Instead of the message "Push here to play" you could create a more obvious UI element where one should press (something like the grip part of a slider). Maybe even make the grip glow when you push it for funs :-).

emmanueloga_··on TypeScript types can run DOOM [video]
I think brew's author point holds even if you replace "invert binary tree" with any other LC problem.

In terms of the problem itself, a binary tree can be expressed something like:

    type Node<T> = { value: T, left?: Node<T>, right?: Node<T> }
Given a root, you can invert it recursively with some code like this:

    function invertTree(root) {
      if (!root) return null;

      // Swap!
      const tmp = root.left;
      root.left = invertTree(root.right);
      root.right = invertTree(tmp);

      return root;
    };
Or using an explicit stack:

    function invertTree(root) {
      const stack = [root];
      while (stack.length > 0) {
        const node = stack.pop(); if (!node) continue;

        // Swap!
        const tmp = node.right;
        node.right = node.left;
        node.left = tmp;

        stack.push(node.left);
        stack.push(node.right);
      }
      return root;
    }
I think without prep would be harder to come up with the non-recursive version.
emmanueloga_··on I think Yann Lecun was right about LLMs (but perhaps only by accident)
Lecun's thesis: "if we generate outputs that are too long, the per-token error will compound to inevitable failure".

> The finding that language models can get better by generating longer outputs directly contradicts Yann’s hypothesis.

The author's examples show that the error has been minimized for a few examples of a certain length. This doesn't contradict Lecun, afaict.

emmanueloga_··on Scroll-Driven Animations
I feel like people are being overly critical of this work. When used sparingly, scrolling effects can add charm to marketing pages and portfolios, and I've seen some great uses on so called "explorable explanations" and other long form articles.

The main objective seems to be advocacy/evangelism on new browser animation APIs, which I welcome [1].

... I agree that the top mouse animation is, errr... a bit ugly, though :-).

--

1: https://scroll-driven-animations.style/#links

emmanueloga_··on Ask HN: Moving a not-for-profit web app off AWS
I understand this position very well! Sometimes there’s room for trade offs, you lose some flexibility but gain something in return.

Also replacing some of CF primitives with something else later can be viable, specially if you plan for it.

emmanueloga_··on Ask HN: Moving a not-for-profit web app off AWS
Cloudflare is a nice option if you can adapt your system to run there [1]. You could also run just the frontend on CF and host any APIs elsewhere. Or check these sites [2] [3] with some good reviews and comparisons of hosting providers.

Regarding spaced repetition, RemNote 1.17 an 1.18 has a bunch of AI features for summarizing PDFs and YouTube transcripts and turning that into Q&A for spaced repetition, and they also have a Chatbot interface in-app. Perhaps you could check some of what they are doing for inspiration [4].

--

1: https://developers.cloudflare.com/workers/languages/

2: https://getdeploying.com/

3: https://www.vpsbenchmarks.com/

4: https://www.youtube.com/@RemNote/videos

emmanueloga_··on Weierstrass's Monster
At some frequencies sounds like a more (or less) chip-crushed church organ.
emmanueloga_··on Weierstrass's Monster
My attempt at nice looking TS version:

    function sum(f: (x: number) => number, upper = 500) {
      let sum = 0;
      for (let n = 0; n < upper; n++) sum += f(n);
      return sum;
    }

    const weierstrass = (x: number, a = 0.5, b = 3) =>
      sum(n => a ** n * Math.cos(b ** n * x));
emmanueloga_··on Weierstrass's Monster
+1, it the obvious thing missing in the article!
emmanueloga_··on Google Fiber is coming to Las Vegas
> There were missteps along the way. A big example was the TV software that was originally an acquisition, SageTV [2]. Somebody decided it would be a good idea to completely rewrite this Java app into Web technologies on an embedded Chrome instance on a memory-limited embedded CPU in a set-top box. Originally planned to take 6 months, it took (IIRC) 3.5+ years.

I worked on the "misstep" with a small team, and it’s wild to see Fiber still around and even expanding to new cities. As far as I can tell, the set-top box software had nothing to do with why Fiber was scaled down. Also, usability surveys showed people really liked the GUI!

The client supported on-demand streaming, live TV, and DVR on hardware with... let’s call them challenging specs. Still, it turned out to be a pretty slick app. We worked hard to keep the UI snappy (min 30 FPS), often ditching DOM for canvas or WebGL to squeeze out the needed performance. A migration to Cobalt [1], a much lighter browser than embedded Chromium, was on the table, but the project ended before that could happen.

Personally, it was a great experience working with the Web Platform (always a solid bet) on less-traditional hardware.

--

1: https://developers.google.com/youtube/cobalt

emmanueloga_··on I made a multiplayer shooter game in Lisp, here is my journey
Quick summary: ClojureScript + Babylon.JS on the frontend and Clojure for the backend, coordination via Websockets.

The point about lack of tooling for Babylon.JS is interesting: a lot of times I see people wanting to release games but spending most of the time building tools... sometimes all of the time. It is a delicate balance!

Congratulations on releasing! Very cool project.

emmanueloga_··on Ask HN: Dense Tree Layout Algorithms
I feel like we are, overall, in agreement, although this may be a case of [1] :-).

--

1: https://youtu.be/XHO4Aby6fT8?t=11

emmanueloga_··on Ask HN: Dense Tree Layout Algorithms
For this particular example, I feel like a combination of both human input + algo could work. Something like:

* Have graphviz or some other solver output the [x;y] pairs for each vertex.

* Use the initial positions to create, with a physics engine, a construct where vertices are masses connected by springs following the DAG.

* Add a resizable bounding box constraint around the whole thing.

* Push and pull the boundaries and masses until you get something nice.

What you say still applies: you may want to give the user the ability to resize the masses and re-run the layout algorithm, etc.

emmanueloga_··on PostgreSQL is the Database Management System of the Year 2024
Kind of, with caveats. For one "extensions can interfere with each other and cause incorrect behavior" [1], and the practicallity of implementations varies. Say, Cypher queries using AGE can be order of magnitude slower than using a dedicated graph DB [2].

Yes, you can drive a Ford Falcon coast-to-coast, but how much gas are you going to spend? Postgres is a solid database but has roots in the 80s. Optimizing for modern hardware would reduce hosting costs and improve efficiency. [3]

This isn’t criticism of Postgres as a database but of the idea that it’s inherently sufficient for all use cases.

--

1: https://www.cs.cmu.edu/~pavlo/blog/2025/01/2024-databases-re...

2: https://blog.kuzudb.com/post/what-every-gdbms-should-do-and-...

3: https://cedardb.com/blog/ode_to_postgres/#why-is-everyone-st...

emmanueloga_··on The Siren Song of Little Languages
I think it is a problem of incentives: programming languages with small, elegant specs are often created by academics, and academia and the software industry have fundamentally incompatible incentives.
emmanueloga_··on The Canva outage: another tale of saturation and resilience
The whole incident report is interesting, but I feel like the most important part of the solution is buried here [0]:

* "We're adding timeouts to prevent user requests from waiting excessively long to retrieve assets."

When you get to the size of Canva, you can't forget your AbortController and exponential backoff on your Fetch API calls.

--

0: https://www.canva.dev/blog/engineering/canva-incident-report...

← PreviousPage 2 of 34Next →