Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
nemetroid
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
91.
▲
by
nemetroid
2y ago
Too late to edit, but: > Equal signs make sense for assignment and equality because of mathy history. But question marks and exclamation marks don't make much sense for nullability. I think they do. The question mark expresses uncer
92.
▲
by
nemetroid
2y ago
> Which is easier to understand? After a ten-second explainer? The one with the punctuation marks. This is base vocabulary intended to be used very frequently, so it should be compact and unintrusive.
93.
▲
by
nemetroid
2y ago
> The market has repeatedly and thoroughly rejected dispatching to different code paths based on CPU, so the only SIMD implementation that actually matters is the lowest common denominator. RHEL just moved up to x86_64-v2, equivalent t
94.
▲
by
nemetroid
2y ago
Disabling the engines sounds like a pretty good deal compared to what bad software could make a warship do.
95.
▲
by
nemetroid
2y ago
Thanks for an interesting read. I don't think it's a convincing argument for general purpose languages, though. In Lean, the zero check is still there, just not in the arithmetic operator itself but in the various division related
96.
▲
by
nemetroid
2y ago
No, the Twitter poster is still wrong.
97.
▲
by
nemetroid
2y ago
Should we do the same for segmentation faults? Silently return zero and let the program continue with whatever broken internal state it ends up with?
98.
▲
by
nemetroid
2y ago
RR supports recording multithreaded programs, but only runs one thread at a time, so it cannot trigger data race bugs. It can find higher level concurrency bugs though, and has a "chaos mode" that schedules threads in an unfair ra
99.
▲
by
nemetroid
2y ago
I’m not sure I follow entirely, but an explicit operator bool will only auto-convert in contexts where it makes sense, and not e.g. in arithemtic expressions. https://stackoverflow.com/questions/39995573/when-can-i
100.
▲
by
nemetroid
2y ago
> I'm not sure I would say that "valid" and "useful" are the same. In standardese, they are: an object in a "valid but unspecified state" requires "that the object’s invariants are met and operatio
101.
▲
by
nemetroid
2y ago
The standard library types are guaranteed to be in a useful state after being moved from (the term "valid state" is used for this). Of course, that doesn't mean that your own types have to, but the C++ Core Guidelines suggest
102.
▲
by
nemetroid
2y ago
Thanks for the link, that's an interesting read. Actually the referenced PyMutex is a good old pthread_mutex_t, the same you'd use in C or C++. But I shouldn't have written so surely. Although uncontested locks are very fast,
103.
▲
by
nemetroid
2y ago
That cannot be the reason for a 30-50% slowdown. Uncontested locks are very fast.
104.
▲
by
nemetroid
2y ago
> Yeah, the last pointer is not correctly aligned. Pointers should be 8 byte aligned (regardless of architecture), but it's at byte index 20: 20/8 does not an integer make. Regardless of architecture among the ones supported by
105.
▲
by
nemetroid
2y ago
I always thought you'd still pronounce it as the original word. How do you pronounce it? Aeleveny?
106.
▲
by
nemetroid
2y ago
Neither would be appropriate in this case. If you don’t need cryptographic properties, don’t use a cryptographic hash function.
107.
▲
by
nemetroid
2y ago
> I'm pretty sure we're done here. Sorry to hear.
108.
▲
by
nemetroid
2y ago
By simple example, I mean this: https://tech.popdata.org/images/flamegraph-example.svg But looking at the one you're referencing, slightly out of order: > highest-magnitude function I see there is __int__malloc
109.
▲
by
nemetroid
2y ago
> How do flame graphs handle the case where most of the time is spent in some leaf function that is called from all over the program? In my experience, they don't really. They're very good for finding easy wins where a high
110.
▲
by
nemetroid
2y ago
> Do you have anything to add to the discussion? Do you ? Can you point out where it (edit: the simple example) breaks down, instead of just repeating that you're dumb?
111.
▲
by
nemetroid
2y ago
Did you read the linked article? It starts with a very simple example and then builds up to a real-world case, unlike the articles you linked, which both start off with an advanced case.
112.
▲
by
nemetroid
2y ago
It is fully possible to launch a program with argc = 0. But yes, replace argc with (argc - 1) in the example to match the typical case.
113.
▲
by
nemetroid
2y ago
Or if the check does not prevent the division (the typical "time-travel" example).
114.
▲
by
nemetroid
2y ago
Slightly tongue in cheek answer: it is easy to write this kind of code in C++ without having C involved, hence style guides will usually have a prominent guideline specifically against this type of code[1]. In Rust, I think you only really
115.
▲
by
nemetroid
2y ago
"Larger Text" is a built-in basic accessibility feature.
116.
▲
by
nemetroid
2y ago
> They forgot they could exit scope there. Their mistake was writing resource management code that requires manually thinking about where they might exit scope.
117.
▲
by
nemetroid
2y ago
> higher pressure air can hold more water at the same relative humidity The 787 and A350 cabins have higher relative humidity. > no. It's not rust, Citation needed. Corrosion resistance is one of the most advertised benefits of
118.
▲
by
nemetroid
2y ago
> I feel like I'm taking crazy pills. Civil society around the world has decided on UTC as the basis for time. What’s easier, convincing everyone to switch to TAI or changing the definition of UTC? I would guess it’s the latter.
119.
▲
by
nemetroid
2y ago
If we wait until UTC and UT1 differ by one hour, dealing with the adjustment will be no more difficult than dealing with time zones.
120.
▲
by
nemetroid
2y ago
I think it’s completely fine. The text as written identifies what problem it’s trying to solve within the first two sentences. That, to me, is much more useful to gauge my interest than your proposed introduction.
More ›