Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
asQuirreL
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
asQuirreL
20d ago
Okay, I see. The issue you are running into is specifically mentioned in this article about how Rust currently does lifetime extension: https://smallcultfollowing.com/babysteps/blog/2023/03/15/tem...
2.
▲
by
asQuirreL
20d ago
Rust already supports the kind of behaviour you are describing for borrows, because of non-lexical lifetimes. Code like the following now compiles: fn main() { let mut x = 42; let y = &x; println!("{y}"
3.
▲
by
asQuirreL
28d ago
That's the definition of a chaotic system (small change in initial conditions results in large, seemingly -- but not actually -- random changes in output), but it's still deterministic (same input results in same output).
4.
▲
by
asQuirreL
1mo ago
It does, yes. It's a reasonable trade-off for me becaues it's rare that I need to do that and if I do, I use [digraph]s in (neo)vim. The alternatives are usually more disruptive for me, (using Cmd as Meta shadows way more commonly
5.
▲
by
asQuirreL
1mo ago
These are all conventions and you can change them, but I'm used to Meta = Opt and Super = Cmd on macOS.
6.
▲
by
asQuirreL
1mo ago
The first analogy that comes to mind, growing out of "harness", is more like harness = harness, model = horse (rather than harness as in climbing harness). I guess you could say that tokens = hay, and agent = horse and cart, from
7.
▲
by
asQuirreL
2mo ago
Fairly sure it would predate even that, and go all the way to lambda calculus, and predicate logic before that, and that's where my knowledge stops and somebody else can tell us where the current conventions around variables in logic a
8.
▲
by
asQuirreL
3mo ago
> on the surface looks like an ORM but is in fact a set of clever functions that write SQL Honest question -- what's the difference? Usually the problems with ORMs stem from the fact that they are exactly clever functions that write
9.
▲
by
asQuirreL
5mo ago
A carry lookahead adder makes your circuit depth logarithmic in the width of the inputs vs linear for a ripple carry adder, but that is still asymptotically worse than XORs constant depth. (But this does not discount the fact that basically
10.
▲
by
asQuirreL
7mo ago
Post can be summarised quite succinctly: Everything was slow because sorting was taking a lot of time. Sorting was slow because its comparator was taking ~6 read locks on every comparison, and was cloning large structures to avoid holding t
11.
▲
by
asQuirreL
8mo ago
It can be (cross-)compiled on whatever architectures the Zig compiler is available for, but the source contains inline x86 assembly, so you're not going to be able to build this for ARM or RISC-V.
12.
▲
by
asQuirreL
9mo ago
This sounds like advice for how to be promoted to a specific level -- the first point where awareness of things beyond yourself is required (somewhere around the Senior or Staff level for ICs, depending on your company). Generally everyone
13.
▲
by
asQuirreL
1y ago
I think what's more important than the character count is the fact that you can add #p with two key strokes. Inserting parentheses requires moving your cursor around or invoking some shortcut in your editor if you use paredit, vim-surr
14.
▲
by
asQuirreL
1y ago
I've seen lots of takes that this move is stupid because models don't have feelings, or that Anthropic is anthropomorphising models by doing this (although to be fair ...it's in their name). I thought the same, but I think it
15.
▲
by
asQuirreL
1y ago
I would tend to use Janet for scripts, especially ones that need to talk to the outside world because of its fast startup and batteries included standard library (particularly for messing with JSON, making HTTPS requests, parsing with PEGs,
16.
▲
by
asQuirreL
1y ago
This is a false dichotomy -- regexes and parsers both have their place, even when solving the same problem. The troubles start when you try and solve the whole thing in one step, using just regular expressions, or parsers. Regular expressio
17.
▲
by
asQuirreL
2y ago
One reason I can think of is that the database needs to maintain atomicity and isolate effects of any given operation (the A and I in ACID). By manually batching the deletes, you are telling the database that the whole operation does not ne
18.
▲
by
asQuirreL
2y ago
I also accept that when the job market tightens you are more likely to encounter worse interviews and worse interviewees because that is what is left in the pool. The problem is when the market widens again and you look at every interview o
19.
▲
by
asQuirreL
2y ago
The comments to this article are on the whole super depressing and haven't really matched my experience (again, on the whole), so I wanted to offer some dissenting opinions: I don't think it's true that interviewers are in ge
20.
▲
by
asQuirreL
3y ago
`cond*` reads more like `do` notation in Haskell than `match`.
21.
▲
by
asQuirreL
3y ago
There's no great mystery here, if you look at the internal function that's being called, it contains a TODO explaining that the code is unnecessarily quadratic and needs to be fixed: https://github.com/zed-industri
22.
▲
by
asQuirreL
3y ago
A couple of other points that struck me as different from my experience, and maybe more a function of where this person is working rather than some fundamental difference between the roles: The idea that your word is taken more seriously as
23.
▲
by
asQuirreL
3y ago
This seems reminiscent of Session Types to me: https://en.wikipedia.org/wiki/Session_type I think one difference is that session types capture which state a process/co-routine is in after receiving a sequence of m
24.
▲
by
asQuirreL
3y ago
Well yes, that definitely changes the game!!
25.
▲
by
asQuirreL
3y ago
How big are we talking? The benchmarks I tried the two numbers in your example, but yes, if you go above 2^53, then you will run into trouble with the naive solution, but that is for correctness reasons, not performance reasons.
26.
▲
by
asQuirreL
3y ago
You're right -- I got nerd-sniped by this, and ended up rewriting the benchmarks in Rust. The compiler successfully inlines the square root operation, simplifies the exponentiation into multiplication and then does common-subexpression
27.
▲
by
asQuirreL
3y ago
You joke but in Rust all of versions 1 to 4 would probably have compiled to the same machine code because LLVM would use Loop Invariant Code Motion and Induction Variable Analysis to perform the same optimisations that are being done by han
28.
▲
by
asQuirreL
3y ago
Well WhatsApp and Telegram are free, so it's hard to make that argument there, but my understanding was that the problematic behaviour was for Apple to make the performance of those devices otherwise worse without disclosing the reason
29.
▲
by
asQuirreL
3y ago
But going in the opposite direction, could you not also implement arbitrary effects using conditions? (Or delimited continuations in schemes)
30.
▲
by
asQuirreL
3y ago
I hadn't heard of Common Lisp Conditions before reading this thread, but I looked them up in response to it, and I have to ask -- what is the fundamental difference? Granted Common Lisp is not statically typed and the type system suppo
More ›