participating on PPCG imo has made me a better problem solver but I can't say how much of that is from the golf and how much is actually ifnding the solution :P
In your grandparents' day, dialing a phone number was done with a rotary dial like this:
To dial each digit, put your finger in the corresponding hole, pull it over to the finger stop, and release it. A mechanism will cause the dial to spin back to its resting position, and the phone will dis...
Given a list of at least two words (made only of lowercase letters), construct and display an ASCII ladder of the words by alternating the direction of writing first to the right, then to the left, relatively to the initial direction from left to right.
When you finish writing a word, change the...
@Anush hmm, it is a valid question (albeit already quite discussed); What do you call a built-in for pi? sin, cos, tan don't really give you pi, gamma gives pi only with a specific argument, by that logic a built-in for 3+x is a builtin for pi, when given 0.1415926. Does a solver for e^x = -1 count? Does that mean that a general math equation solver count as one? Does a language recognizing & optimizing 4*sum(addSubOddFractions) to pi exactly count?
Overlapping Strings
code-golfstringmatrixascii-art
Challenge:
Given a list of multi-line strings, overlap them (in the top-left) and output the result.
Example:
Input: ["aaaa\naaaa\naaaa\naaaa","bb\nbb\nbb","c"]
Output:
cbaa
bbaa
bbaa
aaaa
Challenge rules:
Input-format is flexible. You ...
Introduction
In many programming languages, within syntax exceptions, it is often pointed out to the programmer exactly which character or line is the culprit. This challenge will be a bit of a modification of that - specifically, using an arrow to point out any specific character of an input st...
@Anush (though i didn't downvote), the answer is already pretty much here (though that'd be more a closevote than downvote). The question is about the old revision (AFAICT), which you've yourself said had ambiguity.
I downvoted it because I do not think you can ban built-ins for pi for reasons described above by dzaima and didn't see a suitable answer to downvote instead of the question.
It is better, althrough it doesn't seem to enforce decimal output; I disagree about banning pi built-ins anyway, as it effectively makes the challenge two-part (compute pi then compute x^(1/x)), with both parts fairly hard.
@Anush implementing your own bigints, implementing a pi calculator & error function, repeating the whole process of recalculating everything for each digit, in a slow golfing language and it's over 10 seconds definitely
@H.PWiz it's not because, if you can solve it for n digits, you can just run it repeatedly for n = 1, 2,3, 4.... which then solves the infinite version
@Anush but you have a 10 second limit! (i realize that an updated questions time limits would be different, but what I'm saying that for the current challenge that's a very bad algorithm)
my suggestion: with input n, ouput n correct digits after the decimal place. - alternatively - your solution may accept no input, and output digits indefinitely
@Anush Whenever I would write code for n digits, I find it, firstly difficult to prove correct, and secondly usually has off by one errors for some values of n, that can't be easily fixed.
I don't object to your challenge. But it is more difficult
This challenge is to produce the shortest code for the constant \$\pi^{1/\pi}\$. Your code must output the first \$n\$ consecutive digits of \$\pi^{1/\pi}\$, where \$n\$ is given in the input.
This is code golf, so the shortest submission (in bytes) wins except that it must output the first 100...
@Anush i was stuck replying to the other chains here and didn't think you'd do it so quickly. updating so quickly also means you didn't take much time checking that the question is clear (as seen here above)
@Anush also have to emphasize what HyperNeutrino said in their answer - calling everyone who disagrees with you a hater does literally the opposite of getting people to help you
^ about that - why did you make the question "output pi^(1/pi)" not just output pi? As computing pi is pretty much the whole challenge, the bit of extra calculation is a bit annoying and definitely a reason people would downvote
as if you decide to go down the route of first computing pi, you have to worry about what precision you need to compute pi to and that needs some thought
@someone presumably that'd be taken care of by a big number library (if it's not, you will have problems, but then you're gonna have a bad time anyway)
CMC: Given a list of numbers, return the element with the largest magnitude. (If there is a tie, return any one or all of them.) E.g. [3,1,-4,1,5] → 5 and [3,1,-4,1,3] → -4
@dzaima Sure but that's because ⌈/ selects a specific element. How about +/⍢|? And in any case, what would you do about ⌈/⍢|3 ¯3 (yes, ⌈⍢|/3 ¯3 has the same issue).
±3 ;-) actually, in APL, that should probably look like ∓3
@dzaima Right. Actually, we already have that "problem" with dyadic ,
CMC: Given a list of numbers, return the running signed magnitude-maximum. If there is a tie, return the new one. E.g. [3,1,-4,1,5] → [3,3,-4,-4,5] and [3,1,-4,4,3] → [3,3,-4,4,4]
@Anush that'd be like pi^(1/pi) but you get a "dumb hardcode" option if you don't want to code arbitrary-precision math. e^(1/e) seems to be slightly better that pi^(1/pi) though, as it's the maximum of x^(1/x) and can be searched for.
This could almost be code golf -- how many clickbait elements in the fewest words (or keystrokes).
CIA Officials are furious that this money-making trick has been revealed by a famous actor.