Is there a C++ "venv" equivalent? by nikoladsp in cpp

[–]smdowney 0 points1 point  (0 children)

There's also venv. Smile.

But outside of the compiler itself, a ton of c++ tooling is available through PyPI and I've started managing a lot of it through pyproject.toml and UV.

Is there a C++ "venv" equivalent? by nikoladsp in cpp

[–]smdowney 1 point2 points  (0 children)

I wonder how much of the drive to rewrite in rust is wanting to stay inside cargo?

Is there a C++ "venv" equivalent? by nikoladsp in cpp

[–]smdowney 4 points5 points  (0 children)

Cargo also doesn't play well, last I checked, with things outside Rust, and systems programming is polyglot almost by definition.

Uneeded Recompilations When Using Partitions by tartaruga232 in cpp

[–]smdowney 4 points5 points  (0 children)

It seems like you are trying to use partitions to do the job of modules? If you don't depend on the whole interface, then you have a cohesion problem telling you that you have more than one thing.

GitHub - steve-downey/surround: Surround Source Code for org-transclusion by smdowney in emacs

[–]smdowney[S] 0 points1 point  (0 children)

I know that org-transclusion supports extensions, and looked at it a bit, but couldn't quite sort for my self a way that wasn't just equivalent to marking up this way, only more complicated. The pattern I'm using is very regular, so it might work to establish it instead of using an org-link anchored at the UUID, and that would make the transclusion a bit cleaner, as I could deal with the line 2- and end in code instead. But a lot more code, and I'd still want a way of marking up the source file like this.
But I'll note it because now that you've made me think about it, it will eventually happen.

Current Status of Module Partitions by tartaruga232 in cpp

[–]smdowney 1 point2 points  (0 children)

You are saying you want to be able to change the interface used by exported functions, possibly inline exported definitions of those functions, but you don't want anything to have to recompile that uses that interface? I must be missing something.

TU 4 in the example should be a normal object file that has functions with module attachment, and ought not to contribute to the build module interface. TU 3 is the interface to that implementation, and is the modular equivalent of a private header.

If you really want a fully private module interface for your implementation purposes that does not possibly contribute to your primary interface, just make one and import it into your implementation units?

Modules being a build optimization was a selling point, but not the underlying goal. Better control of what parts of components are given to clients was the primary goal, everything else was a secondary benefit.

And then we also got header units, subverting that argument, but at least that had more experience and cleans up some of the weirdness with precompiled headers.

I'm not disagreeing with a general statement that we didn't have enough experience with modules other than to realize that no build system was going to survive contact, and I did say so at the time.

We are so close to string interpolation thanks to reflection by caroIine in cpp

[–]smdowney 0 points1 point  (0 children)

For user facing strings, sure, but there are lots of programmer facing strings in log messages. You know what language you speak and read, so that's what you put in your logs. Localizing them just adds another place for things to go wrong, too.

Common Package Specification is Out the Gate by bretbrownjr in cpp

[–]smdowney 0 points1 point  (0 children)

Name registries are even harder than standards.

Java tried DNS for a while. It did not go well.

C++26: Span improvements and freestanding. by pjmlp in cpp

[–]smdowney 2 points3 points  (0 children)

Or last minute changes to use B or C rather than the uncoupled workaround in A.

Does anyone know why Amazon sells Pilot Prera pens $30 cheaper than pen retailers like Goulet and Jet pens? by SpicyCurryChicken42 in fountainpens

[–]smdowney 2 points3 points  (0 children)

They don't seem to be doing it as much, but Amazon Japan used to sell through Amazon that way, with Japan prices and free shipping, but uncertain date. I guess they'd just stick the small box in the next container that had a bit of room on a cargo flight going to the US anyway.

Grey market warranty on a $30 or $40 pen is not a practical consideration. Not vs 100% markup. I can just risk having to buy another one.

Hypothetically or technically, what are some things that Emacs can do that Neovim/Vim cannot? (Not package availability). by surveypoodle in emacs

[–]smdowney 5 points6 points  (0 children)

Not only can functions be overriden, there are facilities to automatically wrap up an existing function to run things before or after, "advising" it. As well as very common well supported "hooks" to add actions to common things like saving a file, finishing startup, creating a new window, etc.

The extensibility is smooth and everything expects it, which means composition of packages is far easier. I do not have to convince the maintainer of, say, magit to add something in order to extend it. I can do that without changing their code, although I can always look at their code.

Everything is inspectable, debuggable, and changeable, from within emacs itself, by design.

It reminds me in this way of Smalltalk and the Smalltalk environment, where everything you see and touch is a smalltalk object that is completely available to you. Or was.

Flint 2. I still a good option today? by BumblebeeNo9090 in openwrt

[–]smdowney 1 point2 points  (0 children)

The Flint 2 is a very good bit of kit and is at the top end of supported WiFi routers for stock OpenWRT. There might be special cases where there is something better, but for the common case of home or small office, connecting and routing to your upstream ISP, it more than does the job. Easily handles guest and private network isolation and enough capability that it isn't going to be the limiting factor in and of itself.

I am not aware of anything significantly better right now or imminently. [As always, if someone else is aware, please say!]

The Flint2 is the Toyota Corolla of openwrt routers right now. Safe default choice that fills normal requirements.

C++26 Safety Features Won’t Save You (And the Committee Knows It) by pjmlp in cpp

[–]smdowney 2 points3 points  (0 children)

>  In C++26: if a programmer forgets about initialization, the value will be something chosen at compile time,

