Java can also have 15 minute cold compiles on large projects if you kill all caches. It's less bad on smaller codebases because you don't have to recompile dependencies if you target a bytecode vm, but you just aren't…
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…
I'm pretty sure recall was specifically a selling point for laptops with ai chips which could do the processing locally and reasonably efficiently? Though storing the data locally still could make getting compromised by…
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…
As of python 3.6 you can nest fstrings. Not all formatters and highlighters have caught up, though. Which is fun, because correct highlighting depends on language version. Haskell has similar problems where different…
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…
Both strategies start from roots (e.g. the stack) and then transitively chase pointers. Any memory reachable this way is live. To do this chasing precisely you need some metadata, saying which fields are pointers vs…
But that stores all elements into memory?
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…
The big problem is that - memoization sometimes crucial for performance. - passing objects and functions around is common. - you cannot compare objects and functions for semantic equality If you wrote larger react apps…
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…
Lambdas have two hidden features: Variable capture lets you access variables/values from outer scopes, and statements/calling other functions lets you do control flow. Monads are types that let you build chains of…
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…
Ideally a query could return multiple cte tables. A lot of ORMs default eager loading to select-in loading with multiple queries because it performs best. First A is loaded and then the B query has a `WHERE…
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…
Java can also have 15 minute cold compiles on large projects if you kill all caches. It's less bad on smaller codebases because you don't have to recompile dependencies if you target a bytecode vm, but you just aren't…
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…
I'm pretty sure recall was specifically a selling point for laptops with ai chips which could do the processing locally and reasonably efficiently? Though storing the data locally still could make getting compromised by…
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…
As of python 3.6 you can nest fstrings. Not all formatters and highlighters have caught up, though. Which is fun, because correct highlighting depends on language version. Haskell has similar problems where different…
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…
Both strategies start from roots (e.g. the stack) and then transitively chase pointers. Any memory reachable this way is live. To do this chasing precisely you need some metadata, saying which fields are pointers vs…
But that stores all elements into memory?
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…
The big problem is that - memoization sometimes crucial for performance. - passing objects and functions around is common. - you cannot compare objects and functions for semantic equality If you wrote larger react apps…
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…
Lambdas have two hidden features: Variable capture lets you access variables/values from outer scopes, and statements/calling other functions lets you do control flow. Monads are types that let you build chains of…
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…
Ideally a query could return multiple cte tables. A lot of ORMs default eager loading to select-in loading with multiple queries because it performs best. First A is loaded and then the B query has a `WHERE…
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…