Posts by Razetime
The Ludic Numbers are a sequence that pops up when you apply the sieve of eratosthenes to the natural numbers, completely removing the numbers every iteration. Here is how they are generated: The...
BQN, 31 28 bytes {1+(1≠𝕩)◶¯1‿𝕊2(|⊑÷˜∾1+3×⊢)𝕩} Try it online! An anonymous function which takes a number. the ¯1 branch is a bit tacky but saves a byte over (1+𝕊).
jq, 38 bytes while(1;.+("\(.)"|explode|max+min-96)) Try it online! prints the infinite sequence starting with $n$.
Stax, 8 bytes Ç▐GcΦ≡◘¶ Run and debug it Uses spaces as the staircase fill.
Charcoal, 7 bytes GH↑→↓N# Try it online! Link is to verbose version of code. PolygonHollow exactly fits this challenge. Prints a polygon with sides in x, all with length y, and the z used ...
Inspired by this Rosetta Code article. Introduction Balanced Ternary is a method of representing integers using -1, 0 and 1 in base 3. Decimal 11 = (1 * 32) + (1 * 31) + (−1 * 30) = [1,1,-1] or ...
jq, 14 bytes "Hello, \(.)!" Try it online! jq has expression interpolation, pretty epic!
jq, 48 bytes [while(.>0;./2|floor)]|map(.%2)|reverse|join("") Try it online! jq is the Language of the month for September! if the output is not required as per the question, join can be o...
Husk, 3 bytes ∫İ1 Try it online! Scan from left over all odd numbers with addition. Uses this formula: $$ n^2 = \sum_{k=1}^n(2k-1) $$
Challenge Given a list of integers >= 0 , check if all of them are equal. Tests [1,1,1,1,1] -> true [0,1,1,6,7] -> false [1] -> true [] -> undefined(you do n...
BQN, 8 bytes {𝔽´1+↕𝕩} Try it! basic fold builtin version. Use as a dyadic 1-modifier. Longer than APL since evaluated output is shorter than using first class functions. A more fun recursive...
Yes tips is a sort of prefix tag, and code-golf-tips is a superfluous tag. I think it it worth keeping them separate because tips is already very flexible.
Husk, 5 bytes ±£Θİ□ Try it online! similar to haskell, checks if the number is in the infinite list of squares.
Cracks Lundin's answer: C++ (gcc) %: %: define cops(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) if(not false and k%:%:f%:%:d%:%:l(& (not true) <:%:i%:j%:k%:l" "%:m" "%:n%:o%:p%:q%:r%:s%:t:&...
Cracks Shaggy's answer: Japt ((Cops)&(Robbers))`¬ps d bÞ`¸ËhDÎmEgviuø Test it
Languages made specifically for a challenge after it was published This is the general problem with allowing languages newer than the challenge. This is already considered a standard loophole, and...
Challenge You will be given a string and an ascii art as input. The string must be placed above the ascii art, and centered based on its longest line. The text BOTTOM TEXT must be placed below...
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.
Free as in usable on a free platform "free" meaning there must be a downloadable interpreter available for the language which can run the program with the required features, on an online/offline s...