Discover
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Mac@programming.dev to Programmer Humor@programming.dev · 2 years ago

GoOn

programming.dev

message-square
64
link
fedilink
707

GoOn

programming.dev

Mac@programming.dev to Programmer Humor@programming.dev · 2 years ago
message-square
64
link
fedilink
alert-triangle
You must log in or # to comment.
  • FauxPseudo @lemmy.world
    link
    fedilink
    arrow-up
    193
    ·
    2 years ago

    Ok. This covers every ipv6 and ipv4 address.

    “^\s*((([0-9A-Fa-f]1,4}:){7}([0-9A-Fa-f]{1,4}:))|(([0-9A-Fa-f]{1,4:)6}(:[0-9A-Fa-f]{1,4}((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3)|:))|(([0-9A-Fa-f]1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2}):((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3)|:))|(([0-9A-Fa-f]1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})((:[0-9A-Fa-f]{1,4)?:((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]))3})):))|(([0-9A-Fa-f]{1,4:)3}(((:[0-9A-Fa-f]{1,4}){1,4})((:[0-9A-Fa-f]{1,4)0,2}:((25[0-5]2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3))|:))|(([0-9A-Fa-f]1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})((:[0-9A-Fa-f]{1,4)0,3}:((25[0-5]2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3))|:))|(([0-9A-Fa-f]1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})((:[0-9A-Fa-f]{1,4)0,4}:((25[0-5]2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3))|:))|(:(((:[0-9A-Fa-f]1,4}){1,7})((:[0-9A-Fa-f]{1,4)0,5}:((25[0-5]2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3))|:)))(%.+)?\s*$”

    • YIj54yALOJxEsY20eU@lemm.ee
      link
      fedilink
      arrow-up
      61
      ·
      edit-2
      2 years ago

      deleted by creator

    • MsPenguinette@lemmy.world
      link
      fedilink
      arrow-up
      39
      ·
      2 years ago

      IPv6 was a mistake. We should have just added an addition octet

      • snor10@lemm.ee
        link
        fedilink
        arrow-up
        3
        ·
        2 years ago

        They played us for absolute fools!

      • Centillionaire@kbin.social
        link
        fedilink
        arrow-up
        2
        ·
        2 years ago

        That would allow for like, 2 trillion devices? Feels like a bandaid, my dude. Next you’re gonna suggest a giant ice cube in the ocean once a year to stop global warming.

        • shastaxc@lemm.ee
          link
          fedilink
          arrow-up
          1
          ·
          2 years ago

          And nuke the hurricanes

        • stoy@lemmy.zip
          link
          fedilink
          arrow-up
          0
          ·
          2 years ago

          So add two more octets:

          Moat companies will still just use something like 10.0.13.37.0.1

          • 0xD@infosec.pub
            link
            fedilink
            arrow-up
            1
            ·
            2 years ago

            IPv6 is not made with internal networks in mind lol

      • lnee@lemm.ee
        link
        fedilink
        arrow-up
        1
        ·
        2 years ago

        IPv

        heared of ipv5?

      • FauxPseudo @lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        2 years ago

        Plus the MAC address

    • SchizoDenji@lemm.ee
      link
      fedilink
      arrow-up
      17
      ·
      2 years ago

      I knew there would be someone with the regex.

    • BeigeAgenda@lemmy.ca
      link
      fedilink
      arrow-up
      14
      ·
      2 years ago

      It’s always a treat to debug a regex of that size.

    • takeda@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      edit-2
      2 years ago

      You’re more of a perl programmer than network engineer :P

    • shootwhatsmyname@lemm.ee
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      2 years ago

      *exits the room*

    • rob64@startrek.website
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      https://imgs.xkcd.com/comics/perl_problems.png

      • Patches@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        2 years ago

        deleted by creator

    • Danny M@lemmy.escapebigtech.info
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      2 years ago

      Please don’t. Use regex to find something that looks like an IP then build a real parser. This is madness, its’s extremely hard to read and a mistake is almost impossible to spot. Not to mention that it’s slow.

      Just parse [0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3} using regex (for v4) and then have some code check that all the octets are valid (and store the IP as a u32).

      • Emma_Gold_Man@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        1
        ·
        2 years ago

        And dupe check. 0.0.0.0 and 000.000.000.000 may both be valid, but they resolve the same

    • hemko@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years ago

      .*

      • Trailblazing Braille Taser@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        2
        ·
        2 years ago

        Technically, this one also matches everything:

  • Static_Rocket@lemmy.world
    link
    fedilink
    English
    arrow-up
    104
    ·
    2 years ago

    0.0.0.0/0 0::0/0

    You didn’t specify it couldn’t be in CIDR block notation…

    • Mr_Dr_Oink@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      2 years ago

      Remember, when we abbreviate an ipv6 address all leading zeros are reduced to a single 0.

      E.g

      0003 would just become 03

      When there are geoups of 4 zeros these can be represented as a single 0 or as a double colon ::

      But we can only use the :: once so when summarizing an address containing multiple groups of 4 0s one after the other they can all be abbreviated to a single ::

      Eg

      fe80:0000:0000:0000:0210:5aff:feaa:20a2 would become fe80::210:5aff:feaa:20a2

      Therefore it is perfectly valid to abbreviate an address of 0000:0000:0000:0000:0000:0000:0000:0000 /0 to just ::/0

      • Static_Rocket@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 years ago

        Eh, I’ve seen some software internally prefer 0::0 instead of just ::0 or :: . Notation wise though you are correct, it is unnecessary.

    • redjard@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      ::/0

  • Mr_Dr_Oink@lemmy.world
    link
    fedilink
    arrow-up
    63
    ·
    2 years ago

    0.0.0.0 /0 ::/0

    SUCK MY DICK, GRU!

    • Jimmyeatsausage@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      2 years ago

      This is the way.

    • paholg@lemm.ee
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years ago

      deleted by creator

      • Mr_Dr_Oink@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        2 years ago

        Its CIDR notation. So /0 means the subnet mask has no on bits and would read as 0.0.0 0 if you had a /1 that turns 1 bit on in the subnet mask, so it would be 128.0.0.0.

        If i had a /24 which is the subnet mask used for most small networks like your home router. There would be 255 minus 2 addresses available for clients (phones, pcs etc) so the subnet mask would have 24 on bits and read 255.255.255.0, which you may be familiar with.

        (Assuming you dont know much, not to insult you, you might know plenty), but when writing any kind of instructions or guides, i was always told to assume the reader knows absolutely nothing and miss nothing out.

  • agilob@programming.dev
    link
    fedilink
    English
    arrow-up
    49
    ·
    edit-2
    2 years ago

    :00 - :ff

    Edit: Just learnt this can be also noted as:

    :: - ::f

  • 🇰 🌀 🇱 🇦 🇳 🇦 🇰 🇮 🏆@yiffit.net
    link
    fedilink
    English
    arrow-up
    40
    ·
    edit-2
    2 years ago

    This is gonna take a while…

    0.0.0.0

    0.0.0.1

    0.0.0.2

    0.0.0.3

    …

  • BoofStroke@lemm.ee
    link
    fedilink
    English
    arrow-up
    28
    ·
    edit-2
    2 years ago

    0.0.0.0/0

    ::/0

    • Manifish_Destiny@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      Winrar

      • Dlayknee@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        2 years ago

        Chicken dinrar?

  • rez_doggie@lemmy.world
    link
    fedilink
    arrow-up
    27
    ·
    2 years ago

    0.0.0.0/0

  • quinkin@lemmy.world
    link
    fedilink
    arrow-up
    12
    ·
    2 years ago

    1 and 0. Some assembly required.

    • MystikIncarnate@lemmy.ca
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 years ago

      32 or 128 of them, depending on protocol.

  • shootwhatsmyname@lemm.ee
    link
    fedilink
    English
    arrow-up
    9
    ·
    2 years ago

    one of them has a 7 I’m pretty sure

  • xav@programming.dev
    link
    fedilink
    arrow-up
    8
    ·
    2 years ago

    I’ll start.

    0.0.0.1: Sophie

    Your turn.

    • starman2112@sh.itjust.works
      link
      fedilink
      arrow-up
      5
      ·
      2 years ago

      0.0.0.2 is Bob

      • tamiya_tt02@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        2 years ago

        0.0.0.3 is Clarence

        • 1847953620@lemmy.world
          link
          fedilink
          arrow-up
          3
          ·
          2 years ago

          0.0.0.4 is Darryl

          • Virtual Insanity @lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            2 years ago

            127.0.0.1 is you

  • Orbituary@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    edit-2
    2 years ago

    deleted by creator

    • takeda@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      That’s 1/256th of IPv4

      0/0 and ::/0

      • Orbituary@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        2 years ago

        Funny. I put 0/0 first then reconsidered, but I don’t know why.

  • Seasm0ke@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    2 years ago
  • LemmysMum@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    2 years ago

    127.0.0.1

    • Open World@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      Heh, you just doxxed yourself

  • spudwart@spudwart.com
    link
    fedilink
    English
    arrow-up
    8
    ·
    2 years ago

    I mean if I name them do I have to own the domain or…

  • superfes@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    2 years ago

    People name IPs outside of DNS, I mean is there like a Susan or a Karen, perhaps a Clark IP?

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1.83K users / day
  • 4.55K users / week
  • 8.09K users / month
  • 17.8K users / 6 months
  • 1 local subscriber
  • 27.4K subscribers
  • 1.87K Posts
  • 59.6K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.12
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org