Activity for trichoplax
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Comment | Post #294072 |
I'll amend or delete that answer accordingly once there's consensus here. (more) |
— | about 2 hours ago |
Comment | Post #294072 |
Option 4 is effectively treating environment variables the same way as flags and compiler options, but I'm not entirely comfortable with that existing default rule either. Flags and compile-time options can also be used to fine tune the language to the challenge.
I might be convinced by an answer ... (more) |
— | about 2 hours ago |
Edit | Post #294063 |
Post edited: Change language to avoid unfairly competing with the standard Python 3 answer until there is Meta consensus |
— | about 2 hours ago |
Comment | Post #294072 |
That's a good point about obscure rules.
I added the `hash` function to my answer, and then realised it wouldn't work without setting an environment variable, and then assumed that the correct course of action would be to add the bytes to the score, but that felt unfair on the other Python answer,... (more) |
— | about 2 hours ago |
Comment | Post #294063 |
I'm not sure if our current [default rules](https://codegolf.codidact.com/categories/48/tags/5434) cover this, so I've raised on Meta [Using environment variables in code golf](https://codegolf.codidact.com/posts/294072) if you'd like to discuss how this should be treated. (more) |
— | about 10 hours ago |
Edit | Post #294072 |
Post edited: Emphasis and clarity |
— | about 10 hours ago |
Edit | Post #294072 | Initial revision | — | about 10 hours ago |
Question | — |
Using environment variables in code golf I wrote a code golf answer which depends on setting an environment variable before running the code. I've assumed that the bytes used to define the environment variable should be added to the score, but I'm not sure if this is covered by existing default rules. Should setting environment variables... (more) |
— | about 10 hours ago |
Edit | Post #287133 |
Post edited: Change from code golf to shortest string wins, and from a list to a single string with subsequence fish |
— | 1 day ago |
Edit | Post #294063 | Initial revision | — | 2 days ago |
Answer | — |
A: Net or not? Python 3 + PYTHONHASHSEED=764, 193+18=211 bytes This doesn't work with Python's default settings, because for security reasons `hash` gives different results for the same input on different runs. It needs 18 extra bytes to define an environment variable to make Python give consistent output, to allo... (more) |
— | 2 days ago |
Comment | Post #294030 |
I used your approach to write a Rust answer (thank you!). Thinking of your probable improvement 1, I've omitted the longest encodings from the long string by taking the transpose of the input and only keeping whichever is shorter (the encoding before or after transposing). This means the longer of ea... (more) |
— | 2 days ago |
Edit | Post #294062 | Initial revision | — | 2 days ago |
Answer | — |
A: Net or not? Rust, 325 bytes A closure (anonymous function) returning `true` for a net, or `false` otherwise. ```rust |s|"83e423a313e423e8c1a383e213e823e143e223e443e441ec83a313e233a831acc1e223e233a421ec83e81fcc1e111ecc1e413e133a243e183e172743a343e8".contains(&format!("{:x}",(0..2).map(|c|(0..36).map(|m|{let ... (more) |
— | 2 days ago |
Edit | Post #293927 |
Post edited: Suggest linking from the leaderboard |
— | 3 days ago |
Comment | Post #294030 |
3. `base=` is optional - it will be assumed from the argument order if omitted. (more) |
— | 5 days ago |
Comment | Post #294030 |
Sounds promising.
Yes there's probably still plenty to reduce. I also considered rearranging the numbers so some have an overlap between the end of one and the beginning of the next, so the duplicated overlap can be omitted to save bytes, but that wouldn't be as quick to find as just losing the sp... (more) |
— | 5 days ago |
Comment | Post #294030 |
My other thread about removing spaces saves more than this approach, so it's probably redundant now. The spaces can't be removed in the same way here, so this might be a dead end. (more) |
— | 6 days ago |
Comment | Post #294030 |
Since the order of the numbers in the string is not important, they can be rearranged into an order which does not cause the problem for any of the spaces, allowing all of them to be removed:
```python
lambda s:hex(sum(2**i*(c=='#')for i,c in enumerate(s)))[2:]in"c08182c0c102c30cc702c704c708e07e0... (more) |
— | 6 days ago |
Comment | Post #294030 |
The spaces in the long string of true cases can't all be removed, because that would sometimes cause the end of one number and the beginning of the next to join together and make one of the false cases present in the string, causing a test case failure.
However, this problem only affects 6 of the ... (more) |
— | 6 days ago |
Comment | Post #294028 |
There's a way to save 4 bytes but it will make the code break after the first time it is called. I don't think we have a rule on this yet, so I've raised on Meta [Answers that work only once](https://codegolf.codidact.com/posts/294031) to see what the community thinks. So the suggestion mentioned the... (more) |
— | 8 days ago |
Edit | Post #294032 | Initial revision | — | 8 days ago |
Question | — |
Default-rules is a mod only tag but is suggested with the required tags When creating a new post, at least one of the required tags listed above the Tags field must be added. The first 4 of these can be added by anyone, but "default-rules" is a moderator only tag. For a non-moderator, it is confusing to add this tag from the suggested list of required tags, only to th... (more) |
— | 8 days ago |
Edit | Post #294031 | Initial revision | — | 8 days ago |
Question | — |
Answers that work only once If the challenge author does not specify otherwise, should an answer be required to work repeatedly? That is, is an answer allowed to be written in a way that saves bytes by only working the first time it is called? Example I wondered this after realising that an existing JavaScript answer could ... (more) |
— | 8 days ago |
Comment | Post #294030 |
Turns out it's still possible to save some bytes by converting the string of base 36 numbers to a list of integers, and checking if the integer you generate is in that list:
```python
lambda s:sum(2**i*(c=='#')for i,c in enumerate(s))in list(map(lambda x:int(x,36),"4h3if6 1f9o 1fyb 1g1t 1g1u 1g1w... (more) |
— | 8 days ago |
Comment | Post #294030 |
Oh wait - Python only converts *from* base 36, not to base 36. Might not be any saving after all. (more) |
— | 8 days ago |
Comment | Post #294030 |
You can save some bytes by using base 36 instead of base 16. (more) |
— | 8 days ago |
Comment | Post #294029 |
I haven't proposed closing as a duplicate in case it's useful to have a Code Golf specific discussion here, but for reference, there has been a similar request on Codidact Meta: [Show tags in posts](https://meta.codidact.com/posts/288221) (more) |
— | 8 days ago |
Comment | Post #294008 |
I'd forgotten about this awkwardness when the score is fractional. I've raised a [GitHub issue](https://github.com/codidact/qpixel/issues/1636). (more) |
— | 14 days ago |
Comment | Post #294007 |
The leaderboard turns out to not be equipped to handle scores less than 1, so your answer is currently showing as "Invalid entry format" despite you including a correctly formatted (albeit empty...) codeblock.
[GitHub issue raised](https://github.com/codidact/qpixel/issues/1635). (more) |
— | 14 days ago |
Comment | Post #293933 |
This is a very mathematical challenge. I wouldn't expect most people who write code to understand it, so its target audience will be people who enjoy both golfing code and mathematics.
The previous title sounded like a straightforward conversion challenge, which could attract people who don't have... (more) |
— | 24 days ago |
Comment | Post #293933 |
The new title more than covers it. I like it. (more) |
— | 24 days ago |
Comment | Post #293933 |
(Alternatively maybe something other than "Convert" in the title, such as "Bijection from"?) (more) |
— | 24 days ago |
Comment | Post #293933 |
Interesting challenge. The spec seems complete to me, but I can imagine it being easy to make an incorrect assumption because "Convert" could lead to some people assuming that $f(x)$ is expressing $x$ as a binary fraction. Would it be worth stating explicitly that this is in general impossible so peo... (more) |
— | 24 days ago |
Edit | Post #293927 |
Post edited: Add next steps |
— | 25 days ago |
Comment | Post #292168 |
As there has been no preference expressed after some time, I've [added a fix](https://github.com/codidact/qpixel/pull/1616) (pending review) that sorts undefined scores to the bottom so they don't interfere with the order of the other scores.
I'm guessing this was the originally intended behaviour... (more) |
— | 26 days ago |
Edit | Post #293927 | Initial revision | — | 26 days ago |
Question | — |
Formating an answer to work with the automated leaderboard How should I format my answer so that it works correctly with the automated leaderboard that shows under a challenge? - What is the required format? - How much flexibility is there? Once this has a comprehensive answer consider: - Adding it to the help system. - Linking to it from the an... (more) |
— | 26 days ago |
Edit | Post #293883 | Initial revision | — | about 1 month ago |
Question | — |
Missing usernames on leaderboard The automated leaderboard for each challenge previously showed the username for each answer row, but now it does not. I'm guessing a recent change to page layout has caused the JavaScript that generates the leaderboard to become incompatible. For comparison, there is a Meta question from a year ag... (more) |
— | about 1 month ago |
Edit | Post #293823 |
Post edited: Split long sentence |
— | about 1 month ago |
Comment | Post #293823 |
I've added an explanation and some worked examples. (more) |
— | about 1 month ago |
Edit | Post #293823 |
Post edited: Add explanation and worked examples |
— | about 1 month ago |
Edit | Post #293823 |
Post edited: Reduce challenge wording prior to considering adding a specification |
— | about 1 month ago |
Comment | Post #293823 |
I was torn between specifying an algorithm and leaving it as a part of the challenge to work out how to calculate the pattern. In the end I decided on not specifying at first, but adding an answer of my own as an example if no one answers for a while.
Do you think it would be better to have a spec... (more) |
— | about 1 month ago |
Edit | Post #293867 |
Post edited: Typo |
— | about 1 month ago |
Edit | Post #293867 | Initial revision | — | about 1 month ago |
Question | — |
Transferable golfing skills We have many questions about how to golf in a specific programming language. These result in tips that apply only to that language or closely related languages. What advice do you have on golfing that applies more generally, to most languages? These may be algorithmic tricks or general approaches,... (more) |
— | about 1 month ago |
Edit | Post #293859 |
Post edited: Improve wordings |
— | about 1 month ago |