Hacker Newsnew | past | comments | ask | show | jobs | submit | robbieo's commentslogin

Thanks! I believe the actual code is handling this correctly but would love to read that paper – you don't happen to have another link, do you? https://www.escholar.manchester.ac.uk/ seems to be down for me.


Oh, I'm sorry. That should be Mellor 2014, https://pure.manchester.ac.uk/ws/portalfiles/portal/54552919...

(If you are curious, I was playing around with best-arm finding algorithms for taste-testing: https://gwern.net/water )


This is great (this = both the paper and your post) but I can't believe you never made a tea-test pun


(Tea puns are generally too easy.)


Dozens of delightful and understandable game theory problems and optimal solvers.


There are a few gotchas, but I've introduced them at both Vanta and Q Bio and have been thrilled with the productivity increase at both places. As long as you stay on top of keeping prebuilds green, you know that everything just works for all of your engineers.


Ugh, getting rate limited by Spotify – even though this is just using public preview URLs. I'll put up a notice until I find a workaround. Thanks!


1) sure, but I figured I might as well implement all 4 operations for posterity. The `divideBy2` type would be not-that-dissimilar from the Even type. 2) Ha, if only! If that were true then we could prove all sorts of number-theoretic things by rewriting them in "types." Part of the point of this post is there is no magical power of types; they're just another programming language.


Thanks for replying!

2) I didn't mean it would guarantee a proof, I just meant it would attempt a proof up to the limit of its type checker's ability to prove type validity.


Ah, sure, you could use a mapped type – but given that the actual program starts failing around 3 I don't see a ton of utility.


This library allows you to write code that generates Typescript type/JSON schema pairs <T, s> such that

1. Any type that s can validate is assignable to T

2. As few objects as possible that are assignable to T cannot be validated by s.

This allows you to write JSON schemas and use the corresponding Typescript type without having to resort to code generation, maintaining two types side-by-side, or re-writing a whole JSON schema validator in something like io-ts.

Hope it's useful to someone!


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

Search: