HNHacker News
TopNewBestAskShowJobs

tikhonj

16,934 karma · joined September 12, 2011

Tikhon Jelvis

I am interested in programming languages, functional programming (especially Haskell), domain-specific languages, static analysis and program synthesis.

I am working on apply programming language ideas to supply chain planning.

I worked on supply chain optimization at Target for several years, and co-authored a textbook on reinforcement learning based on that experience.

contact: http://jelv.is, tikhon@jelv.is

submissionscomments
tikhonj··on Bricks and Minifigs Stole a Man's $200k Lego Collection
This is definitely not uniform. I worked on inventory management at Target, and stores had quite a lot of shelf space—to the point where we'd hold large amounts of cheap, non-perishable stuff like cat litter because, well, we had the space for it.

Stores also wanted to look full. We actually had parameters in our inventory management logic to increase inventory just for presentation reasons. If inventory is expensive, having some free, quality inventory can be valuable in and of itself even if it moves slowly.

tikhonj··on Use boring languages with LLMs
Sounds like OxCaml is pretty close to what you want. You get access to similar capabilities as Rust, but also stricter typing and an (optional) effect system. I don't know of an equivalent to Liquid Types, but it seems like the same approach that worked for Haskell would work naturally in OxCaml.
tikhonj··on Using AI to write better code more slowly
Over my time in the industry I've become increasingly convinced most people haven't seen what good human programmers are like. Otherwise we wouldn't have the popularity of things like Scrum, Clean Code (the book, not the concept), etc.

I was lucky enough to see some good teams when I was a student (both at Berkeley itself and by interning at Jane Street), and it totally changed my intuition for what good programming is like. It's gotten to the point where I'm convinced there are two incommensurable paradigms in programming, and we're constantly talking past each other.

Like, if you have an ongoing project where the codebase has grown over time, do you expect it to get easier to do things or harder? I've worked on projects where it's obvious that things are always getting harder (old code is hard to change, you have to deal with lots of complexity and edge cases and workarounds). I've also worked in codebases where things got easier over time: you get better abstractions, more libraries, more capabilities. That can be a lot of fun; you think of a new thing to try, and you have the pieces to just do it.

Or another point of comparison: do people think that writing good code slows you down (so it only makes sense to avoid bugs), or do people think that writing good code lets you move faster? I've talked to people for whom one or the other is totally and obviously true. (I'm solidly in the second camp myself.)

But the surprising thing was how "obvious" the dynamic was in both cases, even though the two cases are exact opposites of each other! If you ask one group or the other they'd just tell you that, well, that's simply how programming works. Of course things get (easier|harder) over time. That's built into people's fundamental understanding of what programming is and how to do it. And that's exactly what I mean by incommensurable paradigms.

Anyway, this is a bit of a tangent from the main discussion, but it's something I've been thinking about a bunch over the last few years, partly inspired by the advent of AI-powered programming, but largely thanks to experiencing some very different projects and teams...

tikhonj··on You can no longer Google the word 'disregard'
I browse the web moderately zoomed in, and the actual definition is almost entirely below the fold for me.

Google gives the AI summary so much blank space it takes up my whole screen! Absolutely wild.

tikhonj··on Anthropic acquires Stainless
The top trading firms had top-end recruiting figured out for ages, without jumping through all these hoops.

There are plenty of other reasons to acqui-hire, but it is not the only or even the most effective way to hire the strongest engineers

tikhonj··on Voice AI Systems Are Vulnerable to Hidden Audio Attacks
I'd guess it's more a way to avoid YouTube's copyright detection/etc rather than AI scraping per se.
tikhonj··on The Third Hard Problem
Reminds me of my favorite math essay: "When is one thing equal to some other thing?"

It's a great question, much deeper and more interesting than it seems. The essay suggests thinking in terms of isomorphisms (relative to the structure you care about) rather than equality in some absolute sense, and I've found a fuzzy version of that to be a really useful perspective even in areas that can't be fully formalized.

