JPDev@programming.dev to Programmer Humor@programming.dev · 6 months agoHow to write Hello Worldprogramming.devexternal-linkmessage-square30fedilinkarrow-up1453arrow-down19
arrow-up1444arrow-down1external-linkHow to write Hello Worldprogramming.devJPDev@programming.dev to Programmer Humor@programming.dev · 6 months agomessage-square30fedilink
minus-squareArthur Besse@lemmy.mllinkfedilinkarrow-up42·edit-26 months agopython -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
minus-squarepalordrolap@kbin.runlinkfedilinkarrow-up21·6 months agoperl -le 'use bignum;print+pack"H22",(61966753*385408813*916167677<<2)->to_hex()' Alas, Perl doesn’t bignum by default
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
perl -le 'use bignum;print+pack"H22",(61966753*385408813*916167677<<2)->to_hex()'
Alas, Perl doesn’t bignum by default