• root@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    ·
    9 hours ago

    Does systemd still have DOB fields added in anticipation of age verification, or can I come back from Artix?

  • yaroto98@lemmy.world
    link
    fedilink
    English
    arrow-up
    79
    ·
    22 hours ago

    there’s a pretty simple solution IMHO. The faker python library is awesome at generating test data. Return a random dob everytime a site requests it.

    import faker
    faker fake
    return fake.date_of_birth(minimum_age=18, maximum_age=90)
    
    • Artwork@lemmy.world
      link
      fedilink
      English
      arrow-up
      25
      arrow-down
      17
      ·
      edit-2
      17 hours ago

      A whole library, or a yet another ad for Python, sorry? Why not marvelous Perl, or any lovely PHP’s or a JavaScript faker?
      Why a library in the first place?

      In case of PHP (checked in v8.1)

      echo date('Y-m-d', rand(strtotime('-90 years'), strtotime('-18 years')));
      // 2007-07-30
      

      And, I had a snippet for JavaScript (tested in the current Chrome’s EcmaScript).
      We get the years in milliseconds, and substract from the current time.

      console.log(new Date(Date.now() - 365*24*60*60*1000 * (18 + Math.random()*72)).toISOString().slice(0, 10));
      // 1984-07-20
      

      In shell even! Let’s use the common suit GNU coreutils (e.g. v9.4).
      We have 90y - 18y = 72 years, that is 26,280 days or ~26,297 days (source)

      $ date -d "-18 years -$(( RANDOM % 26297 )) days" -- '+%F';
      # 1976-04-06
      
      • yaroto98@lemmy.world
        link
        fedilink
        English
        arrow-up
        8
        ·
        10 hours ago

        Mostly because it’s starting with dob, what happens when they require a phone number, address, credit card, or social security number? Faker can fake all those in that library. But you’re absolutely right, for one dob it is massive overkill.

        Also, I’m do test automation for my career. Litterally use faker daily for generating test data. Defaulting to it is natural and familiar. Most use what they’re familiar with, rarely the best solution for a task.

        • Artwork@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          4 hours ago

          Roger that! Thank you for being a developer and improving the ineffably magnificent world! ✨

          In this case, we do relatively the same, and usually in database seeding and model factories, I believe, but personally I am more into the Laravel and Symfony, where the mentioned above PHP library is used there under the hood.

          Please to stay safe!

          Related: https://laravel.com/docs/13.x/eloquent-factories

        • jimmy90@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          8 hours ago

          ikr

          a couple of distro admins remind lawmakers that people can do what they want with their computers and it’s python day on lemmy

      • jesta@lemmy.world
        link
        fedilink
        English
        arrow-up
        26
        arrow-down
        1
        ·
        17 hours ago

        A whole library, or a yet another ad for Python, sorry?

        This is more of a problem with how some people code more than python. I also find it irritating that some people import random libraries out of the internet to do simple things instead of actually spending the time to write two lines of code. Python has built in datetime library that could be used for this similar to the examples you gave.

  • Artwork@lemmy.world
    link
    fedilink
    English
    arrow-up
    47
    arrow-down
    2
    ·
    23 hours ago

    “You shouldn’t have to choose between open and secure.” The implementation backs that up. The friction is one-time for power users, but it’s a genuine obstacle for scammers and it makes opportunistic spyware installation meaningfully harder.

    Source

    -–

    His argument: power users absorb a one-time inconvenience while vulnerable people (scam victims, children) get protected…
    The pattern HN picked up immediately…

    That’s the true believer pattern. The argument is ideological, so persuasion is off the table. He read the laws, decided compliance was the correct response, and went to work. Every objection the community raised went nowhere: that this enables surveillance infrastructure, that lying is trivially easy, that the laws themselves are unconstitutional overreach. He’d already accepted the law as legitimate and moved to implementation…

    He hit three separate projects in one week…
    He agreed entirely, writing that the approach would be “completely ineffective at preventing anyone from lying about their age.” He called it “hilariously pointless.” Then he said Arch Linux should implement it anyway because the law requires it…

    The open source community has always relied on the assumption that contributors act in good faith toward user freedom. Taylor probably believes he does. The laws say collect birth dates, so he collected birth dates, and in his framing that was being helpful.

    The reason to name him is the pattern. The surveillance state runs on volunteers: people who do the implementation work for free, out of genuine conviction, with no paper trail connecting them to the money that wrote the laws…

    Taylor already has the resume line and knows the codebase well enough to try again. The deadline pressure only grows, the laws are real, and someone will be next. The community needs to recognize the pattern before the PR opens, not after.

    Source

  • ranzispa@mander.xyz
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    62
    ·
    14 hours ago

    If you’re against data centers you should be in favour of age verification. Just imagine how many data centers will have to close once Linux becomes illegal.

    On the other hand, it’s unlikely that police will actually go after individuals using Linux.

    • 5too@lemmy.world
      link
      fedilink
      English
      arrow-up
      18
      arrow-down
      1
      ·
      12 hours ago

      …I’m going to go ahead and be against both bad ideas, myself.

    • Encrypt-Keeper@lemmy.world
      link
      fedilink
      English
      arrow-up
      31
      ·
      14 hours ago

      Big tech are the ones behind the age verification push. Linux wouldn’t become illegal, only the distros available to end users would be.

      • MalMen@masto.pt
        link
        fedilink
        arrow-up
        7
        arrow-down
        1
        ·
        14 hours ago

        @EncryptKeeper @ranzispa its funny, I used to think that this kind of legislation where a tremendos effort to apply on big corps, until I understund that it also makes them the only ones that can apply them

      • ranzispa@mander.xyz
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        4
        ·
        14 hours ago

        I guess here on the fediverse it is essential to add the /s to not be taken seriously.

    • PerfectDark@lemmy.world
      link
      fedilink
      English
      arrow-up
      24
      ·
      14 hours ago

      “…you should be in favour of age verification.”

      No, I’m not. I’m in favor of parents parenting kids themselves (their fav excuse for bringing I.D. checks in)

      • Zron@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        11 hours ago

        The way the laws are being written, it applies to literally any computing device.

        They just say “operating system” there’s no carve out for servers or iot or anything. Technically you will have to provide a date of birth to use a smart fridge now. Hell, there’s at least one toaster I know of that has a full android install on it, that will need age verification too.