« first day (4360 days earlier)      last day (778 days later) » 
00:00 - 10:0010:00 - 00:00

10:11
@Simd how about the python or pari answers?
@lyxal they are not as good imho
Why's that?
Look at the brain power that went into the C answer :)
the python and pari ones are much easier
also, I guess I should wait until the bounty time is up in one hour
so it's a little early now
@Simd what's to say brain power didn't go into the other answers?
I guess brain power is subjective
10:16
@lyxal they use the standard libraries
brains are definitely subjective
except mine
:)
@Simd That's true
The python answers used outside libraries
give a bounty to that which does not
so not the python answers
it's really C or Julia for me
I think it will be C
I am rewarding hard work and brains
also the fact that they made 128 bit look trivial in C
might have actually taught people something too!
But C isn't the most golfed
that's my concern :(
10:21
it is a per language competition don't forget
I feel everyone forgets that all the time
Oh
But in that case then C is the only competitor in its own lang
yes
that is why typically there is no accepted answer
yeah
but anyways, who are you giving the bounty to?
@Simd there's a third answer you haven't considered
@lyxal vyxal?
10:31
vyxal?
That's right
It had hella brain power put into it
it doesn't satisfy the criteria of the question
@Simd it does
@Simd What was the criteria to get the bounty?
10:33
@lyxal "Your code doesn't need to be fast, but ideally it should complete in under a minute."
@UndoneStudios that is entirely up to the bounty giver
@Simd ideally
@Simd "Ideally"
That's just a suggestion
ninja'd again
if you want the bounty :)
10:34
So basically only compiled languages ever stand a chance
That's kinda cringe
Huh get a better language lyxal :)
@lyxal that's wrong. python would work fine
and so would basic
in fact almost all interpreted languages
@Simd if using standard libraries
but you just have to implemennt it right
And besides, it's only slow because it's going to a high precision
If it was a lower precision it'd be faster
10:36
@lyxal no that is not right. If you translate the julia code directly into python it would be plenty fast enough
you would use decimal of course
@lyxal there is no problem with speed if you just use the loops set out in the C and Julia answers
in fact I can't think of an interpreted language where that would be too slow
Hold on a minute. Is the criteria ?
@UndoneStudios no
For the bounty
you can look a few thousands times in pretty much any language
look at the loop.
for(X a=*y=k=1,q;k<200;){
/* estimate the Riemann zeta function */
for(i=99,q=0;--i;)
q+=(i%2?k:-k)*pow(i,~k);
*y-=(ldexp(a*=logq(x)/k++,-k)-a)/q
}
in which language would that take more than a minute?
"Estimate"? Does that mean the zeta function is not the zeta function?
@Simd depends
10:39
it is doing less than 2000 iterations in total
Then that's not as accurate as my answer
Mine takes as many iterations as it needs to get to a value that doesn't change
in that case I think the bounty should go to vyxal
accuracy is more important in this case
and to 256 deicmal places too, twice the required accuracy
That's why it takes so long
@lyxal The bounty has to go here
@lyxal the needed accuracy was specified in the question
if you could implement those loops in vyxal you would have won
10:43
Is there a penalty if you go beyond that?
@Simd I've still got an hour
@lyxal true!!
And if 2k loops is all that's needed, it'll be shorter
@lyxal just check you get the right answers
lyxal speedrunning vyxal
pro gemer
10:46
hah
@UndoneStudios sorry, beyond what?
@Simd the precision needed
@UndoneStudios no penalty from me. It just has to finish in time
@Simd "ideally"
@UndoneStudios if you want the bounty :)
10:48
@Simd ah ok
everyone is free to do what they want if they don't want my approval :)
it's a free world
11:02
well turns out it won't be the Julia answer
it gives 4.564496573408498235184002179924633035696951973113798875845920480384681651501851 for 10^1
when 4.56458314100509023986577469558 is required
Hooray for C!
and it's not C either
4.56631846465729586315692453417579 for 10^1
so @Simd who gets the bounty now
when the two options aren't valid to the required accuracy
11:05
sure they finish fast, but at the cost of being valid for only 2 decimal places
I pray it is anything but Vyxal
why though?
@lyxal oh the julia one looks wrong too now!
Nov 30, 2022 at 4:04, by lyxal
and given that Jelly is less practical than Vyxal, I also question your practicality rating
Which we've disproved
Ever since then I never trusted Vyxal
just checking if any of them are right!
11:08
@Simd it's not just 10^1
it's 10^all the powers
the python ones are right
but it uses standard libraries though
I thought that wasn't "brain power"
Yeah
Guess nobody gets the bounty?
@lyxal right it would have been beaten by a correct cleverer answer
Mathematica uses a builtin
11:09
then award it to PARI/GP
not the new vyxal answer?
can you see if you can get the right answer by increasing the number of iterations?
we've shown that all estimate based answers that are fast aren't valid
@Simd not without timing out
the number of iterations determines the accuracy
how long does it take for 99 iterations in the inner loop in vyxal?
@Simd I think the problem is that the Gram sequence just isn't accurate enough
@lyxal try increasing the number of loops
11:12
no I mean fundamentally
all the methods are using that
including the ones giving the right answer
Yeah kind of explains why I do not like making trade-offs
@UndoneStudios we know you don't like real numbers on computers :)
@Simd Give the bounty to that
It's a good answer
@UndoneStudios I may well do
but I am holding out for a vyxal answer :)
11:14
@Simd those are using sum methods that aren't estimations
they aren't iteration based
they give exact results from doing things like clever algebra under the hood
In 47 minutes !?
@lyxal then use it
@lyxal no they don't do any clever algebra
internally they do
the sum in pari just adds until the term it is adding goes below a threshold which you can set
suminf looks to not be iteration based
11:15
it's just a for loop
suminf is just a for loop
while loop
it's a while loop
> The evaluation stops when the relative error of the expression is less than the default precision for 3 consecutive evaluations.
or a for loop with a break :)
but yes
point is, there's no magic number of iterations
so it's easy to implement in any language
nothing clever about it
I think Simd isn't getting lyxal
11:18
sure but you just run it once, see the number of iterations and then use that number
it might change for each input
you just do a preliminary experiment to see what it should be
@UndoneStudios how tf is jelly/golfscript more practical than apl lol
APL isn't even meant to be estoric
@lyxal if you test it for 10^1, 10^31 then largest will be the right answer
@mathcat That's such an old message
11:19
with less than 40 minutes to get an answer, I don't think I have the mental effort left to do so
read the conversation
@lyxal :(
it'll just have to go to one of the python library answers
or pari...
@Simd I mean, technically that's what my current answer is doing, it just takes a while
11:20
PARI/GP
@lyxal is it actually running the same loops?
it's going until there's no change in value
@UndoneStudios apl wasn't mentioned at all
@lyxal just change to set a threshold
that is a one minute fix
@mathcat What I meant was that the conclusion was the graph itself was too subjective
The graph is my way of seeing the world
11:26
@Simd still times out
I'm gonna give up on it. I've spent way too much time on this now
for 50 rep, not worth it :p
k
thanks though
12:03
pari won the day
I can sort a list of pairs by second element with sorted(
[('abc', 121), ('abc', 231), ('abc', 148), ('abc', 221)],
key=lambda x: x[1]
)
but what if the first elements differ too and I want to sort by them second?
12:21
@Bubbler If you need autocompletion to write productively, then you're not writing a terse enough language
 
2 hours later…
14:37
hello all!
0
Q: Write shortest .class file in java which is equivalent to this program

tomatojuicedoughnutsThis is a program: import java.util.*; public class testtekovanje{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int b = sc.nextInt(); // 2 int c = sc.nextInt(); // 3 int d = 2; // 4 int e = 0; // 5 while(b>1){ ...

VTC
no?
14:51
I have lists of grades like [('MATHS', 'A'), ('PHYS', 'A*'), ('ECON', 'B'), ('PHYS', 'B')] in python. I want to only have the highest grade per subject. Is there a golfy way to do that?
A* is higher than A
CMQ ^^
A*? Not A+
yes, it's an odd system
it just means the letter before A :)
15:21
@Simd it's the UK a-level grade system :P
@cairdcoinheringaahing :)
@pxeger or you've got stupidly long variable/function names
There's things in between w and wordsInInputWhichContainOneOrMoreSpaces
15:39
@Bubbler i am trying to program in aarch64 again, can i improve this code? thanks
16:38
Imagine a "language" that consists of an accumulator and two commands: + increases the accumulator value by 1, and * multiplies the accumulator value by 2. The accumulator starts at 0. CMC: Given a nonnegative integer, output the shortest program in this language to set the accumulator to that value.
x=>x.toString(2).replace(/0/g,"*").replace(/1/g,"*+").replace(/^\*/g, "")
Actually at this point "lol its just binary" is longer than doing it properly...
@RadvylfPrograms Can you just do .slice(1), since I think the intermediate result will always start with a single asterisk?
Oh true
x=>x.toString(2).replace(/./g,x=>+x?"*+":"*").slice(1)
f=x=>x%2?f(x-1)+"+":x?f(x/2)+"*":"" is way shorter :/
@RadvylfPrograms Ah, good thinking with the ternary. I was trying to combine the two cases using string slicing, which is probably the shortest way to do it in Python
Yeah, I tried that too
16:58
@RadvylfPrograms Ungolfed port of this solution into Elm:
f x =
  if modBy 2 x == 1 then
    f (x-1) ++ "+"
  else
    if x == 0 then
      ""
    else
      f (x//2) ++ "*"
Now let's see how much I can golf it.
70 bytes: f x=if modBy 2 x>0 then f(x-1)++"+"else if x<1 then""else f(x//2)++"*"
Unfortunately, it looks like case requires newlines and indentation, which makes it a bit longer.
f x=case(x,modBy 2 x)of
 (0,0)->""
 (_,0)->f(x//2)++"*"
 _->f(x-1)++"+"
@RadvylfPrograms 27b
@DLosc sad code golf will be done better by computers than humans at some point. what will we do then
17:13
@user41805 I mean, people still play chess even though computers are better at it
Also reminds me of Ken Jennings's TEDx talk about whether it's still useful to know stuff when Google is a thing.
17:46
@DLosc thanks, gave it a watch
18:09
@RadvylfPrograms when are you planning to post your KOTH?
0
Q: Division between two strings

l4m2Inverse function of this challenge To (properly) multiply an string by an integer, you split the string into characters, repeat each character a number of times equal to the integer, and then stick the characters back together. If the integer is negative, we use its absolute value in the first s...

18:26
0
A: Sandbox for Proposed Challenges

l4m2Write a proper quine. Community decided that you're not allowed to claim you're not reading source code but data, and read a stored string.

lmao at this line from who's help:
> If ARG1 ARG2 given, -m presumed: 'am i' or 'mom likes' are usual.
(-m is a flag that makes who only list the user running it)
$ who are you
pxeger
impostor!
süs
18:54
Considering changing my name again, the a in Radvylf makes it kind of an ugly color still
And it seems like it should be pronounced "rad-vilf"
"Rydwolf"
It looks so much nicer
@mousetail Some time in the next few weeks
Hey, almost completely destroyed my Raspberry Pi today with sudo apt-get purge python3, nothing to be concerned about
It looks like purge deletes python and its dependencies, almost everything on my Pi was dependent on python
19:12
...why would you remove Python?
> why
Python's a dependency for lots of stuff
Were you trying to upgrade it?
@RadvylfPrograms i read who
I mean it makes sense that way too, you're why we should remove Python :p
If we don't, you'll make us regret it :p
19:15
Or a less dark interpretation: We don't need Python anymore because Seggan will do the job themselves
AI will no longer be taking our jobs, Seggan will
@user yup lol
19:28
@user If Seggan took over all of those customer service AI chat popups on websites we'd be in a much better world
The hivemind is already two-strong, we just need exponential growth to kick in
Seggan can just be Larry from AWoG
there's only room for one distributed artificial intelligence on this planet, and I've already got that spot filled
Idea: A programming language where import trains a transformer AI on your code and the library's code, and has it write out a new program inspired by both
19:44
me: import tensorflow
language: oh god oh frick oh god oh frick
@RadvylfPrograms corollary: importing multiple modules on the same line mixes them together
@RadvylfPrograms oh i will
@Seggan you're a hivemind right? q:
ignore that then :P
 
3 hours later…
22:26
I'm considering accepting my answer to this, given the votes, but would like any more feedback/opinions
22:39
It seems fine, but I guess in future, there needs to be emphasis on avoiding situations where a problem would possibly arise
like creating a url shortened link to a site is obviously going to lead to some issues down the line, especially if it's registered just by a code golfer
feel like that should be a standard loophole
What's weird is that using URL shorteners is a loophole
23:01
Url shortners are, registering custom domains for challenges aren't
It's basically metaurlscript
Feel free to suggest it as a loophole
turns out it kind of already is
42
A: Loopholes that are forbidden by default

DennisURL shorteners / shortened URLs Every once in a while, we get a challenge that requires fetching some data from the internet. While some of them manage to ban URL shorteners in time, other don't. I propose to forbid them by default because of the following reasons. URL shorteners that were cre...

> I propose counting all URLs on domains as shortened (and therefore forbidden) if the domain name isn't owned by the same individual/company as the canonical one. Thus, e.g., if the task at hand involves querying api.stackexchange.com, only URLs that belong to Stack Exchange, Inc. may be used in the challenge.
and the ppcg.ga link was used after that loophole was proposed
so now not only are the answers invalid due to external resources, they're invalid due to standard loopholes
which means that even if it's decided to mark everything as invalid because of the external resource issue, they still need to be handled as invalid due to loopholes
new meta question time?
23:31
I'm not entirely convinced that loophole covers the linked question
And, even if it does, I'm also not convinced that it should be a standard loophole to use "non-officially owned" URLs
@cairdcoinheringaahing why not? The task of the challenge involves opening codegolf.stackexchange.com which belongs to Stack Exchange, Inc. Therefore, only links owned by Stack Exchange, Inc are allowable
0
Q: n-digit primes given the first m digits

Luis AlexandherI just discovered this site and this is my first question, I hope I'm doing it correctly. The challenge is the following, you must write a code that prints all the prime numbers of \$n\$ digits. Since this problem is computationally complicated, I think that one way to simplify it is to give a nu...

@cairdcoinheringaahing you may not be, but the score is more than 5+ with a distribution of +53/-11
meaning it's recognised as a loophole
I will also just bluntly say: I'm not happy deleting 46/50 answers from a post in the first place, especially given that, at the time, all the answers were accepted - and flags on those posts were handled - as valid
If the numbers were lower, I'd be more open to doing so. But deleting literally 92% of 50 answers is a massive amount
so if a lot of answers to a challenge are edited to violate a loophole and no one notices for a long time that's allowable?
23:41
I'm not saying that
well that's what happened
I'm saying that I want to avoid having to go through literally two pages of answers deleting every single one of them, and would like to find a resolution that allows me to avoid that
If the site wants them all deleted? Fine, I'll spend an afternoon leaving comments and mass-deleting them. But, I'd rather avoid that if possible
Additionally, that loophole was explicitly allowed:
@issacg Yes, it is allowed. — noɥʇʎԀʎzɐɹƆ Mar 30, 2016 at 15:26
hm
fair enough
CMQ: Are infinite lists/generators allowed to be returned for challenges where the output would otherwise be a finite list but you know that logically, the infinite list will end up being equal to the finite list?
More specifically, does anyone know of any existing meta posts explicitly allowing/disallowing this
I know this exists, but that doesn't really cover the case of what I'm asking. It's just saying lazily evaluated lists are allowed. It doesn't state anything about infinite being guaranteed the same as finite
00:00 - 10:0010:00 - 00:00

« first day (4360 days earlier)      last day (778 days later) »