HNHacker News
TopNewBestAskShowJobs

strongly-typed

79 karma · joined June 7, 2023

submissionscomments
strongly-typed··on Bonsai: Janestreet's UI Library
A framing from that podcast that helped me better understand the role of Bonsai is that it's really a framework for building incremental distributed state machines.
strongly-typed··on Leanstral 1.5: Proof abundance for all
Lean is such a wonderful language. So hyped by these releases.
strongly-typed··on Mistralai/Leanstral-1.5-119B-A6B
Lean is such a wonderful language. So hyped by these releases.
strongly-typed··on Ask HN: Who wants to be hired? (May 2026)
Senior software engineer, ~11 years' experience. Most recently at Lambda (AI inference infra). Before that, ~7 years at Solvuu building a data science platform for genomics research and data analysis. Looking for senior backend / devops roles — full-time.

Location: NYC (preferred) or Orlando, FL

Remote: Yes

Willing to relocate: NYC or Orlando only

Technologies: Python, TypeScript, Go, Rust, OCaml, Haskell, Lean, AWS, Kubernetes, Terraform, Envoy, Docker

Resume: available upon DM

GitHub: https://github.com/rdavison

LinkedIn: https://linkedin.com/in/richardndavison

Email: richardneildavison@gmail.com

strongly-typed··on An AI agent deleted our production database. The agent's confession is below
I’m not following. If I run an agent on ollama locally, it’s not in the cloud. I don’t see what cloud has anything to do with the argument.

As to your other point about anything you include in the prompt can and will be ignored. Yes, I agree. You could draw an analogy to how a teacher assigns an in-class reading assignment and follows it up with a reading comprehension quiz. If your mind wanders during the reading you may come to find that you will fail the quiz because “anything you include in the prompt can and will be ignored”. Therefore, the quiz result serves the purpose of an evaluation.

strongly-typed··on An AI agent deleted our production database. The agent's confession is below
No no, that’s not what I’m saying. The fact that the data is stored in files is incidental. It could be in a database, in a knowledge graph, derived from so other data Regardless of where it is, something should know to include it in the context, but only when it’s relevant.

So for instance you could start by trying to classify the prompt in some way. If you use an LLM for this, you might need to get it to return a machine parsable data format. Then your harness can pattern match on the classification and use it to enrich the prompt with additional context. The challenge would be in determining how exactly you want to go about this, balancing tradeoffs such as accuracy, cost, time, etc..

For the classification step you might begin with something like "Determine whether the following prompt is a QUESTION or a STATEMENT. Respond using only one of the two words. Prompt: $PROMPT"

You could have multiple back-and-forths like this and at each round you gain more information about the prompt, and you can use that information to determine further classifications and/or context to include.

strongly-typed··on An AI agent deleted our production database. The agent's confession is below
That's the million dollar question. Maybe have systems of agents that all validate each other's work? Maybe something needs to be done at the harness level? I don't suppose that we could realistically expect 100% accuracy, but if we take 100% to be the upper limit, we could build systems that get us closer to that ideal.
strongly-typed··on An AI agent deleted our production database. The agent's confession is below
To me it sounds like a tooling problem. OP seems to be trying to use probabilistic text systems as if they enforce rules, but rule enforcement should really live outside the model. My sense is that there was a failure to verify the agent's intent.

The tooling that invokes the model should really define some kind of guardrails. I feel like there's an analogy to be had here with the difference between an untyped program and a typed program. The typed program has external guardrails that get checked by an external system (the compiler's type checker).

strongly-typed··on 90% of Claude-linked output going to GitHub repos w <2 stars
Doesn’t matter if the recruiter doesn’t call you back because you’re not a 1000x engineer.
strongly-typed··on Zero-Cost POSIX Compliance: Encoding the Socket State Machine in Lean's Types
Feels like we're living in parallel universes. You're building Hale, and I'm building Abs XD : https://github.com/rdavison/abs
strongly-typed··on Mistral AI Releases Forge
Wait, what does NFTs have to do with RAG?
strongly-typed··on Leanstral: Open-source agent for trustworthy coding and formal proof engineering
You know you could just define the verified specs in lean and if performance is a problem, use the lean spec to extract an interface and tests for a more performant language like rust. You could at least in theory use Lean as an orchestrator of verified interfaces.
strongly-typed··on A case for Go as the best language for AI agents
Strong agree. OCaml's compiler is sofa king good at catching and preventing real bugs that the agents accidentally introduce here and there. It's the same as with humans, except the agents don't complain about the bullshit reasons humans don't like OCaml. They just crank through and produce high quality output.
strongly-typed··on Ask HN: What are you working on? (February 2026)
It's still in beta but I repackaged Descent Raytracer (a remaster of Descent (1995) made by students at Breda University) to be launchable on macs with Apple Silicon (ray tracing reqs M3+).

