Posts by trichoplax
Function Score is the bytes of the function A code golf answer can be a function. Only the bytes required to define the function are included in the score. Score includes imports and definitions...
Anonymous function A code golf answer can be an anonymous function[1]. That is, a function that can be defined without giving it a name (in programming languages that allow this). If an anonymous...
A snippet is not a valid answer A code golf answer must in general be able to take input[1] and give output. A snippet of code that is not contained in a function or program cannot take input[2], ...
Currently the maximum number of characters for a Codidact post is 30,000. However, at some point this may be configurable per community (or perhaps per category). There is a GitHub issue for Config...
Complete program A code golf answer can be a complete program. This means that the code can be interpreted or compiled (as appropriate) without any additional source code.
When answering a code-golf challenge, what types of answer are acceptable by default? Can an answer be a complete program, a function, an anonymous function, a snippet of code? Please add one type...
Rust, 35 bytes |n:f64|(12.*n-3.).sqrt().fract()>0. Counterintuitively, this outputs false for a hex number, and true otherwise, but this is consistent with the output requirement: One o...
Given a hexomino, indicate whether it is a net of a cube. Input A 6 by 6 grid containing exactly 6 filled squares. The 6 filled squares will be in a single edge connected set (a hexomino). Th...
Respect both sides We should consider how an approach would affect the poster of the incorrect answer, and how it would affect the posters of correct answers. Correct answers In general, allowin...
Given a radius R, output a text representation of a circle. Input A positive integer R (strictly greater than zero) You do not need to handle values of R greater than 32 Output A square ...
Since the examples I've given in the question are deliberately brief, they don't demonstrate the benefit of hiding a large block of text. I'm giving an example in this answer of one of my own chall...