Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
OskarS
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
34 ms
·
271.
▲
by
OskarS
3y ago
I think the original point was to make a typesafe printf that's still reasonably efficient without creating a bunch of small temporary strings. Like, if you printf like this: printf("Number %d, String %s", n, s); but
272.
▲
by
OskarS
3y ago
Really, any code? I thought they were adding fine-grained locks to the python objects themselves? Are you saying that if I share a python list between two threads and modify it on one and read it on the other, I can segfault python?
273.
▲
by
OskarS
3y ago
So lovely that the status page indicates that everything is fine except the WhatsApp Business API!
274.
▲
by
OskarS
3y ago
The book it's based on, Money Men by Dan McCrum, is also a spectacular read.
275.
▲
by
OskarS
3y ago
Yeah, I had the same reaction, it was a very bad strawman: the author had explicitly set the function to be public in the Java example, and then not done so in the Rust example, and then argued that Rust is safer. But that's absurd: yo
276.
▲
by
OskarS
3y ago
Would you say that one watt is equal to one joule-hertz?
277.
▲
by
OskarS
3y ago
Oh wow. I got The Codebreakers as a Christmas gift when I was a teenager and devoured it. It’s still on my bookshelf, almost falling apart. A great work of history. Rest in peace.
278.
▲
by
OskarS
3y ago
It's also just great documentation for a programming library. Like, if you're using libcurl and realize you need to do a range request (or whatever), or "copy as curl" from browser network tab, you can just do it on the
279.
▲
by
OskarS
3y ago
This is exactly the point of the article. From the conclusion: > Hopefully this has illustrated some points about using and abusing tools like Hadoop for data processing tasks that can better be accomplished on a single machine with simp
280.
▲
by
OskarS
3y ago
The thing you're talking about is just not possible in a low-level, runtime-less language like Zig. Like, utimately Zig. libraries need to generate arbitrary assembly to run on your architecture (like if you want to write a driver or s
281.
▲
by
OskarS
3y ago
No, and it would be impossible to prevent as well: obviously library code can do anything it wants, including asking the kernel for memory. But this is one of those things which just wouldn't happen in practice: custom allocators are s
282.
▲
by
OskarS
3y ago
The bottom-up tabularization isn't always necessary, but it's a key technique that is not just "avoiding overhead" or whatever. Doing the top-down memoization, you don't know which subproblems you need to store at a
283.
▲
by
OskarS
3y ago
This is not quite the problem I was asking (i wanted to know how many numbers smaller than N this is true for, not the first N numbers it's true for), but it illustrates my point anyway: the i.1000 generates an array of all numbers [0,
284.
▲
by
OskarS
3y ago
I have a question about array languages that I've been wondering for a while: lets say you have the task "find all numbers smaller than N where predicate P is true". You know, like, "find all primes smaller than 1000&quo
285.
▲
by
OskarS
3y ago
Seems like an excellent use case for trurl [1], a tool built on curls url parsing functions (which can presumably handle any weird url format you throw at it), though I'm not sure how well packaged/available it is. [1]: https:&#x
286.
▲
by
OskarS
3y ago
What's the incremental compile time? If you just change that "Hello World" string to something else, does it compiler faster the second time?
287.
▲
by
OskarS
3y ago
Another cool thing that I believe git does in these situations is that it hard-links the blobs in the .git folder if you do a local clone. It makes sense: the blobs are immutable and content-addressed, no need to store two copies! Just have
288.
▲
by
OskarS
3y ago
Not to be "that guy", but... one second is a VERY VERY long time to compile a hello world program.
289.
▲
by
OskarS
3y ago
That's a fair point, children's literature (a wonderful and valuable genre) will certainly be under threat. I would probably suggest that nothing an LLM would come up would stay with a person for decades like (say) Were The Wild T
290.
▲
by
OskarS
3y ago
Yeah, not too worried. AI might kill the "self-published Amazon eBook market of garbage genre novels", but honestly there's very little value there. The suggestion that an LLM could write a Hilary Mantel novel, or a Robert Ca
291.
▲
by
OskarS
3y ago
Not to mention the best touchpad in existence. One of my friends loathes everything Apple does (on principle, basically) and has tried several times to convince me that the ThinkPad X-series is just as good (or better) than an M-series MacB
292.
▲
by
OskarS
3y ago
I’ve always found this argument very cool (and obviously true in a mathematical sense) but not really ”practically” relevant. Like, the only reason you would be interested to know the length of a coastline is because you want to know how fa
293.
▲
by
OskarS
3y ago
You really think so? This is really my biggest issue with Dear ImGui, I think it just looks awful. The design is just not great, and stuff like text rendering has been terrible in every Dear ImGui UI I've seen. Especially on macOS, the
294.
▲
by
OskarS
3y ago
Yeah, obviously a creature with Haste or Trample or whatever is very easy to make a simple parser for. But I can imagine because WotC is so strict on how they word text on cards, even more advanced interactions would be pretty straight-forw
295.
▲
by
OskarS
3y ago
I've always wondered if it's a good trick for horizontal scaling as well. Like, if you have one server serving 1,000,000 clients, using a CRDT you could trivially split that up into 10 servers serving 100,000 clients each, and the
296.
▲
by
OskarS
3y ago
Conflict-free Replicated Data Types. It's essentially a way to make Google Docs-style products which are resilient in the face of disconnects and reconnects and slow syncing. Think of it like Git, but all merge conflicts are resolved a
297.
▲
by
OskarS
3y ago
Not a web dev, but I saw this on a stream at some point and found it delightful. Surprisingly effective! html { filter: invert(100%); }
298.
▲
by
OskarS
3y ago
C++'s std::string does some version of this as well (at least on all major standard libraries), it's known as the "small string optimization".
299.
▲
by
OskarS
3y ago
The author is a bit too categorical, there are certainly use-cases where both speed and code-size matters a great deal. Others have mentioned Monte Carlo algorithms, but there are others: not very long ago I was doing an effect in a shader
300.
▲
by
OskarS
3y ago
> Reproducibility That's a very silly objection: CSPRNGs can be seeded just like a PRNG. The "P" in both abbreviations is the key, it stands for "pseudo".
More ›