Live data from Hacker News

Love C, hate C: Web framework memory problems

alew.is

201–210 of 218 posts

Re: Love C, hate C: Web framework memory problems

#201
post #174

Earlier quoted context omitted.

This should not be downvoted, it is both factually correct and a perfect illustration of these problems already being solved and ages ago at that. It is as if just pointing this out already antagonizes people.

A certain group of people likes to pretend before C there were no other systems programming languages, other than BCPL. Ignoring what happened since 1958 (JOVIAL being a first attempt), and thus all its failings are excused because it was discovering the world.

I think the main reason you see this happening over and over again is because we're teaching this whole discipline wrong. By 1960 most of the problems in software development were known and had one or more solutions. Knuth spent decades just cataloging what was mostly already known (and moved the field forward in quite a few occasions as well).

And yet, you can't go a day without someone declaring that now is the time to do it right, this time it will be different. And then they proceed to do one thing after another for which the outcome is already known, just not to them. I think the best way to teach would be to start off with a fairly detailed history of what had gone before, just to give people a map and some basic awareness of the degree to which things have already been done, rather than to find new and interesting ways to shoot themselves in the foot (again).

Re: Love C, hate C: Web framework memory problems

#202

Earlier quoted context omitted.

The code is on github. Figure out a way to get a shell through that code and you're hosed if someone recognizes it in active use.

I mean tha hacker won't know what software is running on the server, unless the server announces itself which can be traced to the repo, but then, why ?? Who cares about this guy's vps? This whole thread makes no sense to me and I'm the only one questioning.

> This whole thread makes no sense to me and I'm the only one questioning.

That may well be because this isn't your field?

Re: Love C, hate C: Web framework memory problems

#203
post #195

Earlier quoted context omitted.

> You have a read buffer and somewhere where you have to write to. The "somewhere you have to write to" is the same buffer you are reading from.

Not if you are doing buffered reads, where you replace slow file access with fast memory access. This buffer is cleared every X bytes processed. Writing to it would be pointless because clears obliterate anything written; or inefficient because you are somehow offsetting clears, which would sabotage the buffered reading performance gains.

Maybe I missed it, but ITT we were talking about C buffers, not buffered reads.

Re: Love C, hate C: Web framework memory problems

#204

Earlier quoted context omitted.

I mean tha hacker won't know what software is running on the server, unless the server announces itself which can be traced to the repo, but then, why ?? Who cares about this guy's vps? This whole thread makes no sense to me and I'm the only one questioning.

> This whole thread makes no sense to me and I'm the only one questioning. That may well be because this isn't your field?

Or maybe well thought out, intelligent responses are a rare thing. Occam's razor suggests the latter.

Re: Love C, hate C: Web framework memory problems

#205

Earlier quoted context omitted.

> I propose that we start taking the appropriate amount of professional responsibility. I agree. For me that means: software engineering should start taking the same attitude to writing software that structural engineers bring to the table when they talk about bridges, buildings and other structures that will have people's lives depending on them. I'm not sure how we're going to make rings out of bits but we need to…

Cost is a useful metric because it reflects a number of relevant things: Time to develop, effort to maintain - yes, but also people turnover, required expertise levels, satisfaction, and so on. Whether or not you like it, you have to care about cost if you want to make rational decisions. I'm not talking about assigning a Euro/Dollar/Yuan value to each hour spent on a project, but you need a rough idea about the size…

> It's a very pleasant language with a pleasant community

I'm sure.

> bullshit.

> But that old world is gone.

> Every competent programmer

> an excuse to deliver more crap.

Yeah. Very pleasant indeed.

Some serious cognitive dissonance is in your post. You claim how you're part of a community that so damn pleasant, but you're out throwing shade...

Re: Love C, hate C: Web framework memory problems

#206
post #195

Earlier quoted context omitted.

Not if you are doing buffered reads, where you replace slow file access with fast memory access. This buffer is cleared every X bytes processed. Writing to it would be pointless because clears obliterate anything written; or inefficient because you are somehow offsetting clears, which would sabotage the buffered reading performance gains.

Maybe I missed it, but ITT we were talking about C buffers, not buffered reads.

I thought we were talking about high performance parsing. Of which buffered reads are one. Other is loading entire document into mutable memory, which also has limitations.

Re: Love C, hate C: Web framework memory problems

#207
post #96
post #87

Earlier quoted context omitted.

Gotcha hypocrisy might be a really cheap thing to point out, but they're not wrong. I have noticed my fair share of Rust Derangement Syndrome in C++ spaces that seems completely outsized from the series of microaggressions that they eventually point out when asked "Why?"

It’s interesting, over the past 15 years I’ve had occasion to work with other c/c++ devs on various contracts, probably 50ish distinct different companies. Not once has rust even come up in casual conversation.

I'm probably a little younger than you, so it's likely a generational thing. I also notice it's a lot more pervasive in internet-driven watercoolers than face to face.

Re: Love C, hate C: Web framework memory problems

#208
post #199
post #90

Earlier quoted context omitted.

I don't think Rust will ever be as big as C++ because there were fewer options back then. These days Go/Zig/Nim/C#/Java/Python/JS and other languages are fast enough for most use cases. And Rust learning curve doesn't help either. C++ was basically C with OOP on steroids. Rust is very different. I say that because I wouldn't group Rust opposition with any of those languages you cited. It's different for mostly differ…

As someone that was there, a few things helped C++ adoption, and even then it wasn't without the C vs C++ flamewars that endure to these days. - At the time, with a few minor differences, C++ was Typescript for C, thus very easy to adopt into existing projects - Being born on the same birthplace as C and UNIX, meant all C compiler vendors saw as added value to have it as part of their offering, and it was natural tha…

> Rust doesn't have this kind of industry wide push, even in OSes where it is being embraced like Windows and Android, note that it isn't being pushed as yet another way to write userspace applications, rather low level OS services.

This seems apropos in a world where C++ has been bleeding userspace buy-in for longer than I've been professionally programming.

I started learning Rust a few months ago in an attempt to teach an old dog new tricks, and while it's quite pleasant as far as it went, I can think of several classes of programs that I would be reluctant to use the language for. But I wouldn't dream of using C++ for those types of programs either.

There are rumors floating around that Microsoft is rolling their own rustc-codegen-gcc paired with their C2 codegen backend. Don't know what to make of those rumors, but it helped to reassure me to feel like the time I invested thus far hasn't been wasted.

Re: Love C, hate C: Web framework memory problems

#209
post #174

Earlier quoted context omitted.

A certain group of people likes to pretend before C there were no other systems programming languages, other than BCPL. Ignoring what happened since 1958 (JOVIAL being a first attempt), and thus all its failings are excused because it was discovering the world.

I think the main reason you see this happening over and over again is because we're teaching this whole discipline wrong. By 1960 most of the problems in software development were known and had one or more solutions. Knuth spent decades just cataloging what was mostly already known (and moved the field forward in quite a few occasions as well). And yet, you can't go a day without someone declaring that now is the tim…

Unlike actual engineering, software "engineering" as a field has decided to reinvent itself every generation - worse, every turn of the trends, even every project and person. Majority of the practitioners are in it for superficial reasons, unaware of its rich history and culture.

With ignorance comes arrogance of an individualist intellectual, thinking their unique revolutionary contribution will wow the public and move the field forward. Except inevitably they're not only reinventing the wheel but the entire automobile, without knowing basic principles and the work of predecessors. It has a lot in common with modern art.

> we're teaching this whole discipline wrong

I sometimes think languages after C, like C++ and Java, were misguided in some ways. Sure they provided business value, brought new ideas, and the software worked - but their popularity came at a cost of leaving countless great thoughts behind in history, and resulted in a poverty of software culture, education and imagination.

There are optimistic signs of people returning to the roots, re-learning the lessons and re-discovering ideas. I think many are coming to realize the need for a reformation of sorts.

Re: Love C, hate C: Web framework memory problems

#210
post #199

Earlier quoted context omitted.

As someone that was there, a few things helped C++ adoption, and even then it wasn't without the C vs C++ flamewars that endure to these days. - At the time, with a few minor differences, C++ was Typescript for C, thus very easy to adopt into existing projects - Being born on the same birthplace as C and UNIX, meant all C compiler vendors saw as added value to have it as part of their offering, and it was natural tha…

> Rust doesn't have this kind of industry wide push, even in OSes where it is being embraced like Windows and Android, note that it isn't being pushed as yet another way to write userspace applications, rather low level OS services. This seems apropos in a world where C++ has been bleeding userspace buy-in for longer than I've been professionally programming. I started learning Rust a few months ago in an attempt to…

Not sure about the new backend, but they are indeed quite invested.

"From Blue Screens to Orange Crabs: Microsoft's Rusty Revolution"

https://www.youtube.com/watch?v=uDtMuS7BExE

Post reply on HN