Search
Ruby, 27 bytes ->n{x=[];n.times{x<<x*1};x} ->n{ } # lambda taking n x=[]; # set x to empty array n.times{ }; # repeat...
Sneakily using macros In a code golf challenge, you are tasked to use as small bytes as possible. However, it's considered unacceptable in a language like C to use macros to hide code or shorten i...
Bypassing source restrictions by storing data in the file name In some languages, like Pxem, programs are usually stored in the file name and the file's contents are irrelevant. On Somewhere Else,...
What is random defined as on this site? How are answers allowed to handle random chance?
My thoughts on the matter Does randomness need to be uniform? Nope, although it has to follow the specifications of the challenge (but if the challenge is too demanding with its randomness yo...
Platform specific languages are free if there is a free implementation on another platform (or of the platform which the lang is native to) Although Batch is exclusive to Windows, Windows can be p...
Javascript (V8), 202 97 bytes o=>r=>o.replace(/[a-zA-Z]/g,o=>String.fromCharCode((o<="Z"?90:122)>=(o=o.charCodeAt()+r)?o:o-26)) Try it online! Since the text of input must be ma...
Ruby, 56 bytes ->s,i{a=[*?a..?z].rotate(i)*"";s.tr "A-Za-z",a.upcase+a} Try it online! tr is wildly useful here. Builds the tr string manually and replaces only the alphabets.
The "Uppers" def oneup(data, history): if len(history) > 0: prev = history[-1] if prev[2] > 1: better = [prev[0] + 1, prev[1] + 1, prev[2] - 2] elif prev[1] > 1: better...
Japt, cracked by Razetime, 44 bytes ((Cops)&(Robbers))`¬ps d bÞ`¸ËhDÎmEgviuø Test it `...`¸ËhDÎmEgviuø `...` :Compressed string "cops and robbers" ¸ ...
There's another type of challenge named code bowling, and I've never heard of it, or even if I did, still don't know how it works. I'm willing to write challenges on code bowling and I want to know...
Forth (gforth), cracked by user, 20 bytes .( Cops and Robbers) Try it online!
Haskell, 116 bytes a#b=a!b:a++[a!"BOTTOM TEXT"] a!b=replicate(div(m a-k b)2)' '++b m=foldr1 max.map k k=length.dropWhile(==' ').reverse Try it online!
Cracks Mark Giraffe's answer: Forth (gforth) .( Cops and Robbers) Try it online!
Scala, 98 83 bytes Saved 15 bytes thanks to Shaggy! a=>t=>{val w=a.map(_.size).max (" "*(w-t.size>>1)+t)+:a:+" "*(w/2-5)+"BOTTOM TEXT"} Try it online! a is the ASCII art, t is th...
Japt, 19 bytes Takes the artwork as an array of lines and the string as the second input. If we can require that the artwork be right padded with spaces on each line so they're all the same length...
Cracks Mark Girrafe's answer: Japt No way I wasn't getting this one! Even if the intended solution was Pyth. "Cops and Robbers Test it
Cracks Quintec's answer: Canvas My first clue was the echp; if the language used echo then why wouldn't it error on that? The second clue was that the last line contained the exact output we need...
Cracks Mark Girrafe's answer: F# printfn"Cops and Robbers" Try it online!
Cracks Mark Girrafe's answer: Rust fn main(){print!("Cops and Robbers")} Try it online!
JSFuck, cracked by user*, 6106 bytes *With honourable mention to AndrewTheCodeGolfer who first recognised it as JavaScript. This version will only work in Firefox v90+. [][(![]+[])[+!![]]+(!![]+...
Rockstar, cracked by Hakerh400, 126 bytes I never thought of languages that would ignore everything except the strings - I should have stated that the solution should be irreducible. Hakerh400 get...
Vyxal, 2 bytes ∆² Try it Online! Woooooooo built-in elements ftw.