12:32 AM
why doesn't C golfing have more of a following

@Rick Why C when you can A?

you mean apl

@Rick No, A

or was that a pun

@Rick It was a pun
I have a better version on my profile

12:34 AM
No A on TIO, unfortunately, but you can do B

a better version of the A pun?
I would golf more, but if feel like my data structures needs to get better before I dive into that rabbit hole.
does golfing make you a better problem solver. like at work are you ever really challenged when you golf code for fun?

Honestly I don't like golfing. Solving the task at all, for me, is the fun part, reducing the byte count isn't as enjoyable.

so you are more of a basketball player and less of a golfer. You just prefer to shoot from the three-point line.

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

@Downgoat For me it's both
@Pavel I like golfing in normal and golfing languages and just solving the question in tarpits

12:47 AM
I like golfing code only because I'm lazy. like my brain will do the extra work as long as my fingers don't have to.

Okay
I normally golf actual code because (often) the golfed code is faster
And also I feel good when golfing

@MilkyWay90 That's debatable shortcode is not fast, that would be a false conclusion to arrive at. It might look faster :P

@Rick Normally, it is actually faster
But in the cases that it isn't, I go with ungolfed code
For example i%=10 probably is faster than if i>10:i=0

but this would be even faster input >= ceil ? input % ceil : input;
looks can be deceiving

yeah

2 hours later…
3:16 AM
2

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...

4:11 AM
@MilkyWay90 very wrong, it's usually slower
@MilkyWay90 they don't do the same thing
@Rick wrong

4:26 AM
@MilkyWay90 You golf actual code? Have you heard of maintainability??????
@MilkyWay90 Your examples don't do the same thing, one takes the remainder of i / 10, other sets i to 0 if it's bigger than 10

5:04 AM
@ngn Very nice!

5:57 AM
@Rick but real golfing requires several rewrites (i.e. more code)
@Rick it doesn't?

2 hours later…
7:37 AM
0

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...

2 hours later…
9:30 AM
even my meta question was downvoted! codegolf.meta.stackexchange.com/questions/17705/… :)

9:53 AM
@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?

@dzaimah Hi. Yes I thought it was a valid question too
no idea why it was downvoted!
I really meant what the previous questions I linked to meant

@Anush this & this only prohibit pi exactly, and this is already disallowed

but isn't ppcg full of challenges asking you not to use builtins?
there is a meta somewhere for standard loopholes.. let me see if I can find it

@Anush that too is a controversial issue, but you're going a step further and disallowing anything that gets you remotely close to pi

I don't think I refer to being close to pi anywher

10:03 AM
@Anush Generally you may not use any built-in that computes pi for you. i see now that that was in an older revision now though

yes
"You may not use a built-in for 𝜋, the gamma function or any trigonometic functions."
that's all it says

so solve(e^x=-1) is allowed? Is (GammaFunctionPlusOne(0.5)-1)^2?

yes to the former
is the latter real?

@Anush I can make it real :P

you aren't allowed to use builtins made after the question
that's also a standard loophole that is banned

10:09 AM
@Anush yeah i guess, but let's imagine it already existed, would you prohibit it?

10:57 AM
0

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 ...

11:25 AM
@dzaima it would be a painful decision :)

@ASCII-only Sorry for the mistake!
@EmbodimentofIgnorance I put what it does and how it works in a comment
But I don't have a coding job (or any job)

@Anush thing is, you shouldn't be the one deciding, the challenge spec should be enough to tell whether an answer is valid or not

@EmbodimentofIgnorance Oh sorry, I meant i%11 and i should be a positive number or 0

@dzaima right but it is. there is no ambiguity in the challenge spec

@Anush so why mention "painful decision" and not just say a concrete yes or no?

11:34 AM
@dzaima I thought you were asking me a hypothetical question about the previous rule I removed

@Anush I am doing exactly that, but since you say that there's no ambiguity in the description, what would be the unambiguous, correct answer?

-1

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...

@dzaima there is no ambiguity in the description. There was ambiguity in the previous version
but the question was closed after I changed it to make it unambiguous

@Anush ah okay

the fact my meta question has been downvoted is a very had sign
I can't see any reason at all to do that

11:43 AM
@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.

