Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Hyke, a programming language that runs on TypeScript's type system (github.com/davidaf3)
38 points by davidaf3 on June 30, 2023 | hide | past | favorite
This absurd project started when I read a couple of blog posts that got very popular around here about solving the N queens puzzle using only Haskell's type system and TypeScript's type system. I figured I could implement Peano arithmetic using only TypeScript's type system. Turns out this have been done several times before, but I did it anyway.

While working on it, I realized that you could emulate functions with conditional recursive types, writing them in a way that strongly resembles the equations that can be found in some functional programming languages. So I thought I could write a transpiler that would transform equations written in a more terse language into conditional recursive types with the added boilerplate. And that was when hyke was born.

If you want, you can try it in your browser at the playground that is linked in the GitHub repo.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: