Live data from Hacker News

I stopped everything and started writing C again

kmx.io

91–100 of 475 posts

Re: I stopped everything and started writing C again

#91
> Virtual machines still suck a lot of CPU and bandwidth for nothing but emulation. Containers in Linux with cgroups are still full of RCE (remote command execution) and priviledge escalation. New ones are discovered each year. The first report I got on those listed 10 or more RCE + PE (remote root on the machine). Remote root can also escape VMs probably also.

A proper virtual machine is extremely difficult to break out of (but it can still happen [1]). Containers are a lot easier to break out of. I virtual machines were more efficient in either CPU or RAM, I would want to use them more, but it's the worst of both.

[1] https://www.zerodayinitiative.com/advisories/ZDI-23-982/

Re: I stopped everything and started writing C again

#93

C, or more precisely a constrained C++ is my go to language for side projects. Just pick the right projects and the language shines.

I've tried, but never succeeded in doing that; the complexity eventually seeps in through the cracks.

C++'s stdlib contains a lot of convenient features, writing them myself and pretending they aren't there is very difficult.

Disabling exceptions is possible, but will come back to bite you the second you want to pull in external code.

You also lose some of the flexibility of C, unions become more complicated, struct offsets/C style polymorphism isn't even possible if I remember correctly.

I love the idea though :)

Re: I stopped everything and started writing C again

#95

Earlier quoted context omitted.

> helping the cause Rust evangelism is probably the worst part of Rust. Shallow comments stating Rust’s superiority read to me like somebody who wants to tell me about Jesus.

Jesus wasn't written in Rust? Sounds like a recipe for UB if you ask me.

That's very funny, Jesus was pretty much undefined behavior personified from the perspective of the state/church.

Re: I stopped everything and started writing C again

#96

Earlier quoted context omitted.

Rust is not free of trade offs and you're not helping the cause the way you think you are. Just a few off the top: - Rust is a much more complex language than C - Rust has a much, much slower compiler than pretty much any language out there - Rust takes most people far longer to "feel" productive - Rust applications are sometimes (often?) slower than comparable C applications - Rust applications are sometimes (often?…

Not to mention, modern CPUs have essentially been designed to make C code run as fast as possible.

I haven't designed any CPUs myself, someone with more experience could give you more details.

But I don't think this carries much weight anymore, might have been true way back in the days.

C gives you more control, which means it's possible to go faster if you know exactly what you're doing.

Re: I stopped everything and started writing C again

#97
post #36
post #8

I started programming with C a long time ago, and even now, every few months, I dream of going back to those roots. It was so simple. You wrote code, you knew roughly which instructions it translated to, and there you went! Then I try actually going through the motions of writing a production-grade application in C and I realise why I left it behind all those years ago. There's just so much stuff one has to do on one…

Don't forget Pascal is still alive.

Also, COBOL and FORTRAN. FORTRAN is still being developed and one of the languages supported as first class citizen by MPI.

There's a big cloud of hype at the bleeding edge, but if you dare to look beyond that cloud, there are many boring and well matured technologies doing fine.

Re: I stopped everything and started writing C again

#98
post #90
post #4

[flagged]

The best feature of C is the inconvenience of managing dependencies. This encourages a healthy mistrust of third-party code. Rust is unfortunately bundled with an excellent package manager, so it's already well on its way to NPM-style dependency hell.

It's also very mature, not so much of a moving target.

Both aspects are something I think many developers grow to appreciate eventually.

Re: I stopped everything and started writing C again

#99
post #19
post #4

[flagged]

Rust has three major issues: - compile times - compile times - compile times Not a problem for small utilities, but once you start pulling dependencies... pain is felt.

Compared to C I'd say the biggest issue is complexity, of which compile time is a consequence.
Post reply on HN