https://github.com/rdavison/DXX-Raytracer-ar/releases/tag/ar...

strongly-typed··on Show HN: Miditui – A terminal app/UI for MIDI composing, mixing, and playback
What a weird coincidence. Literally today I started building a fully keyboard driven MIDI sequencer in Rust. I was originally going to build it as a TUI but then decided against it because I wanted to have more control over the UI, so I'm building it as a pseudo-TUI with Bevy. But the idea is very similar, I'm approaching this project as a "vim"-like editor but for MIDI editing.
strongly-typed··on We chose OCaml to write Stategraph
Here's my take. It helps you enforce properties about your data. Didn't mean to make this response so long, but alas.

  (* 
    Quick note on notation: I will use "double quotes" when referring to _values_ and `backticks` when referring to _types_.
  *)

  (* 
    Think of this as an interface. It defines the shape of a module. Notice that the interface describes a module that defines a type called `t`, and two values: "of_string", and "to_string", and they are functions with types: `string -> t`, and `t -> string`. 
  *)
  module type ID = sig
    type t
    val of_string : string -> t
    val to_string : t -> string
  end
  
  (* 
    Below this comment is a module named "Id" that _is of type_ (in other words: it _implements the interface called_) `ID`. Due to the explicit type annotation (Id : ID), now from the perspective of anywhere else in the code, the exported interface of the module "Id" is `ID`.
  
    Modules only contain two things: `type declarations`, and "values". Values are your primitives such as 1, '<', "hello", but also composite such as (fun x -> x + 1), (Some x), f x, { foo = "bar"; baz = 42 }, and even (module Id) (yes! modules can be values too!). Type declarations tell the compiler . Anything which is a value _always_ has a type that can _usually_ be inferred.
  
    No type annotation is necessary when the compiler correctly deduces the type of your value through static analysis. For instance, in the module below, "of_string" is deduced to be of type ('a -> 'a). The ' on the symbol 'a signifies a "type variable", and it means that it can be filled in with any type. For instance (t -> t) and (string -> string), but not (t -> string) or (string -> t). For those it would have to be of type ('a -> 'b). We cannot deduce this type, however, because our implementations do nothing with their inputs besides return them. Since nothing is changed, it's always the same type. 

    Now, can you spot the pink elephant? Notice how the "ID" interface from above defines "of_string" to be of type (string -> t). How can this be possible? It's because we gave the compiler a hint when we said `type t = string`. This says that a "value" of type `t` is backed by a value of type `string`. If something type checks as `t`, it also type checks as `string`. 

    So, we could reason through and say ('a -> 'a) can be instantiated to (t -> t), but `t` is also equal to `string`, so we can mentally imagine a hypothetical intermediate type... something like ({t,string} -> {t,string}). This type and type equality is visible _inside_ the module. But when the `ID` interface was applied over the `Id` module as in (Id : ID), this has the effect of hiding the type equality (the fact that `type t = string`) because in the `ID` interface we define `t` without an equals sign: `type t`. This forces us to _choose_ a concrete type to expose externally, even though the type is less general than what the implementation sees.
  
    NOTE: OCaml doesn't use parens for function definition or application. Compare this OCaml code against its Python equivalent.
  
    > let hello_world h w = (h, w)
    > let h, w = hello_world 1 2
  
    vs.
  
    > def hello_world(h, w):
    >   return (h, w)
    > h, w = hello_world(1, 2)
  *)
  module Id : ID = struct
    type t = string
    let of_string s = s
    let to_string s = s
  end
  
  let main () =
    let s = "abc123" in
    let id = Id.of_string s in
  
    (* NOTE(type error): because the built-in "print_endline" function is of type (string -> unit) and not (Id.t -> unit) *)
    (* NOTE: if an expression returns unit, you don't need to create a let binding for it. You can simply tack a semicolon to the end of it if you need sequence another expression to follow it. *)
    print_endline id;
  
    (* okay *)
    (* STDOUT: abc123 *)
    print_endline (Id.to_string id)
  ;;
  
  main ()
You could imagine implementing this pattern of defining parsers such as "of_string", "of_bytes", "of_json", "of_int", "of_db_row", "of_request", for any piece of input data. You can think of all of these functions as static constructors in OOP... you take in some data, and produce some output value: e.g. "of_string" takes in a `string` and produces a `t`.

Now, if you have a bunch of "values" of type `t`, you know that they _only_ could have been produced by the `of_string` function, because `of_string` might be the _only_ function that ends with `-> t`. Therefore, all the values maintain the same properties enforced by the `of_string` function (similar to class constructors in OOP). With this, you can create types such as `Nonnegative.t`, `Percent.t`, `Currency.t`, `Image.t`, `ProfilePicture.t`, and parsers from another type to the newly minted type.

The compiler can help you enforce these properties by providing guardrails in the form of static compiler checks (these checks are run _before_ your code can even be compiled). If I have a value of type `Nonnegative.t`, then not only do I not need to validate that it's not negative, I also don't have to validate that it's not negative everywhere else that values of that type are used -- the validation logic is baked into the constructor. Parse, don't validate.*

strongly-typed··on We chose OCaml to write Stategraph
Imagine inheriting a project that was a joy for someone to work on instead of a slog.
strongly-typed··on Stringly Typed
my nemesis
strongly-typed··on I recreated Shazam’s algorithm with Go
This is really cool. I’ve been itching to try building this exact kind of thing as part of my bucket list.
strongly-typed··on Borgo is a statically typed language that compiles to Go
I'm not an expert in Go, and my experience is somewhat limited, however, a few years back I fixed a really subtle bug in a project that was related to the fact that errors _weren't_ being handled correctly. As a relative newbie to Go, the code in the diff[0] didn't appear to be doing anything wrong, until I added some print statements and realized that the numbers were not adding up correctly. IMO, if the returned value had been more like a Rust optional or result type, I think this issue would have either not been a bug in the first place, or it would have been easier to spot the bug.

[0]: https://github.com/semilin/genkey/commit/fafed6744555c5a81fd...

EDIT: The fact that this was a bug at all makes me fear for the rest of the code base. If this one slipped through the cracks, how can I know that the rest of the code base is correct?

strongly-typed··on TypeScript: Branded Types
The way you're describing it sounds to me like you are adding failure handling to handle cases where the programmer is intentionally misusing the thing. I would argue that in this type of situation, the error handling is not necessary because it would hide the fact that the thing is being misused.

Or perhaps I'm misunderstanding your comment. When you do `as OrgId` or `as UserId`, where do you envision those casts in ways that would require handling failures?

strongly-typed··on Descent: A classic 3-D first-person shooter (2012)
The ray traced version is absolutely phenomenal. If you've never seen it or heard of it, check it out here:

- https://github.com/BredaUniversityGames/DXX-Raytracer

- https://www.youtube.com/watch?v=2eQJKFFEc7E

strongly-typed··on Descent: A classic 3-D first-person shooter (2012)
Have you tried the ray traced version? In my opinion it's the best way to play it. https://github.com/BredaUniversityGames/DXX-Raytracer
strongly-typed··on Libgourou: A Free Implementation of Adobe's Adept DRM on ePub/PDF Files
No, it’s ròu
strongly-typed··on Colon Cancer Is Rising in Young People: What to Know About Causes and Symptoms
This post coincides with a sudden major uptick in cancer related video recommendations on my YouTube feed. I wonder if other people are seeing the same thing.
strongly-typed··on Colon Cancer Is Rising in Young People: What to Know About Causes and Symptoms
I had to search for this post to find it after it suddenly disappeared.
strongly-typed··on Ask HN: Tips to get started on my own server
Curious why you say Ubuntu is not the best. What would you consider better?
strongly-typed··on Show HN: Godspeed is a fast, 100% keyboard oriented todo app for Mac
Can the keyboard shortcuts be modified? One of my personal pain points with other task managers such as Asana is that I can't remap the keyboard shortcuts. This is very important to me since I use alternative keyboard layouts such as Dvorak, Colemak, MTGAP, Graphite, and have continued to experiment with many others.
strongly-typed··on Show HN: Phrasing – learn every language, to any level
I recognize this comment has little to do with this post, but as a fellow obscure language aficionado, I just wanted to recommend probably most obscure language I’m legitimately interested in called Modern Indo European. It’s a conlang that takes the reconstructed Proto Indo European and fills in the missing parts to turn it into a usable language.

That’s all, just wanted to give them a shoutout.

———

I’m also an avid language learner myself, and I feel like what has worked for me has been to study a wide range of words with Anki, but then also try to use them in conversation. Often times I wouldn’t remember the words I studied, but it would be “on the tip of my tongue”. Then the speaker would fill in the word, and from then on I would never forget the word.

Finally, I think you guys are also headed in the right direction with the idea of “expression”, because I feel it is often difficult to map words 1 to 1 with a language you already know. Oftentimes the expression will be said differently “my name is” vs “to me the name is”. The idea is to capture a unit of meaning in a set expression and to be able to combine the expressions to communicate.

strongly-typed··on Gameboy music and sound archive for MIDI
I contributed a few midis to that site back in the day. Chrono Cross band arrangement of Scar of Time, a FFX battle theme, a Secret of Mana “into the thick of it”, and an organ piece from one the Ys games.

This site is one of the pillars grounding me to the reality that once was the internet.

Page 1 of 2Next →