Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
legobmw99
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
61.
▲
Implementing a Struct of Arrays
(brevzin.github.io)
6 points
by
legobmw99
1y ago
|
1 comments
62.
▲
by
legobmw99
1y ago
This is probably the most compelling example of C++ reflection I've seen yet. Deriving a debug printer or stringifying the names of enums is one thing, but this is clearly quite a powerful abstraction one could get 'for free'
63.
▲
by
legobmw99
1y ago
It's a bit heavy handed, but the VSCode "Live Server" plugin is the closest I've come. If I set code as the default file association for `.html`, then it's just one extra click to get it open in a browser with a loc
64.
▲
by
legobmw99
1y ago
I mean, we already have a sort-of answer, because the "Bedrock Edition" of Minecraft is written in C++, and it is indeed less popular on PC (on console, it's the only option, so _overall_ it might win out) and does lack any r
65.
▲
by
legobmw99
1y ago
I still think it is a shame that `match` isn't valid as an expression, requiring things like the helper function here that could be a lambda or part of a comprehension otherwise
66.
▲
by
legobmw99
1y ago
No idea how plug-n-playable it is, but the source seems to be self contained: https://github.com/mcy/mcy.github.io/blob/master/public/js/m...
67.
▲
by
legobmw99
2y ago
Note that MinGW uses libwinpthread, which is known to have slow TLS behavior anyway (I've observed a 100% overhead compared to running the same program under WSL using a linux-native GCC). c.f. https://github.com/msys2&
68.
▲
by
legobmw99
2y ago
I can't find the exact link now (very well might have been a video without a searchable transcript), but I recall someone asking Linus that (specifically re his previous comments on C++), and his answer was something like he saw Rust s
69.
▲
by
legobmw99
2y ago
“strict aliasing” refers to disallowing pointers of different types to alias. In the context of a function that accepts two arrays of floats, for example, it doesn’t apply
70.
▲
by
legobmw99
2y ago
Morph into a federal sales tax? This bill literally proposes one
71.
▲
by
legobmw99
2y ago
Some other languages have equivalents (OCaml comes to mind), but usually they’re less necessary
72.
▲
by
legobmw99
2y ago
I mean, maybe? But if you hover over the function you just completed, the same LSP will also show you the documentation. This is how I personally use it for discovery, anyway. The other day I was writing some Rust code and needed to remove
73.
▲
by
legobmw99
2y ago
One of my first ever public projects actually had a bug report that ended up being the Turkish i problem. Didn’t know there were more!
74.
▲
by
legobmw99
2y ago
The Fn trait could be used, which prevents mutation, but allows a lot of useful closures. I should note, a motivated user could provide a junk function no matter what the type accepted is
75.
▲
by
legobmw99
2y ago
Is there a technical reason to now allow closures as the integrand?
76.
▲
by
legobmw99
2y ago
It seems like it is lacking the functionality R's integrate has for handling infinite boundaries, but I suppose you could implement that yourself on the outside. For what it's worth, use integrate::adaptive_quadrature::simps
77.
▲
by
legobmw99
2y ago
I’ve seen this attributed to John von Neumann, of all people
78.
▲
by
legobmw99
2y ago
I’d be shocked if jart didn’t know this, but it seems unlikely that an LLM would generate one of these most vexing parses, unless explicitly asked
79.
▲
by
legobmw99
2y ago
I wonder how much of this has to do with Covid interrupting a lot of recent grads’ time in college and forcing a large percentage of their courses to be online for a time It seems pretty obvious to me that the quality of both teaching and a
80.
▲
by
legobmw99
2y ago
The author links to https://arxiv.org/abs/2006.10343 , which seems like a good place to start on normalizing flows for Bayes
81.
▲
by
legobmw99
2y ago
It’s sadly a bit more of a proof of concept than a hackable project. The docker build in the readme did work last time I tried, and there is a demo site at https://jprendes.github.io/emception/ , but I’ve failed to modi
82.
▲
by
legobmw99
2y ago
If what I want is not an executable but a shared library, does this get me anything? I currently have a use case that uses a server running an emscripten build (using SMODULARIZE and some exports, I suppose it’s not a true dylib)
83.
▲
by
legobmw99
2y ago
See: emception https://github.com/jprendes/emception
84.
▲
by
legobmw99
2y ago
Synergy core (aka synergy 1) just had Wayland support merged this week. “Next year” has finally come to pass
85.
▲
by
legobmw99
2y ago
The closest I’ve found in terms of description is https://github.com/feschber/lan-mouse , but the lack of encryption on the connection has discouraged me from using it. I’m also a paid Synergy user, and it’s frankly com
86.
▲
by
legobmw99
2y ago
It seems a little odd to me that this is not just… a vscode extension pack?
87.
▲
by
legobmw99
2y ago
I think a challenge to this evolution path is the same as what motivated Sutter’s cpp2: defaults I think the premise that a lot of experienced programmers can write good C++ is at least somewhat valid. They know to not use raw pointers, whi
88.
▲
by
legobmw99
2y ago
extern “C” on everything, if you care about linking compatibility, gets you another chunk of the way there by also disabling overloading etc.
89.
▲
by
legobmw99
2y ago
I feel like most RAII fans will openly admit that it’s the worst name in the world for such an idea. The idea is that any time you acquire a resource, you should initialize an object with said resource. But I guess “resource allocation shou
90.
▲
by
legobmw99
2y ago
If you’re very careful with forward-vs-back slashes and your username isn’t “Firstname Lastname”, sure. But in practice there are tons of issues especially for non expert users
More ›