Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
fch42
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
61.
▲
by
fch42
2y ago
Caution: I'm a C programmer "by history" and therefore I see "C Interfaces" as that and don't always / immediately view them through the rust lens of ownership... Reading the article (nice troubleshooting
62.
▲
by
fch42
2y ago
It's rather fascinating to find that in the case of M87*, the black hole and its accretion disk are counterrotating. A rotating black hole has a giant amount of angular momentum, and that has "accreted" onto it during its for
63.
▲
by
fch42
2y ago
The current working directory is kernel state. getcwd() is a system call. This doesn't compare.
64.
▲
by
fch42
2y ago
The problem (with get/set/putenv as they are) was isn't the non-use of a mutex. It's the "meaning" of the pointer returned to by getenv(). It returns a char*. Nevermind the persistance of that value - you can w
65.
▲
by
fch42
2y ago
"mutating" there involves the need to (re)allocate memory. To do so in a signal handler is hard ... because memory allocators are, while threadsafe, not async-signal-safe. You can't make a hard problem easy by asserting depen
66.
▲
by
fch42
2y ago
I had to smirk at the sarcasm (intended or no). I merely included "processes modifying their env" amongst all these historical warts. I consider doing so as inevitably necessary as append writes, the advantages of which you aptly
67.
▲
by
fch42
2y ago
Indeed, and from my point of view, that's perfectly ok.
68.
▲
by
fch42
2y ago
Obviously not, but _threading_ primitives are not the subject of this post at all. Declared-as Non-threadsafe interfaces are. And of course one (as is happening here) one can argue whether all "system runtimes" shall be threadsafe
69.
▲
by
fch42
2y ago
In short, no - because environment variables are userland state only, you can't interact with them using system calls, the kernel doesn't keep a "canonical" copy of them on behalf of the process. So the "environment
70.
▲
by
fch42
2y ago
That is basically "what it means" if an interface is non-MT: you can call this no-problem if you know you're singlethreaded, and if you're not, find your own way to serialize (meaning: have your own locking prinitive you
71.
▲
by
fch42
2y ago
+1 on the "horrible idea" part. Thing is, the (history of the) UNIX APIs - call'em "libc" if you like - is littered with the undead corpses of horrible ideas. Who thought that having global file write offsets are gr
72.
▲
by
fch42
2y ago
That (managing the env "from the outside) is and always has been the "supposed" way of using it. Modifying _your own_ environment _at runtime_ is not. The corresponding functions - setenv/getenv - and state - envp/e
73.
▲
by
fch42
2y ago
The "cross platform" way of setting the environment is to set it "from outside" of the program - meaning, through the executor, whether that's the shell or the container runtime or even the kernel commandline if you
74.
▲
by
fch42
2y ago
You needn't go "hacky" for this; constructors for global/static variables are called before main(). But then, the underlaying linker support is usually "trivially exposed" (using the constructor attribute in gc
75.
▲
by
fch42
2y ago
Visiting Billingsgate will teach you that quite a few restaurant folks (and quite a few "normal people") shop there, in addition to (smaller) fish traders. Smithfield, at least to me, always had a different vibe; more pro-to-pro&#
76.
▲
by
fch42
2y ago
There's only so and so much you can practice in front of a mirror. Tell yourself a thousand times "I won't panic in a social setting" and you've made zero progress. Expose yourself to a social setting twice, panic t
77.
▲
by
fch42
2y ago
You got me there. Were this a social setting, that yell would have triggered my interest sufficiently to chase after you for an extended conversation. Resistance is futexile.
78.
▲
by
fch42
2y ago
Anger is a great motivator in the mid-term yet self-destructive in the long term. To begin, it motivates - "show 'em!" way. You gain the energy to prove yourself, to excel-over-others, you may feel the thrill of winning while
79.
▲
by
fch42
2y ago
only European but if your choice is binary, you can only make it that way. Some Americans may well vote for the rightwing candidate because they want to stick it to the left (or whoever the "anti" would be). Personally, I don'
80.
▲
by
fch42
2y ago
QUIC has TLS built into it, and also (http) streams, and a few other such goodies (say, masque - tunneling). It definitely "fills the hole" between L4..L7. Or smashes the layers, if you prefer.
81.
▲
by
fch42
2y ago
Cloudflare "splits" their reverse proxies functionally into different processes; TLS termination may happen in a different process from WAF, or cache access, or origin fetch. I'm sure other large CDNs do similar things. As ot
82.
▲
by
fch42
2y ago
(forgot to say, German would know "Ich war Tennis spielen ..." as much as "Ich habe Tennis gespielt ..."; the first one would be considered imperfect passive, and yes I would agree perfect passive, "Ich bin Tennis s
83.
▲
by
fch42
2y ago
I defer to you for that, simply because I'm a native speaker of German and "only" long-term fluid in English. I don't entirely grasp the difference between the two - other than "phrasing" (and on that level it
84.
▲
by
fch42
2y ago
Slightly off-topic, but for the Frankish/French/German evolution, this is usually considered a "marker": https://en.m.wikipedia.org/wiki/Oaths_of_Strasbourg I'm not sure if any such "found
85.
▲
by
fch42
2y ago
With respect to past tense, a "common" thing in english appears to be that the imperfect of a verb is the same word as the past particilpe of that verb. So "played" can be the imperfect tense itself, or the participle of
86.
▲
by
fch42
2y ago
I follow, yet I disagree that "first priority" must always be a reproducer. There are a lot of conditions that can be rootcaused clearly from diagnostics; say, Linux kernel code deadlocks can exhibit as two different (in their sta
87.
▲
by
fch42
2y ago
It's unfortunate that during "professional development" we collectively appear to unlearn saying "no". Or, more widely, learn to avoid using simple direct language. It's not limited to scientists :-(
88.
▲
by
fch42
2y ago
I have a similar experience from waaaaay back (now near 30 years). We had a water leak in the basement of the institute of physics. Nothing terribly major, ran for a few hours shorted power downstairs eventually (that's how it was foun
89.
▲
by
fch42
2y ago
the github commit's "conversations" log for the commit has a few notes you need to log in for to view. But then, the maintainer who merged said "it's just a few constants". Which is fair enough. I think this wo
90.
▲
by
fch42
2y ago
And now I can't unrememeber and feel totally compelled to a) translate them and b) use them in my code somewhere. Cannot help but think this is a deliberate pun, to get cynic's imagination going ... did they do this to poke fun at
More ›