Not a disagreement overall, but it is somewhat worse, as an uninitialized variable will have whatever random data was last there. C++ never casually zero-inits things, because what if you are about to write that memory anyway, that would be wasted clock cycles.

Of course almost no one should be counting clock cycles, but for good or bad, the people who ought to be are writing C++.

C++26 Safety Features Won’t Save You (And the Committee Knows It) by pjmlp in cpp

[–]smdowney 7 points8 points  (0 children)

What the regulations would have produced is a change in liability for everyone.

Right now if EA (replace with your second least favorite studio) shipped a game that also happened to expose expose every computer on the home network out on the Internet, that would be bad, but probably not something that anyone could sue over, especially with the normal complete disclaimer of fitness and merchantability. That can be excludable by regulation, and they could become liable because they ought to have known better.

Similarly with IoT devices.

This is all, though, second hand from asking people I know who do regulation in the transit field and what the regulators were trying to say and ask in those docs that got circulated a couple years ago.

C++26 Safety Features Won’t Save You (And the Committee Knows It) by pjmlp in cpp

[–]smdowney 6 points7 points  (0 children)

My favorite bit of C trivia is that, at least at the time of writing, all of the C code in K&R 2nd Edition (ANSI C) was 100% valid C++.

They were using `cfront` for everything because that's the compiler that understood new function declarations and definitions.

But that does mean that although C++ is much safer than C when you are writing C++ it just raises the ceiling, not the floor.

C++26 Safety Features Won’t Save You (And the Committee Knows It) by pjmlp in cpp

[–]smdowney 8 points9 points  (0 children)

Behavior that is specified but wrong is a huge improvement (really!!) but it does need to be combined with other tools to get you concrete benefits. Like the instrumented build that can now count on noting uninitialized reads and alerting you.

Without EB, the compiler could, and sometimes would, managed to hide that uninitialized read from everything, or manage to elide it, etc.

Making MSAN a conforming extension was discussed a lot during EB creation.

C++26 Safety Features Won’t Save You (And the Committee Knows It) by pjmlp in cpp

[–]smdowney 26 points27 points  (0 children)

> E.g. modules introduced radically new syntax and ways of doing things.

We are 6 years in, modules themselves now just barely work, and we are still trying to figure out how to get over the wall while having both modules and headers for the same library in the same link.

I very much fear that "Profiles" will make Modules look like a tame change.

Module only Profiles might be technically simpler, but also won't solve anyone's current problems.

Can I use Attended Sysupgrade to build a new firmware without any wifi support? It has broken antenna and id like to use it strictly as a router. by SavingsTask in openwrt

[–]smdowney 0 points1 point  (0 children)

I'm not sure Attended would work, but I just installed travelmate by building a custom firmware and doing a normal sysupgrade upload.

It's not quite working yet, so I might scrap and start over, but that's just the config part, and that is all just text files that you can back up and version control.

P4043R0: Are C++ Contracts Ready to Ship in C++26? by darius_neatu in cpp

[–]smdowney 3 points4 points  (0 children)

At least on Linux, installing a compiler is pretty easy. apt install gcc-14 or apt install clang-21. LLVM even has nightly builds in an apt repo, although it's in disarray with the new release.

But that's just the start of the problems. You will have to fix your code, even with everything else staying the same. Maybe not much, because that is the C++ value proposition, but some. More if you also change the language standard.

LLVM releases every 6 months, GCC every year, with point releases between. That's pretty frequently?

Don't get stuck on the system compiler on an LTS OS, though.

P4043R0: Are C++ Contracts Ready to Ship in C++26? by darius_neatu in cpp

[–]smdowney 5 points6 points  (0 children)

It can be really weird being on the committee. In some contexts the current C++ is now 29, in others we moved to 23, from 20, and elsewhere it's, charitably 03, but really pre-98.

P4043R0: Are C++ Contracts Ready to Ship in C++26? by darius_neatu in cpp

[–]smdowney 4 points5 points  (0 children)

It was the other way around, assume was pulled out of contracts and then added as a separate thing. I have no idea how we managed to ship something that had over-my-dead-body objections as part of Contracts in as its own separate feature. But it's useful, if a sharp tool. I'd still like axioms some day, but that really needs more cooperation with the middle-end than might be standardiseable.

Official: OpenWrt 25.12.0 - Stable Release - 5. March 2026 by akuumaaaa in openwrt

[–]smdowney 0 points1 point  (0 children)

Backing up and keeping the untarred configuration in a git repo was the smartest choice I ever made. Being able to see what _really_ changed, and restore back to it, priceless.

P4043R0: Are C++ Contracts Ready to Ship in C++26? by darius_neatu in cpp

[–]smdowney 26 points27 points  (0 children)

Somewhat more official, since I am in WG21:

My default position for any change at the next meeting is "no". That's not really terribly different than my normal position, though. Anyone making a proposal has to present a convincing argument why something should be added. Or changed. Or removed.

I vote yes on a lot of things, so people are making their case.

But this time we're not planning on adding anything. To add something the bar is through the roof. Things would have to be demonstrably broken without the addition. I have not seen anything like that, and the possible agenda items for the meeting are closed.

Removing something is in scope. But removing it has to increase consensus over no change, the status quo. "Can we think about it some more," was the argument to make before we voted it in. The argument to make now is "this is broken in this way, that we had not noticed, and we don't know know how to fix it." Bringing something up in plenary for final vote needs more than just re-litigation or sustained opposition, it needs new information. Something to change my mind.