Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kd5bjo
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
26 ms
·
241.
▲
by
kd5bjo
6y ago
> You could never trust the other person (or the person who fooled them) to not mix some less valuable metal on with their coins Another major problem was people taking shavings from the edge of coins and trying to pass them off as unalt
242.
▲
by
kd5bjo
6y ago
Rooms designed for presentations often don’t have windows so that they can be easily darkened for projectors to work better. Where I grew up, it was quite common for classrooms to have an overhead projector [1] equipped with a long scroll
243.
▲
by
kd5bjo
6y ago
> I might be the only person who dislikes traveling. To me, traveling is an expensive way to explore food, museums and maybe some overcrowded landmarks. I went to Paris, Tokyo, and all we did was followed a guidebook of one touristy plac
244.
▲
by
kd5bjo
6y ago
Often separating the coins isn’t necessary either. Because the value of a coin was historically the value of the metal it contained, many modern coin sizes still have a volume proportional to their value. US dimes, quarters, half dollars,
245.
▲
by
kd5bjo
6y ago
> Obviously the one crucial bit of having the Pinecil actually functional is having software support for the device. Personally, I would’ve thought the one crucial bit of a functional soldering iron is to deliver enough thermal power at
246.
▲
by
kd5bjo
6y ago
> Best solution is to "air gap" your TV by not connecting it your wifi or ethernet. How long will it be before TVs embed a cellular modem with manufacturer-paid service to keep the smart features connected? “No setup, works st
247.
▲
by
kd5bjo
6y ago
My rule of thumb for pulling in an external dependency is whether or not I’d be willing to maintain a private copy myself. For most libraries, that’s a yes— they have only a few entry points that my program uses, and it’s (relatively) easy
248.
▲
by
kd5bjo
6y ago
> Panicing is not in line with how `as` casts are supposed to act. (e.g. `u32value as u8` does not panic but just takes the "lower" one byte.) So, instead of this being traditional UB, it was a combination of two separate issue
249.
▲
by
kd5bjo
6y ago
It looks like ‘as’ is generally defined as a truncating cast operator for other numeric types. Since it doesn’t panic for other overflow situations (like u64->u32), they chose consistency with those cases. https://github.com&
250.
▲
by
kd5bjo
6y ago
Right, but given that panicing was already allowable behavior, why was the new behavior chosen to be one likely to introduce subtle bugs? It seems much better to loudly proclaim the existence of an erroneous precondition, which is consiste
251.
▲
by
kd5bjo
6y ago
As it was UB anyway, wouldn’t the compiler also be within its rights to detect the problem and panic the thread?
252.
▲
by
kd5bjo
6y ago
> Aren't most PRNs made deterministically? All pseudorandom numbers are deterministic; that’s what the ‘pseudo-‘ prefix is meant to indicate. There are other kinds of random number generator that observe physical entropy sources in
253.
▲
by
kd5bjo
6y ago
In game theory, the optimal strategy is often a stochastic one. In those games, if you play deterministically there’s always a way for your opponent to gain an advantage; playing randomly from a particular distribution is strictly better f
254.
▲
by
kd5bjo
6y ago
> A static player looking at a corner will always be at a disadvantage to [a moving one]. ... The static player won’t see them until the movement makes it through the server to them. Do you mean that an accelerating player has an advan
255.
▲
by
kd5bjo
6y ago
Oh; I had assumed that the original upload was from a computer, but they didn’t actually say that, did they?
256.
▲
by
kd5bjo
6y ago
Right, but an app shouldn’t be spying on me to support a feature I don’t actively use. If they want to include it in the binary for other people to use, I don’t have a big problem with that as long as it stays off. A corollary is that the
257.
▲
by
kd5bjo
6y ago
The issue is a utility app doing anything other than what the user explicitly requests. I use a maps app to look at maps ; it has no business doing anything with my photos. Other people may use it for other things— that’s fine, as long as
258.
▲
by
kd5bjo
6y ago
I make photocopies of all my notes: the original gets filed by title, and the copy goes into a Leitner box after having key details redacted.
259.
▲
by
kd5bjo
6y ago
It’s very easy to let notetaking overwhelm the real goal— learning. I’ve had good luck putting my full attention into whatever reading material or exercise I’m working on. I don’t take any notes until the end of the session, when I do an i
260.
▲
by
kd5bjo
6y ago
For most countries, visiting with a tourist visa means that it’s illegal to work while inside the country. The intent is to prevent you from entering the local job market, so most countries will turn a blind eye to tourists who don’t compl
261.
▲
by
kd5bjo
6y ago
If I’m reading marcan_42’s comment correctly, the FTDI chip defers any EEPROM write request to an even address until it receives the next write request to the subsequent, odd, location. If the next write is somewhere else, it discards the
262.
▲
by
kd5bjo
6y ago
> The more work the compiler does, the less we have to keep track of in our head There’s two sides to this: on the one hand, you don’t have to keep as much info in your head because the compiler will tell you if you ask it. On the other
263.
▲
by
kd5bjo
6y ago
> I mean, what's FTDI supposed to do? I’m not saying that FTDI or a similar company should sit idly by, but the vigilante justice you’re advocating leads to bad places. We have customs enforcement to stop goods at the border and a
264.
▲
by
kd5bjo
6y ago
Your example is also off, because we’re talking about an internal component rather than an entire device. If a repair shop doesn’t use a Genuine Apple replacement screen, does Apple have to support it? No. Is going out of their way to ph
265.
▲
by
kd5bjo
6y ago
> Having to rely so much on recursion for instance adds a lot of complexity. I’ve written some fairly heavy Rust macro code, and I almost never need recursion— the repetition primitives generally prove sufficient for my needs. What are
266.
▲
Rust trained my sense for spotting UB in C
(users.rust-lang.org)
2 points
by
kd5bjo
6y ago
|
0 comments
267.
▲
by
kd5bjo
6y ago
Native Rust macros are generally preferred, because they prevent a few classes of error that can happen with the purely textual macros cpp and m4 use. In particular, they prevent unpaired delimiters from appearing in the macro expansion an
268.
▲
by
kd5bjo
6y ago
The Little Book of Rust Macros is a pretty good, but dense, overview of how macro_rules! can be used. (Procedural macros are a completely different beast). https://danielkeep.github.io/tlborm/book/index.html
269.
▲
by
kd5bjo
6y ago
> Are the users freeloaders, or is the product just not compelling enough to attract paying users? There’s no cognitive dissonance in believing both of these things at the same time. The non-paying users are freeloaders because they’re
270.
▲
by
kd5bjo
6y ago
It sounds like what you want to do is print the number with the smallest denominator (from the range of numbers represented by this bit pattern). A quick search turns up a plausible formula for this: https://math.stackexchange.c
More ›