Tranus

joined 2 years ago
[–] Tranus@programming.dev 1 points 2 years ago (4 children)

What do you mean no alternative to VS? There are many IDEs on Linux. What does VS do that nothing else can?

[–] Tranus@programming.dev 31 points 2 years ago (10 children)

Well letters don't really have a single canonical shape. There are many acceptable ways of rendering each. While two letters might usually look the same, it is very possible that some shape could be acceptable for one but not the other. So, it makes sense to distinguish between them in binary representation. That allows the interpreting software to determine if it cares about the difference or not.

Also, the Unicode code tables do mention which characters look (nearly) identical, so it's definitely possible to make a program interpret something like a Greek question mark the same as a semicolon. I guess it's just that no one has bothered, since it's such a rare edge case.

[–] Tranus@programming.dev 19 points 2 years ago (4 children)

I've seen shitposts with more compelling stories than some of those isekais.

[–] Tranus@programming.dev 7 points 2 years ago

Every thing you code is binary. You may write '15', but the code your computer runs will use '00001111'. The base-10 source code is only like that for human readability. All mathematical operations are done in binary, and all numbers are stored in binary. The only time they are not is the exact moment they are converted to text to display to the user.

[–] Tranus@programming.dev 5 points 2 years ago (1 children)

I find that much harder to read than a for loop. You are making a helper function to only use it once, which is kind of confusing when it is totally unnecessary. Also, distinguishing between two groups only inside the setter line is weird. Applying the modification to one group, then the other, is more obvious. Considering the alternative isn't really longer, and only using basic loop syntax, I would just use the loop. If you really want to add the "set dots visibility" explanation into it, just use a comment, that's what they're for.

I literally just now misunderstood your code and had to change my comment to correct for it.

[–] Tranus@programming.dev 7 points 2 years ago

Use:

items=[...]
for o in items:
    ...

This is the most direct way of doing what you want. The first option might allocate a new array each iteration, which is unnecessary. The match statement is both a pain in the ass to write and less direct, which at best compiles to the same thing and at worst has you doing a bunch of totally unneeded comparisons.

If this 'i' variable you used isn't just an incrementing counter, use the last option. If it is though, it's an extra counter you don't actually need.

The performance difference here would be so small I doubt you could even observe it. So, you really shouldn't worry about this particular pattern. Compiler optimizations are more likely to trigger on simple, direct code, so writing it as directly as possible is probably the fastest option anyway.

[–] Tranus@programming.dev 4 points 2 years ago (1 children)

" dumb it down"? Isn't the mobile app (s) displaying the same posts as the website(s)?

[–] Tranus@programming.dev 4 points 2 years ago (5 children)

Tests would be a pretty bad idea. It is easy to imagine the ways that someone could use that to attack their political opponents. Similar things were used to disenfranchise voters in the past. Also, it is too easy to corrupt the legitimacy of such a test. All a person would need to do is get a heads up of how the test works and practice for it. Or, have the test designed to be too easy to pass. It's easy to say "make it impartial, scientific, and dignified", but that doesn't mean it will be. I seriously doubt any governmental body ever has or will be that trustworthy. An actual age limit would be objective and clear though, making it much more practical.

[–] Tranus@programming.dev 15 points 2 years ago (1 children)

That's not entirely accurate. The first amendment mentions both freedom of speech and freedom of press. Freedom of speech is for individuals sharing ideas, not just reporters. That applies both conceptually and legally. Hate speech is seen as a necessary exemption by many, because of the potential ramifications (see comic). That isn't the same thing as saying free speech wouldn't apply even without said exemption; even though it may lead you to the same conclusion.

[–] Tranus@programming.dev 25 points 2 years ago (1 children)

You can't set reminders if you never knew the interview existed. It's still their fault, but it's an easy mistake to make.

[–] Tranus@programming.dev 8 points 2 years ago

If you're installing Ubuntu or Manjaro, it's honestly easier than windows. The options make more sense, and you get much more useful info on your drives. With windows, I have to identify them by capacity, which has led to me installing on the wrong drive before. And live CD installs even allow you to look something up for help right there.

Arch is a totally different story though. No way I would have started using Linux if that was my introduction to it.

[–] Tranus@programming.dev 0 points 2 years ago (3 children)

It sounds to me like they we were going for more of a realistic future than a utopia. The money free utopia thing never seemed that important, I suspect it's only used in later shows for consistency with TOS. It's far more important to trek to criticize and reflect modern society, which is a lot harder to do if your characters are living in a utopia. I haven't seen Picard yet though, so I'm just extrapolating from your description.

view more: ‹ prev next ›