Live data from Hacker News

"No way to prevent this" say users of only language where this regularly happens

xeiaso.net

221–230 of 342 posts

Re: "No way to prevent this" say users of only language where this regularly happens

#221
post #162

Earlier quoted context omitted.

> Like assigning an address to then use as pointer to physical memory... What do you mean by this? Like writing to a specific integer address? *((volatile unsigned *)(0x20001000)) = 0x12345678; That's not UB and is also the only way to write to memmapped registers.

It's not UB. It's also not covered by standard - it's implementation-specified. What will happen is dependant on decision of compiler writers. It is, however, not the only way to write to memmapped registers. The original C way of doing so was to use an assembly function wrapping the actual act of reading/writing (honestly, better than doing the above, as it helps making it very explicit how the write will happen as…

Both of the alternative do not generate same code though.

At least they don't without LTO.

Re: "No way to prevent this" say users of only language where this regularly happens

#222

Earlier quoted context omitted.

> This was an important reason why I switched back to C from C++ and why I don't have much interest in Rust. I can't quite stand the the "holier than thou" attitude in.parts of those communities. This is 100% baffling to me. Let me explain. 1. Every single area has zealots. Yours included. And we're not talking only work. Every hobby area as well. 2. What the attitude of the most toxic 0.1% of the users of a thing is…

In Europe (esp Eastern), if you take resale price into account you have to get a german car because everything else loses value faster :) The VWs you can just dump on the fans. I know, I live in a similar country.

The point is that the guy who was bombarded by feedback that VW Golf is good did not go out of his way to avoid buying it. He did his own research, formed his own informed opinion, and didn't go against the grain due to misguided notions.

Wink wink.

Re: "No way to prevent this" say users of only language where this regularly happens

#223

Earlier quoted context omitted.

I spent 20 years with C++ as my main language, and the endless and heated "style discussions" where personal.opinions are thrown around like facts were just tiring and a massive waste of time. And it's such endless circular discussion where the extremists show up (I guess the equivalent in Rust is shaming projects that use unsafe, IIRC there have been quite a few dramas in the past). Shit like this is simply mentally…

Restating your anecdotal evidence is just stubborn and does not advance any discussion but you do you. You also addressed almost zero of what I said and asked you.

In the end I did seriously look into Rust for a time and decided that's not my thing and instead watch progress from the sidelines in case anything interesting happens in the language to give it another try.

What's quite obvious when watching from the outside is that it's almost always people with a crab emoji in their profile who are more likely to talk shit about C programmers (myself included in a couple of cases via subtweeting).

I usually just shrug it off and move on, because what else is there to do?

Re: "No way to prevent this" say users of only language where this regularly happens

#224

Earlier quoted context omitted.

THIS, sadly. Though it'd be more accurate to re-phrase: 's/just don't want to do it/have other priorities, or are stuck in organizations with other priorities/'

I get that we can't always do what we want in our jobs (and in some places quite rarely even). I get it fully and I sympathize. But that still doesn't do C/C++ any favors. None of my Rust contracting work ever resulted in a buffer overflow.

And it doesn't need to be Rust, as the anti-seat belt folks always are quick to complain about, plenty of systems languages since PL/I and NEWP days have bounds checks by default.

Back in the days we were arguing for Ada, Modula-2, Object Pascal on Usenet, we were straitjacket programming advocates apparently.

Re: "No way to prevent this" say users of only language where this regularly happens

#225

Earlier quoted context omitted.

Restating your anecdotal evidence is just stubborn and does not advance any discussion but you do you. You also addressed almost zero of what I said and asked you.

In the end I did seriously look into Rust for a time and decided that's not my thing and instead watch progress from the sidelines in case anything interesting happens in the language to give it another try. What's quite obvious when watching from the outside is that it's almost always people with a crab emoji in their profile who are more likely to talk shit about C programmers (myself included in a couple of cases…

> In the end I did seriously look into Rust for a time and decided that's not my thing and instead watch progress from the sidelines in case anything interesting happens in the language to give it another try.

FYI I did the same because the kind of work that I do does not desperately need Rust's benefits.

But I'll always call out biased and prejudiced people and I don't care about what the HN group-think believes.

> I usually just shrug it off and move on, because what else is there to do?

1. Stop thinking that the zealots are representative of... anything at all, really. (I don't include myself in that group of zealots. I get ticked off by bias and firmly held preconceived notions. That's why I commented as much in the entire sub-thread started by me.)

2. Do your own research like you did.

3. Refuse to think about trolls and zealots. Which is what all of us as healthy adults in this attention-predatory age of the internet should do.

Re: "No way to prevent this" say users of only language where this regularly happens

#226

Earlier quoted context omitted.

Mostly agreed with your comment though I still have to remark that every community has zealots and it's mystifying to me why are people so annoyed by Rust's. So it's hard to agree that "Rust is a cult". As you said, it's a pragmatic but also kinda niche language. I don't reach for it unless I can't do the job with others, easier and quicker to work with languages.

The C sphere is actually refreshingly free of zealotry (mainly I guess because there isn't such a thing as a "C community" and even despite C being the main attack target of language zealots - funny enough nobody complains about those pesky assembly coders and their hippie attitude towards memory safety lol). The "religious zeal" was also an important reason why I switched back to C from C++ and why I don't have much…

Are you sure? The C sphere overlaps with the UNIX one, for obvious reasons.

Re: "No way to prevent this" say users of only language where this regularly happens

#227
post #224

Earlier quoted context omitted.

I get that we can't always do what we want in our jobs (and in some places quite rarely even). I get it fully and I sympathize. But that still doesn't do C/C++ any favors. None of my Rust contracting work ever resulted in a buffer overflow.

And it doesn't need to be Rust, as the anti-seat belt folks always are quick to complain about, plenty of systems languages since PL/I and NEWP days have bounds checks by default. Back in the days we were arguing for Ada, Modula-2, Object Pascal on Usenet, we were straitjacket programming advocates apparently.

Haha, nice analogy, thank you. :)

And yeah I am gradually giving up on arguing with people who are extremely biased but point at me and blame me for being biased. Seems there's no win.

I actually regret engaging so thoroughly in this thread but once started I figured I'll not budge and will hold my ground. I am anti-group-think that way.

I haven't engaged in such threads in a while and I think the next time around is going to be months in the future. We'll see.

Re: "No way to prevent this" say users of only language where this regularly happens

#228

Some of the HN discussion about whether "new projects in C should be allowed" is moot: Fluent Bit was imported into git in 2015 [0] (a few months before Rust's first public release), and may be considerably older than that for all I know. I suppose incidents like this actually do give a reason to "rewrite it in Rust", when "it" is "widely deployed infrastructure written in C". OTOH, I'm sure there were plenty of non-…

People slipping backdoors into stuff are no doubt super enthusiastic about Rust both for the opportunity for new anonymous nobodies to rewrite long stable and proven tools as well as the dependency ecosystem that tends to blindly pull in multiple different entire HTTPS/TLS stacks into anything but the most trivial software.

Re: "No way to prevent this" say users of only language where this regularly happens

#229
post #101
post #66

Earlier quoted context omitted.

> Code should be dumb and easily maintainable. Well ... that rules out everyone's pet favourite here to replace c.

which is C, because nothing can replace C. C is portable assembly. Don't use it unless you really must. Yes I know people want to replace C with Rust, no it won't work because Rust is not assembly, yes it can be used to replace anywhere between 90% to 99% of C and it shouldn't even be too hard. (Unless your embedded device manufacturer doesn't care, which of course they don't.)

Only if you mean K&R C, where C was mostly a portable macro assembler, calling into Assembly code, written and compiled via an external assembler like in the first iteractions of the UNIX rewrite from Assembly into C.

The Lions book is a good example of what that C used to be like.

Re: "No way to prevent this" say users of only language where this regularly happens

#230
post #206

Earlier quoted context omitted.

Most of the free democratic western world does not have a lax gun culture like the US has and yet there's no tyranny. Weird.

This isn't as clear cut of a case as you make it out to be. Britain's recently been on a path of overregulation bordering tyranny and limiting free speech. Canada is on a similar path. German green and red party politicians recently caught flack for trying to criminalize unpleasant critique. Press freedom and press independence are actively getting worse and Europe is setting course on a path of nationalism and conse…

And the US police routinely rob travellers of their cash and goods at gunpoint.

So again, what good are the lax gun laws providing the populatnon against tyranny?

Post reply on HN