Computer Science Canada
Miniscule Poker Hand Shuffler
|Author:||MEINsweeze [ Tue Mar 02, 2021 5:48 pm ]|
|Post subject:||Miniscule Poker Hand Shuffler|
another submission, this one isn't very fancy, just small!
back in high school, my friend and i wanted to know which language was more compact.
we both made programs that shuffle a deck of cards and then give you the first 5
he did his in java in about 800 bytes, i did it in turing in around 650 (3-4 years later and we both still use our respective languages for side projects lmao)
since then, i've learned so much more about turing and tuned it to the point where i've spent an hour staring at it, trying to find a chink in the armour to get rid of another byte. i can't find anything else, so i'm deciding to publish it here!
it's a minuscule 390 bytes, and is as minimalist as i could possibly make it
of course, because of its compressed size, it's nearly illegible and has terrible terrible formatting...
i'll put it here too since it's not exactly bulky!
|Author:||scholarlytutor [ Fri Mar 05, 2021 4:02 pm ]|
|Post subject:||Re: Miniscule Poker Hand Shuffler|
Wow, you're definitely a pro at keeping files small in terms of bytes. And it works well. The main drawback is that it's hard to read: the formatting, as you said, and also the single letter variable names. But your goal here was for the code to be compact, not readability.
I decided to challenge myself and make something similar in my 'style' of coding, and it's over 800 bytes! I'm sure I can make improvements, but I wrote it in under 30 minutes.