« first day (4411 days earlier)      last day (731 days later) » 
00:00 - 21:0021:00 - 00:00

00:16
0
A: Sandbox for Proposed Challenges

InfigonAnimate the shape! In PowerPoint, there's one single overly used feature: animations. For simplicity, that shape will be a non-rotated rectangle. (There just has to be a better way to describe that kind of shape!) The data is specified as an array of seven integers: [20, 30, 4, 5, 6, 7, 60] means...

 
2 hours later…
02:35
guys what do we think about this answer... codegolf.stackexchange.com/a/258321/96039
@AidenChow invalid
02:50
well it does have a golfed version (which i did not test as theres no tio link), but they told chatgpt to golf it for them lmao
also no byte count lol
ive put my grievances in the comments
on another topic
behold, some of the most elegant code ive ever written:
private fun calculateVertexesForPoly(n: Int): List<Point> {
        val center = deckPos
        val slice = Angle.fromDegrees(360.0 / n)
        val radius = min(viewport.width / 3f, viewport.height * (2f / 3f))
        return (0 until n)
            .map { slice * it }
            .map { Point(center.x + -radius * sin(it), center.y + radius * cos(it)) }
    }
03:50
@AidenChow Another reason why we shouldn't allow ChatGPT: doesn't ever golf efficiently
Wait, let's add a philosophical twist: If I ask ChatGPT to write an answer, and I golf it, is that allowed? If I create an answer and ask ChatGPT to golf it, is that allowed?
IMO whether or not an answer was written by ChatGPT or any other non-sentient AI should have no bearing on its validity
A good answer is a good answer regardless of how you got the code, and a bad answer is a bad answer no matter how you got the code
And we generate answers using tools we write (or borrow from others) all the time, so originality isn't as big of a deal as on other sites (unless you're stealing it from someone else)
And a bad or wrong answer can't mislead someone into thinking it's safe to stick their nose in a light socket or take a shower with their toaster oven
So there's no "ChatGPT could give dangerously wrong answers" issue either
Technically, we can think of ChatGPT as just a human that doesn't understand golf. Are those people allowed?
forbidding lack of legitimate effort to golf is totally separate from using ai
04:01
The answer's validity is entirely independent of its origin (ignoring plagiarism)
and unlike most of the rest of the network we have no real reason to forbid ai
^
@RydwolfPrograms ChatGPT takes information from other websites... Isn't that technically plagiarism?
If someone who's never written a line of code in their life somehow writes a competitive Python golf, we allow it, because why not. If you can wrangle ChatGPT into producing an answer that doesn't have obvious missing golfs, it's valid
@UndoneStudios I take all my information from other websites
We're just really complicated functions over our sensory inputs
@RydwolfPrograms That would be a miracle
As is ChatGPT
04:04
@UndoneStudios in any case that cat's out of the bag lmao
just make sure the model itself is credited where credit is due
A language model like ChatGPT or an AI art GAN is doing exactly what a human would do; taking ideas from the outside world and synthesizing new creations from the sum of those stimuli
So for the answers that plainly take ChatGPT code, that's not allowed right?
It's not like ChatGPT is stealing whole chunks of text or code verbatim; it's synthesizing its own output just like I do
@UndoneStudios If it's without attribution, no IMO, since you're plagiarizing from ChatGPT
The takeaway message here is that so long as a) a serious effort has been made to golf an answer and b) the answer is attributed correctly, it's allowed.
04:05
The answer in question hasn't made a serious attempt to golf its code
hence the answer isn't allowed
Has any ChatGPT answer?
probably not
Whether or not ChatGPT counts as a thing that creates on its own and thus needs to be attributed, or a procedural tool that does not, is probably debatable, but to be safe, we should strongly encourage just attributing anyway
@lyxal So for the time being, ChatGPT shouldn't be allowed?
Chat glitch
that's not what I'm saying
"make a serious effort" here means removing unnecessary whitespace and golfing variable names
04:07
If you can get well-golfed code from ChatGPT, and you say it was from ChatGPT, it's allowed
that's right
If a human could trivially golf it further, it's not allowed. But you could always post ChatGPT's best attempt underneath, but in the same answer as, a human-refined version of it
Hell, you could get a million monkeys randomly banging on keyboards, and if they produce a valid well-golfed answer, it's allowed (with attribution of course)
@RydwolfPrograms "well-golfed" as in, "making serious effort" right?
04:09
yes
Yeah. Although that's bad wording here since there's two things exerting effort, ChatGPT and the human curating it, and "serious effort" for either of those two doesn't actually correspond to the quality of the golfed code very much
Normally, you ban people who do the opposite of that right?
We wouldn't ban them (except in extreme scenarios)
Just delete the answer after giving them a chance to fix it
19
A: Clarifying "serious contender" in the help center

