Interesting. I wonder what the thinking is here? It’s almost like a really poor manual password hash. Here’s something derived from my date of birth. Store that instead of the actual date. Pretty weak though.
Interesting. I wonder what the thinking is here? It’s almost like a really poor manual password hash. Here’s something derived from my date of birth. Store that instead of the actual date. Pretty weak though.
In fairness, I remember a time when everyone smoked in Japan and flicked cigarette butts all over the place.
I can’t speak for others, but the python3 transition wiped the smile off my face for awhile there.
I suppose it depends on the language? For the most part I think you’re right. Exceptions are only used (if at all) in situations where a program diverges unexpectedly from its normal flow. But take a language like Python. They’re just everywhere. Even your plain old for
loop ends on an exception, and that’s just business as usual.
This could be why Obiwan wound up a hermit? (Programmers of my generation at least talk about “Obiwan errors” because his name sounds like “off-by-one”.)
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-bit int
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.
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.
You mean like the comment fields we’re using right here on lemmy?
As others have pointed out, it’s usually some markdown that’s embedded within the text. Lemmy is using a format that’s actually called “markdown” if I’m not mistaken, or a slight variation/subset thereof.
I’ve gotten used to the double-star for bold and what not to the point that it annoys me when some message client or whatever doesn’t support it. I share code snippets with people fairly often, and the code markdown is particularly useful to maintain its legibility.
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.
I guess the MAC address guy is up next. 48 bits may not go so far if every light bulb is going to want its own.
Imagine if you were the guy who made the call on IPv4 addresses…
Falsehoods About Time
Having a background in astronomy, I knew going into programming that time would be an absolute bitch.
Most recently, I thought I could code a script that could project when Easter would land every year to mark it on office timesheets. After spending an embarrassing amount of…er…time on it, I gave up and downloaded a table of pre-calculated dates. I suppose at some point, assuming the code survives that long, it will have a Y2K-style moment, but I didn’t trust my own algorithm over the table. I do think it is healthy, if not essential, to not trust your own code.
Falsehoods About Text
I’d like to add “Splitting at code-point boundary is safe” to your list. Man, was I ever naive!
Fair, though I guess my interpretation was that void*
is kind of like a black hole in that anything can fall into it in an unsettling way that loses information about what it was?
One thing most text editors can do is print. I was shocked the other day when I couldn’t print a readme from vscode when someone asked for hard copy.
This is why I fear activating any AI features in the IDE.
Compiler/interpreter: Can’t find variable farfignewton
.
Earlier:
Me: Declare variables near, far
IDE: Oh! You mean farfignewton
right? I found that in some completely unrelated library you didn’t write. Allow me complete that for you while you’re not paying attention.
This was a struggle for me going from hobbyist programmer to working at a company. I tried to tone it down. Really. But eventually I got “promoted” to having my own office with a suspiciously thick door. Hmm…
True story. I was looking for an answer to an obscure problem and found it in a 10-year-old stackoverflow post. Then I looked more closely at the author…
Hey! Me from 10 years ago, stop being such a smart ass! It’s obnoxious.
This is a big deal. The UN doesn’t throw the term genocide around lightly. And I thank the OP for linking directly to their site to give as unadulterated a reporting as possible.
Interesting. I had never heard of LilyPond before. I do a lot of music scoring using abc notation and even wrote myself a GUI to help with that, but it’s interesting to see that there is another script language for generating sheet music.