this post was submitted on 20 Jun 2024
451 points (98.1% liked)

Programmer Humor

19548 readers
993 users here now

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

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 42 points 4 months ago* (last edited 4 months ago) (1 children)

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

[โ€“] [email protected] 21 points 4 months ago

perl -le 'use bignum;print+pack"H22",(61966753*385408813*916167677<<2)->to_hex()'

Alas, Perl doesn't bignum by default