Better HN
topnewbestaskshowjobs
Log inSign up

simplotek

1,581 karma · joined Oct 22, 2022 (4y ago) · 796 submissions

Submissions

comment 3y ago · link · parent

> Yes, unfortunately they decided to replace one antiquated technology by yet another one.

Your statement makes no sense and reads like you have an irrational axe to grind regarding cmake.

CMake is just a way t provide high level descriptions of your project and from that generate a build system of your choosing. It does its job well and better than any alternative. Making random claims like "outdated" is meaningless, specially as you can use cmake to generate Ninja or visual studio projects.

comment 3y ago · link · parent

> I tried to like cmake for twenty years.

This statement alone automatically eliminates any credibility from what you said. CMake was revolutionized with CMake 3.0, which was released in 2014. Since then CMake became a radically different build system, and got so many things right it became the de facto standard.

Also, CMake is a build system generator. It's just a high level specification that generates build systems that you pick, like make, ninja, even visual studio and Xcode.

comment 3y ago · link · parent

> I thought the modern C and C++ communities effectively standardized on CMake?

They have. You'll be hard pressed to find anything other than CMake on any professional project.

Even Qt has migrated to CMake in spire of having developed make.

This was the very first time I ever heard of BUSY, quite frankly.

comment 3y ago · link · parent

> "This food is terrible" merely needs to be true, and anyone can say it, even people who aren't chefs.

If you bitch about how "this food is terrible" but you do nothing to make it more palatable or order something else and instead just stand there eating while complaining and reordering and asking for seconds... The food is not terrible, and you just enjoy bitching.

comment 3y ago · link · parent

> Pointing out that something has shortcomings is the first step.

Talk is cheap. If even that same critic feels that his solution to his problem is not worth pursuing, the criticism adds nothing and creates no value. At best it's nitpicking about stuff that falls in Eisenhower's "not important"/"not urgent" box.

comment 3y ago · link · parent

> yes, let's just ignore the mountains of people (...)

Who are they, exactly, and why haven't anyone from that mountain thought it would be a worthy investment of their time to pull it off?

I see you complaining that people have to implement things, but why has no one ever implemented the thing you perceive to be so invaluable?

comment 3y ago · link · parent

> Do you not view io_uring or Windows IOCP as alternatives?

I don't simply due to the fact that no one ever bothered to put something together on UNIX-like systems that resembles any of those options.

If anyone felt that those were worthy ventures, in these last few years we would already have seen something resembling that effort. But we haven't.

comment 3y ago · link · parent

> I don't think he's wrong that the POSIX synchronous IO model isn't a great fit for modern hardware, though.

Opinions don't really matter. Solutions to real-world problems do.

To me, the fact that no one up to this day felt that the issues in this area was significant enough to warrant a fix or an alternative tells me that it's noise about nothing.

comment 3y ago · link · parent

> Accomplishing negative impact.

This opinion piece is the epitome of a negative impact work. It's easy to accuse random things of being all wrong, but it's far harder to actually present something you feel is right.

comment 3y ago · link · parent

> I've spent quite a bit of time amongst the Rust community, and I have never actually seen any of these RiiR evangelists that are complained about so much on HN.

You're telling me you don't see "why not rewrite it in Rust" posts in a forum dominated by people who are enthusiastically working on Rust codebases?

In the meantime, you did noticed that RiiR is already a meme, didn't you?

comment 3y ago · link · parent

> It makes code a tiny bit more verbose (...)

The issue is not verbosity. It's the needless addition of nesting levels and independent expressions in a non-idiomatic way, which greatly increase the cognitive load of checking a single row of chained predicates. It's bad code.

comment 3y ago · link · parent

> If the short circuit becomes critical for performance the

The point is not performance. The point is readability, and expressing things clearly and with the appropriate level of detail and leaving out nesting and scope. Safety and performance are important but secondary advantages.

comment 3y ago · link · parent

