frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Major reversal in ocean circulation detected in the Southern Ocean

https://www.icm.csic.es/en/news/major-reversal-ocean-circulation-detected-southern-ocean-key-climate-implications
13•riffraff•18m ago•4 comments

Introducing tmux-rs

https://richardscollin.github.io/tmux-rs/
673•Jtsummers•14h ago•216 comments

Flounder Mode – Kevin Kelly on a different way to do great work

https://joincolossus.com/article/flounder-mode/
204•latentnumber•13h ago•41 comments

Launch HN: K-Scale Labs (YC W24) – Open-Source Humanoid Robots

159•codekansas•12h ago•83 comments

AV1@Scale: Film Grain Synthesis, The Awakening

https://netflixtechblog.com/av1-scale-film-grain-synthesis-the-awakening-ee09cfdff40b
182•CharlesW•12h ago•152 comments

Wind Knitting Factory

https://www.merelkarhof.nl/work/wind-knitting-factory
101•bschne•8h ago•27 comments

Context Engineering for Agents

https://rlancemartin.github.io/2025/06/23/context_engineering/
6•0x79de•2d ago•0 comments

Manipulating trapped air bubbles in ice for message storage in cold regions

https://www.cell.com/cell-reports-physical-science/fulltext/S2666-3864(25)00221-8
48•__rito__•3d ago•13 comments

Peasant Railgun

https://knightsdigest.com/what-exactly-is-the-peasant-railgun-in-dd-5e/
216•cainxinth•15h ago•157 comments

Poor Man's Back End-as-a-Service (BaaS), Similar to Firebase/Supabase/Pocketbase

https://github.com/zserge/pennybase
161•dcu•13h ago•99 comments

Sound Chip, whisper me your secrets [video]

https://media.ccc.de/v/gpn23-302-sound-chip-whisper-me-your-secrets-
13•rasz•2d ago•1 comments

Ubuntu 25.10 Raises RISC-V Profile Requirements

https://www.omgubuntu.co.uk/2025/06/ubuntu-riscv-rva23-support
83•bundie•2d ago•24 comments

Opening up ‘Zero-Knowledge Proof’ technology

https://blog.google/technology/safety-security/opening-up-zero-knowledge-proof-technology-to-promote-privacy-in-age-assurance/
253•doomroot13•11h ago•151 comments

Where is my von Braun wheel?

https://angadh.com/wherevonbraunwheel
131•speckx•15h ago•98 comments

Caching is an abstraction, not an optimization

https://buttondown.com/jaffray/archive/caching-is-an-abstraction-not-an-optimization/
95•samuel246•2d ago•81 comments

High-Fidelity Simultaneous Speech-to-Speech Translation

https://arxiv.org/abs/2502.03382
76•Bluestein•8h ago•41 comments

Postcard is now open source

https://www.contraption.co/postcard-open-source/
94•philip1209•12h ago•29 comments

CO2 sequestration through accelerated weathering of limestone on ships

https://www.science.org/doi/10.1126/sciadv.adr7250
37•PaulHoule•5h ago•32 comments

Converge (YC S23) well-capitalized New York startup seeks product developers

https://www.runconverge.com/careers
1•thomashlvt•8h ago

An Algorithm for a Better Bookshelf

https://cacm.acm.org/news/an-algorithm-for-a-better-bookshelf/
82•pseudolus•2d ago•12 comments

Experiment: Colocating agent instructions with eng docs

https://technicalwriting.dev/ai/agents/colocate.html
7•dannyrosen•3d ago•2 comments

White House claims expansive power to nullify TikTok ban and other laws

https://www.nytimes.com/2025/07/03/us/politics/trump-bondi-tiktok-executive-power.html
29•ytpete•33m ago•7 comments

Fei-Fei Li: Spatial intelligence is the next frontier in AI [video]

https://www.youtube.com/watch?v=_PioN-CpOP0
266•sandslash•2d ago•137 comments

Electronic Arts Leadership Are Out of Their Goddamned Minds

https://aftermath.site/ea-dice-battlefield-battle-royale-free-to-play-f2p
25•dotmanish•1h ago•17 comments

Encoding Jake Gyllenhaal into one million checkboxes (2024)

https://ednamode.xyz/blogs/2.html
55•chilipepperhott•13h ago•14 comments

AI for Scientific Search

https://arxiv.org/abs/2507.01903
94•omarsar•13h ago•22 comments

Show HN: I rewrote my notepad calculator as a local-first app with CRDT syncing

https://numpad.io
30•tonyonodi•3d ago•12 comments

Stalking the Statistically Improbable Restaurant with Data

https://ethanzuckerman.com/2025/07/03/stalking-the-statistically-improbable-restaurant-with-data/
61•nkurz•11h ago•31 comments

Michael Madsen has died

https://www.nytimes.com/2025/07/03/movies/michael-madsen-dead.html
98•anigbrowl•6h ago•30 comments

Astronomers discover 3I/ATLAS – Third interstellar object to visit Solar System

