Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
gsliepen
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
61.
▲
by
gsliepen
1y ago
A lot of people don't realize that all these so-called issues with TCP, like slow-start, Nagle, window sizes and congestion algorithms, are not there because TCP was badly designed, but rather that these are inherent problems you get w
62.
▲
by
gsliepen
1y ago
It was an act of Google^H^H^H^Hd.
63.
▲
by
gsliepen
1y ago
When is it "safe" though? What if the row-polymorphic record has more fields than the named record? Should those just be discarded? If it has exactly the same fields, then in C++ at least you can use std::get<NamedRecordType>
64.
▲
by
gsliepen
1y ago
What if you find one word that covers all the letters, like "highlighted"?
65.
▲
by
gsliepen
1y ago
AFAIK compilers will perform tail call optimization without [[musttail]], it's just not guaranteed (and probably it won't if you don't enable optimizations at all).
66.
▲
by
gsliepen
1y ago
pg_usleep(1000L); Virtually any time you put a fixed sleep in your program, it's going to be wrong. It is either too long or too short, and even if it is perfect, there is no guarantee your program will actually sleep for exact
67.
▲
by
gsliepen
1y ago
Or since C++20, just default operator<=>: https://en.cppreference.com/w/cpp/language/default_compariso...
68.
▲
by
gsliepen
1y ago
That would indeed satisfy std::map, but then the question is, is that a useful ordering for intervals? To answer that, you need to define what you want to use the interval map for. If you want to be able to lookup in which unique interv
69.
▲
by
gsliepen
1y ago
It's a somewhat interesting article, but it doesn't say much. It starts with: > Suppose we want to have a C++ map where the keys are disjoint And then we do something that goes against the whole point of such a map: > But wh
70.
▲
by
gsliepen
1y ago
Indeed. There is no reason why CGI would need shells or scripting languages though, you can just write them in any programming language. It's not that hard; I wrote this pastebin clone in C: https://github.com/gsliepen&
71.
▲
by
gsliepen
1y ago
You can get pretty far in C++ though: https://codereview.stackexchange.com/questions/259045/poor-m...
72.
▲
by
gsliepen
1y ago
> With staging you get to control exactly what gets inlined/partially evaluated. I want to stress that this is not true. Sure, sometimes it might work, but compilers can also uninline, as well as reorder the way things are evaluated
73.
▲
by
gsliepen
1y ago
Interesting, I never heard of Futamura projections before. Looking at the definition, it seems like the first projection (specializing an interpreter for given source code) is already handled pretty well by today's compilers, just by u
74.
▲
by
gsliepen
1y ago
If you drop the requirement that the image has to be taken with wavelengths our eyes are sensitive to, you could image it using radio telescopes. We already have this capability, the problem though with radio interferometry is that while yo
75.
▲
by
gsliepen
1y ago
> For example, instead of a power function that uses a loop, you could generate specialized code like x * x * x * x * x directly. This eliminates runtime overhead and creates highly optimized code. This is misguided. For decennia now, th
76.
▲
by
gsliepen
1y ago
> Could anyone explain to me how this is different from templates or parameter pack expansion in C++? I don't think it's any different. > I can see the constexpr-ness here is encoded in the type system I also see they introd
77.
▲
by
gsliepen
1y ago
He apologized, didn't he? There was a screen named "I'm sorry" :P
78.
▲
by
gsliepen
2y ago
I don't understand why you would code these explicit state machines when you can just write normal code that is much more readable. The state machine example they start with could be written as: while (true) { wait(); fil
79.
▲
by
gsliepen
2y ago
While NixOS goes a bit further with it, most other distrubtions also compile everything from source, cryptographically verify that the sources they use are not tampered with, and have versioned dependencies between packages. Debian also has
80.
▲
by
gsliepen
2y ago
"It's peer-to-peer, trust me bro!" The problem is that you are still using a website provided by a third-party to serve you the JavaScript program that initiates the transfer. It's easy to replace that JavaScript by some
81.
▲
by
gsliepen
2y ago
From the article: > Currently, packets are not being encrypted within the UDP tunnel so packet sniffing over the internet is possible. It is encouraged to use this over a protocol like SSH No encryption takes the P out of VPN. Also, if y
82.
▲
by
gsliepen
2y ago
Congrats on getting this self-hosted. However, the solution looks more complicated than necessary. You shouldn't have to set up a database server and Docker just to sync a little bit of data. Ideally, there would be a sync server imple
83.
▲
by
gsliepen
2y ago
USB-C is already a de-facto standard, supports a wide range of voltages and with enough current to be able to charge even beefy laptops. You also don't have to support all the complexity; if you just want to power a simple device that
84.
▲
by
gsliepen
2y ago
I got my first mechanical keyboard many years ago when playing a game where I had to do some complicated maneuver involving multiple keys which I just couldn't seem to pull off, until I realized that my then keyboard suffered from ghos
85.
▲
by
gsliepen
2y ago
Do not forget though that not all CRTs were made the same. There was a huge variation in dot pitch, or even the "subpixel layout" (think Trinitron). Also, not all CRTs had nice black levels; either the screen still reflected/
86.
▲
by
gsliepen
2y ago
"Resolution" is used very loosely here. They are very big images of the full Sun (in terms of the number of pixels), but there are also various telescopes that "zoom in" much more on a small part of the Sun, resulting in
87.
▲
by
gsliepen
2y ago
I'm sure this library does the thing it claims to do very nicely. However, as a programmer I am saddened that so many things that should have been in the standard library by now need to come from external repositories and have a weird
88.
▲
by
gsliepen
2y ago
Well there is one way to nest comments in C, and that's by using #if 0: #if 0 This is a #if 0 nested comment! #endif #endif
89.
▲
by
gsliepen
2y ago
> At this point, I realized that I got the "V2" of the camera. This camera is regarded as worse than the "V1" mostly because the manufacturer removed the internal processing FPGA? That's actually better. In-camer
90.
▲
by
gsliepen
2y ago
Oh, Numerical Recipes is nice but their algorithm implementations are not really state-of-the-art. I highly recommend using FFTW ( https://fftw.org/ ) as it will likely give you a substantial performance improvement.
More ›