HNHacker News
TopNewBestAskShowJobs

humanrebar

12,138 karma · joined February 8, 2013

submissionscomments
humanrebar··on The two factions of C++
This is true. That is why there is no leadership committee for the C++ ecosystem. There is no way to select one.
humanrebar··on The two factions of C++
The C++ profiles proposal is something like an "editions lite". It could evolve into more fully featured editions some day, though not without some significant tooling work to support prevention of severe memory and type safety issues across different projects linked into the same program.
humanrebar··on The two factions of C++
Googletest is the most widely used test library for C++. Googlemock is the only mocking library available that's reasonably feature complete.
humanrebar··on A C++ Mixin System
You can implement that in C++ code, no language extensions required, by using type erasure and a pointer semantic type with at least one constructor templated on the type of the object being pointed to.
humanrebar··on Arrested and Charged Because My 11yo Was Walking 1 Mile from Home
All the more reason not to overshare.
humanrebar··on Arrested and Charged Because My 11yo Was Walking 1 Mile from Home
This is really counterproductive policing. Seems like the big lesson the mother should take is about discussing her parenting with a police officer.
humanrebar··on Trump wins presidency for second time
Housing isn't any cheaper. Basics like groceries aren't either. If someone is struggling to own a clean and safe home, pointing at averages isn't convincing.

Many people don't trust that math.

humanrebar··on Post World War II Food
A better argument against chicken breast is that the commercial chickens have been selectively bred, fed, and treated with not-found-in-nature medicines to the point that they don't resemble a "natural" ingredient anymore. This would be in contrast to wild poultry like wild duck, goose, turkey, pheasant, squab, etc.
humanrebar··on The C23 edition of Modern C
> IIRC Clang implements a C++ style auto, while GCC implements a C style auto, which has subtle differences for 'auto pointers' - not sure if those differences have been fixed in the meantime

Both have compatibly implemented the standard C++ auto. Since 2011 or so.

humanrebar··on Why not just do simple C++ RAII in C?
Or taken to an extreme, it's not hard to compose clang-queries that find for any arbitrary syntax. You could ban 'int' and pointers in your project if you wanted!
humanrebar··on Orthodox C++
Sure. I do. But there are tradeoffs even then. Look at the error messages compared to printf for example.
humanrebar··on Orthodox C++
Well, wrap it up in something more ergonomic, but it works. I'm usually putting strings into some sort of I/O API (like a logger) instead of hardcoding copies to stdout everywhere.

https://stackoverflow.com/a/72575650

humanrebar··on Orthodox C++
std::string_view with %.*s as a string formatter work well enough if you're set on using printf.
humanrebar··on Apple apologizes for iPad 'Crush' ad that 'missed the mark'
People love outrage. Many are not aware of it though.

If you're engaging with it, it's for you.

humanrebar··on Xmake: A cross-platform build utility based on Lua
C++ modules need a lot of communication between build systems, compilers, packaging environments, and other dev tools like clangd. Given some of that interop isn't available anywhere due to missing or at least unimplemented protocols, I expect XMake is overpromising here. The CMake blogs are more qualified:

1. General named module use: https://www.kitware.com/import-cmake-c20-modules/

2. Importing the std module: https://www.kitware.com/import-std-in-cmake-3-30/

humanrebar··on Xmake: A cross-platform build utility based on Lua
I find that C and C++ need nontrivial code generation or environment tuning often enough that you really want a Turing complete expression syntax available.
humanrebar··on Xmake: A cross-platform build utility based on Lua
It could all be python, but you would need many customization points to serve all the use cases needed to build natively compiled code in all its forms.

Language ecosystems like Rust and Go, and even Haskell shrink the problem space to a smaller universe to grab dependencies. You can see this by how awkward it would be to build a program containing those three languages. They all have different package repositories and build workflows.

C, Fortran, C++ have very rough tools, but the community wants, and often needs, a wide range of dependency management options. Like mixing languages. Or shipping to PYPI. Or integrating with exotic embedded build environments.

humanrebar··on Rhyme as Reason
It's good advice to not take shots after you're already drinking.

