Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Joker_vD
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
31.
▲
by
Joker_vD
2mo ago
> but here it is done through a pointer to an object with pointer arithmetic going beyond the allowed bounds. When you do "void *x = malloc(sizeof(struct node))", the returned storage doesn't have struct node object in it,
32.
▲
by
Joker_vD
2mo ago
Furthermore, two structure, union, or enumerated types declared in separate translation units are compatible in the following cases: — both are declared without tags and they fulfill the preceding requirements; the pre
33.
▲
by
Joker_vD
2mo ago
Wait, seriously? They are unique, sure, but the 6.2.7.1 quite explicitly states they are compatible as long as they're in separate files: Moreover, two structure, union, or enumerated types declared in separate translation un
34.
▲
by
Joker_vD
2mo ago
> Now you have a naming problem. You need a naming convention that every user of the list library must follow, or else their types will be incompatible. Oh, that's simple: just have empty struct tags. > And what about typedefs? T
35.
▲
by
Joker_vD
2mo ago
> It does not matter that storage happens to be allocated beyond the end of said array. It does matter, for malloc-returned storage. You can put whatever objects you want into that storage as long as it fits and the pointer is properly a
36.
▲
by
Joker_vD
2mo ago
> If an application uses two libraries, each of which handles lists of int, each library will have to independently macro-generate its separate list implementation, and because C's type system is nominal, the generated types will be
37.
▲
by
Joker_vD
2mo ago
> Accessing an array out of bounds is UB. There is no OoB access of an array; the calculated pointer is pointing to the payload object that's residing in the malloc-returned storage right after the node struct. I think the actual pr
38.
▲
by
Joker_vD
2mo ago
Nah, you won't sell the cow like that. You need to add more reliance on the public CA infrastructure and third-party code signing. Also, "ask user"? Ask the TPM instead — I mean, why would the computer's owner trust the
39.
▲
by
Joker_vD
2mo ago
Well, what else can it do, really? It has to boot with pretty much zero knowledge about the external world (maybe except asking the user for the current date and time). Sure, you can hardcode an outdated list of CAs (it's always outd
40.
▲
by
Joker_vD
2mo ago
Ah, detached "while" as a replacement for if-guarded "break". A concept that, syntactically, can very easily be fitted onto ALGOL/Pascal-like languages but not onto the C-likes: loop stmt1; while condA; stmt2;
41.
▲
by
Joker_vD
2mo ago
> How would you fix signals Well, I'd probably just get rid of them entirely? For example, Windows functions just fine without them: SIGINT is emulated by the kernel doing essentially pthread_create(..., ®istered_ctrl_c_handl
42.
▲
by
Joker_vD
2mo ago
> Far pointers are for accessing memory in different segments. They're basically obsolete now. Project CHERI would like to disagree.
43.
▲
by
Joker_vD
2mo ago
No, I understand that. I just find it deeply ironic that when an interrupt/signal arrives, pretty much the only thing you can do to handle it, is to raise some flag, then leave the handler and continue doing whatever you were doing i
44.
▲
by
Joker_vD
2mo ago
There is also a charming statement in POSIX standard that If the signal occurs other than as the result of calling abort(), raise(), [CX] [Option Start] kill(), pthread_kill(), or sigqueue(), [Option End] the behavior is undef
45.
▲
by
Joker_vD
2mo ago
> the slowdown is coming from (probably) slow musl implementations of memcpy/memset. It's wild that such a fundamental piece of code (you can't really implement operation on structs without those) is library-supplied. I wi
46.
▲
by
Joker_vD
2mo ago
> We just need better, efficient and faster GUIs to put these TUIs to an end. Well, yeah, it just that those GUIs failed to appear for at least 30 years. > It is time to move on from using this arcane technology from the 60s-70s. Yo
47.
▲
by
Joker_vD
2mo ago
Not everyone has a (non-screen) keyboard either, you know.
48.
▲
by
Joker_vD
2mo ago
Well, there is apparently no evidence that he was "far right" either. So far, investigators haven't found any evidence on social media or other writings by Crooks that might help identify his motive for the attempte
49.
▲
by
Joker_vD
2mo ago
Yeah... I've recently had a chance to compare how fgets is implemented in both GNU libc and musl, and, well. With glibc, it was a challenge to even find where the fgets's code actually is.
50.
▲
by
Joker_vD
2mo ago
Adverb hilariously (comparative more hilariously, superlative most hilariously) 1. In a hilarious manner; so as to amuse greatly. The author was greatly amused how quick the resulting algorithm works.
51.
▲
by
Joker_vD
2mo ago
Most files aren't contiguous on a disk either, you know. Which makes inability to punch wholes in the middle of the files without having to read/write huge chunks of data quite annoying, especially when you write a linker or an ar
52.
▲
by
Joker_vD
2mo ago
Also known as a directory.
53.
▲
by
Joker_vD
2mo ago
Is it? Because it all really looks awfully close to "okay, fine, the dark energy/matter apparently also can do/be this stuff as well, just so we can write in whatever correction factors we need to make the theory fit the obse
54.
▲
by
Joker_vD
2mo ago
Y'know, makes me wonder why Democrates didn't disband ICE and CBP when they had control over the Congress and the government. I mean, they knew those agencies would be used in precisely this way, yet did nothing anyhow.
55.
▲
by
Joker_vD
2mo ago
There is a book "The People's Republic of Walmart: How the World's Biggest Corporations are Laying the Foundation for Socialism" describing how e.g. Walmart (there is also Amazon now) does its own large-scale planning. I
56.
▲
by
Joker_vD
2mo ago
Of course you can. E.g. the steel production in the US has been government-planned (well, DoD-planned) since the WW2, and it's not even that big of a secret, just not something that's mentioned often.
57.
▲
by
Joker_vD
2mo ago
You know, when you speak language where the word for Tuesday is literally "Seconder" and the word for Friday is "Fifter", it's really difficult to accept that starting to number the days of the week from Sunday is a
58.
▲
by
Joker_vD
2mo ago
Well, maybe sometimes you need to format lots and lots of RFC 822 timestamps, or some other format that explicitly includes day-of-week.
59.
▲
by
Joker_vD
2mo ago
Applaud the Claude. Applaud it. Surely you ain't mis-Anthropic?
60.
▲
by
Joker_vD
2mo ago
So you propose to replace the nation states with corporate governments. Okay, two questions: who gets to make the laws, including the property laws? and who gets to enforce those laws?
More ›