Activity for H_H
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Comment | Post #289866 |
I think a non-golfed example should be provided, since it is often easier to understand short readable code than written text. (more) |
— | about 1 year ago |
Comment | Post #289866 |
Is it necessary that a solution has to support all input orderings? Can't a solution require the input to be `A≤B≤C` or vice versa? (It could make it simpler in some languages) (more) |
— | about 1 year ago |
Comment | Post #289866 |
What is the largest input number that has to be supported?
Other than that: Good challenge, since it is simple and still most languages will not have a built in function for that (which is good for code golf). (more) |
— | about 1 year ago |
Comment | Post #289852 |
Can you give a ungolfed example? (One that is easy to understand). And explain the score of the example. (more) |
— | about 1 year ago |
Comment | Post #289782 |
Yes. But if we split answers, wouldn't it make sense to also split the question? One question for Integer size, one for list lengths and one for "floating point" accuracy? (more) |
— | about 1 year ago |
Comment | Post #289782 |
Should i split the question to ask for each rule separately? (more) |
— | about 1 year ago |
Comment | Post #289782 |
@trichoplax made an edit and i can't accept it.
Error message:
> Failed: You don't have permission to change moderator-only tags.
Why? And what should i do? (more) |
— | about 1 year ago |
Edit | Post #289782 |
Post edited: |
— | about 1 year ago |
Edit | Post #289782 | Initial revision | — | about 1 year ago |
Question | — |
Default minimum required precision and supported size for inputs For challenges that require a input, what is the maximum a solution has to support, if not further specified by the challenge author? Lets say the input is a string, how long a string has to be accepted? I assume it isn't infinite since that would eliminate most programming languages and all real ... (more) |
— | about 1 year ago |
Edit | Post #289681 |
Post edited: |
— | about 1 year ago |
Edit | Post #289681 |
Post edited: |
— | about 1 year ago |
Edit | Post #289681 |
Post edited: |
— | about 1 year ago |
Comment | Post #289679 |
Is there a requirement that the author can test it? Many solution are platform specific and i don't think most authors have all the platforms, interpreters and compilers a solution can use.
(more) |
— | about 1 year ago |
Comment | Post #289679 |
The point is that there is large factor between both, so it easy to test, even on different computers. Automatically: Run it once where you know the the runtime will be fast, measure it, multiply it by 4. Use this time as a limit, if it stops before you know it had a fast runtime if not, it had a lon... (more) |
— | about 1 year ago |
Comment | Post #289679 |
I agree.
Changed the suggestion and now use always a limited runtime which measurable. (more) |
— | about 1 year ago |
Edit | Post #289679 |
Post edited: |
— | about 1 year ago |
Edit | Post #289679 |
Post edited: |
— | about 1 year ago |
Comment | Post #289679 |
I don't think 2 matters for code golf. There is no goal to have reusable code.
On the other hand, i don't think solutions that require longer to compute as you can reasonable be expected of someone to wait for a result should be allowed by default. The problem is that is a very ambiguous and depen... (more) |
— | about 1 year ago |
Edit | Post #289678 |
Post edited: |
— | about 1 year ago |
Edit | Post #289681 | Initial revision | — | about 1 year ago |
Question | — |
Is it part of the mandelbrot set? Input is a number, you have to decide if it is part of the mandelbrot set or not, after at least 16 iterations. This is done by applying this formula: $zn = z{n-1}^2 + c$ repeatedly. $c$ is the input number and $z0 = 0$. Therefore: - $z1 = c$ - $z2 = c^2 + c$ - $z3 = ( c^2 + c )^2 +c$ - $z4 ... (more) |
— | about 1 year ago |
Edit | Post #289678 |
Post edited: Removed some maybe ambigious test cases that are on a edge. |
— | about 1 year ago |
Comment | Post #289678 |
Edit it: Remove the halting vs non-halting option. And i added test cases that should work with multiple different rounding methods and a different number of iterations. (more) |
— | about 1 year ago |
Edit | Post #289678 |
Post edited: |
— | about 1 year ago |
Comment | Post #289678 |
Thank you for the valuable input.
I agree to some extend. Yes, too much flexibility makes creating testcases hard. Especially in this case, since the mandelbrot is a fractal that can change in a hard to predict way with very tiny changes in the input number. This was the reason to not include test... (more) |
— | about 1 year ago |
Edit | Post #289680 | Initial revision | — | about 1 year ago |
Answer | — |
A: Default Rules: Code Golf I/O A program may use IOs for input and output. A input can be read via IO, which can be a port with (multiple) IOs each IO reads a symbol (a bit or more when you have a ADC). Or it can come from frames, such as UART frames, I2C, SPI, Ethernet, .... (any bus you like). And Output can be done the sa... (more) |
— | about 1 year ago |
Edit | Post #289679 | Initial revision | — | about 1 year ago |
Answer | — |
A: Default Rules: Code Golf I/O A program may output a boolean value by using different amount of time or instructions till it returns. If a program needs to determine a boolean value, it may return in less than N second (or instructions) when the value is `false` but take longer than N + ϵ second (or instructions) when the valu... (more) |
— | about 1 year ago |
Comment | Post #287082 |
> The order of letters in a secondary compass point is always z axis direction, then y axis direction, then x axis direction.
Why? Sounds like a additional requirement (even a simple one) to a already hard challenge. (more) |
— | about 1 year ago |
Edit | Post #289678 |
Post edited: |
— | about 1 year ago |
Edit | Post #289678 | Initial revision | — | about 1 year ago |
Article | — |
Is it part of the mandelbrot set? [FINALIZED] Now posted Input is a number, you have to decide if it is part of the mandelbrot set or not, after at least 16 iterations. This is done by applying this formula: $zn = z{n-1}^2 + c$ repeatedly. $c$ is the input number and $z0 = 0$. Therefore: - $z1 = c$ - $z2 = c^2 + c$ - $z3 = ( c^2 +... (more) |
— | about 1 year ago |
Edit | Post #289564 |
Post edited: |
— | about 1 year ago |
Comment | Post #289642 |
> A byte has at least 8 bit. If it makes things easier, you can use a bigger byte size. The size should be independent of the value. (more) |
— | about 1 year ago |
Edit | Post #289564 |
Post edited: |
— | about 1 year ago |
Edit | Post #289564 |
Post edited: |
— | about 1 year ago |
Comment | Post #286280 |
What is the minimal maximum the solution has to support? I assume you don't require a infinite amount, since there would be no real world implementation that can support a infinite counter, including your ungolfed example. (more) |
— | about 1 year ago |
Edit | Post #289564 | Initial revision | — | about 1 year ago |
Answer | — |
A: Looping counter C, 30 + 1-4 byte f(m){f(printf("%0i\n",m,0));} Has this limitations: - counter stops working at `INTMAX` or at stack overflow. - Needs a input value to indicate on which line we start. `0` starts on the line with one character. - It uses `0` and not `` as output character Because of... (more) |
— | about 1 year ago |
Comment | Post #286280 |
Can i start with a empty line, for the index 0?
Can the solution require a input value that specifies on which line it starts? (It works with input 0). (more) |
— | about 1 year ago |
Comment | Post #282792 |
Real world programs like grep also use it, there is even a flag for grep, `-q`, where all other output is suppressed and the exit code is the only meaningful output.
There are even programs where the whole purpose is to exit with a specific value, such as true and false
So this should absolutely ... (more) |
— | about 1 year ago |
Comment | Post #282796 |
Does that mean `f(n){if(n&1)return;}` is a valid submission for a challenge to determine if a number is even or odd?
`f(n){if(n&1)return;}` is the same as:
```
void f(int n)
{
if(n&1) //When n is odd
{
return; //Return here
}
return; //return here when n is even
}
```
Or alt... (more) |
— | about 1 year ago |
Comment | Post #289447 |
Possible that i am just stupid. But if you ask me, your challenge requirements are hard to understand.
How does the summation at the end (Part with the Σ) work? From what value do you count till which value and what is your index? And what is the value of `f`? I know there is `f(0)` and `f(1)` ...... (more) |
— | about 1 year ago |
Edit | Post #289436 |
Post edited: |
— | over 1 year ago |
Edit | Post #289436 |
Post edited: |
— | over 1 year ago |
Comment | Post #289436 |
Yes. But output and input have to use the same format and you can't rely on leading 0's.
Thank you for the input, i updated the post to clarify. (more) |
— | over 1 year ago |
Comment | Post #289439 |
I don't know Sclipting. But the formula also works with `b = (b * 0x0202020202ULL & 0x010884422010ULL) % 341;` Is that shorter or does it have the same length? (more) |
— | over 1 year ago |
Comment | Post #289437 |
How do i input values above 127 and how values below 0x20?
And does this work for values <0x80 (AFAIK `bin()` outputs only the digits needed)?
Which brings the other question: Why the use of `ord()` and `chr()`. Wouldn't it be easier in python to use a integer? (more) |
— | over 1 year ago |
- ← Previous
- 1
- 2
- 3
- Next →