aebletrae

joined 2 years ago
[–] aebletrae@hexbear.net 0 points 2 years ago (1 children)

You've replied while I was editing, so see that regarding what I mean by side effects.

As far as throwing an error when you try to create "31st February", this wouldn't actually help much, since the error would still only occur on some days of the year, because your original code doesn't account for the range of outputs from Date() when called without arguments.

To perform correctly, your code needs to normalise the day of the month, or just create the date more explicitly to begin with, but this is a calendrical issue, not a JavaScript one.

[–] aebletrae@hexbear.net 0 points 2 years ago* (last edited 2 years ago) (3 children)

The rake has nothing to do with JS (which I agree is cursed, but for its own reasons, not this).

You have called a function in a way that does not give a consistent value (Date()). Such functions are hardly the preserve of JavaScript. You've failed to adequately deal with the range of values produced, with code that tries to insist that the "31st February" can be a meaningful date in February. You should accept that this is your mistake and learn to (better) avoid side effects where possible.

Also, the function isn't side effecty since it doesn't make implicit references outside its scope.

Edit responding to your edit:

Also, the function isn't side effecty since it doesn't make implicit references outside its scope.

The Date() function's output varies according to something other than its input (and even the rest of your program). Using its output without accounting for that variation means that your function, as originally written, also gives inconsistent return values, varying according to something other than its input, because it does, in fact, reference something outside the function. If it did not, the results would only depend on the monthNumber argument, and would always be consistent. I don't know what you call that, but I view it as a side effect.

As you have said, the rake is that months have different lengths, and you need to account for that. But that's not one of JavaScript's many issues.

[–] aebletrae@hexbear.net 0 points 2 years ago (5 children)

You want to create the date "31st February", but it's JavaScript that's cursed?

Write a less side-effecty function.

function getMonthName(monthNumber) {
    const date = new Date(2023, monthNumber - 1, 1);
    return date.toLocaleString([], { month: 'long' });
}
[–] aebletrae@hexbear.net 13 points 2 years ago (1 children)

Their physiology is barely diverged so their intellects are likely to remain similar. Espionage is frequently the theme of Romulan encounters, which would help keep them up to date. And if they procreate more frequently than every seven years, they might have a much larger population even with greater murderousness, with more people being advantageous for tech development.

[–] aebletrae@hexbear.net 1 points 2 years ago

The output here lets us know that systemd is running the service file and starting the script just fine. The echoed GPU temperature is making it to the journal, but the gpuTemp variable isn't being updated (staying at 0) because of a problem executing nvidia-settings. Specifically, it wants a display: "The control display is undefined".

You could add a line to the service file:—

Environment = DISPLAY=:0

Although if echo DISPLAY in your terminal gives you a different value, use that. There's a possibility that that will just push one error further down the line, but it's something to try.

Alternatively/additionally, you could try changing the User= line to your own username to see if it picks up the environment your manual executions work with.

You aren't the only one to run into problems trying to automate nvidia-settings. You might end up needing to track down an Xauthority file or use the display manager's initialisation options.

[–] aebletrae@hexbear.net 10 points 2 years ago

If you had a book which had on its Contents page:

Chapter 1 . . . . . . . . . . page 1

and you crossed it out, then wrote:

Chapter 1 . . . . . . . . . . page 1

Chapter 2 . . . . . . . . . . page 50

someone looking for Chapter 1 is still going to find all the text in the right place (as long as it was less than 50 pages).

Changing the partitition table is like changing the Contents page; it doesn't mess with the rest of the data. And if the new table points to the same place it did before, the data can still be found.

That said, if the filesystem still thinks it's 1TB, you may end up with future problems unless you resize it to fit the reduced partition.

[–] aebletrae@hexbear.net 1 points 2 years ago

If it works when run manually, but fails via systemd, then you should post your service file.

[–] aebletrae@hexbear.net 7 points 2 years ago (1 children)

I think the assumption is not that adblockers alter the user agent info, but that they also block other resources, so StatCounter won't see those users at all, leading to under-reporting.

[–] aebletrae@hexbear.net 6 points 2 years ago* (last edited 2 years ago)

"Instance" seems too jargon-y to me as well, and "proxy" is even worse. "Server" and "host" are probably a little more familiar, but are still technical language.

Confusion doesn't stem from individual words; people need explanations and examples, but, as an alternative to "instance", if you want to extend the "communities" metaphor, then "society" as a cluster of communities is a natural option, particularly since it relates to the widely understood concept of social media. Since most people using the Internet also know what a web "site" is, you could use the sibilant linguistic association to help cement the notion:—

Each society has its own web site, such as:

  • aussie.zone, where the communities relate to Australia;
  • programming.dev, where the communities discuss software development;
  • and lemmy.film, where the communites are about movies.

You can choose which society you want to join, although some will ask you to fill out an application. Most societies have connections to others, meaning that you can discuss things with people who are part of different societies. Often, you'll recognise them by their username saying that they're at (@) another site. Not all societies get along with one another, so which one you join will also affect who you can talk with.

Each society has its own rules it expects you to follow, whether you are a member of that society or just visiting.

This kind of language seems more intuitive to me anyway, although when I've tried describing instances and federation before now, I've likened instances to countries:—

You choose somewhere to live (and you can move later if you want). If there's a cross-border agreement, then you can send messages back and forth between people in each place.

but this has also meant stressing that your instance "country" doesn't have to match where you physically live, so a more general term probably would have been more useful.

[–] aebletrae@hexbear.net 3 points 2 years ago

chiS peD Soch wo'rIvpu' je is a classic of the genre, but the sanitization for a human audience is worse than the Disney treatment of the Brothers Grimm.

[–] aebletrae@hexbear.net 2 points 2 years ago* (last edited 2 years ago)

SuvwI' qu' SoH vIHar

Following the links will take you to a handy search tool.

[–] aebletrae@hexbear.net 23 points 2 years ago* (last edited 2 years ago) (4 children)

I believe, since it's a recruitment poster, the translation is "We seek programmers for a great mission."

  • Qu' = mission
  • Dun = to be great
  • -vaD = for
  • ghun = to program
  • -wI' = one who does
  • DI- = we — them
  • Sam = to seek
view more: next ›