Letti42Lvl 6
- Windows
I think I won this
https://studio.code.org/projects/applab/0yGYcXJ_fD4a1LoLavshpR66-_dTXpA4exKsvRTqs7Q/view
22 characters! - maybe with a bit of cheating, of course...
Awards
- â’¸ 100 from
Ravage
Comment: That box though...
I think I won this
https://studio.code.org/projects/applab/0yGYcXJ_fD4a1LoLavshpR66-_dTXpA4exKsvRTqs7Q/view
22 characters! - maybe with a bit of cheating, of course...
Ravage
alr so like binary coder pointed out it is just better in most cases for dumb people like me to just print in the string you gave
however i have a decent amount of coins and I just wanted to obfuscate it as much as possible so here is my hundred something characters code
console.log(("00"+(102250447070918).toString(3)+(232673281708485).toString(3)).replace(/2/g,'\n').replace(/0/g,'⬜').replace(/1/g,'⬛'));
the way this works is it converts the number into base 3, with 2s being line breaks and ones and zeros turning into black and white boxes to form the image
i had to put two decimal strings because cdo doesn't give enough accuracy with the base 3 translation
you can change the decimal numbers to form whatever image you want
But I really like this idea. It's fun to have some challenges to think about.
Letti42
i mean... by this logic in that you can rely on the already existing parts of the program you might as well just make a function called e and submit e()
for a total character count of 3
or better yet make a variable named e and just put e
in the console for a total of 1
but ngl i think the idea is that you could be able to execute this in any console
I mean since this is high level JS there's not much i can do to minimize stuff here unfortunately gamelab environment takes the L here since i can't use the pollyfills CDO is missing either but oh well
// 79
throw a="\n0011110\n0010010\n"+"1110111\n1010101\n1010111\n1110010\n0011110\n0010010"+a;
// 79 +1 up ack (cleaner no weird parsing)
throw(0x9e92f7d5d7f2.toString(2)+40594..toString(2)).replace(/.(.{7})/g,"\n$1")
unlike acks method you just need to add another start bit in the front so it'll be forced to fomat it correctly since no prototype of pad exists (cuz idfkw) this is the least amount of effort to force it to be rendered though if you do plan on having more challenges like this you should offer different rewards for different categories (even if it's just between enviroments) because some have a lot more features that lead to running the code in only 1 enviroment
though i support Letti winning Ain't no way somebody is getting lower than 1 function call
in case your wondering why throw? it gives a console message and is several times shorter than console.log
Also fun fact CDO can handle basically any other format other than binary it hates it any the only way to deal with it properly is through strings and or parsing methods
Varrience I tried something similar, by converting a hex code to binary, but for some weird reason it would cut off leading zeroes (even though it’s a string). Also, was everyone else looking at the same Stack Overflow page as me? Cause I used the same .replace(/(.{7})/g,"$1\n")
code…
Letti42 Ok, ok, I'm seeing some weird things here.
First off, @Letti42 ... very creative of you, but it has to be printed out to the console. Says it in the rules. 100 coins for epic creativity, though!
Second, @Varrience , what do you mean by "different categories?" Simply GameLab and AppLab?
Little hint to @Varrience , @Binary_Coder , @ackvonhuelio : didn't I precise that you had to make a script which, "when entered into the CDO console," would give the result?
If nobody can beat my 63, no prize for you! Too bad it's now at 62 characters!
EDIT: since you seem to be the only people interested in this, do answer below if you think that we should end it up now; I'll do that once everybody says they're done.
Binary_Coder it zero's out because the max number it can handle it 253 which is longer than an int but shorter than a long very weird right (it also doesn't support big ints so don't even try)! so i split the number as you can see it takes the first 6 as hex since it's shorter but it's actually longer to write 40,594 in hex so i opted for that instead.... also didn't know that was a stack topic that's the shortest way possible to match what i wanted to match
Ravage and if we get to use anything to generate output rather than actual code char count I'll try a different approach
Varrience You goofy little goober... do you want me to give you coins for that, lol
In all seriousness, I asked for the code to output what I wrote up top...
EDIT: wait lol it gives me an error in the console, better luck next time
Also, did you even read the post up on the top, or did you just skim over the title?
Varrience Depends on how you plan to "fill them in"
If the "filling in" is part of your console code and counts as chars, then sure
EDIT: just show me what you mean by giving me your code, you can make it a private discussion if you want, but I can't really understand what you're trying to do just by this sort of communication.