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

GoOn

programming.dev

message-square
68
link
fedilink
765

GoOn

programming.dev

Mac@programming.dev to Programmer Humor@programming.dev · 2 years ago
message-square
68
link
fedilink
alert-triangle
You must log in or # to comment.
  • FauxPseudo @lemmy.world
    link
    fedilink
    arrow-up
    232
    arrow-down
    4
    ·
    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
      72
      ·
      edit-2
      2 years ago

      deleted by creator

    • MsPenguinette@lemmy.world
      link
      fedilink
      arrow-up
      45
      arrow-down
      7
      ·
      2 years ago

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

      • Nalivai@discuss.tchncs.de
        link
        fedilink
        arrow-up
        13
        ·
        2 years ago

        Oh yeah, great, let’s change the fundamental protocol on which all the networks in the world are based. Now two third of the devices in the world crashed because you tried to ping 192.168.0.0.1

        • tilcica@lemm.ee
          link
          fedilink
          arrow-up
          8
          ·
          2 years ago

          that WOULD be quite funny for the first second or 2…

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

        They played us for absolute fools!

      • 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

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

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

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

        deleted by creator

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

          Holy hell yeah you did. How would you go about doing that in a single expression? A bunch of back references to figure out the country? What if that’s not included? Oy.

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

            deleted by creator

            • azertyfun@sh.itjust.works
              link
              fedilink
              arrow-up
              3
              ·
              2 years ago

              The only valid regex is (.+). Maybe add a separate country field (especially because some Americans wholeheartedly believe that the entire world should understand that “foobar, TX” means “foobar, Texas, United States”) (don’t get me started on states whose abbreviations are also ISO country codes).

              Unfortunately I guess business people only care about getting fewer support calls for missing shipping details, not correctness or a couple of calls from customers who live in the boonies. Then the proper answer is a form with a bunch of fields… which Americans will inevitably fuck up by making the “State” field mandatory despite most countries not having an equivalent.

              What I’d really do is use one of those services that automatically fill on the address using google maps or whatever. Not perfect, probably not free, but a whole lot less work for presumably way fewer PEBCAKs from customers.

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

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

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

      I knew there would be someone with the regex.

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

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

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

      .*

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

        Technically, this one also matches everything:

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

      *exits the room*

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

    0.0.0.0/0 0::0/0

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

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

      ::/0

    • Mr_Dr_Oink@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      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.

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

    0.0.0.0 /0 ::/0

    SUCK MY DICK, GRU!

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

      Haha spot on

    • 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.

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

      This is the way.

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

    :00 - :ff

    Edit: Just learnt this can be also noted as:

    :: - ::f

    • glibg10b@lemmy.ml
      link
      fedilink
      arrow-up
      5
      ·
      2 years ago

      What about IPv4

  • penguintrinity@discuss.tchncs.de
    link
    fedilink
    arrow-up
    53
    ·
    2 years ago

    0.0.0.0/0

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

      Better hope the goon hasn’t heard of IPv6 either, or you’re toast

      • oatscoop@midwest.social
        link
        fedilink
        English
        arrow-up
        16
        ·
        2 years ago

        ::/0

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

      Undefined

  • BoofStroke@lemm.ee
    link
    fedilink
    English
    arrow-up
    34
    ·
    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
        4
        ·
        2 years ago

        Chicken dinrar?

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

    0.0.0.0/0

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

    one of them has a 7 I’m pretty sure

  • Napain@lemmy.ml
    link
    fedilink
    arrow-up
    20
    arrow-down
    6
    ·
    2 years ago

    /32

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

      That’s only 1 ip (single host)

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

    1 and 0. Some assembly required.

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

      32 or 128 of them, depending on protocol.

  • Seasm0ke@lemmy.world
    link
    fedilink
    arrow-up
    14
    arrow-down
    1
    ·
    2 years ago
  • Gamma@beehaw.org
    link
    fedilink
    English
    arrow-up
    12
    ·
    2 years ago

    0.0.0.0/0

  • xav@programming.dev
    link
    fedilink
    arrow-up
    10
    arrow-down
    1
    ·
    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
            arrow-down
            1
            ·
            2 years ago

            127.0.0.1 is you

  • LemmysMum@lemmy.world
    link
    fedilink
    arrow-up
    9
    arrow-down
    1
    ·
    2 years ago

    127.0.0.1

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

      Heh, you just doxxed yourself

  • Marxism-Fennekinism@lemmy.ml
    link
    fedilink
    English
    arrow-up
    7
    ·
    2 years ago

    Name every protocol

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.

  • 503 users / day
  • 1.76K users / week
  • 3.63K users / month
  • 9.96K users / 6 months
  • 1 local subscriber
  • 28.4K subscribers
  • 1.47K Posts
  • 26.2K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.14
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org