I am not sure what is wrong with the current version of the question
except that some people think it's hard
@someone do you still dislike the current version of the pi^{1/pi} question?

(fwiw, i'd reopen, but my vote would be a hammer and i definitely don't want to force an opinion)

@dzaima thanks!

@Anush without using a language which is essentially a computation engine, the question is very difficult

11:47 AM
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.

@primo that's not a reason for an unclear close-vote though

@primo If you can compute the answer up to n decimal places you can answer the question, right?

(It has to be fast too)

@someone that's not the only way to compute x^(1/x))

you would get more answer that way, surely

11:48 AM
And just calculating it yourself is tricky enough

@primo can I just edit the question to say that now? I am not sure what you are allowed to do once there is already an answer
@H.PWiz 10 seconds is really slow for 1000 digits. You would have to work hard to use more than that imho

producing an infinite spigot for a transcendental value that hasn't been analyzed to death would take effort
i think this is why people don't like it
honestly

@primo ok.. so shall I just change it to say "the first n digits"?
which is funny because that would also solve my puzzle
so it can't be easier

it's far easier!

I think first n digits is hard, because you don't really know how uch precision you need in advance

11:51 AM
i can compute the constants to necessary precision, and output the answer

@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

it can't be because if you can solve it for n digits, you can just run it repeatedly for n = 1, 2,3, 4.... which then solves my problem
@dzaima ok

A fixed number of digits is far easier, but then you get answers that are just compression

@H.PWiz it's not easier for the reason I gave above
but I will change it now

A fixed number is most definitely easier.

11:52 AM
@Anush you could do what you suggest, but it would be and absolutely horrible implmentation

@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
@primo yes! But that seems allowed on PPCG :)

@Anush but that adds an n to the speed factor, and multiplying slowness by 1000 is definitely gonna make it pretty slow

you'd essentially be recalculating all the digits you've previously output each time, and then just output the last one :p

@primo yes exactly
I have seen much worse here!

i refuse to implement that.

11:53 AM
@dzaima yes. But pretty slow is ok
@primo :)

@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)

I think you can calculate first the first, then the first two, the first 4, 8, 16, 32 and so on for performance.

changing it now
@dzaima I don't think that would be a problem but of course I don't code in very very slow languages

my suggestion: with input n, ouput n correct digits after the decimal place. - alternatively - your solution may accept no input, and output digits indefinitely

only python :)

11:55 AM
@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

question changed

@Anush you don't, but many, many of us here do. If you only care about things you want to and ignore what others say, you're bound to get disagreement

-4

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...

@dzaima sorry I don't understand. It is true that some code may be too slow. That's why it is a coding challenge
@H.PWiz changed now. Hopefully you will find it better

@Anush n digits after the decimal place, or including the initial 1?

I don't mind that your challenge is difficult

11:58 AM
including the 1, I'll clarify

unclear! vote to close!
oh, ok

@primo :-D

@Anush also idk if editing the old question was the best move, as it's now a different challenge, invalidates answers, is old, downvoted, and closed.

remove the trailing \\s from the test case?

@dzaima I asked that above and no one replied!!
@primo thanks!

12:00 PM
- alternatively - your program may accept no input, and output digits indefinitely

@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)

@primo I worry people will get upset about an "alternatively"
they will say "WHICH ONE IS IT!"

i don't think it will be a problem, it's certainly a bigger problem that the current solution is now invalid

Allowing both nth digit, first n digits and output indefinitely is pretty common among oeis-sequence challenges and no one complains on that

12:06 PM
ok doing it
ok now the question is optimal :)
thanks all
in theory you are supposed to edit questions to get them reopened
"If this question can be reworded to fit the rules in the help center, please edit your question."
@someone I hope the improved question looks better to you

@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

@dzaima yes I think my use of a smiley failed to convey the sense I meant it in
i.e. that I didn't mean it literally
all subtlety is lost on the internet

@Anush I think the only change is that handling infinite output is easier now (by making it finite); that still requires golfing two programs at once.

^ 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

@someone harder questions are ok aren't they? Also, you don't need to solve it by first computing pi and then pi^{1/pi}
@dzaima it is more interesting and difficult to output pi^(1/pi) to high precision

12:18 PM
@dzaima you still have to compute the root; is that really noticeably simpler than computing pi?

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

