Activity for trichoplax
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #293791 |
Post edited: Remove promise of explanation |
— | about 2 months ago |
Edit | Post #293791 |
Post edited: Remove redundant backstory |
— | about 2 months ago |
Edit | Post #293791 |
Post edited: Clarify wordings |
— | about 2 months ago |
Edit | Post #293791 |
Post edited: Make test cases shorter but also cover required patterns exhaustively |
— | about 2 months ago |
Edit | Post #293791 |
Post edited: Replace test cases with better distribution of inputs and more golfable outputs |
— | about 2 months ago |
Edit | Post #293791 | Initial revision | — | about 2 months ago |
Article | — |
Awkward Ordinals [FINALIZED] Now posted: Awkward Ordinals Write code that takes a positive integer and outputs the awkward ordinal name from the test cases. Notice that these are not the conventional ordinal names, although there is significant overlap. You are free to use any approach that happens to pass all the test... (more) |
— | about 2 months ago |
Comment | Post #293752 |
While I was writing that, the challenge rules were updated, which I think now excludes use of `τ`. (more) |
— | about 2 months ago |
Comment | Post #293752 |
There's a [comment thread](https://codegolf.codidact.com/comments/thread/10711#comment-26764) that gives a different impression of the rules than the challenge specification, so I've asked for the challenge to be updated to remove any ambiguity.
Until that's done, I'm not certain whether `τ` is pe... (more) |
— | about 2 months ago |
Comment | Post #293750 |
Ambiguity is common when designing challenge specifications. For this reason I post my challenges first to the [Sandbox category](https://codegolf.codidact.com/categories/50) so as much ambiguity as possible can be pointed out before answers start arriving. This makes it easier to make changes to the... (more) |
— | about 2 months ago |
Comment | Post #293750 |
The challenge says:
> No built-in hexadecimal functions.
However, this comment thread suggests a stronger rule:
> `.toString(16)` would be banned.
Since `toString` can convert to different bases depending on that argument, this suggests general base conversion functions are banned.
Ple... (more) |
— | about 2 months ago |
Edit | Post #293746 |
Post edited: Typo |
— | about 2 months ago |
Edit | Post #293747 | Initial revision | — | about 2 months ago |
Answer | — |
A: Rust golfing tips Replace `reduce` with `fold` Unlike some languages, Rust's reduce returns an `Option`, requiring additional bytes to `unwrap` the output. However, Rust's fold does not. If you can find a suitable neutral initial value that will keep your output the same (such as the additive identity `0` for a ... (more) |
— | about 2 months ago |
Edit | Post #293746 | Initial revision | — | about 2 months ago |
Answer | — |
A: Rust golfing tips Avoid assignment & semicolon of unnamed closure Closure (15 bytes) If you need to call a closure using it's name (such as if it is recursive) then you need the bytes required to assign it to a variable, including a trailing semicolon to end the assignment. ```rust let f=|a,b|ab; ``` Tes... (more) |
— | about 2 months ago |
Comment | Post #293741 |
We have questions tagged "tips" and "code-golf", and we also have questions tagged "tips" and "fastest-code" or "tips" and "king-of-the-hill".
Does this work well enough, or is there demand for "fastest-code-tips" and "king-of-the-hill-tips"? I was guessing the separate tags for "tips" and the cha... (more) |
— | about 2 months ago |
Edit | Post #293743 | Initial revision | — | about 2 months ago |
Answer | — |
A: Rust golfing tips Avoid type annotations with a closure instead of a fn Function (24 bytes) A function requires types to be specified for its return value, and for any arguments it takes. ```rust fn f(a:u8,b:u8)->u8{ab} ``` Test function on Rust Playground Closure (15 bytes) A closure does not genera... (more) |
— | about 2 months ago |
Edit | Post #293742 | Initial revision | — | about 2 months ago |
Question | — |
Rust golfing tips What tips do you have for saving bytes in Rust? Please post one tip per answer for ease of voting and commenting. (more) |
— | about 2 months ago |
Edit | Post #293741 | Initial revision | — | about 2 months ago |
Question | — |
Should we delete the code-golf-tips tag? The code-golf-tips tag seems redundant since we already have code-golf and tips. It also has zero usages. Should this tag be deleted to avoid its future usage? (more) |
— | about 2 months ago |
Edit | Post #284061 |
Post edited: Fix sentence structure |
— | about 2 months ago |
Comment | Post #279856 |
There was no tab - you can still save all 8 bytes. Here's how the other 5 sneaked in:
> By adding `*r=0;`, we can call it multiple times during testing, which is why the code in the TIO link below looks slightly longer. (more) |
— | about 2 months ago |
Comment | Post #279856 |
I'm impressed that you had the foresight to add just enough whitespace at the end of the first line of the code to avoid any of it being obscured by the "Copy" button when you scroll to the right, on both desktop and mobile. It lines up perfectly. Particularly impressed that you did this over 2 years... (more) |
— | about 2 months ago |
Edit | Post #293603 |
Post edited: Mark as finalized |
— | 2 months ago |
Edit | Post #293682 | Initial revision | — | 2 months ago |
Question | — |
Digit balanced numbers Does a number have balanced numbers of distinct digits? That is, do the number's digits appear with equal frequency? Input - A positive integer N. - N will have no leading zeroes. Output - An indication of whether the number has balanced digits. - This can be a truthy or falsy value (where ... (more) |
— | 2 months ago |
Edit | Post #293603 |
Post edited: Choose the second challenge type to avoid the need to handle huge numbers |
— | 2 months ago |
Edit | Post #293603 |
Post edited: Exclude leading zeroes from input for second challenge type |
— | 2 months ago |
Comment | Post #293659 |
I agree - I included the downscaled images to show why that approach is insufficient. What I'm hoping to see here are answers that either give handcrafted versions of the current icon with detail levels appropriate to the different image sizes, or entirely different icons that work better for favicon... (more) |
— | 2 months ago |
Edit | Post #293655 | Initial revision | — | 2 months ago |
Question | — |
A Code Golf specific favicon On main Codidact Meta there was a request for Unique favicons for each site. This has had a positive response and no objections (the nearest is one answer that says it should be opt in per community). Code Golf seems like a good place to test out having a distinguishing favicon. Is this something ... (more) |
— | 2 months ago |
Edit | Post #293603 |
Post edited: Add alternative challenge for comparison |
— | 2 months ago |
Edit | Post #293603 |
Post edited: Add a sandbox question about a possible alternative challenge |
— | 2 months ago |
Edit | Post #293603 |
Post edited: Improve example headings |
— | 2 months ago |
Edit | Post #293603 |
Post edited: Mention OEIS and add test cases. |
— | 2 months ago |
Edit | Post #293603 |
Post edited: Improve sentence structure for clarity |
— | 2 months ago |
Edit | Post #293603 |
Post edited: Clarify that digits to be counted are distinct |
— | 2 months ago |
Edit | Post #293603 | Initial revision | — | 2 months ago |
Article | — |
Digit balanced numbers [FINALIZED] Now posted: Digit balanced numbers Does a number have balanced numbers of distinct digits? That is, do the number's digits appear with equal frequency? Input - A positive integer N. - N will have no leading zeroes. Output - An indication of whether the number has balanced digits. - T... (more) |
— | 2 months ago |
Comment | Post #293336 |
> so I've added the assignment (f←) in the footer
I agree your score but I don't know how to enter it into TIO. What you have at the moment is giving correct output so I don't see any reason to change it, but I don't think TIO is using the code field, to produce that output. The footer field conta... (more) |
— | 4 months ago |
Comment | Post #293336 |
> If I remember correctly assigning the function to a name is not part of the code
Yes this is my understanding, provided the function is not recursive (so it doesn't need to call itself by name). I [proposed this rule on Meta](https://codegolf.codidact.com/posts/292347/292350#answer-292350) and t... (more) |
— | 4 months ago |
Edit | Post #293295 |
Post edited: Typo |
— | 5 months ago |
Edit | Post #293293 |
Post edited: Add further test cases |
— | 5 months ago |
Edit | Post #293293 |
Post edited: Remove ambiguity |
— | 5 months ago |
Edit | Post #293289 |
Post edited: Mark as finalized |
— | 5 months ago |
Edit | Post #293293 | Initial revision | — | 5 months ago |
Question | — |
Expand a greyscale/colour hex code Consider a type of hexadecimal colour code that supports shorthand for both greyscale and colour: - A 6 digit code is interpreted as 2 digits for red, followed by 2 for green, then 2 for blue. - A 2 digit code is greyscale. The 2 digits are used for each of red, green, and blue. - A 3 digit code i... (more) |
— | 5 months ago |