Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
James_K
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
361.
▲
by
James_K
2y ago
We can all at least appreciate that COBOL is something you try to get rid of where possible. If we took the same attitude to C++ as we do COBOL, then I think the issue would be much less severe.
362.
▲
by
James_K
2y ago
> it is not difficult to write very nice, readable, efficient, and safe C++ code That's a fine case of Stockholm Syndrome you've got there. In reality, it is hard. The language fights you every step of the way. That's beca
363.
▲
by
James_K
2y ago
That in and of itself is a failure. The decision to continually bolt more stuff onto this mess instead of developing a viable alternative is honestly painful. When you look at something like Zig, it gets you much of what C++ offers and in a
364.
▲
by
James_K
2y ago
> This is a Bjarne issue. I have come to find this category of error to be distressingly large.
365.
▲
by
James_K
2y ago
> Among girls : 10% where lesbian, 84% were hetero and 12 % were interested in both genders > Among guys: 7% homo, 92% hetero and almost none were interested in both genders That's insane.
366.
▲
by
James_K
2y ago
> Guys that the girls think she wants to see but she will never like Brutal.
367.
▲
by
James_K
2y ago
It is valid C program. Undefined behaviour occurs at runtime, but it is valid and should be compiled by a conformant C compiler.
368.
▲
by
James_K
2y ago
I don't see how the proposed solution improves matters. Even without the second optimisation, it seems that the third could still occur and cause issues. I suppose the compiler must only recognise the potential for a pointer writing ar
369.
▲
by
James_K
2y ago
This code doesn't assume that q follows p, that's the trick to it. The way you are trying to explain this to me, I feel like you haven't read the article or understood the code snippet.
370.
▲
by
James_K
2y ago
> The following type designates an unsigned integer type with the property that any valid pointer to void can be converted to this type, then converted back to pointer to void, and the result will compare equal to the original pointer: &
371.
▲
by
James_K
2y ago
The only reason it doesn't work is because the stack grows downwards on x86 targets so p is at a higher address than q. If you swap the variables round, it compiles and runs printing the value assigned. https://godbolt.org&#
372.
▲
by
James_K
2y ago
char p[1], q[1] = {0}; uintptr_t ip = (uintptr_t)(p+1); uintptr_t iq = (uintptr_t)q; if (iq == ip) { *(char*)iq = 10; print(q[0]); } I am genuinely a little scared of this C program.
373.
▲
by
James_K
2y ago
> Starting on January 19, 2025 Facebook's internal policy makers decided that Linux is malware I'm glad someone finally said it.
374.
▲
by
James_K
2y ago
I have a utility called ZSH Autosuggestions, and it's probably one of the most useful things on my computer. It shows you a sort of preview of the most recent command you typed that matches the prefix of the current command you are typ
375.
▲
by
James_K
2y ago
> Your argument is reductive because it requires the assumption that people only want one thing No it doesn't. I explicitly mention that there is one thing they want to do the most and that other things are closer to or further away
376.
▲
by
James_K
2y ago
I think by describing it in the starkest possible terms, one can elucidate the situation. What people object to here is the idea of being a drone, and I'm saying "you are and it's fine".
377.
▲
by
James_K
2y ago
> I understand you’ve convinced yourself that the UBI and other hypotheticals are proof but they’re only proof if you’re already subscribed to those reductive views Far from reductive, my theory is fully explanatory. People have a certai
378.
▲
by
James_K
2y ago
Luckily you don't need to convince the treasury, just the electorate. And they are desperate for it. As you said, Bojo's levelling up scheme was like electoral crack. Perhaps some day we will achieve the level of democracy where t
379.
▲
by
James_K
2y ago
> I know a woman who won the lottery at a young age, but kept her job as a waitress for decades because she wanted to be a waitress This is a lovely anecdote, but practically speaking most people do not have such enjoyable jobs. The worl
380.
▲
by
James_K
2y ago
The reason for investing in the North is pretty simple: people live there. We have three options: do something productive with he area, do nothing and continue to pay for its decline, or move all the people to London and let house prices ri
381.
▲
by
James_K
2y ago
The process is quite simple and fairly obvious. Government policy is the bedrock of all economic development. Government officials will always have the most knowledge about the capital, so all policy is tailored to it. It's no surprise
382.
▲
by
James_K
2y ago
I don't think you'd really like to see any code like that in production. The point of an interview is to demonstrate your talents as they relate to the job. While fiddling with types is fun, it is not really relevant and is the ex
383.
▲
by
James_K
2y ago
Well okay, let's walk the goalposts back. Suppose there was some radical UBI scheme in place and now you get paid the same amount for working as you would for not working. There is no financial incentive to do any piece of work, but al
384.
▲
by
James_K
2y ago
I use it deliberately to invoke these negative connotations. I am not commenting on the skill, creativity, or any other aspect of the drones. I think it's just a fairly basic fact that most of us are drones. We go to work, we do what w
385.
▲
by
James_K
2y ago
Are you trying to insult me?
386.
▲
by
James_K
2y ago
Why? It is a simple fact that people only go to work because they get paid. You can verify this for yourself by seeing how many people continue to work for a company after it has stopped paying them.
387.
▲
by
James_K
2y ago
This reply seems very witty until you realise that there are actual people whose job it is to act in a circus. In the real world, a job is mainly being told to do things that you don't really want to do, but deciding to do them anyway
388.
▲
by
James_K
2y ago
Do you think you'll make it to the interview stage of the hiring process if the interviewer looks on your personal website and finds that you wrote an entire blog post calling out your last interviewer by name? I would not risk invitin
389.
▲
by
James_K
2y ago
As a programmer, your goal should always be to produce the most readable possible code. Just because you can't produce something perfect doesn't mean that you should give up on readability entirely.
390.
▲
by
James_K
2y ago
Why is that your takeaway? The test isn't just "write a fizzbuzz", it's "write a fizzbuzz better than all the other candidates". Suppose one candidate produces straightforward readable code within those restric
More ›