@Anush somehow computing pi^(1/pi) without computing pi first requires even more 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)

@someone yes it does

@Anush which means that pretty much noone will do it

12:19 PM
@dzaima you can't just use the big number library without working out what precision you need
the point is, it is not a question for people who don't enjoy thinking about spigots

@Anush that can probably be thought of ahead of time & hardcoded in

but people who do may enjoy it
@dzaima not for arbitrary n

by the way, is it proven that pi^(1/pi) doesn't have terribly long runs of nines?

well.. a formula can be coded in

@Anush what i meant

12:20 PM
@someone oh maybe I should say we can assume pi^{1/pi} is irrational?

@someone that shouldn't matter - if it's irrational, your code should work for any run of 9s, and those must end at some point

@dzaima i was planning on e^(ln(pi)/pi)
...using a taylor series to compute the exponent

12:52 PM
@dzaima having followed ppcg for quite a while, there are really smart and math talented people here
@dzaima codegolf.stackexchange.com/questions/184743/… is a recent example. This is not a simple question

1:05 PM
have we had a straightfoward "compute e to 1000 decimal places" challenge?
is it possible to make a C program that will make gcc compile forever?

@Anush Yeah

@Emigna thanks!

1:47 PM
@Anush does this count?
it does seem to stop
this is cool, but is c++

There's also that template Ackermann function answer somewhere. upd: codegolf.stackexchange.com/a/69265/36445

@dzaima interesting!
@someone compiler bomb! That's it

@Anush but it's definitely not infinite

I should try it on my desktop
and time it

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

2:00 PM
I think this has a 2 or 3 byte solution in all current golfing languages.

I forget which grows faster, Knuth Arrows or Ackermann

@someone OK, do it!

@someone I know at least 2 that definitely don't

Veskah, pretty much the same as far as I remember.

2:02 PM
that's a nice challenge

@dzaima Very nice, but I want ⌈⍢| :-/ (obviously, we'll never get that)

@Adám you mean ⌈/⍢|? (now i really want to make an apl smart enough to track that, but my list of really-want-to-do is way too long already)

@dzaima For the actual usage it has to be ⌈⍢|/

I am tempted to ask a kolmogorov complexity question for the first 1000 digits of e^{1/e}

2:08 PM
@Adám eh, both could work in a Sufficiently Smart Compiler

@dzaima How could ⌈/⍢| possibly work? It wouldn't know which sign to apply.

@Adám track un-inverses of all objects when they're gotten, make ⌈ return the exact tracked version of the maximum, make inverting use that

@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

@Adám you'd have to define which exact element ⌈ picks then. but yeah, in general this only works with things that return its inputs

@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]

2:26 PM

@dzaima 8: (≤⍥|⊃,)\

@Anush The problem is that not too many people would be interested in it...

@Adám oh, forgot that's how the language works

@user202729 :(

@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.

2:40 PM
@someone As if someone would want to post that...

@someone hardcoding it is not going to do well.It will be largely uncompressible

@someone I also noticed that

if my question could be unclosed I could add a bounty
I think I have addressed almost all the criticisms now

2:55 PM
@Adám Absolute values without purging the original value is a bit of a bastard in PS :<

3:20 PM
@Veskah :-) Try another language then.

Nyet. It's a good pain

here is another tricky coding challenge

3:49 PM
Ha ha, just using [math]::abs(\$_) actually saves three bytes

4:02 PM
@Veskah And they say APL is unreadable…

4:36 PM
Conditional list indexing is a hell of a drug

5:16 PM
someone make this into a challenge

5:39 PM
> Leojagupard

6:30 PM

6:51 PM
@orlp more like given A and B return AB...?

@EriktheOutgolfer no idea
there's many ideas to go off :P

I'm just saying that someone should make some challenge of it

@DJMcMayhem Back when you used to be DrGreen

cough ---EggsAndHamDJ

7:06 PM
ninja :P

1 hour later…
8:15 PM
We're becoming famous — code golf on writing.SE:
1

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.

8:26 PM
Jul 20 '18 at 20:04, by AdmBorkBork
@H.PWiz Golfers hate him. See how you can save 4 bytes with this one trick.

@AdmBorkBork These ten golfing tricks make Dennis 'INVINCIBLE'