Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Activity for trichoplax‭

Type On... Excerpt Status Date
Comment Post #292356 In response to a comment on the challenge, I've decided to make the input format more flexible. This leaves your current answer just as valid as before, but I'm letting you know because it is likely you can use the added flexibility to reduce your score.
(more)
3 months ago
Comment Post #292354 I've now edited to make the input format more flexible. Specifically, yes you can take input as an array of digits.
(more)
3 months ago
Edit Post #292354 Post edited:
Make input format more flexible
3 months ago
Comment Post #292354 Allowing an array of digits (as integers rather than characters) would bring the python answer down to 27 bytes. I did intend this as a very quick challenge, so I'm now considering allowing input as any of: - a number (such as integer or floating point number) - a string - an array of character...
(more)
3 months ago
Comment Post #292354 Actually allowing input as a string would only take the python answer from 37 bytes to 32, so I was probably overstating "bulk of the challenge".
(more)
3 months ago
Comment Post #292354 Oh good point. I hadn't thought of that. Usually I like input formats to be flexible as long as the input format doesn't constitute preprocessing. In this case I feel like separating the input into digits is the bulk of the challenge. I've currently specified input as an integer, so the existing p...
(more)
3 months ago
Edit Post #292355 Post edited:
Clarify
3 months ago
Edit Post #292355 Post edited:
Remove redundant "non-empty"
3 months ago
Edit Post #292355 Initial revision 3 months ago
Article Digits with subsets of unique probability
Output a random digit, with no 2 subsets having equal probability. Input There is no input for this challenge. Output - A single digit from 0 to 9. - The output must have a distinct probability of being in each subset of the digits 0 to 9. - It follows that every digit must have a non-zero ...
(more)
3 months ago
Edit Post #292344 Post edited:
Mark as finalized
3 months ago
Edit Post #292354 Initial revision 3 months ago
Question How many odd digits?
Given a positive integer, count its odd digits. Input - An integer from 1 to 999,999,999, inclusive, in any of the following formats: - A number (such as an integer or floating point number), like `123`. - A string, like `"123"`. - A sequence of characters (such as an array or list), lik...
(more)
3 months ago
Edit Post #292350 Post edited:
Change footnote to 3 to avoid clash with 1 and 2 in another answer on this page
3 months ago
Edit Post #292350 Post edited:
Link to main function answer
3 months ago
Edit Post #292347 Post edited:
Condense
3 months ago
Comment Post #292351 This answer is the one I am least confident of. It isn't clear what counts as a "snippet" of code, making it difficult to know how to interpret this answer. I've added this answer as a starting point for discussion. Please mention any exceptions or edge cases.
(more)
3 months ago
Edit Post #292351 Post edited:
Mention STDIN
3 months ago
Edit Post #292351 Initial revision 3 months ago
Answer A: Default Rules: Code Golf Answer Types
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], instead requiring the input value to be inserted directly into the code. This is not an acceptable typ...
(more)
3 months ago
Edit Post #292350 Initial revision 3 months ago
Answer A: Default Rules: Code Golf Answer Types
Anonymous function A code golf answer can be an anonymous function[^3]. That is, a function that can be defined without giving it a name (in programming languages that allow this). If an anonymous function does not call itself, it need not be given a name. If an anonymous function is recursive, i...
(more)
3 months ago
Edit Post #292349 Post edited:
List full import code to remove ambiguity
3 months ago
Edit Post #292349 Initial revision 3 months ago
Answer A: Default Rules: Code Golf Answer Types
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 If the function depends on additional source code in order to work, the bytes required for that addi...
(more)
3 months ago
Edit Post #292348 Initial revision 3 months ago
Answer A: Default Rules: Code Golf Answer Types
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.
(more)
3 months ago
Edit Post #292347 Post edited:
Link to code-golf tag
3 months ago
Edit Post #292347 Initial revision 3 months ago
Question Default Rules: Code Golf Answer Types
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 per answer. An answer can express that a particular type is acceptable, or that it is not acceptable....
(more)
3 months ago
Edit Post #292344 Initial revision 3 months ago
Article How many odd digits? [FINALIZED]
Now posted: How many odd digits? Given a positive integer, count its odd digits. Input - An integer from 1 to 999,999,999, inclusive. Output - The number of odd digits in the input. Test cases Test cases are in the format `input : output`. ```text 1 : 1 2 : 0 3 : 1 4 : 0 5 ...
(more)
3 months ago
Comment Post #291891 > Should execute up to 870 or so. Although the test suite times out before reaching 1000, this is only because it is trying to run all of the test cases consecutively. Running individual test cases works correctly all the way up to 1000, as required. Mentioning for future voters.
(more)
3 months ago
Edit Post #292333 Post edited:
Label equation for clarity
3 months ago
Edit Post #292333 Initial revision 3 months ago
Answer A: Hex ​​​detector
Rust, 35 bytes ```rust |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 of 2 distinct values, indicating whether the input is a hex number. This allows usin...
(more)
3 months ago
Comment Post #292279 I defined the Fibonacci numbers to be zero-indexed for clarity, but seeing your answer makes me realise this may disadvantage some languages, which was not my intention. I have now edited the challenge to allow either zero-indexed or one-indexed Fibonacci numbers, while still requiring that the in...
(more)
3 months ago
Edit Post #290870 Post edited:
Allow either zero-indexed or one-indexed Fibonacci numbers
3 months ago
Comment Post #292000 Do you mean keep it greyscale but allow accepting input with a grey value as something like (128, 128, 128) or #808080 instead of just 128? I was considering allowing RGB or RGBA for the output colours but I hadn't thought of this for the inputs.
(more)
3 months ago
Comment Post #291889 Thanks for pointing this out. I've now added a footnote linking to it.
(more)
3 months ago
Edit Post #291889 Post edited:
Add link to OEIS
3 months ago
Edit Post #292000 Post edited:
Collapse example implementations because they are optional
4 months ago
Edit Post #292000 Post edited:
Separate accuracy section from test cases section
4 months ago
Edit Post #292171 Post edited:
Mark as finalized
4 months ago
Edit Post #292173 Initial revision 4 months ago
Question Net​​ or​​ not?
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). - The topmost row and leftmost column will never be empty (the hexomino will be as far up and left a...
(more)
4 months ago
Edit Post #292171 Post edited:
Further specify input
4 months ago
Edit Post #292171 Post edited:
Move attribution to footnotes
4 months ago
Edit Post #292171 Post edited:
Add explanation of hexomino
4 months ago
Edit Post #292171 Initial revision 4 months ago