https://www.abc.net.au/news/science/2025-07-03/3i-atlas-a11pl3z-interstellar-object-in-our-solar-system/105489180
291•gammarator•1d ago•161 comments
Open in hackernews

Using obscure graph theory to solve programming languages problems

https://reasonablypolymorphic.com/blog/solving-lcsa/
106•matt_d•1mo ago

Comments

tekknolagi•1mo ago
This seems, at least upon first read, analogous to global value numbering (GVN). Or, depending on how you look at it, common subexpression elimination (CSE). I am mostly wondering why they are not mentioned in the article.
j2kun•1mo ago
I came here to mention this as well. If this problem was so critical to the company the author was working at, it seems negligent to spend a _year_ reinventing a solved problem from scratch, especially given the author's apparent history of compiler experience.
kldx•1mo ago
Wondered about the same thing. Perhaps the author deals with graphs with no side effects or branches? It would then trivially become CSE on a single basic block.

SSA transformations are essentially equivalent to what the author appears to be doing in terms of let-bindings [0].

[0] https://dl.acm.org/doi/10.1145/278283.278285

sjurba•1mo ago
Shit. I had the semi hard problem at my last job and I just realized that the most efficient way I could solve it would be to write a blog post on how proud I was of my (shitty) solution and wait for the snarky commenters to tell me the proper way to do it..

I love this fact about the internet! Thanks guys! Keep it up! Including the snarkyness. It’s part of what makes it great!

(I am aware this is not a novel idea. Posting the wrong solution is better than asking for help.. It is just fun to see it in action)

tekknolagi•1mo ago
This is not snark! This is me genuinely wondering.
tylerhou•1mo ago
GVN and CSE only identify duplicate/common subexpressions. They do not tell you where to place the computation of the common subexpression.

The canonical algorithm to do that is to compute the dominance relation. A node X dominates Y if every path to Y must go through X. Once you have computed the dominance relation, if a common subexpression is located at nodes N1, N2, N3, you can place the computation at some shared dominator of N1, N2, and N3. Because dominance is a statement about /all/ paths, there is a unique lowest dominator [1]. This is exactly the "lowest single common ancestor."

Note that dominance is also defined for cyclic graphs. There may be faster algorithms to compute dominance for acyclic graphs. Expressions in non-lazy programming languages are almost always acyclic (e.g. in Haskell, you can write cyclic expressions).

[1] Claim. Let A, B, and C be reachable nodes. Suppose A and B both dominate C. Then either A dominates B or B dominates A.

Proof. We prove the contrapositive. If neither A dominates B nor B dominates A, then there exist paths a, b from the root such that path a passes through A but not B and path b passes through B but not A. If there is no path from A to C, then A cannot dominate C as C is reachable. Similarly, if there is no path from B to C, then B cannot dominate C. So assume there are paths a' from A to C and b' B to C. Then the path b.b' witnesses that A does not dominate C, and the path a.a' witnesses that B does not dominate C.

(There might be a bug in the proof; I think I proved something too strong, but I'm going to bed.)

mananaysiempre•1mo ago
I’m also a bit weirded out by the lack of mentions of dominators (in TFA or in the article[1] it links to). Once you have the dominator tree, though, you’re still going to need to answer LCA queries on it (in this problem and in an SSA-based compiler both), so there seems to be no way around this part.

The algorithm in the article does O(1) queries with O(V+E) preprocessing (assuming linear-preprocessing LCA, which, yeah). What’s the best algorithm for dominator trees? People usually talk about Lengauer–Tarjan[2], which is linear in practice (linear except for UNION-FIND), and not the linear one by Georgiadis[3,4]. Unfortunately, I’m not a compiler person.

[1] https://doi.org/10.1016/j.ipl.2010.02.014

[2] https://maskray.me/blog/2020-12-11-dominator-tree

[3] https://www.cs.princeton.edu/research/techreps/43

[4] https://dl.acm.org/doi/abs/10.1137/070693217

chc4•1mo ago
You don't need to compute dominators. A topological sort of the graph gives you a computation order where your definitions are computed before their use.
mananaysiempre•1mo ago
I mean, it does, but that’s not what TFA’s problem statement is, and I can imagine why one may not want to immediately take apart the expression into assembly-like SSA

  let $0 = f a b in
  let $1 = g $0 c in
  ...
and instead leave some original structure in place and some tree-level simplifications available.
chc4•1mo ago
The "equivalent-but-more-efficient program" example given at the top is almost exactly that, though
tylerhou•1mo ago
I don't see how a topological sort helps you determine where to place the computation. If an expression A is topologically before an expression B, that does not mean that A always is computed on the path to B.

For an example, consider a three-node binary tree where R is the root, A is the left child, and B is the right child. A valid topological sort is R A B, but it is not the case that whenever B is computed, A has already been computed.

tylerhou•1mo ago
In practice, if I have to implement dominators, it's probably for a toy language so I just go with the (fast quadratic) dataflow approach. It's simple to implement if you know what you're doing and if you already have a dataflow framework, it's pretty easy to implement: https://github.com/tylerhou/cs265/blob/main/tylerhou/lib/ssa...
kazinator•1mo ago
CSE doens't only identify; it eliminates (hence the E!). It refers to the complete solution.

I don't think you necessarily have to compute the dominance relation because it can pop out implicitly.

If CSE is done on intermediate code, the dominance relation will pop out from thedirecton in which the instructions are followed around the basic blocks.

E.g. simple case: we see t3 <= t2 + t1. So we make a note in some CSE hash table that we had a t2 + t1, and that the result is cached in t3. Then if we see t2 + t1 again in the same basic block, we can replace that with t3. The dominance relation is that earlier instructions in the basic block dominate later ones, but we don't have to explicitly calculate it.

georgewsinger•1mo ago
If you like reasoning about a program in terms of expression trees/graphs, I recently discovered that Wolfram Language has built-ins for this:

https://reference.wolfram.com/language/ref/ExpressionTree.ht...

garganzol•1mo ago
Problem solvers based on graphs are hard to get your head around at first, but then you get extremely elegant and powerful solutions to seemingly unsolvable problems.

The only gotchas are: 1) time to get your head around 2) algorithmic complexity of the resulting solution.