https://people.math.osu.edu/cogdell.1/6112-Mazur-www.pdf

tikhonj··on Appearing productive in the workplace
Eh, Facebook today is farther from what anybody "wants" than macOS 26, and Facebook is about as blindly data-driven as they come.

Turns out you can get away with a lot when you have a quasi-monopoly on an addictive product, and you buy out your realistic competitors...

tikhonj··on The bottleneck was never the code
Ceremonies and tickets aren't especially effective for actual collaboration. They're primarily tools for making work legible and controllable to management.

There is a reason (well, many reasons) that, if I'm working on a creative project with somebody outside a company, we would never think of reaching for Scrum ceremonies or Jira.

It is more than perfectly consistent to complain about that while valuing collaboration.

tikhonj··on Computer Use is 45x more expensive than structured APIs
Everything exposed programmatically would have been great even without agents—the NixOSes and Emacses of the world show just how amazing a fully flexible and programmable world would be—but I'm glad that the advent of AI is getting people invested in this vision :P
tikhonj··on Why Almost Everyone Loses–Except a Few Sharks–On Prediction Markets
The real trap of modernity is treating "productivity" as some sort of quasi-religious moral imperative.
tikhonj··on A couple million lines of Haskell: Production engineering at Mercury
You can do a great job of navigating that as long as you have some experienced engineers with taste building the core pieces. You can't have it all, but you can have a lot.

I interned at Jane Street years ago and they seemed to do a great job of walking that line (in OCaml rather than Haskell, but same difference). They moved remarkably quickly despite working in an area with a lot of inherent complexity and where reliability and correctness are an existential concern to the business. (Which, perhaps surprisingly, is massively more the case for a trading firm than for a Mercury-like neobank...) In hindsight, a key thing Jane Street did was hire some experienced OCaml programmers with great taste (like Stephen Weeks, the author of MLton) and let them build the core libraries and guide the whole codebase from the beginning.

Unfortunately, this is one of the things that Mercury didn't do anywhere near as well.

tikhonj··on Meetings are forcing functions
I've gone in the opposite direction: on projects I've led, I decided to have no recurring meetings at all, very much going against the flow of the broader organization. Instead, I would set up a time when we had something specific to talk about. I wrote a short but hopefully clear description of what we needed to cover on each event that I scheduled.

I found this worked really well in practice. We actually talked more as a team compared to the ones using a fixed process with recurring meetings or "ceremonies", but the discussions were consistently useful. There was a lot more time spent figuring things out together and developing a strong shared mental model for what we were doing—some non-trivial but not quite research-level machine learning work—and no energy wasted on glorified status updates that only one person on the team cared about, or "syncs" that became increasingly less useful week-over-week.

Most other teams I've been on had this seemingly contradictory dynamic where we had too many meetings but also did not talk nearly enough. It's amazing how a bunch of recurring meetings can take up a bunch of time and attention, but somehow not leave enough space to dive deeply into non-trivial technical or strategic questions, or meaningfully talk about "meta" team topics.