user45941A serious contender is a submission which makes a serious effort towards optimizing the submission's score within the chosen language(s) and other choices (such as algorithm choice or optional restrictions/bonuses taken). This is somewhat subjective, in that the best answer in my opinion is "you...

that's the definition of "well-golfed" or "making serious effort" we use
I'm considering minoring or at least taking classes about AI in college. What we have now is cool and all but it just makes me even more impatiently excited for the real stuff
04:13
The top is what we'd consider valid, the bottom is what we'd consider invalid
And while print(sum(range(int(input())))) is shorter than the top one, the top one is still considered valid
I really like how we allow answers that aren't the golfiest and use weird approaches or self-imposed restrictions as long as they're serious contenders
It's a neat side effect of the long answer != automatically invalid rule
So shouldn't you be deleting every answer that uses ChatGPT until one comes that is a serious contender?
yes
Answers still need to be serious contenders even if they're currently winning
04:18
@UndoneStudios that's also true of posts made by humans
@lyxal So shouldn't codegolf.stackexchange.com/questions/258201/… be deleted by now?
-4
A: "Candy Crush" a string

Wellington TurntopC++, 196 characters std::string c(std::string s) { for (int i = 0; i < s.size(); i++) { int j = i+1; while(j < s.size() && s[j] == s[i]) j++; if (j-i >= 3) return c(s.substr(0, i) + s.substr(j)); } return s; } I didn't spend any tim...

I've already casted a vote to delete
you can flag it for the mods to review if you want it handled quicker than community handling
@UndoneStudios that it's not a serious contender
there is no reason menu
it's just a delete button and clicking it says "you sure you want to VTD"
@lyxal I'm not 2 10k rep
04:20
You need 10k to vote to delete
I'm flagging
But with what...
for flagging, I'd put that it isn't a serious contender
in the textbox there
Alright
Just did that now
:+1:
how tf u vtd
i dont see no delete button anywhere
04:24
3 mins ago, by lyxal
You need 10k to vote to delete
:( i have 10k
For answers isn't it 20k
Lyxal is having a "let them eat cake" moment rn, forgetting what it's like to be one of us sub-20k peasants :p
huh, it is a 20k privilege
@AidenChow guess that's a you problem :p
low rep nerds :p
speaking of high rep privileges, I've just remembered how much I completely forget about the site metrics tab
it really is useless
@lyxal :( this is straight up elitism
@lyxal More or less than the 10k tools? :p
04:29
@RydwolfPrograms more so :p
Wow really? That's hard to do lol
@AidenChow hey it's only fair - I get vtd answer abilities, you get the ability to be way too good at atomic chess and tetris :p
@RydwolfPrograms the 10k tools tell you what has high score, low score, pending close/reopen/delete/undelete votes, and you can act on those answers
the site metrics tab is 3 charts that you can only guess as to why they are like the way they are
Thems the charts
that's literally it
@lyxal :\ u know, kinda unrelated things but ok lol
also like im not that good at atomic chess... u literally beat me once
beginners luck
u should play atomic more tho, its a fun variant :P
04:35
I like games where you don't need to know the Irish inverted-sofa Wednesday london opening to not lose in 2 turns :p
@lyxal ok well atomic is very opening oriented but i swear its a fun variant otherwise :)
also for tetris u could probably beat me if i dont go for a perfect clear at the beginning of the game and u werent playing on mobile lol
04:52
I gotta go now anyway
I think I've thoroughly proven that I am bad at tetris
oh rip cya
@lyxal ok really the only thing u gotta work on is managing the board better... like everytime i look at ur board theres holes in the middle and everything. once u fix that ull get much better
i think start by playing slower than u usually do and really think about where u placing the blocks. ull see ur gameplay slowey improve
and really try to minimize misdrops when u doing that
see this is what I mean - you're much better at tetris. It takes an expert to be able to efficiently teach someone else :p
hence the tradeoff - you're either good at gaming but lower rep or higher rep and trash at gaming :p
@lyxal errrr no. have u seen how fast truly good players play?? its insane
@lyxal well i have serious doubts about that correlation but ok
also im pretty sure bubbler said at one point (long time ago) that he had some really good sprint times (50 seconds in 40 line iirc) so hes probably better than me, and yet bubbler have high rep, so.... yeah
hey shh stop point out flaws in my long winded compliments :p
well thx for the compliments :)
05:10
0
A: Sandbox for Proposed Challenges