Graph theory is probably the most fulfilling math application in the computer science. In a way, graph-based algorithms do magic similar to AI but in a fully determined manner. If you think about it more broadly, a graph resembles a subset of a neural network but only with {0, 1} weights.

vkazanov•1mo ago
Maybe some day neural networks will so obvious and well-known to the general public that this is how we'd explain graphs to kids: imagine a NN where weights are always 0/1...
Traubenfuchs•1mo ago
The general public believes 1/3 is smaller than 1/4.
ableal•1mo ago
Only 1/4 [0] of the general public believes that, but marketers get hurt at any loss of customers ...

[0] https://mises.org/mises-wire/87-statistics-are-made

sylware•1mo ago
You know what did happen millions of years ago when the monkeys started to use tools.

Time of AI to know how to use tools, like a mathematical formal solver. Well, it is already done, but it is not LLM... soooo.. academics only?

NoOn3•1mo ago
Neural networks is not so complicated. They are much much simpler than it seems when you think about something as complex as intelligence. It even makes me sad that such simple things as neural networks perform such complex intellectual things...
vkazanov•1mo ago
Building blocks (real ones, not metaphorical ones) are also simple.

Your brain is made of relatively simple cells. Even earthworms have neurons.

But emergent complexity of systems made of simple neurons is staggering! That's the point, I guess. Simple bricks made complex systems.

tlavoie•1mo ago
Now we need to look up that "They're Made out of Meat" story. Here we go: https://www.mit.edu/people/dpolicar/writing/prose/text/think...
anonymousDan•1mo ago
A great example of the value of academia and scientific research.
RetroTechie•1mo ago
Equally important: have professionals of all kinds (like, engineers) be aware of state-of-the-art in fields of science that touch their profession. And how to find that (if necessary through 3rd parties - like author did).

Knowledge is much less useful if it doesn't get applied.

CrimsonCape•1mo ago
I recently started watching this lecture series on Category Theory by Bartosz Milewski and he delves into some mind-boggling existential questions in the first video.

To paraphrase, mathematicians believe that they are in "a field of discovery" with the implication of "discovery" being that mathematicians are discovering something that already exists.

He gives an example of how mathematicians believe that lambda calculus and other systems like set theory and graph theory are actually all the same thing as category theory. In a metaphoric way we have discovered the abstraction (category theory) and recognize that lambda calculus "implements the trait/interface"

The dilemma is: did we truly invent a theory of a pre-existing phenomenon? Or do we somehow map physics of the universe to a what a brain is capable of parsing?

https://www.youtube.com/watch?v=I8LbkfSSR58&list=PLbgaMIhjbm...

3abiton•1mo ago
This took a wild turn on HN, unsxpectedly? Is the series worth it? What are takeaways skills?
lifelesson701•1mo ago
Yivycy
kazinator•1mo ago
> This transformation is affectionately known as sharing

No, it is ubiquitously known as CSE: common subexpression elimination.

The original DAG representation of the abstract syntax, on the other hand, exhibits substructure sharing.

> Of course, that invariant eventually changed. We added a way in the source langauge to introduce lets, which meant my algorithm was wrong.

Because you have to identify variables by more than just their symbol, due to shadowing, like De Brujn indexing and other schemes.

CSE is not particularly difficult in a functional language. Variable assignments throw a monkey wrench into it. Any terms with side effects also.

By the way, CSE can be done over intermediate representations, rather than abstract syntax. In an intermediate representation, you look for identical instructions with the same operands, not arbitrarily large expressions, while paying attention to variable liveness.

Another by the way is that not only do we have to worry about side effects, but we also cannot do CSE on expressions that guarantee returning a fresh object. E.g. if we are compiling Lisp we cannot merge two occurrences of (cons 1 2). The expressions must produce fresh cells which are not eq to each other. Ultimately that is linked to side effects; being able to mutate one cell with no effect on the other. Construction per se is not a side effect, even if it guarantees freshness.