This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-05
Channels
- # babashka (13)
- # beginners (146)
- # biff (3)
- # calva (18)
- # cider (6)
- # clerk (29)
- # clj-commons (1)
- # clj-kondo (75)
- # clojure (42)
- # clojure-belgium (2)
- # clojure-europe (13)
- # clr (9)
- # conjure (2)
- # datomic (2)
- # gratitude (3)
- # hyperfiddle (3)
- # off-topic (26)
- # reitit (5)
- # releases (1)
- # shadow-cljs (2)
- # timbre (3)
https://arxiv.org/pdf/1708.08021.pdf I’m going to drop this here so people smarter than me can read it and comment :) It’s a paper about Flow, the JS type checker by Facebook. It includes scary math-like notation. The comment I read (which I now can’t find) was that Flow was/is much better than TypeScript, but TS won because of better autocomplete.
The Flow binary was also really slow, even for just a single file. Maybe there was room to optimize? As it was really hurt their sales pitch when when held up against TS.
Another lexi-lambda follower on Twitter? lol
This paper is very cool. I wish I knew more about the math, makes me want to try to implement something like it for Clojure.
If only i knew how to read
The over/under lines are pattern matching production rules "If you see something that looks like this, expand to that"
Haha yeah, it’s funny now changing the notation from math/logic symbols to a c-like or lisp-like syntax reveals the meaning to me crystal clear.
You actually could do that. All those productions should map pretty directly to core.match or meander
What was that tech-talk about how Lisp is a better notation for mathematics? It has several examples from math, physics and EE I think?
@U01EFUL1A8M Sussman had a talk like that, https://www.youtube.com/watch?v=iqlxsSrd-M4
And of course we have a full port into Clojure of the library he uses for that talk… https://github.com/sicmutils/sicmutils
Including the Einstein field equations! https://github.com/sicmutils/sicmutils/blob/main/test/sicmutils/fdg/einstein_test.cljc
@U7PBP4UVA we tried to use Flow in a project once. It was quite a nightmare. Some things worked really well, some didn't, some were weird... Then, some years later, some developer from Facebook told that Flow's feature were basically made to solve problems on Facebook's code. That explained a lot for me, actually...
It’s interesting if TS won because of better autocompletion. Anecdata (not me) tells me that autocompletion is the most important feature of TS. And to that extent, I have reasonable autocompletion in CIDER, even though it’s not driven by types. Also, with fly-check and clj-kondo, I get a bunch of squigglies, even without types.
For me the most useful things about TS is to quickly see "Where am I making assumptions about the DOM?" or "Did I handle all the cases here?". Whenever I do Autocompletion Driven Development, I count that as a hint that I'm either not really understanding what I'm doing at this moment, or that the interface is too specific, verbose or obscure.
the vibes i've always gotten of flow vs TS is that flow was more sound/had better theory, but worse DX. Fundamentally rooted in how much dollars their respective corp was willing to pour into development and community support, AFAICT
I'm chatting with a friend from a previous job who moved that job's codebase from Flow to TS and he said basically the same thing, @U4YGF4NGM. He said that when they were using Flow, soundness mattered much less than poor/cryptic errors and bad integration with the various editors everyone on the team used.