EzioMercerSum of strings code-golf Your function must accept two strings and return new string where are UTF-16 code of all symbols is the sum of UTF-16 codes of inputs symbols If the sum of two codes are more than the 65535 (range of UTF-16 is [0, 65535] or [\u+0000, \u+ffff]) then take the module of sum...

05:52
@lyxal btw the imgur url for this is AtJ0E
06:07
where's joe
06:19
Doing your mom
07:03
I feel like we've gotten a lot more activity lately
07:15
@cairdcoinheringaahing and in the case of lengths, even brachylog can do it
07:56
@PyGamer0 I didn't realise that flax was even closer to APL than Jelly. If you want to, then feel free to create and populate apl.wiki/flax
38
Q: How much do I have to write?

tuskiomiWriting out numbers is among the Hello worlds of programming, often the numbers 1-10. I want to write out many numbers! Many, Many numbers. But how many numbers do I have to write? Task Given an integer input, give a number as output that would give me the number of digits that would be in a stri...

 
2 hours later…
09:42
@Adám 👍
i will do it in april because i have my final exams starting from tomorrow
@lyxal i guess that chart is for people who want to practice their data science skillz lol
 
3 hours later…
12:31
0
Q: Shortest Code to Find the Smallest Missing Positive Integer

Aira ThunbergDescription Given an unsorted array of integers, find the smallest positive integer that does not appear in the array. Your task is to write the shortest code possible to solve this problem. Input A non-empty array of integers, where the integers may be negative, zero, or positive. Output The sma...

@NewPosts A dupe right?
but of what
Yea it's hard to find
i KNOW that question exists but i cannot find it
all i can find are this and this but i very distinctly remember one like this with a very low maximum like 256 or something
12:41
i thought it was 20
The first question linked has a maximum of 9
i guess it could be that one but i feel like it was larger than that
but i could also be getting it mixed up with something else
20 doesn't ring any bells though :P
welp couldn't find anything searching 256 so the challenge could just not be a dupe
still feel like i remember seeing a jelly solution like 1e´#
...though in this case, shouldn't ṬS‘ be sufficient?
guess i'll just post that :P
wait no that's the opposite of what this wants
also 1e´# just errors lmao
oh yeah because i forgot the argument order
# is fucked up
there we go
13:01
y'all ever just wake up one day and go "yup today's the day I port Jelly's SSS to Scala"?
and then wade through the mess that is Dennis' code?
best of luck
val StringBuilder decompressed = StringBuilder()
me on my way to write Scala like I write Java
(it should be val decompressed: StringBuilder = StringBuilder() or simply val decompressed = StringBuilder() because type inference)
@NewPosts 100 rep to anyone who solves it in flax :P
ok :p
you'll have to wait :p
13:20
@PyGamer0 the OP requests you not to do this please lol
@AiraThunberg Not really your choice what bounties get offered
of course, that is a request :P By the way, how can one offer bounties on answers? How much reputation it needs @mousetail
I think just 50 is enough, but the post must be 3 days old
13:45
@lyxal ive done that to groovy
@emanresuA we did questionwise
14:06
0
A: Sandbox for Proposed Challenges

