{"by":"davidaf3","descendants":0,"id":36535693,"score":38,"text":"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&#x27;s type system and TypeScript&#x27;s type system. I figured I could implement Peano arithmetic using only TypeScript&#x27;s type system. Turns out this have been done several times before, but I did it anyway.<p>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.<p>If you want, you can try it in your browser at the playground that is linked in the GitHub repo.","time":1688135912,"title":"Show HN: Hyke, a programming language that runs on TypeScript's type system","type":"story","url":"https://github.com/davidaf3/hyke"}