Sandbox Posts

 The Nineteenth Byte

The Nineteenth Byte: General discussion for codegolf.stackexc...
Fri 22:05
0
A: Sandbox for Proposed Challenges

ngnIdentify Last-Layer Perm of a Rubik's Cube A popular method for solving Rubik's cube consists of: solving its first two layers, by convention starting with the white side orienting the last layer's pieces so they face the same direction with their common colour - usually yellow, which is opposi...

Fri 05:09
0
A: Sandbox for Proposed Challenges

Dannyu NDosComplex Geometric Mean code-golffloating-point Objective Given two complex numbers, output their geometric mean, as precisely defined below. Definition Recall that, for two nonnegative real numbers \$x\$ and \$y\$, their geometric mean is defined as \$\sqrt{x \cdot y}\$. One would want to extend ...

Fri 03:53
0
A: Sandbox for Proposed Challenges

Steve BennettTest your own code (assistance requested) I have an idea that I need help workshopping. The concept is: You have to write three programs/functions. Program 1 does a task. Program 2 generates test cases for the task. Program 3 takes the test cases and verifies that Program 1 passes them. There is ...

Thu 17:54
0
A: Sandbox for Proposed Challenges

The Empty String PhotographerLess is better king-of-the-hill You choose between two halves of a pitch. If you are on the half with fewer players, you win! Structure Each game will have 1000 rounds. Each round will consist of the following: Your bot is given their move history for each previous round during this game. This ...

Jul 20 20:34
0
A: Sandbox for Proposed Challenges

RosarioWilson P+1 factoring method Write a function that implement the p+1 method for factoring integers. That function has to have arguments two positive integers the base for doing the calculation and the number of factoring. I think for doing that you need build one ltor like function. For limits, B1...

Jul 13 10:25
0
A: Sandbox for Proposed Challenges

NeilSolve a Mora Jai puzzle box A Mora Jai puzzle box is a 3×3 square of tiles of the following colours: Black: Clicking on a Black tile moves it right one square by rotating the row; the tile at the rightmost end of the row (which may be the Black tile itself) "jumps" to the leftmost end. Red: Clic...

Jul 12 09:33
0
A: Sandbox for Proposed Challenges

Dannyu NDosTest Associativity, Probabilistically Tags: code-golfrestricted-complexitydecision-problemrandom Objective Given a real number \$\epsilon \in (0, 1/2)\$ and a finite magma \$(X, *)\$, decide whether \$*\$ is associative, where mis-judgement is tolerable with a probability no more than \$\epsilon\...

Jul 10 17:12
0
A: Sandbox for Proposed Challenges

QOO-OOKALANThe Gather Operation Overview Output: You may take in input and output in any reasonable format. Definication The gather operation extracts values from a string based on a pattern-matching syntax. Syntax gather <x, y, z, ...> from <string> using <gather_syntax> [check <varname>] Characters can ...

Jul 9 17:22
0
A: Sandbox for Proposed Challenges

QOO-OOKALANCall 911 Input: None Output: 911 Rules This is code-golf, shortest code3 per language wins! Markup (e.g., HTML) languages, or languages without output/input support are banned. Cheating languages for zero-size programs like MetaGolfScript and is banned. If a language includes a built-in functio...

Jul 2 12:19
0
A: Sandbox for Proposed Challenges

ThemoonisacheeseGolf this arduino program Inspired by I need compact code to fit in memory One area Code Golf may still have a practical application in the age of 2 Tb microSD cards is microcontroller programming. Task: Implement the same functionnality as this arduino program: #include "TM1637Display.h" #defin...

Jul 1 19:34
0
A: Sandbox for Proposed Challenges

QOO-OOKALANInterpret Custom Language First Line of Input: An ASCII character, which this character in the language will increase counter by 1 Second Line of Input: An ASCII character, which this character in the language will print a character to output with ASCII code of counter mod 127, and sets counter t...

Jul 1 17:11
0
A: Sandbox for Proposed Challenges

macOSisthebestOSCrash your program Okay, so. As far as I can tell, we don't actually have a simple, generic "crash the program" challenge yet. (We do have some challenges where crashing the program is the overall goal, but it needs to be done in a particular manner — for instance, by raising a specific signal. T...

Jul 1 09:46
0
A: Sandbox for Proposed Challenges