Even for mixed drinks, the ABV can vary a lot more compared to lagers, pilsners, etc. The sugar content can be quite a bit higher in mixed drinks as well.

humanrebar··on Rhyme as Reason
Beer before liquor, never been sicker. Liquor before beer, you're in the clear.
humanrebar··on Amazon grows to over 750k robots, replacing 100k humans
It doesn't seem like we are close to robotics providing housing, food, and healthcare for nominal costs to everyone. Seems like we still need a lot of humans working in those spaces.

In particular, durable goods (and human bodies and even hair) need a lot of maintenance. So far, at least, robots aren't especially gifted at maintenance tasks.

humanrebar··on 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup
At this point, it's not realistic to maintain interesting C++ programs without a build system. That being said, I expect the specific g++ example you provide will end up working with some special casing in the compiler, at least eventually, when someone submits patches to GCC to get it to work.

But mostly, it's not realistic to directly wire up calls to g++ anymore outside of research examples. Note that other compiled languages use systems like gobuild, cargo, Maven, etc. instead of fiddling with gccgo, rustc, javac, etc. directly.

https://www.kitware.com/import-std-in-cmake-3-30/

humanrebar··on How Matzo Is Made
You can order it online and have it delivered.

https://www.amazon.com/matzah/s?k=matzah

humanrebar··on A proof that Meson is Turing-Complete
> I don't think this proof invalidates any of the excellent work that has been put into Meson. If anything, this shows that build configuration is a hard enough problem that requires a turing-complete language. Most features have gone into Meson because somebody actually needed them. And for this reason, Meson serves as an estimate of the required complexity.

I think it's true given the goal to support a specific set of requirements of modern build systems.

The problem is that there is no separate dependency management protocol to target, and there is no separate projects description configuration format. That means build systems end up trying to interoperate with, or even implement large portions of, those kinds of subsystems.

humanrebar··on Can you really explain the difference? Subtle nuances of English words
There is nuance in the difference between the word "morals" and the word "ethics".

The problem is that there are a variety of viewpoints on the distinction. Many of the viewpoints are contradictory or otherwise incompatible.

That's why I think the words are effectively ambiguous. I don't communicate in a way that assumes my audience members have a shared and coherent understanding of the distinction.

As an aside, to pick nits on Bernstein's definition of morality:

> Morality refers to right and wrong as a felt sense.

Many people wouldn't self-describe as having moralities that rely on "felt sense". They might even bristle that morality operates in some of the ways that food preferences do. In particular, a lot of moral systems have a notion of self-evident and universal truths. The Declaration of Independence prefaces itself from that perspective, for instance.

humanrebar··on Code search is hard
The problem with monorepos is that they're so great that everyone has a few.
humanrebar··on Code search is hard
The build system coherence provided by a monorepo with a single build system is what makes you understand this::fn(double) as a single thing. Otherwise, you will get N different mostly compatible but subtly different flavors of entities depending on the build flavor, combinations of versioned dependencies, and other things.
humanrebar··on Cache is King: A guide for Docker layer caching in GitHub Actions
If you're saying to use a proper dependency management system (package manager or monorepo build system) and keep Docker to mostly dumb installs, I agree.

Though I also think Nix and Bazel are typically not the right starting points for most projects. If you're not committed to having at least four experts on those complex tools in perpetuity, find something simpler.

To be clear, inventing your own, better system is typically as bad. Language specific ecosystems can be too, but it's often hard to avoid both Maven and gradle if you're a Java shop, for instance.

humanrebar··on The xz attack shell script
What if the project is python or a dependency of python?
humanrebar··on The xz attack shell script
Meson is way better than autotools, but if you're too level to depend on python, you're probably needing to customize your build scripts in the ways you mention. I don't see meson being a silver bullet there.

Also, meson's build dependencies (muon, python) are a lot for some of these projects.

humanrebar··on The xz attack shell script
Running that command is simple, sure. The development workflows when that doesn't work is full stop horrible.

Also the basic workflows for the alternative build systems have maybe ten more characters to type. It's not bad.

← PreviousPage 2 of 34Next →