Fork me on GitHub
#announcements
<
2023-01-13
>
moe08:01:11

Not much of announcement, but I think I mostly finished up this implementation of Algorithm W for Hindley-Milner type inference https://github.com/moea/types/blob/main/src/types/w.clj. I think it's much easier to follow (and much shorter) than the other implementations I've seen. I'll turn it into a blog post once I've added some pretty printing and tested it a bit more.

🎉 28
Noah Bogart15:01:34

This is so cool.

Noah Bogart15:01:13

@U055XFK8V seems like something you'd be interested in

jaide06:01:23

Having a bit of trouble following what this project does. Could you please explain it?

moe07:01:38

Sure. It takes symbolic expressions representing primitive constructs in the lambda calculus + polymorphic let (or "Hindley-Milner" for short) and infers the types of them using the algorithm outlined in this paper https://www.cs.uu.nl/research/techreps/repo/CS-2002/2002-031.pdf — Hindley-Milner is the same type system used by the ML family, a subset of the one used by Haskell, etc. — and basically the foundation of all type inference algorithms, if not most type systems

dvingo02:01:09

I had an interesting thought, not sure if this is possible, but could you use this sort of thing to add some static typing to clojure via clj-kondo?

dvingo02:01:02

specifically to enhance how it is used with malli https://github.com/metosin/malli#clj-kondo

Eddie00:02:57

Cool stuff! I have been working towards something along the lines of what @U051V5LLP proposes for a while, but there are tricky parts associated with Clojure's data structures being more expressive than typed collections. https://github.com/erp12/schema-inference

Alex Miller (Clojure team)23:01:44

https://github.com/clojure/tools.build v0.9.1 27ff8a4 • uber - https://clojure.atlassian.net/browse/TBUILD-35 Fix error on exploding jar with / entry • uber - https://clojure.atlassian.net/browse/TBUILD-30 Apply exclusions and conflict handlers for local and git libs

🎉 22
henrik08:01:49

My build fails with Too many open files at clojure.tools.build.util.file$collect_files when using this version.

Alex Miller (Clojure team)14:01:22

Thanks, I’ll take a look

👍 2
Alex Miller (Clojure team)01:01:49

@U06B8J0AJ would be great if you could test with 0.9.2!

👍 2
henrik07:01:11

All good! 👌