Weird GlyphsDraw an outline of the traditional chinese character for Biangbiang noodles Biangbiang noodles are a type of Chinese noodle originating from Shaanxi cuisine. The noodles, touted as one of the "eight curiosities" of Shaanxi (陕西八大怪), are described as being like a belt, owing to their thickness and...

Jul 1 00:52
0
A: Sandbox for Proposed Challenges

l4m2Consider such a language using only ( and ): Name /(\(\))+/ Expr (Name) | (Expr Expr) | Func Func (Name Expr) Given code length, output amount of valid programs. You can assume given length is even. You can optionally take input divided by 2. code-golf Undecided: Are expressions wit...

Jun 29 07:35
0
A: Sandbox for Proposed Challenges

QOO-OOKALANCan we castle in chess Input: An ASCII art version of a chess board. This should look like this for example: r n b q k b n r p p p p p p p p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P P P P P P P P R N B Q K...

Jun 27 14:34
0
A: Sandbox for Proposed Challenges

ThemoonisacheeseExplain why Kolmogrov complexity does not work as a complexity measure output the exact text of this answer: I think the answer I gave for the linked question is relevent to this one too, because your question fundamentally makes an assumption about what characteristic of the data you care about ...

Jun 27 04:35
0
A: Sandbox for Proposed Challenges

Dannyu NDosMultiplication in \$\overline{\mathbb{F}(2)}\$ Objective Given two elements in the algebraic closure of the finite field with two elements, multiply them, and output the result. Mathematical introduction \$\mathbb{F}(2)\$, the finite field with two elements, is essentially a bit endowed with the ...

Jun 26 15:53
0
A: Sandbox for Proposed Challenges

sergiolGet the Fonts out of there! Challenge is simple to enunciate, but may be not so easy to implement. Just make appear on the display or return a list with all the fonts there are available in your environment. If you chose to display them, you must chose a separator different from space; or alterna...

Jun 25 08:39
0
A: Sandbox for Proposed Challenges

QOO-OOKALANNote to you if it's on meta: If image is not good to included, edit my question and remove it please. Fix spelling/grammar too if there was a problem found! (This note removed if I publish question) The Array Walker Input: A non-empty array of integers (without nesting1). This can have negative ...

Jun 23 09:20
0
A: Sandbox for Proposed Challenges

Weird GlyphsMake an animated winking smiley 😉 code-golfgraphical-output Recently, I've been looking more and more into retrogaming programming, and I saw this nice example from an old GBDK wiki (A tool to make Gameboy games with C, replaced by GBDK-2020): This example program uses two similar 16x16 sprites...

Jun 21 17:35
0
A: Sandbox for Proposed Challenges

Bryle MorgaBrainfuck quine using as few "-" instruction as possible Challenge The challenge is in the title itself. The scoring would be the number of "-" instruction. The lower the score, the better. The program should work without wrapping, because with wrapping, one can replace "-" with sufficiently many

Jun 21 03:03
0
A: Sandbox for Proposed Challenges

DomenicoTRIANGULAR TRANSPOSITION CIPHER A text that can be arranged triangularly in some fashion can be read back in some other fashion effectively enciphering it. Narrowing down a set of plausible triangular permutations allows to individuate the set of plausible transpositions of the original text. Con...

Jun 19 00:45
0
A: Sandbox for Proposed Challenges

Dannyu NDosAdd two sets of algebraic conjugates Objective Given two positive-degree polynomials with integer coefficients, output the polynomial that accommodates the sum of each pair of roots of the inputted polynomials. Note that the outputted polynomial may have repeated roots, so may the inputted polyno...

Jun 16 10:38
0
A: Sandbox for Proposed Challenges

Bryle MorgaBrainfuck braggy busy beaver Challenge Write a brainfuck program that takes as many steps to halt. Non-halting program brainfuck programs are not allowed. Not only does it have to be busy but it should also brag by printing the number of steps it takes to halt in good old Base-10. The program ...

Jun 16 09:06
0
A: Sandbox for Proposed Challenges

Bryle MorgaSelf-deranging but self, fixing?!?! Challenge Find a program that prints another program, which prints another program and so on, and goes back to the original program. At each step, the program must print a program that is a derangement of itself. A derangement is a permutation of a string tha...

Jun 14 00:43
0
A: Sandbox for Proposed Challenges

l4m2Trit encoder Decide an encoding from five trits(aka. a digit with 3 states, called 0, 1 and 2) to a byte. Build a circuit with NAND gate with input [byte: 0-255, idx: 0-4, val: 0-2], swap the idx-th trit in byte and val and output. You can decide which 13 states are invalid. They won't get inputt...

