I think the thing with C++ is they have tried to maintain backward compatibility from Day 1. You can take a C++ program from the 80s (or heck, even a straight up C program), and there’s a good chance it will compile as-is, which is rather astonishing considering modern C++ feels like a different language.
But I think this is what leads to a lot of the complexity as it stands? By contrast, I started Python in the Python 2 era, and when they switched to 3, I was like “Wow, did they just break hello world?” It’s a different philosophy and has its trade-offs. By reinventing itself, it can get rid of the legacy cruft that never worked well or required hacky workarounds, but old code will not simply run under the new interpreter. You have to hope your migration tools are up to the task.
I started in C and switch to C++. It’s easy to think that the latter sort of picked up where the former left off, and that since the advent of C++11, it’s unfathomably further ahead. But C continues to develop and occasionally gets some new feature of its own. One example I can think of is the restrict
key word that allows for certain optimizations. Afaik it’s not included in the C++ standard to date, though most compilers support it some non-standard way because of its usefulness. (With Rust, the language design itself obviates the need for such a key word, which is pretty cool.)
Another feature added to C was the ability to initialize a struct
with something like FooBar fb = {.foo=1, .bar=2};
. I’ve seen modern C code that gives you something close to key word args like in Python using structs. As of C++20, they sort of added this but with the restriction that the named fields have to come in the same order as they were originally defined in the struct, which is a bit annoying.
Over all though, C++ is way ahead of C in almost every respect.
If you want to see something really trippy, though, have a look at all the crazy stuff that’s happened to FORTRAN. Yes, it’s still around and had a major revision in 2018.
There is also the ounce of prevention is worth a pound of cure aspect to all this. The anti-carbon tax camp loves to blame rising costs on essentials like groceries on the tax (conveniently forgetting to mention that aside from it being a minor contributor, the rebates are specifically put in to address this).
But you know what else will raise the price of food? Climate change. I think it’s fair to say that it has already contributed to shortages of certain items and you can bet it’s only going to get worse to the point that we will be looking back on the prices today nostalgically before long.
Well that’s not really what I’m referring to. I’m talking about EUI-64, which was supposed to make life easier by giving everyone an IP addressed based on their MAC address. You wouldn’t need to worry about address collisions with such an address, as it would be globally unique.
But following up on it a little just now, it seems the idea is falling out of favour precisely due to the privacy issues I was fretting about. I assume that means DHCP or some similar scheme will come to dominate just as with IPv4? I’m not an IT guy so I don’t know what the current thinking is on this.
I’m glad the decision swung in favour of Charter protection. I worry about the implications in terms of IPv6. Typically, addresses in that case are built out of the MAC address of the device. That means you can nail down not just the person but the exact device they were using. Since IPv6 is big in the cellular world, that means your phone.
It was more than just tab conversion. For example, it decided on its own that:
if(...) {
...
}
else {
...
}
would look better like:
if(...) {
...
} else {
...
}
I mean I guess I could live with that, but really? I imagine there’s some config where you can disable all this, but it just doesn’t seem worth some giant git commit every time I touch a file with the editor.
I tried it briefly. It certainly is a lot snappier than Atom ever was, I’ll give it that. Seemed to be pretty good with Python, but when I opened some C++ source, it went around reformatting my indentation and replaces tabs with spaces. I will have to see if there is a way to disable all that, as I found it obnoxious.
Yeah how’s that going? (I don’t live in Alberta.)
It seems to me this idea of opting out of federal programmes might score some quick political points if you’re a have-province, in that it could be argued you’re sinking more into them than you’re getting out. But Alberta has historically had a boom-and-bust economy, and as such, cutting those federal lifelines seems unwise. But what do I know?
In an email to Global News on Sunday, Alberta’s health minister said that if the federal government pursues a national pharmacare program, Alberta intends to opt out, and instead intends to obtain a full per capita share of the funding.
So they can just pocket the money like that with no strings attached? wth
Good Lord, we’ve had the MMR vaccine since what, the 60s? What’s wrong with people?
I guess the problem is there aren’t so many people today who still remember a pre-vaccine world. I asked my dad about it. He got the mumps when he was a kid. Missed a year of school and had to retake the 3rd grade. He also sustained permanent hearing damage.
Ok, so in most languages, you have some way to define a data structure. It could be anything. Maybe it stores the X and Y coordinates of a Cartesian vector. And now you want to do stuff with your vectors, so you write a bunch of functions you can call like get_vector_length(myvect)
or add_vectors(vect1, vect2)
.
In OOP, you add that kind of functionality into the data structure itself. So now you can just write myvect.length()
or vect1 + vect2
(by implementing the +
operator for your data structure). At this point, the data structure is typically called a “class” and the functions you build into the class are “methods”.
As you dig deeper into it, you learn about inheritance. When you have 2 related classes that share a lot of functionality, you can use inheritance to save a lot of duplication in your code.
In statically-typed languages, it can also come in useful to have a base class you can pack into a container, since most containers can only accept a single data type. If you had some graphics classes like Rectangle
and Circle
that all inherit from Shape
, you could make a collection of Shape
that’s a mix of those. (In dynamically-typed languages, this tends to be less of an issue since you can put objects of any data type straight into the list. This might be why OOP isn’t approached as soon in tutorials for such languages, since it’s not as mission-critical? But it’s still a good idea to have some sort of class hierarchy where it makes sense.)
The idea is that an insurance company deals exclusively with one or several pharmacies in exchange for lower costs. Steve Morgan, a professor at the University of British Columbia in Vancouver and an expert on pharmacare systems, said that “we don’t know exactly how much of the savings that are generated get passed on to the consumer at the end of the day.”
Oh I have a pretty good idea about that…
You could try base64 maybe? The above would be: Z3nFNDK4ut8Em7nYkkpXhd2IckM= (28 chrs)
base64 uses A-Z, a-z, 0-9, and the + and / characters to encode 6 bits per character. That means you can encode every 3 bytes (or 6 hex) in 4 characters (since 3 * 8 bits = 4 * 6 bits). If the data are not a perfect multiple of 3 bytes, the last group of 4 characters gets padded out with = signs.
Bear in mind that there is going to be nimby opposition to pretty much any new power project. I’ve seen it where I live with wind farms, for example, and it unfortunately does work, leading to delays, downscaling, and outright cancellation. I guess the thing is that with nuclear or hydro, you tend to run into a few colossal battles to get the things built, whereas with wind, you’re looking at hundreds of smaller clashes. Solar seems a little less contentious, but it’s also the least reliable energy source, meaning you will have to look at large-scale energy storage projects which, again, will attract a nimby element.
Cutting/deferring carbon taxes is such a bad idea. It sends the wrong message. There should be no exemptions. This is the cost per tonne of carbon. Period.
If there is a segment of the population who suffer disproportionately due to the tax, you compensate them by providing a larger share of the rebates. This already happens with rural residents who have higher costs and fewer options in terms of transportation.
Now let’s say you lived down east and took out a loan to replace your oil furnace with a heat pump. You figured an increase in the rebate that would come with the promised carbon tax hike would help you pay it down. But then they decide to defer the tax (and therefore the rebate) instead. It’s a betrayal.
Personally, I have a fair amount of faith in the CANDU design. The fact that they can operate using unenriched uranium is itself comforting relative to light water designs, and they employ a number of passive safeguards that would have prevented a Fukushima or what have you.
That said, I think we as Canadians tend to forget that most of us live near the border and there are nuclear plants on the other side as well. For example, where I live, the nearest plant is on the other side of Lake Ontario in upstate NY, as opposed to Darlington or Pickering as you might expect. And it might as well be the sister plant of Fukushima in terms of its design.
At any rate, though, I am generally supportive of building more reactors if done right.
There is a lot NA could learn from Germany and, well, Europe in general. I’m in Canada and read an article recently about how some Scandinavian communities keep their bike trails serviceable all winter long. I wish! They pack down the snow kind of like a cross-country ski trail here but over a broader width.
The worst part is that he tried to blame me for the accident.
Good God. Now there’s some drama you could’ve done without. Sounds like you had a competent lawyer though. Glad that part worked out!
I looked up what the model the local dealer was selling. They’re made by a company called trivel which I see now seems to specialize in orthopedic designs. Specifically, they were selling the e-azteca model. What I remember from watching others ride around the parking lot was the seating position looked a bit more recumbent than a regular bike and there was some back support? Wish I had tried one myself! Would have more to say about it then.
Since you were cool I’ll share a few pics of the accident I plan to put in the video I’m making. I warn you it’s a bit graphic but it’s not blood and gore levels of graphic.
Thanks for sharing those. I think the importance of such photos is that they give you a baseline to compare where you are today. I had some major surgery to remove a growth from my neck and looked like hell afterwards. I also had some facial numbness and the doctor wasn’t sure that would ever heal? It did after several years but in a weird way. Like I can touch my neck and feel it on my earlobe. Weird stuff like that. lol
That is one hell of a story! It just burns me that one second of dumbfuckery by a dude with no idea of the responsibility that comes with driving a large vehicle created this life-altering saga for you.
Also this is a bit weird, but my ankle is super problematic.
Keep bitching about this to the doctors or get a second opinion. Maybe they’ll send you for an x-ray or some physio? You have to be your own advocate with this sort of thing. And as they say, the squeaky wheel gets the grease.
If I can ride a bicycle one day, even just for a short ride.
Last time I was at the ebike dealer, they had a bunch of these 3-wheeler cargo models and I saw several people take off on them. I asked the owner about them. He said he rides one himself in the winter since they are much more stable over snow and ice, and the extra storage in the back between the 2 wheels is handy. He also said the last 2 he sold were to people with mobility issues. One was a husband with some sort of condition that kept him house-bound a lot of the time until his wife figured out he could do this and now they ride everywhere. The other was a 91-year-old cyclist who was saying his balance was not what it once was. I kid you not! Anyway, something to consider.
I’m working on a YouTube video that will recount the story.
Please drop a link here if you do this. I would love to see this.
I am long since past my teen years, but as an avid traditional cyclist who is now an ebike enthusiast, here are a few points off the top of my head:
I think the pros outweigh the cons? Anything that steers us away from car culture is desperately needed at this point, and this is one of the only practical alternatives in suburbia.
I would be for bike safety being taught at schools, though I feel licensing for minors would be a quagmire? Let’s not go there. I would be for speed limiters that are harder to bypass. For example, I can disable mine by phone app. If I had any trouble I could ask, well, a teenager? lol
But perhaps most importantly, cycling infrastructure, at least in North America, is a joke and there is so much that can be done on the safety front it’s not funny. I wish the decision makers were all bike commuters. Then they would understand the level of impracticality in their well-meaning but futile attempts to improve the situation.
I don’t remember it costing much more and the kids seemed relieved to not incur my wrath on a monthly basis. And not long after, my ISP increased the speeds on all accounts, so it more or less got us back to where we had been anyway.
Incidentally, if you’ve been with a particular ISP for years, it’s worth talking to a person when you change your account. They may have some discretionary power to give you say an introductory rate on a better plan to reward your loyalty?
There were breaking changes between C and C++ (and some divergent evolution since the initial split) as well as breaking changes between different releases of C++ itself. I am not saying these never happened, but the powers that be controlling the standard have worked hard to minimize these for better or worse.
If I took one of my earliest ANSI C programs from the 80s and ran it through a C++23 compiler, I would probably need to remove a bunch of
register
statements and maybe check if an assumption of 16-bitint
is going to land me in some trouble, but otherwise, I think it would build as long as it’s not linking in any 3rd party libraries.