Command MasterGenerate a permutation from the high-water marks code-golf permutations restricted-complexity open-ended-function Given a permutation, we can define its high-water marks as the indices in which its cumulative maximum increases, or, equivalently, indices with values bigger than all previous values...

14:43
@lyxal oh weird, you were right
14:59
@AiraThunberg then i save my 100 rep :P
15:11
0
Q: Bumping Series Implementation

Aira ThunbergI have a follow-up question here from my previous question on Math SE. I am lazy enough to explain the content again, so I have used a paraphraser to explain it below: I was considering arbitrary series, springing up as a top priority, when I considered one potential series in my mind. It is as p...

@PyGamer0 that answer was good (do not take my wierd comments above personally please) but that code gave an error when the elements were all negative.
lyxal will probably fix that lol
for this of my question above, if someone solves both the question on Code Golf and Mathematics, I offer 150 bounty on Code Golf and 50 on Mathematics. (I am new to site so you would further explain me how to give bounty)
but for this you must answer both the questions, answering 1 question will not make it eligible
I might raise bounty to answer to 200 on Code Golf, if the answer on Mathematics SE is rigorous and well-explained.
Waittt, I cannot give so much reputation, sorryy, I take my above words back
15:45
if you are ninja'd are you meant to delete your answer
what? no
@AiraThunberg Consider posting here: codegolf.meta.stackexchange.com/q/5243/91213
@Jacob if this isn't /jk, duplicate answers are totally fine here
@mathcat ok ty
16:11
@lyxal You may find it easier to write a Python interpreter in Scala and then simply insert Dennis's code into that :P
 
2 hours later…
18:01
just found this in the CPython source here:
# It's a chicken-and-egg I'm afraid:
# We're imported before _opcode's made.
# With exception unheeded
# (stack_effect is not needed)
# Both our chickens and eggs are allayed.
#     --Larry Hastings, 2013/11/23
I wonder, how tf am I going to make Rabbit work?
@RydwolfPrograms remind me, in Rust can you use impl <x> to add arbitrary methods to structs, even if you didn't define them?
hopefully not, because if so that means I'm going to have to rethink some syntax
also, how should I do error handling?
here's a little demo program I wrote in Rabbit:
import requests

main function downloadFile(list<str> args) -> int:
	let response = requests.get(args[1])
	return switch response.code:
		case 200:
			using open(args[2]) as file:
				file.write(response.data)
			break with 0
		case * as code: break with code
(again, this is a WIP, feedback welcome)
18:31
Not a huge fan of requiring break in switch statements personally
I like it when a block evaluates to the last expression in that block
Also, do you really want to have main functions returning ints? Most modern languages don't do that, right?
I assume this is an example, but you're treating an HTTP response code as an exit code
People are gonna be surprised when your program 404s :P
import requests
import os

@main function downloadFile(list<str> args):
  let response = requests.get(args[1])
  switch response.code:
    case 200:
      using open(args[2]) as file:
        file.write(response.data)
    case code:
      print("oopsies $code")
      os.exit(1)
I would personally prefer something like that
18:56
@user Agreed
@Ginger You can only implement a trait on a struct you didn't define if the trait is one you defined. I don't think you can add non-trait impls to them either.
19:21
@user yeah, I don't like it either so I'm considering having them do that automatically, but I like using break to return data from a switch instead of return, so it could be confusing to people who come from langs like JS
also look what I just made:
user image
3
@RydwolfPrograms cool and good
LDQ: Would it be confusing to use break to return a value from a switch statement if there's no fallthrough? I think not
@Ginger am I looking at a robbit?
@mathcat yes, they're like hobbits but with long ears d:
20:18
@Ginger yeah
I am less than 250 rep away from 100K on MathsSE
I expect to be done Tuesday
20:36
wow
00:00 - 21:0021:00 - 00:00

« first day (4411 days earlier)      last day (731 days later) »