Jun 13 02:41
0
A: Sandbox for Proposed Challenges

WarpPrimeComputing Pi with iF*ck pi math number number-theory open-ended-function Objective Compute \$\pi\$ using nothing but \$i\$ (\$\sqrt{-1}\$). Guidelines ONLY exponentiation and multiplication may be used (i.e. \$i^i\$ or \$ii\$) No additional symbols may be used (so no addition, subtraction, paren...

Jun 12 13:53
0
A: Sandbox for Proposed Challenges

QOO-OOKALANCan we escape from array? Input: A array in syntax of [a,b,c,...], can have at least 1 elements and up to 10,000 elements, and each can be from 0 to 1,000,000. Output: false or true based on if we can finally escape the array, if we start on first item and go n items forward in each step. false i...

Jun 11 01:20
0
A: Sandbox for Proposed Challenges

Dannyu NDosHow much do the Wuxings act? Objective Given two Chinese ideographs that purely consist of Wuxings, output how much their relationship is positive, or negative. Wuxings Wuxings(五行) are the five "elements" in the Chinese philosophy. They are namely Fire(火), Water(水), Wood(木), Metal(金), and Soil(土)...

Jun 5 16:17
0
A: Sandbox for Proposed Challenges

CursorCoercerIntersection check in the fewest operations Given two line segments, your goal is to wirte a funciton which determines if they intersect using only the operations given below: Multiplication: x*y Division: x/y Addition: x+y Subtraction: x-y Negation: -x (this can be thought of as multiplying by ...

May 26 13:25
0
A: Sandbox for Proposed Challenges

ThemoonisacheeseWhen is my coworker's next birthday? inspired by this post. Consider 2 coworkers who work monday - friday, every week of every year, with no breaks or national holidays. On day n (day, month and year), worker 1 asks worker 2 their birthday, in the hopes of throwing an office party for the occasio...

May 21 20:06
0
A: Sandbox for Proposed Challenges

InfigonBuild the deepest filled array possible (JS) Your goal is to create an array with the most items inside. However, it won't be so easy: (Assume that the compiler uses V8 and has unlocked the ability to create very large pointer indexes and flags necessary to bypass other JS restrictions, making th...

May 18 17:44
0
A: Sandbox for Proposed Challenges

The Empty String PhotographerLin-Slow Implement an algorithm for any computing problem that is solvable in linear time. The twist? Answers are ranked in a strange way! The winner is the algorithm with the fastest-growing time complexity (i.e. the one that becomes slowest as the input size increases). Also, there are some re...

May 16 04:44
0
A: Sandbox for Proposed Challenges

bigyihsuanIs it a product of 4 primes (A046386)? code-golfsequenceprimesdecision-problem A046386 is the sequence of all natural numbers that are the product of exactly 4 distinct primes. Write the shortest program, function, or code snippet, that, when given a number of the largest fixed-size unsigned inte...

May 11 03:27
0
A: Sandbox for Proposed Challenges

Wheat WizardWrite a function from rational numbers to binary fractions (rational numbers whose denominator is a power of two) which is bijective and preserves order. That means: For every binary fraction \$x\$ there is exactly one rational \$y\$ such that \$f(y)=x\$. \$x < y \iff f(x) < f(y)\$ That's all. ...

May 7 11:17
0
A: Sandbox for Proposed Challenges

Steve BennettHow many polygons overlap? Given some number of polygons, determine what is the greatest number of polygons overlapping at a single point. That is, if each polygon was a piece of paper positioned somewhere on a table, what is the maximum number of layers of paper you could simultaneously pierce w...

May 3 00:30
0
A: Sandbox for Proposed Challenges

Dannyu NDosWhat animal is my zodiac? Objective Given a Chinese ideograph meaning a zodiac, output the ideograph meaning the zodiac's representative animal. Mapping 子 (U+5B50) → 鼠 (U+9F20) 丑 (U+4E11) → 牛 (U+725B) 寅 (U+5BC5) → 虎 (U+864E) 卯 (U+536F) → 兔 (U+5154) 辰 (U+8FB0) → 龙 (U+9F99) 巳 (U+5DF3) → 蛇 (U+86C7) ...

May 2 15:47
0
A: Sandbox for Proposed Challenges

The Empty String PhotographerI SAT on a conjunction … AND it was very pointy. So far, we have had 2SAT solving and Sudoku to SAT conversion, but we haven’t had anything for solving unrestricted SAT. Given a list of clauses for a SAT formula in conjunctive normal form, determine whether it is solvable, and if so, give a sol...

Apr 29 13:08
0
A: Sandbox for Proposed Challenges

Steve BennettBreak a shape into two pieces A shape is defined as a contiguous (touching orthogonally, not diagonally) set of cells on a grid. For example, with . representing empty and x or X part of the shape: .xxx..x....... xxxxxXxxxx.... xxxxxXxxxxx... .xx...xxxxxxxx Your task is write a program or functi...

Apr 27 16:27
0
A: Sandbox for Proposed Challenges

squareroot12621There's a reason hashes aren't short code-golf hashing Challenge Given a string s, return the SHA-256 hash of s. Builtins that solve this exact challenge aren't allowed, but everything else is allowed. The SHA-256 hashing process is very long, so you can use this website for the explanation. Test...

Apr 27 11:05
0
A: Sandbox for Proposed Challenges

Steve BennettWhat is the largest circle that can be added now? Circles of various sizes and locations, possibly overlapping, are being added to a 100x100 box. Your task is to write a program or function to figure out the size of the largest circle that could be added now without overlapping any existing circl...

Apr 26 17:41
0
A: Sandbox for Proposed Challenges

JordanSlanted Letter Sign I dreamed I opened a business called “The Skill Share” and the sign out front looked (sort of) like this: L E L R E I A H K H T S S Write a program or function that formats text like this. Input The input will be a non-empty string of printable ASCII characters....

Apr 25 14:21
0
A: Sandbox for Proposed Challenges

caird coinheringaahin gDestroy your predecessor In these two previous challenges I asked you to try to "destroy" a starting configuration in Conway's Game of Life as minimally as possible, and to try to outlast previous answers as minimally as possible. Now, we're gonna combine the two. Conways' Game of Life is a well...

Apr 23 14:29
0
A: Sandbox for Proposed Challenges

bigyihsuanImplement PHMINPOSUW (Packed Horizontal Word Minimum) code-golfarray PHMINPOSUW (Packed Horizontal Word Minimum) is a specialized x86 instruction that finds the minimum value and location of a 16-bit unsigned integer in an 8-element vector packed into a 128-bit register, and places it in another ...

Apr 22 06:47
0
A: Sandbox for Proposed Challenges

a random personBox drawing 7-segment display Similar: Display words using 7-segment display Seven Slash Display My first challenge Using the box drawing symbols (─│┌┐└┘├┤┬┴┼ and/or ━┃┏┓┗┛┣┫┳┻╋) and space ( ), make a 7-segment display capable of displaying digits 0-9. Note that digit 1 should take up the sam...

Apr 20 02:45
0
A: Sandbox for Proposed Challenges

Explorer09Conversion between CESU-8 and UTF-8 The Compatibility Encoding Scheme for UTF-16: 8-Bit, also known as CESU-8, is a Unicode encoding that is not part of the Unicode standard, but mentioned in a Unicode Technical Report as a compatibility scheme. CESU-8 is a label for an erroneously encoded UTF-8,...

Apr 19 05:23
0
A: Sandbox for Proposed Challenges

panBalance the eggs! Problem You just bought a full \$2 \times 5\$ carton of \$10\$ eggs: For now on, we will depict cartons with ASCII art. The top-view of the above carton would look like: +-----+ |ooooo| |ooooo| +-----+ To save on production costs, the egg factory has a master egg. Every egg pr...

Apr 14 03:59
0
A: Sandbox for Proposed Challenges

l4m2Implement ForkStack ForkStack is a 2D language I just created with 4 instructions. F Create a subprocess that turn right. After the subprocess halt, go on current process. All processes share same stack. T Turn. Pop from stack. Turn left if it's a 0, right if it's a 1, or straight if it's empty....

Apr 12 11:15
0
A: Sandbox for Proposed Challenges

l4m2Given input with addition, fraction and number, output in ASCII art. You can assume either addition and fraction appear alternatively (in which case a single value in dominator is expressed as sum of single element) or every operation is binary or whatever. A fraction is a horizon line of larger ...

Apr 12 02:07
0
A: Sandbox for Proposed Challenges

Steve Bennett63 ways to split your string in YAML There are 63 ways you can split a string across multiple lines in YAML. Your task is to write a program that outputs a YAML array that demonstrates all of them and their key features, in any order. A summary of these features is this answer on StackOverflow (w...