A real risk is that a recurring meeting can pull out the oxygen in the room to talk about a given topic. It's too easy to put off talking about something important until the next scheduled meeting—by which time you have less context and less time—and then, if the recurring meeting isn't long enough to go deeper, the discussion gets put off even further. A team I worked on recently had a quarterly "retro", never had enough time to cover anywhere near every "retro" topic we actually needed, but also didn't consistently talk about that kind of topic outside the retro. We'd just wait until the next one rolled around. (Worse yet, this still put this team ahead of a number of other teams I've seen...) In contrast, the best teams I worked with never had explicit retros because we just talked about things that needed talking about as part of our day-to-day.

tikhonj··on The future of everything is lies, I guess: Where do we go from here?
A large part of the effect that cars have come from massive subsidies and policy choices that push for cars over alternative options. The comparison shouldn't be "cars vs literally nothing" but rather "car-dominated infrastructure vs the same investments in alternatives". (Not to say that it's an either-or; the optimal equilibrium might still involve some mix of car investments, just far less than we have now.)
tikhonj··on The future of everything is lies, I guess: Where do we go from here?
It's the folks pushing cars that are both the most strident and the most successful at pushing their "obviously correct" way onto everyone, at least in the US.
tikhonj··on EFF is leaving X
Ah yes, a non-profit reaching out to a broader audience for its activism is clearly a "certain ideological concern" separate from their core mission.
tikhonj··on The Importance of Being Idle
We can't read everything, so we need markers of taste to figure out what is and isn't worth engaging with. AI tells are markers of drastically bad taste.
tikhonj··on Ask HN: Any interesting niche hobbies?
It's a great time to get into programming languages stuff: designing domain-specific languages, building new tools/abstractions and, especially, formal verification. If you're mathematically oriented, you can explore formalizing mathematical proofs in Lean.

LLMs have really revitalized interest in these areas. AI can really help navigate the initial learning curve, can do a surprising amount of "heavy lifting" and can make tedious but useful work much easier. Do you want your little language to have a language server and nice editor-specific syntax highlighting? Do you need to write a parser with decent error messages? Do you need to prove a bunch of largely straightforward lemmas to get to the proof you actually care about? All of these things are easier (and, hopefully, more fun) than they were a few years ago. But, at the same time, there is still a lot of room for human insight and design in this process. There are a lot of areas that AI can't handle (or, at least, can't handle well) and, of course, nothing stops you from doing the fun stuff by hand even if you could hand it off to Claude.

And, of course, all this PL stuff was fun before LLMs. It's even more fun now even if you don't want to use AI yourself, because more people are doing and talking about PL stuff online, and there are more tools and libraries you can use yourself.

tikhonj··on Delve removed from Y Combinator
Yeah, fraud is what happens when you don't make it.
tikhonj··on What category theory teaches us about dataframes
You can have both: you start with a small, mathematically inspired algebraic core, then you express the higher-level more user-friendly operations in terms of the algebraic core.

As long as your core primitives are well designed (easier said than done!), this accomplishes two things: it makes your implementation simpler, and it helps guide and constrain your user-facing design. This latter aspect is a bit unintuitive (why would you want more constraints to work around?), but I've seen it lead to much better interface designs in multiple projects. By forcing yourself to express user-level affordances in terms of a small conceptual core, you end up with a user design that is more internally consistent and composable.

tikhonj··on Delve allegedly forked an open-source tool and sold it as its own
I wonder how much of that is posturing (less charitably, lying to outsiders) and how much is the organization effectively lying to itself.

Both are indictment of today's ambient startup culture, and I'm not sure which is ultimately worse.

tikhonj··on Slop is not necessarily the future
The most productive teams I've seen (eg at Jane Street) rewrite things all the time, and still move faster than any "normal" teams I've seen. I remember when I interned there over a decade ago, they were already on like the seventh? version of their incremental computing framework, and were building a new build system. But they were also incredibly effective at getting things done both on a per-engineer basis and in terms of making money.
tikhonj··on Slop is not necessarily the future
> No one has ever made a purchasing decision based on how good your code is.

