Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mattnewport
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
33 ms
·
1.
▲
by
mattnewport
5mo ago
Ironic that they used an LLM to write the article: > 42.9 units of insulin from a single photo. That’s not a rounding error. That’s a potential fatality.
2.
▲
by
mattnewport
6mo ago
It's ironic that the STL basically exists for stable sort (that's what Alex Stepanov was trying to create an efficient version of which led to most of the standard algorithms as building blocks), yet it's apparently not had m
3.
▲
by
mattnewport
6mo ago
I think a better approach might be automated performance regression tests. That's checking the property you probably actually care about directly (performance) and leaves the compiler (and other engineers) some leeway to do better with
4.
▲
by
mattnewport
8mo ago
The disconnect is weird isn't it? The latest coding models can churn out a lot of mediocre code that more or less works if the task is sufficiently well specified, but it's not particularly good code, they have no real taste, no i
5.
▲
by
mattnewport
8mo ago
Yeah, you can even use tree-sitter to implement a language server, I've done this for a custom scripting language we use at work.
6.
▲
by
mattnewport
9mo ago
Good article, thanks! Minor correction though, I think this is not quite correct: > The compiler computes the required size at compile time by summing the sizes of all locals (accounting for alignment). In optimized C++ builds, compilers
7.
▲
by
mattnewport
10mo ago
That's not really "fooling" the optimizer, that's kind of the point of volatile. The optimizer not making optimizations is the intended behaviour.
8.
▲
by
mattnewport
11mo ago
This might be true in the abstract but it's not true of actual compilers dealing with real world calling conventions. Absent inlining or whole program optimization, calling conventions across translation units don't leave much roo
9.
▲
by
mattnewport
1y ago
> Are there any debuggers that let you look at intermediate results of pipelines without modifying the code? F# in the visual studio debugger does a pretty good job of this in recent versions.
10.
▲
by
mattnewport
1y ago
What's the basis for your claim that it is on an exponential growth trajectory? That's not the way it feels to me as a fairly heavy user, it feels more like an asymptotic approach to expert human level performance where each new m
11.
▲
by
mattnewport
1y ago
Big little cores like on mobile or some Intel processors are really not the same thing. The little cores have the same instruction set and address the same memory as the big cores and are pretty transparent to devs apart from some different
12.
▲
by
mattnewport
2y ago
UI is also a sync problem if you squint a bit. React like systems are an attempt to be a sync engine between model and view in a sense. Multiplayer games too.
13.
▲
by
mattnewport
2y ago
- Sum types / discriminated unions - Pattern matching (arguably a more flexible and general way to do the type of thing you have in your number 4 if syntax)
14.
▲
by
mattnewport
2y ago
I use Zola, a static site generator written in Rust, and Github pages for hosting on my own domain.
15.
▲
by
mattnewport
2y ago
Medical Nemesis by Ivan Illich
16.
▲
by
mattnewport
2y ago
This looks cool, I find myself wishing for a language and introductory tutorial that isn't so targeted at Python programmes however (though I understand from a commercial point of view why that may make sense). It seems like this is ac
17.
▲
by
mattnewport
2y ago
Modules, standardised in C++20, are the official solution both for the standard library and for other code but they are not universally well supported by all major compilers and build systems yet. Transitioning existing code to use modules
18.
▲
by
mattnewport
2y ago
This is true but in practice it's pretty common to find this sort of code seems to work fine on x64 because the compiler doesn't actually reorder things and then sometimes blows up on ARM (or PowerPC, though that's less commo
19.
▲
by
mattnewport
2y ago
Ok, that's not really what your example showed though. You seem to be relying on string interning to have two different "hello" literals refer to the same underlying object and therefore be equal? Coming from other languages,
20.
▲
by
mattnewport
2y ago
That's only because strings are immutable in Java. It's not true for reference types in general. In C++ passing a pointer by value is effectively the same as passing a reference, the only real difference being that the syntax for
21.
▲
by
mattnewport
2y ago
Yeah, this is one of those things that while it may be more technically correct causes a lot of unnecessary confusion. I remember being confused by this as a C++ programmer learning Java when resources claimed that Java was always pass by v
22.
▲
by
mattnewport
2y ago
That's not really accurate. Component based systems are designed specifically to address situations that traditional inheritance doesn't handle well. Examples are usually something like having a base entity, a player that inherits
23.
▲
by
mattnewport
2y ago
Not really, the data oriented design movement in games programming that eschews OOP is driven by performance concerns of traditional OOP code on areas like rendering. As a graphics programmer for many years I can also say that OOP is not re
24.
▲
by
mattnewport
2y ago
Inheritance doesn't work well for games, that's why so many games take a component based approach like Unity, or full blown ECS.
25.
▲
by
mattnewport
2y ago
The use case is for dedicated game servers controlled by the developer running in data centers, not clients running on player's home computers.
26.
▲
by
mattnewport
3y ago
At least for depression, the chemical imbalance theory has long been disproved, a recent summary of the evidence: https://www.theguardian.com/society/2022/jul/20/scientists-q...
27.
▲
by
mattnewport
3y ago
Anyone saying "I need you to..." just makes me think of Bill Lumbergh from Office Space. Doesn't come across well at all.
28.
▲
by
mattnewport
3y ago
Have you looked at F#? If you like the MLish aspects of Rust but want to not have to deal with some of the manual memory management complexity it's pretty nice. There's access to the whole .NET ecosystem too, as well as really goo
29.
▲
by
mattnewport
3y ago
Sounds like Azure Durable Functions: https://learn.microsoft.com/en-us/azure/azure-functions/dura...
30.
▲
by
mattnewport
3y ago
Doesn't really explain Rotherham.
More ›