• underscore_@sopuli.xyz
    link
    fedilink
    arrow-up
    54
    ·
    edit-2
    2 years ago

    LGTM. Though do people really code with ligatures turned on?

    Edit: Ok so there are some big advocates of ligatures, I’m going to have to give them a second chance. I’ll try for a week, and either way that Fira Code font looks great.

  • Arthur Besse@lemmy.ml
    link
    fedilink
    arrow-up
    36
    ·
    edit-2
    2 years ago

    python -c 'print((61966753*385408813*916167677<<2).to_bytes(11).decode())'

    how?
    $ python
    >>> b"Hello World".hex()
    '48656c6c6f20576f726c64'
    >>> 0x48656c6c6f20576f726c64
    87521618088882533792115812
    $ factor 87521618088882533792115812
    87521618088882533792115812: 2 2 61966753 385408813 916167677
    
  • Mikelius@lemmy.ml
    link
    fedilink
    arrow-up
    15
    ·
    2 years ago

    What is that weird >>=== symbol? Looks like a cross breed between C and JavaScript here.

    • underscore_@sopuli.xyz
      link
      fedilink
      arrow-up
      19
      ·
      edit-2
      2 years ago

      It’s a the right shift assignment operator so x >>= 4 right shifts x by 4 and assigns the result back to x. The code editor is displaying single double wide symbol (ligature) instead of the three character long operator >>=, I discovered today these are in fact well loved by some coders.

      • PlexSheep@infosec.pub
        link
        fedilink
        arrow-up
        3
        ·
        2 years ago

        If someone likes it but doesn’t know where to find it, FiraCode does linea tires really good IMO

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

        I totally thought because of how long the equals looked, it was multiple equals characters, not just >>= lol. That’s what got me confused. Don’t think these are things I’d personally use but each to their own preferences right xD

  • call_me_xale@lemmy.zip
    link
    fedilink
    arrow-up
    10
    arrow-down
    1
    ·
    edit-2
    2 years ago

    As long as I don’t have to maintain it.

    (Who tf downvoted this? The “legacy code” lobby?)

  • state_electrician@discuss.tchncs.de
    link
    fedilink
    arrow-up
    5
    ·
    2 years ago

    The best Hello World I saw used a random library. Because there’s no true random without hardware, the author figured out the correct seed to write Hello World with “random” characters. I’ve used that to show junior devs that random in programming doesn’t mean truly random.