This is very much a "it's not the fall that kills you, it's the sudden stop at the end" sort of thing. (Same with the other variant I've heard, which is something like "no company has gone out of business because of tech debt".)

Code is as much a tool for developing and expressing conceptual models as it is for making computers do things. So not only does code quality have proximate impacts on engineering productivity and reliability, but, done well, it also improves the holistic design of the system you're building. You get better tools, faster, by putting some thought and care into your codebase and, especially, your core abstractions. Teams with good code move faster even in the short term and produce better tools and products.

Of course, it's not just a matter of code; you also need a culture that gives engineers the agency to make real, long-term decisions about what you're building (not just how) which, unfortunately, is rare to find in the modern tech industry :/ The dominant "high-output management" paradigm where code is seen as a virtually fungible "output" to be "delivered" loses the higher-order advantages of good code and good conceptual design, and leaves us with something much closer to the trade-off you describe. But there are other ways of approaching technical work that don't make this trade-off at all!

tikhonj··on Artemis II is not safe to fly
Google's R&D budget is like $60B. Make of that what you will.
tikhonj··on Artemis II is not safe to fly
Based on some rough numbers, NASA's budget (around $24B) would be <4% of the US's total spending on entertainment, with a pretty great return in research, engineering and education to boot.

I also looked up the NSF's 2024 budget, which, at $9B, was much lower than I expected.

tikhonj··on Why I'm betting on ATProto (and why you should, too)
There are a lot of small, informal and fuzzy communities around specific interests in Twitter. For example, I routinely run into the same folks talking about some specific areas in PL/FP or in complex systems/resilience engineering. These sub-communities aren't clearly delineated like a subreddit, rather they arise organically through the same set of people following each other or, at least, consistently appearing in each others' feeds and conversations.
tikhonj··on Dataframe 1.0.0.0
I rather like this. A represents major changes like a substantial redesign of the whole API, while B catches all other breaking changes. Tiny changes to the public API of a library may not be strictly backwards compatible, even if they don't affect most users of the package or require substantial work to address.

A problem with Semver is that a jump from 101.1.2 to 102.0.0 might be a trivial upgrade, and then the jump to 103.0.0 requires rewriting half your code. With two major version numbers, that would be 1.101.1.2 to 1.102.0.0 to 2.0.0.0. That makes the difference immediately clear, and lets library authors push a 1.103.0.0 release if they really need to.

In practice, with Semver, changes like this get reflected in the package name instead of the version number. (Like maybe you go from data-frames 101.1.2 to data-frames-2 1.0.0.) But there's no consistent convention for how this works, and it always felt awkward to me, especially if the intention is that everyone migrates to the new version of the API eventually.

tikhonj··on A case against currying
The practical upside is that it makes using higher-order functions much smoother, with less distracting visual noise.

In Haskell this comes up all over the place. It's somewhat nice for "basic" cases (`map (encode UTF8) lines` vs `map (\ line -> encode UTF8 line) lines`) and, especially, for more involved examples with operators: `encode <$> readEncoding env <*> readStdin` vs, well, I don't even know what...)

You could replace the latter uses with some alternative or special syntax that covered the most common cases, like replacing monads with an effect system that used direct syntax, but that would be a lot less flexible and extensible. Libraries would not be able to define their own higher-order operations that did not fit into the effect system without incurring a lot of syntactic overhead, which would make higher-order abstractions and embedded DSLs much harder to use. The only way I can think of for recovering a similar level of expressiveness would be to have a good macro system. That might actually be a better alternative, but it has its own costs and downsides!

tikhonj··on A case against currying
In a non-strict language without side-effects, having a function with no arguments does not make sense. Haskell doesn't even let you do that.

You can write a function that takes a single throw-away argument (eg 0 vs \ () -> 0) and, while the two have some slight differences at runtime, they're so close in practice that you almost never write functions taking a () argument in Haskell. (Which is very different from OCaml!)

tikhonj··on Brute-forcing my algorithmic ignorance
They've been gamed in the "study for the test" sense for years—a sort of human over-fitting—but managers did not mind. I've heard some insist that this is a feature, not a bug. (Depending on levels of cynicism, it's either testing for diligent workers who put effort into preparation, or selecting out non-conformists who aren't willing to put up with management bullshit.)

LLMs make it easier to cheat and give managers a push to develop new, AI-aware, assessment methods, but don't really change the underlying organizational dynamics that led to these tests in the first place.

← PreviousPage 5 of 34Next →