• 1 Post
  • 285 Comments
Joined 11 months ago
cake
Cake day: August 4th, 2023

help-circle
  • I honestly fully believe that proprietary software is bullshit and all software ought to be Free Software. I’m not saying I don’t use proprietary software, but I don’t trust it. If I run proprietary software, I go out of my way to try to run it in prison. I don’t let my Nintendo Switch connect to the internet except when I have a very specific reason and then I disconnect it immediately after I’m done. When I bought a robot vacuum cleaner, I bought specifically the model that I knew I could hack to not phone home. I bought a phone on which I could run LineageOS without the Google apps. (And, yes, I’m running a proprietary EFI BIOS on my main desktop machine and such. But I do take a lot of steps to limit how much influence proprietary software has on me and my devices.)



  • Yeah. I figured the day-of-the-month change should definitely happen at UTC midnight. I kindof like the idea that a day of the week lasts from before I wake up to after I go to sleep. (Or at least that there’s no changeover during business hours.)

    But hell. If you wanted to run for president of the world on a platform of reforming date/time tracking but planned for the days of the week to change at midnight UTC, I’d still vote for you.


  • Note that the Sun position is not consistent throught the year and varies widely based on your latitude.

    Good call. The definitions of “noon” and “midnight” would need to be formalized a bit more, but given any line of longitude, the sun passes directly over that line of longitude “exactly” once every 24 hours. (I put “exactly” in quotes because even that isn’t quite exactly true, but we account for that kind of thing with leap seconds.) So you could base noon on something like “when the sun is directly over a point on such longitudinal line (and then round to the nearest hour).”

    Could still be a little weird near the poles, but I think that definition would still be sensical. If you’re way up north, for instance, and you’re in the summer period when the sun never sets, you still just figure out your longitude and figure when the sun passes directly over some point on that longitudinal line.

    Though in practice, I’d suspect the area right around the poles would pretty much just need to just decide on something and go with it so they don’t end up having to do calculations to figure out whether it’s “afternoon” or “morning” every time they move a few feet. Heh. (Not that a lot of folks spend a lot of time that close to the poles.) Maybe they’d just decide arbitrarily that the current day of the week and period of the day are whatever they currently are in Greenwich. Or maybe even abandon the use og day of the week and period of the day all together.

    Just the days of the week? you mean that 2024-06-30 23:59 and 2024-07-01 00:01 can both be the same weekday and at the same time be different days? Would the definition of “day” be different based on whether you are talking about “day of the week” vs “universal day”?

    Yup.

    I’m just thinking about things like scheduling dentist appointments at my local dentist. I’d think it would be less confusing for ordinary local interactions like that if we could say “next Wednesday at 20:00” rather than having to keep track of the fact that depending what period of the day it is (relative to landmarks like “dinner time” or “midmorning”) it may be a different day of the week.

    And it’s not like there aren’t awkward mismatches beteen days of the week and days of the month now. Months don’t always start on the first day of the week, for instance. (Hell. We don’t even agree on what the first day of the week is.) “Weeks” are an artifact of lunar calendars. (And, to be fair, so are months.)

    (And while we’re on the topic of months, we should have 13 of 'em. 12 of length 30 each and one at the end of 5 days or on leap years 6 days. And they should be called “first month”, “second month”, “third month”, etc. None of this “for weird historical reasons, October is the 10th month, even though the prefix ‘oct’ would seem to indicate it should be the 8th” bs. Lol.)


  • No, see, how it would work without timezones is:

    • Everyone would use UTC and a 24-hour clock rather than AM/PM.
    • If that means you eat breakfast at 1400 hours and go to bed around 400 hours and that the sun is directly overhead at 1700 hours (or something more random like 1737), fine. (Better than fine, actually!)
    • Every area keeps track of what time of day daily events (like meals, when school starts or lets out, etc) happen. Though I think generally rounding to the nearest whole hour or, maybe in some cases, half hour makes the most sense. (And it’s not even like everyone in the same area keeps the same schedule as it is now.)
    • You still call the period before when the sun is directly overhead “morning” and the period after “afternoon” and similarly with “evening”, “night”, “dawn”, “noon”, “midnight” etc.
    • One caveat is that with this approach, the day-of-the-month change (when we switch from the 29th of the month to the 30th, for instance) happens at different times of the day (like, in the above example it would be close to 1900 hours) for different people. Oh well. People will get used to it. But I think it still makes the most sense to decide that the days of the week (“Monday”, “Tuesday”, etc) last from whatever time “midnight” is locally to the following midnight, again probably rounding to the nearest whole hour. (Now, you might be thinking "yeah, but that’s just timezones again. But consider those timezones. The way you’d figure out what day of the week it was would involve taking the longitude and rounding. Much simpler than having to keep a whole-ass database of all the data about all the different timezones. And it would only come into play when having to decide when the day of the week changes over.)
    • Though, one more caveat. If you do that, then there has to be a longitudinal line where it’s always a different day of the week on one side than it is just on the other side. But that’s already the case today, so not really a drawback relative to what we have today.

  • TootSweet@lemmy.worldtoProgrammer Humor@lemmy.mlWorst is UTC vs GMT
    link
    fedilink
    English
    arrow-up
    147
    ·
    edit-2
    4 days ago

    The creator of DST gets the first slap. Then the timezones asshole.

    I’m planning to do a presentation at work on how to deal with dates/times/timezones/conversion/etc in the next few weeks some time. I figure it would be a good topic to cover. I’m going to start my talk by saying “first, imagine there is no such thing as timezones or DST.” And then build on that.







  • Thank you for bringing more awareness of this. I’m what you might call an “AI skeptic” and don’t really care what happens in the AI space as long as it doesn’t screw up things I care about.

    But I care deeply about FOSS and AI is screwing it up. I don’t want to have to explain why XYZ thing absolutely is not Open Source and that “Open Source” has a specific meaning beyond “you can look at (at least some of) the source code.”

    (Compare it to the term “hacker” that has among at least a lot of muggles taken on the exclusive meaning of committing some kind of fraud with computers. Originally it meant something very different. And it’s unfortunate the world has forgotten the old meaning.)

    Another project that is diluting the term “Open Source” is Grayjay, a video streaming app that is a FUTO project (and FUTO is a Louis Rossman thing.) Rossman has called it Open Source in YouTube videos, but it’s not Open Source. (The license is here and forbids things like “commercial use” (selling the software or derivative works) and removing facilites for paying the FUTO project from derivative works. Which is a lot less restrictive than the license was last time I checked it. Previously it didn’t allow redistribution or derivative works at all. But it’s not Open Source even now.)





  • map := map[string] int {}

    Not sure where you got your examples, but the spacing is pretty wonky on some (which can’t possibly help with confusion) and this one in particular causes a compile-time error. (It’s kindof trying to declare a variable named “map”, but “map” is a reserved word in Go.)

    var test int < bruh what?

    This article gives the reasoning for the type-after-variable-name declaration syntax.

    :=

    Lots of languages have a colon-equals construction. Python for one. It’s not terribly consistent what it means between languages. But in Go it declares and assigns one or more variables in one statement and tells Go to figure out the types of the variables for you so you don’t have to explicitly tell it the types to use.

    func(u User) hi () { … }

    That function (“method”, really, though in Go it’s more idiomatic to call it a “receiver func”) has no return values, so no return type. (Similar to declaring a function/method " void in other languages.)

    The first pair of parens says to make this “function” a “method” of the “User” type (which must be declared in the same package for such a function declaration to work.) The whole “when I call it like u.hi(), don’t make me pass u as a parameter as well as putting u before the period” thing also has precedent in plenty of other languages. Python, again, is a good example.

    Oh, and the second set of parens are where the function’s (non-receiver) parameters go. Your example just doesn’t take any. A function like func (u User) say(msg string) { ... }, for instance, could be called with u.say("Hey."). func (u User) ask(question string) string { ... } has a return type of string. So you could do var ans string = u.ask("Wuzzup?") or ans := u.ask("Wuzzup?").

    I can’t say I was ever too taken aback with Go’s syntax. Just out of curiosity, what languages do you have experience with?


  • Great question! Not really my area of expertise, but probably there are at least a couple of possible avenues. One is decompilation and/or disassembly and static analysis. (Basically use automated tools to reconstruct the original source code as best it can and then read that imperfect reconstruction of the source code to figure out what it does.) Another is isolating it (“air gap” – no network or connectivity to anything you care about) so you’re sure it can’t do any damage and running it with tools that record/report everything it does. (On Linux, one could use strace and/or GDB. On Mac, dtrace. Not sure what the equivalent is for Windows programs running on Windows.)

    Actually, I guess another option could be to set up an isolated system, record a whole bunch of information about it before running the .exe then after running the .exe, examine it to see what you can find on the filesystem or in the registry or in RAM or whatever that might have changed. It wouldn’t catch everything, though. Like if it made a network connection or something but didn’t actually change anything on the filesystem, it might not leave any traces.

    Whatever the case, it’d probably require some specialized tools and expertise. But it’d be an interesting project.