So basically adding machine readable type-at-point queries as an lsp extension so Pylance and Pywright can be separated? The 'result types'format is super python specific, like not having a for all binder. I don't think…
I'd guess a lot of government agencies (globally) will end up with their own compute clusters hosting open source models. Much cheaper at that scale and much less hassle than defining which critical data cannot be fed…
Having pair programmed over some truly awful and locked down connections before, dropped frames are infinitely better than blurred frames which make text unreadable whenever the mouse is moved. But 40mbps seems an awful…
Intellij also has structural search and replace, where you can do full subgraph isomorphism search in the code and with patterns like $x$.foo($args$) Where you add filters like x's type is a subclass of some class, and…
I think WasmGC is very hard to make work with laziness. A lazy value is always a closure on the heap. If an expression might be unused, throw a closure which computes it on the heap If the value is actually needed,…
Sometimes keeping a fixed shape for the variable context across the computation can make it easier to reason about invariants, though. Like, if you have a constraint is_even(x) that's really easy to check in your head…
Interval arithmetic is only a constant factor slower but may simplify at every step. For every operation over numbers there is a unique most precise equivalent op over intervals, because there's a Galois connection. But…
In my head the two dimensions are tail Vs non-tail jumps, and explicit Vs implicit scope passing. The most interesting case is implicit scope+non-tail recursion, usually this requires you to capture the variable context…
Forgot to mention: In the twee style, the int for the function id contains metadata (is it a unification variable or constant name? how many args does it take?). That way f1(f3(f5(), f7())) would be serialised as…
Twee (an equational theorem prover in Haskell used by quickspec) has an interesting take on this. Terms are slices of arrays, but you get a normal interface including pattern matching via synonyms. It can also be nice…
This behaviour was introduced in 3.6 (and made part of the spec in 3.7 iirc) From the python 3.6 change log: New dict implementation¶ The dict type now uses a “compact” representation based on a proposal by Raymond…
Either hackernews or autocorrect ate the p, it was supposed to be \p{L} which is a unicode character class. As the other comment mentioned pcre-compatible Regex are a standard, though the pcre spec isn't super readable.…
For Regex I like lens-regex-pcre > import Control.Regex.Lens.Text > "Foo, bar" ^.. [regex|\p{L}+|] . match ["Foo", "bar"] > "Foo, bar" & [regex|\p{L}+|] . ix 1 . match %~ T.intersperse '-' . T.toUpper "Foo, B-A-R" For…
Love this algorithm. It feels like magic, and then it feels obvious and basically like binary search. Similar to the algorithm to parallelize the merge step of merge sort. Split the two sorted sequences into four…
To me the big winning is that you don't have to memoize transitively. Occasionally someone asks me for help to optimize some react code, and then the dependency array contains some object/callback that has a dependency…
Computer-Checked proofs are one area where ai could be really useful fairly soon. Though it may be closer to neural networks in chess engines than full llm's. You already use tons of solvers because proving everything…
Orm's do a lot for you if you require related data from multiple tables: - Eager loading the data efficiently is annoying, most ORM's can do batched select-in loading now - Detecting changes with the DB is annoying if…
Often, the concrete problems we are interested in have some internal structure that make them easier to solve in practice. Solving Boolean formulas is NP-complete but we routinely solve problems with millions of…
TikTok did use ip tracking of reporters working on a story to try to find whistleblowers. According to TikTok that was a misguided employee who was let go shortly after. Though they are hardly alone in the 'misguided…
Borrow checking is a good fit for datalog. And trait resolution is Prolog, though Rusty's backtracking makes it a worse fit for datalog than typeclasses in Haskell.
The optics library is a bit stricter, using separate types with implicit conversions to give better type errors, and the subtyping diagram is here https://hackage.haskell.org/package/optics-0.4.2/docs/Optics... The lens…
Some advanced Haskell features make this hard because constraints like 'a is a number' are solved separately. For instance data Tag a where IsInt :: Tag Int IsDouble :: Tag Double someNum :: Num a => a someNum = 3 * 4 +…
Inventing a new language and a new query engine and a new storage engine at the same time, competitive with the state of the art, is maybe just too much to be feasible. There were multiple optimizing compilers which can…
I think for clang that's the purpose of -fsanitize=undefined and -fsanitize=nullability. If some undefined behavior isn't caught by the sanitizer, clang doesn't use it for optimization.
To be fair, that's a foot gun in haskell as well. Using lists non-linearly like this in haskell gives you the correct results but at a 10x performance tax or worse because it can't optimize into a loop anymore.
So basically adding machine readable type-at-point queries as an lsp extension so Pylance and Pywright can be separated? The 'result types'format is super python specific, like not having a for all binder. I don't think…
I'd guess a lot of government agencies (globally) will end up with their own compute clusters hosting open source models. Much cheaper at that scale and much less hassle than defining which critical data cannot be fed…
Having pair programmed over some truly awful and locked down connections before, dropped frames are infinitely better than blurred frames which make text unreadable whenever the mouse is moved. But 40mbps seems an awful…
Intellij also has structural search and replace, where you can do full subgraph isomorphism search in the code and with patterns like $x$.foo($args$) Where you add filters like x's type is a subclass of some class, and…
I think WasmGC is very hard to make work with laziness. A lazy value is always a closure on the heap. If an expression might be unused, throw a closure which computes it on the heap If the value is actually needed,…
Sometimes keeping a fixed shape for the variable context across the computation can make it easier to reason about invariants, though. Like, if you have a constraint is_even(x) that's really easy to check in your head…
Interval arithmetic is only a constant factor slower but may simplify at every step. For every operation over numbers there is a unique most precise equivalent op over intervals, because there's a Galois connection. But…
In my head the two dimensions are tail Vs non-tail jumps, and explicit Vs implicit scope passing. The most interesting case is implicit scope+non-tail recursion, usually this requires you to capture the variable context…
Forgot to mention: In the twee style, the int for the function id contains metadata (is it a unification variable or constant name? how many args does it take?). That way f1(f3(f5(), f7())) would be serialised as…
Twee (an equational theorem prover in Haskell used by quickspec) has an interesting take on this. Terms are slices of arrays, but you get a normal interface including pattern matching via synonyms. It can also be nice…
This behaviour was introduced in 3.6 (and made part of the spec in 3.7 iirc) From the python 3.6 change log: New dict implementation¶ The dict type now uses a “compact” representation based on a proposal by Raymond…
Either hackernews or autocorrect ate the p, it was supposed to be \p{L} which is a unicode character class. As the other comment mentioned pcre-compatible Regex are a standard, though the pcre spec isn't super readable.…
For Regex I like lens-regex-pcre > import Control.Regex.Lens.Text > "Foo, bar" ^.. [regex|\p{L}+|] . match ["Foo", "bar"] > "Foo, bar" & [regex|\p{L}+|] . ix 1 . match %~ T.intersperse '-' . T.toUpper "Foo, B-A-R" For…
Love this algorithm. It feels like magic, and then it feels obvious and basically like binary search. Similar to the algorithm to parallelize the merge step of merge sort. Split the two sorted sequences into four…
To me the big winning is that you don't have to memoize transitively. Occasionally someone asks me for help to optimize some react code, and then the dependency array contains some object/callback that has a dependency…
Computer-Checked proofs are one area where ai could be really useful fairly soon. Though it may be closer to neural networks in chess engines than full llm's. You already use tons of solvers because proving everything…
Orm's do a lot for you if you require related data from multiple tables: - Eager loading the data efficiently is annoying, most ORM's can do batched select-in loading now - Detecting changes with the DB is annoying if…
Often, the concrete problems we are interested in have some internal structure that make them easier to solve in practice. Solving Boolean formulas is NP-complete but we routinely solve problems with millions of…
TikTok did use ip tracking of reporters working on a story to try to find whistleblowers. According to TikTok that was a misguided employee who was let go shortly after. Though they are hardly alone in the 'misguided…
Borrow checking is a good fit for datalog. And trait resolution is Prolog, though Rusty's backtracking makes it a worse fit for datalog than typeclasses in Haskell.
The optics library is a bit stricter, using separate types with implicit conversions to give better type errors, and the subtyping diagram is here https://hackage.haskell.org/package/optics-0.4.2/docs/Optics... The lens…
Some advanced Haskell features make this hard because constraints like 'a is a number' are solved separately. For instance data Tag a where IsInt :: Tag Int IsDouble :: Tag Double someNum :: Num a => a someNum = 3 * 4 +…
Inventing a new language and a new query engine and a new storage engine at the same time, competitive with the state of the art, is maybe just too much to be feasible. There were multiple optimizing compilers which can…
I think for clang that's the purpose of -fsanitize=undefined and -fsanitize=nullability. If some undefined behavior isn't caught by the sanitizer, clang doesn't use it for optimization.
To be fair, that's a foot gun in haskell as well. Using lists non-linearly like this in haskell gives you the correct results but at a 10x performance tax or worse because it can't optimize into a loop anymore.