Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tijsvd
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
tijsvd
6mo ago
From what I understand in the follow up: postgres uses shared memory for buffers. This shared memory is read by a new connection while locked. In postgres, connections are handled with a process fork, not a new thread. If such a fork first
2.
▲
by
tijsvd
1y ago
TLDR is that the full correct explanation is not simple. The Wikipedia article on lift makes a good effort. https://en.m.wikipedia.org/wiki/Lift_(force)
3.
▲
by
tijsvd
2y ago
Of course you don't need a calendar library to measure 30 seconds. That's not the use case. Try adding one year to a timestamp because you're tracking someone's birthday. Or add one week because of running a backup sched
4.
▲
by
tijsvd
3y ago
Everything that's visible to the compiler is subject to automatic inlining. That is all code in the current crate (compilation unit), all concrete instantiations of generics (regardless where defined), and all functions marked inline (
5.
▲
by
tijsvd
3y ago
> Get this, say a project takes a year to complete. The concept is saying a 10x engineer can do this in about month. The true 10x engineer looks at the project, sees the inherent needless complexity, goes back to the sponsor and uses his
6.
▲
by
tijsvd
3y ago
Would it not be feasible to turn electron inside out, and have chromium as a library, with bindings for various languages?
7.
▲
by
tijsvd
4y ago
Never combine new tech with new functionality. If you want to learn new tech, use it to rewrite an old project that was due anyway. If you want to build new functionality, use tech that you know. This has nothing to do with Rust. I've
8.
▲
by
tijsvd
4y ago
You get the same with e.g. tokio::spawn, which runs the future concurrently and returns something that you can await and get the future's output. Or you can forget that something and the future will still run to completion. Directly aw
9.
▲
by
tijsvd
4y ago
Then the app relies purely on the ssl cert of the server, for mitm mitigation. This way, the qr can contain a signed reply to the code, which adds a layer.
10.
▲
by
tijsvd
4y ago
Apart from CGAT being a 2-bit alphabet, changing the alphabet does not change the information density. Expect that this kind of transformation has no impact on the compressed result, with most general purpose algorithms.
11.
▲
by
tijsvd
4y ago
First, this is about data access and not programming. Second, that quote is from a time when compiler optimizations did not exist, and the programmer was supposed to use all kinds of clever tricks to speed up code (what today you get for fr
12.
▲
by
tijsvd
4y ago
It's the field of information theory. https://en.m.wikipedia.org/wiki/Information_theory
13.
▲
by
tijsvd
4y ago
Take incrementing int32. Extend to 64 bits. Multiply by large prime number (e.g. fnv32 prime). Mod 1 million. Add 1 million. End up with random looking, 7 digits, nicely sequenced, 32 bit integers. Write an exhaustive test to verify. When n
14.
▲
by
tijsvd
4y ago
What do you use then that has the same order as rows becoming visible? We use an auto-increment id, and lock inserts on the related account (which always limits the scope of the query). The only other (stateless) way I can think of is to so
15.
▲
by
tijsvd
5y ago
The callback is really hard to implement without allocating memory for each wakeup. The poll mechanism can simply leave the task in place. I suspect the poll thing is also easier to generate.
16.
▲
by
tijsvd
5y ago
I was generally OK with the speed of Prost, and making it faster was not the goal really. The goal was to make the generated code more Rust-friendly. It is probably faster due to straightforward decoding, no tag switch. At the cost of not b
17.
▲
Show HN: fcode is a binary rust-serde format that supports schema evolution
(crates.io)
14 points
by
tijsvd
5y ago
|
2 comments
18.
▲
by
tijsvd
5y ago
Thanks for that link. The article links to another article with more background: https://blog.cloudflare.com/lavarand-in-production-the-nitty... Which answers all your questions. Tl;dr: the lava feed is only an additional e
19.
▲
by
tijsvd
5y ago
Does Rust's `:b` formatter always print leading zeroes? Otherwise the code will not only be inefficient, but wrong for half the input space. Or perhaps that was the original goal, to find the most significant one and the 41 bits that t
20.
▲
by
tijsvd
5y ago
IIRC (many years since I used windows), the New context menu on windows is fed from a directory with templates, and you can add to it.
21.
▲
by
tijsvd
5y ago
With 2 children, there are 4 configurations of equal probability. The one with 1 boy 1 girl occurs twice. Take away the 2 girl case, then 2 boys is 1 in 3.
22.
▲
by
tijsvd
6y ago
Does that mean that every nested coroutine (async call) needs another heap allocation, or just the top level one?
23.
▲
by
tijsvd
6y ago
> And from what I've read they are better than Rusts coroutines for this use case Reference please? In what sense are they better, and what makes them better?
24.
▲
by
tijsvd
6y ago
Nah, it doesn't matter if you do (prev + 1) % len, or (prev % len) + 1. Hash tables matter more though.
25.
▲
by
tijsvd
6y ago
No I don't work for Blizzard. When I did this, we were using a very fast custom wire format, but entirely hand-coded. Say flatbuffers without the code generation part. And having massive trouble with schema evolution. Another group had
26.
▲
by
tijsvd
6y ago
Yes, this comes back to use case. So it's great that there are different implementations for different use cases. It helps that the wire format is simple and well-documented.
27.
▲
by
tijsvd
6y ago
Sure that makes some sense. But it's somewhat ugly as well, from an architecture point of view. Because that argument translates to anything else you might want to do with these objects. In past libraries for C++ I've tried to pre
28.
▲
by
tijsvd
6y ago
> No zero-copy for networking? Forced internal heap allocations with only this arena feature after a decade? Sorry no. Protobufs isn't useful for serious network applications. That's a bit harsh. Protobufs deliver smaller wire
29.
▲
by
tijsvd
6y ago
It didn't exist yet. We were evolving from simple raw messages with all sorts of problems. The alternative was something custom again, with better support for schema evolution, but pb was convenient due to existing implementations in P
30.
▲
by
tijsvd
6y ago
But then all that must come with bookkeeping, which brings its own cost. Take a look at an implementation like Prost, for Rust. It's very similar to what I did (10 years ago by now). Everything is just inline, except when messages can
More ›