Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Tarean
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
Tarean
29d ago
If your prognosis is true I'm not sure it's fully positive. Inference without batching is just massive less efficient, even if local hardware can be more energy efficient per operation and can skip out on cooling. Open weights, ob
2.
▲
by
Tarean
2mo ago
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 if you always gate feedback
3.
▲
by
Tarean
9mo ago
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 lot for 1080p 60fps.
4.
▲
by
Tarean
9mo ago
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 args st
5.
▲
by
Tarean
11mo ago
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, invoke the closure. Opt
6.
▲
by
Tarean
11mo ago
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 with some informa
7.
▲
by
Tarean
11mo ago
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 a targeted atta
8.
▲
by
Tarean
1y ago
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 just because th
9.
▲
by
Tarean
2y ago
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 in mutable objects&#
10.
▲
by
Tarean
2y ago
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 something like [1,3,5,7], w
11.
▲
by
Tarean
2y ago
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 to use phantom types
12.
▲
by
Tarean
2y ago
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 compiler flags require
13.
▲
by
Tarean
2y ago
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 Hettinger which was first
14.
▲
by
Tarean
2y ago
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. There are some
15.
▲
by
Tarean
2y ago
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 %
16.
▲
by
Tarean
2y ago
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 other data like ints. Fo
17.
▲
by
Tarean
2y ago
But that stores all elements into memory?
18.
▲
by
Tarean
2y ago
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 sequences so that `merge(
19.
▲
by
Tarean
2y ago
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 which has a
20.
▲
by
Tarean
2y ago
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 you almost certainly
21.
▲
by
Tarean
2y ago
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 by hand is mind
22.
▲
by
Tarean
2y ago
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 lambdas, so you
23.
▲
by
Tarean
2y ago
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 you update m
24.
▲
by
Tarean
2y ago
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 B.foreign_key in (...all A id
25.
▲
by
Tarean
3y ago
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 variables. ILP (and sat) sol
26.
▲
by
Tarean
4y ago
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 employees' de
27.
▲
by
Tarean
4y ago
I was wondering if they are planning to use some datalog-style compilation strategy, where all choices are dumped into b-trees and nesting is replaced by indexed tables which are joined. But I think mixing this with unification vars is sort
28.
▲
by
Tarean
4y ago
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.
29.
▲
by
Tarean
4y ago
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..
30.
▲
by
Tarean
5y ago
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 =>
More ›