Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
haberman
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
61.
▲
by
haberman
1y ago
I have the opposite experience. Several years ago I didn't worry too much about people using private variables. Then I noticed people were using them, preventing me from making important changes. So I created a pseudo-"private&q
62.
▲
by
haberman
1y ago
I agree with almost all of this, including the point about c header files, except that code has to be in headers to be inlined (unless you use LTO), which in practice forces code into headers even if you’d prefer to keep it private.
63.
▲
by
haberman
1y ago
I am not the only user of my API, and I cannot control what users do. My experience is that users who are trying to get work done will bypass every speed bump you put in the way and just access your internals directly. If you "just&quo
64.
▲
by
haberman
1y ago
> I feel like I can write powerful code in any language, but the goal is to write code for a framework that is most future proof, so that you can maintain modular stuff for decades. I like Zig a lot, but long-term maintainability and mod
65.
▲
by
haberman
1y ago
The article doesn't clearly define what this 21 GB/s code is doing. - What format exactly is it parsing? (eg. does the dialect of CSV support quoted commas, or is the parser merely looking for commas and newlines)? - What is the
66.
▲
by
haberman
1y ago
I was speaking in the context of my original post, which was specifically talking about traffic lights at intersections and what combination of lights are allowed to be green at the same time. I think it would be fairly straightforward to e
67.
▲
by
haberman
1y ago
The description in your link says: > What is a Metaheuristic? A common but unfortunate name for any stochastic optimization algorithm intended to be the last resort before giving up and using random or brute-force search. Such algorithms
68.
▲
by
haberman
1y ago
> To improve the stability of the resulting designs, we employ an efficient validity check and physics-aware rollback during autoregressive inference, which prunes infeasible token predictions using physics laws and assembly constraints.
69.
▲
by
haberman
1y ago
A very interesting article that goes deeper into store-to-load forwarding than anything I’ve read before.
70.
▲
by
haberman
1y ago
None of this really supports your claim that "C++ has been faster than C for a long time." You can argue that C takes more effort to write, but if you write equivalent programs in both (ie. that use comparable data structures and
71.
▲
by
haberman
1y ago
> C++ has been faster than C for a long time. What is your basis for this claim? C and C++ are both built on essentially the same memory and execution model. There is a significant set of programs that are valid C and C++ both -- surel
72.
▲
by
haberman
1y ago
These days I game on a PC in the closet streamed to my Mac via Sunshine/Moonlight. Keeps the wires and fan noise out of the office, which is nice. There’s a tiny bit of latency, but I’m not playing twitch reflex games on it.
73.
▲
by
haberman
1y ago
TL;DR: like f-strings, all {foo} expressions in the t-string are evaluated immediately, but instead of immediately concatenating everything into a single result string, the t-string evaluation returns a Template object that keeps the interp
74.
▲
by
haberman
1y ago
I've downloaded it and am loving it so far. Thanks for the recommendation!
75.
▲
by
haberman
1y ago
It's funny, I fit that description perfectly and played all the way through KCD1. But when I saw the trailers for KCD2, it looked like it was so fighting and confrontation focused, maybe even more than the first one. The main title a
76.
▲
by
haberman
1y ago
> my experiments show that the runtime cost of most coroutine‑like abstractions is simply too high Which runtime cost do you mean? The main one I am aware of is a heap allocation per coroutine, though this can in some cases be elided if
77.
▲
by
haberman
1y ago
I also found that FreeTaxUSA helped me understand my taxes better. A few areas where TurboTax performed some calculation automatically, FreeTaxUSA made me aware that I had eg. maxed out a particular deduction, in a way that helped me chang
78.
▲
by
haberman
1y ago
Fair point. But I think it does illustrate that defamation lawsuits are unlikely to be an effective defense in the (admittedly unlikely) case that you are falsely accused of something.
79.
▲
by
haberman
1y ago
As I understand it, all of the allegations were investigated by Madame Justice Boyd who found that none of them were substantiated except for the affair, which I agree is far from advisable, but on its own seems unlikely to have ended his c
80.
▲
by
haberman
1y ago
> If you get accused of doing something you didn't do, you can file a defamation lawsuit. Are you aware of anyone who has successfully done this and maintained their standing in life? The example that comes to mind for me is Steven
81.
▲
by
haberman
1y ago
There is also Quarto, which I have had a good experience with: https://quarto.org/
82.
▲
by
haberman
1y ago
> other concepts that may not be so critical: `query` vs `aquery` vs `cquery`, action-graph vs configured-action-graph vs target-graph, providers vs outputs, macro vs rule-impl, etc Almost all of the distinctions you mentioned are relate
83.
▲
by
haberman
2y ago
I think it's important to note that a primary motivation of the tail call interpreter design is to be less vulnerable to the whims of the optimizer. From my original blog article about this technique ( https://blog.reverbera
84.
▲
by
haberman
2y ago
I do not claim that No-Panic Rust is popular (or even used at all) in Rust libraries currently. If it was popular, I would not have had to think so hard about it and write a blog entry. I claim that this technique is widespread in C lib
85.
▲
by
haberman
2y ago
> It's true that Rust code is going to check more things because of `unwrap()`, but that's a good thing! Because the alternative is clearly what C libraries practice: they'll just have UB. I have been consistently advocati
86.
▲
by
haberman
2y ago
I think this is moving the goalposts. My claim was not "these C libraries perfectly avoid UB by dynamically checking every invariant that could lead to UB if broken." Clearly they do not, as you have demonstrated. (Neither does
87.
▲
by
haberman
2y ago
> Its `SQLITE_INTERNAL` error code is atypical in my experience. In my experience it's reasonably common. Here are some other examples in what I would consider quintessential, high-quality C libraries: - zlib has Z_STREAM_ERROR, wh
88.
▲
by
haberman
2y ago
I am biased towards thinking that low-level libraries should generally avoid panic. That would mean that all invariants are either assumed true or returned as errors to the user. I think this is not an unreasonable design: it's how lo
89.
▲
by
haberman
2y ago
Ok, but let's consider the other extreme: a world where no library can ever assume a runtime invariant holds without dynamically checking it first. In this world, Vec::index() would need to perform not only a bounds check but also a ch
90.
▲
by
haberman
2y ago
> But such behaviour is still unacceptable from a library perspective: a library should never, ever call abort or otherwise terminate the program. I tend to agree with this, which is why I was happy to discover that No-Panic Rust does ap
More ›