Fork me on GitHub
#off-topic
<
2023-02-05
>
orestis17:02:05

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.

👀 2
skylize18:02:11

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.

Noah Bogart19:02:27

Another lexi-lambda follower on Twitter? lol

Noah Bogart19:02:47

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.

Ben Sless19:02:05

You just need to read it very slowly and keep several pages open at the same time

Ben Sless19:02:57

It's not math, it's logic, using logos helps

Ben Sless19:02:00

try reading it out

Noah Bogart19:02:52

If only i knew how to read

Ben Sless19:02:34

This is the most important part

Ben Sless19:02:09

The over/under lines are pattern matching production rules "If you see something that looks like this, expand to that"

Ben Sless19:02:13

basically, functions!

Ben Sless19:02:16

It's just that the notation is very terse and dense, especially in this paper 😞

Noah Bogart19:02:28

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.

Ben Sless19:02:50

You actually could do that. All those productions should map pretty directly to core.match or meander

dgb2321:02:56

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?

dgb2322:02:16

Thanks, that's the one!

Sam Ritchie22:02:55

And of course we have a full port into Clojure of the library he uses for that talk… https://github.com/sicmutils/sicmutils

🎉 6
mauricio.szabo03:02:45

@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...

slipset07:02:54

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.

dgb2311:02:48

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.

lilactown16:02:10

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

Noah Bogart16:02:27

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.

dgb2317:02:24

TS isn't known for its good error messages either though. This can be painful for beginners especially!