> Without the disadvantages? What advantage does C hold over Rust if you value a composable language which is safe and expressive?

Having existing C codebases in production which are time-tested and stable and reliable is a huge advantage of having to rewrite them from scratch, don't you think?

Also, you can check out C code from 20 years ago and build it in your personal laptop with ease, and be able to do the exact same thing 20 years from now. Meanwhile, Rust still fails to put together a single specification, let alone a standard one, and relies on reference implementations that may or may not exist in a few years.

comment 3y ago · link · parent

Code reviews don't replace automatic tests or even linters. What leads you to believe they replace memory management errors?

comment 3y ago · link · parent

I agree, these ignorant Rust fanboy comments don't help Rust gain any goodwill, and even convey the idea that their vocal proponents are clueless and completely out of touch with basic industry requirements. It's unthinkable for any project to just casually drop everything and go for a complete rewrite in entirely different programming languages and tech stack. But this blend of Rust fanboys keep on insisting this is a reasonable thing (only when it's Rust, oddly) and have the gall of trying to turn things upside down and make believe that it's unreasonable to not jump head first onto a major rewrite.

comment 3y ago · link · parent

> C++ is not necessarily popular for its merits. Inertia has a lot to do with it.

This personal assertion says nothing about C++ other than stating you have an irrational dislike for it. There are plenty of reasons that make C++ one of the most successful programming languages in mankind's history, if not the most successful, and inertia is not it.

comment 3y ago · link · parent

> in mine, yes definitely 100% the second code is more readable than the first

If anything, adding a nesting level for each chained predicate makes code harder to read, and needlessly so.

comment 3y ago · link · parent

> in short circuit conditionals even more so.

I'm curious, what leads you to believe that skipping unnecessary calls to functions with side effects is something to be avoided? Do you believe that unconditionally calling code with side effects specially when you don't have to is something to be desired?

comment 3y ago · link · parent

> Relying on short circuiting to avoid side effects or improving performance meaningfully is pretty shaky.

You've got it all backwards. Short-circuiting is not used to avoid side effects. Short-circuiting is used to avoid needless calls to any predicate, which can have and often do has side-effects, and if it doesn't have today it might have tomorrow.

If you don't call them when you don't have to, your code is in a better shape.

And let's not pretend that unconditionally macode with side effects when you don't have to is a good practice.

comment 3y ago · link · parent

> I may be a little cynical but when I read the words "modern utilities" my first associations are: (...)

I think this comment is too short-sighted and naive. In the end at best it's an apples-to-oranges comparison between what you personally like and are used to with a cherry-picked set of tools and what you personally don't like and have an axe to grind with a cherry-picked set of strawmen.

There are plenty of decades-old tools that provide colorful TUI interfaces that don't integrate with standard tools and make them hard to reuse with UNIX tooling. There are plenty of excellent non-standard tools that are quite recent and raise the bar in UX. This is not an old-vs-new comparison. This is reads like a rant directed at strawmen.

Let's face the facts: JSON is excellent as a data interchange format, and YAML is a far improvement in expressiveness over INI-type formats. Colors are important to make things human-readable, and TUI is a UX godsend in applications that involve view-heavy data presentation and ensure complex commands can be a key press away.

comment 3y ago · link · parent

> The named booleans suggested here help adding clarity, but more often than not they'll end up being single-use (const) variables that just paraphrase their definitions.

That's ok. The worst tradeoff in the "named booleans" pattern proposed in the blog post is that it misses the whole point of chaining predicate evaluations, which is leveraging short-circuiting to prevent further predicates from being evaluated.

Chaining logical comparisons and the way they short-circuit is specially important when a predicate has preconditions and/or is expensive and/or has side-effects.

If your predicates are hard to read you don't fix that mess with "named booleans". You fix them by extracting them to a pure function like

   isNotUnknown(_someLongNamedVar) && isNotEmpty(_someLongNamedVar)

comment 3y ago · link · parent

> So many of the problems I see come from developers (myself included) adding new business logic to a process, or fixing a bug and not thinking through the side effects of the change

That's a great take, but I'd turn it upside down. Problems come from developers adding new features while not being mindful of the importance of helping out whoever is reading that code in the future to understand what are all the possible states.

Anyone can hack together code that's all over the place, but forcing people in the future to do shotgun surgery is as bad as adding the bugs ourselves.

comment 3y ago · link · parent

> The word game appears twice in all the articles, so I took this writing as a broad outlook. And C++ is not C.

C++ is indeed not C. C++ is a considerable improvement over C. You can stick with your C-style code and get the same result you'd get if you had used C, but you still have access to features that simplify a great deal your life and don't have a performance impact, like templates. With C++ you can have your C cake and eat the C++ cake too. The only drawback is compilation times, but any caching system takes care of that.

comment 3y ago · link · parent

> There's also almost nothing pragmatic about C++.

That's a heck of a weird take. C++'s main value proposition has always been pragmatism. In all possible and conceivable aspects of a programming language. The fact that is a (mostly) superset of C, support for OO, RAII, outstanding backwards compatibility, time-tested and future-proofed, "you pay for what you use", it targets everything and runs everywhere, it's the language of choice on most mainstream OSes and specially Windows, etc.

Why do you think people tolerate footguns and memory shenanigans? Why do you think that C++ is still one of the most popular languages ever devised and continued to hold the crown even after the C++98 cross through the desert?

C++ has been the optimal choice with regards to pragmatism at least for the past two decades. What does C++ offer other than pragmatic solutions?

comment 3y ago · link · parent

> but I do use linters (like clang-tidy) that enforce a decent chunk of the guide. And reference like a style guide (or any documentation really), yes.

That's my experience as well. Clang-tidy, clang-format, cppcheck and Core Guidelines. I don't recall the last project I've worked that didn't used that combo.

comment 3y ago · link · parent

> For whatever reason it's never really caught on

I don't believe this is true at all. I don't recall working on a single C++ for the last half dozen years which hasn't adopted the Core Guidelines up to the code review level.

Of course it's a blend of survivorship bias to claim that no project uses the Core Guidelines if you personally fail to consider it to start with.

comment 3y ago · link · parent

> I wonder if the author writes this content for free or if they expect to be paid.

Does your personal expectation of getting your business model validated enjoy the privilege of stifling everyone else's ability to benefit from a free internet?

I mean, the internet was already around way before paywalls were invented.

And does your business model enjoy this exclusive privilege or does each and every business model have the right to strong arm everyone you deem a market to lose rights?

comment 3y ago · link · parent

> I agree. The only reason it’s “inhumane” to lay people off is because of our horrible safety net and ridiculous cost of education.

It goes way beyond that point. Your tenure in a company requires you to specialize and develop your skills to meet the needs of your employer. When you are fired then the employability of those skills might be none or even detrimental to finding jobs anywhere else. The longest you work for an employer, the more potential you risk losing.

Also, you will leave an employer at a different stage in your life. Your ability to allocate your time and energy to onboard onto the requirements of another company can be severely limited due to factors like your family responsibilities or even your health and energy levels. Working for a company always requires you to waste potential that could be used.

Lastly, you will make life decisions around your work. For example, you might buy a home based on factors such as where your workplace is, your job requirements, and your salary range. If you're forced to switch jobs you might be forced to sell your home at a point in time that is detrimental to your interests.

For a company, an employee is expendable. For an employee, being fired can and often has a profound detrimental impact in their life, physically, mentally, emotionally, economically, and socially as well.

A job is not a mere business deal. A job is a social contract. An employer demands employees to make life changes around them, and employees are expected to comply. It's profoundly unfair and one-sided to make believe that an employee's social responsibilities only go as far as their paycheck.

1
111213
27