« first day (4356 days earlier)      last day (499 days later) » 
07:00 - 22:0022:00 - 00:00

7:45 AM
Hi all
@reerectsbespanglingaachen awesome:)
 
8:03 AM
0
Q: ASCII-art polygons to GeoJSON coordinates

HanneshWe're going to turn ascii art versions of polygons into their equivalent GeoJSON. The ASCII shape language The input ASCII language only has 3 possible characters: * signifies a vertex - signifies a horizontal line | signifies a vertical line A * will never be directly adjacent to another * (bu...

 
8:58 AM
@reerectsbespanglingaachen you forgot to update your profile
 
9:57 AM
Are there any reasons to prohibit global vars in koths?
 
I can see it if the KOTH is intended to be stateless, or if you want it to be resumable
 
@mathcat Limiting the ability for bots to screw around with other bots and the runner
 
Isn't that covered by the standard loopholes?
 
Just makes sure there's no sneaky business
And prevents accidental chicanery as well
 
In what language can global variables mess with each-other? Neither python nor JS, the 2 most popular KOTH languages, allow this
 
10:04 AM
Just in case a bot reads from a global and another changes that global
 
But "globals" are still local to the module
 
10:29 AM
Anytime fancy doing a Julia answer to my challenge? I think it's pretty well suited to it
Although assembly would of course be cooler :)
 
@UndoneStudios Don't know what you're talking about :P
 
 
1 hour later…
11:42 AM
A boring coding question. If I have functions that needs 8 variables defined should it have 8 arguments or is there a cleverer way of doing it?
It looks very messy as is
 
What language?
 
12:19 PM
@Simd Depending on the language, you might be able to take an object as argument, and extract the parameters from that.
 
@Adám this is for python
@mousetail python, sorry I should have said
 
@Simd You can use the , *, syntax to force the use of keyword arguments
 
@mousetail good point. But I still have then have 8 arguments to my function
And that function calls another function that needs 7 of them!
 
8 is ok number, as long as they are keyword arguments to keep them readable
 
@cairdcoinheringaahing If you changed back to caird what's the point of clarifying
 
12:26 PM
@mousetail it doesn't really fit in a pep approved line length
 
You can put them on multiple lines
 
You mean by just splitting on commas?
 
yes
 
You are right
 
black will do it for you
 
12:27 PM
Yes I love black :)
It's so remorseless
 
@Simd Try using * to have multiple args and then assign the variables to the tuple
 
@Simd So? Doesn't Python have dictionaries?
 
Python doesn't have dict unpacking so it's really inconvenient, and you lose type safety
Creating a dataclass can work for a similar effect though
 
like this
def x(*n):
    a,b,c,d,e,f,g,h=n
    print(a,b,c,d,e,f,g,h)
helps?
 
@UndoneStudios That completely destroys readability
Now the docstring will be meaningless
 
12:33 PM
@mousetail By saying that, does that mean you're an amateur Python programmer who relies on reading the docstring?
@mousetail Besides Python has blessed you with the power of comments
 
What? Every programer reads the dosstring
Every IDE shows docstrings when you hover over methods
it's super useful
 
I mostly don''t
 
@Adám I could put them all in a dictionary. Is that a recommended style?
 
You are a amateur though
 
I was programming a 3D module
 
12:34 PM
@Simd In python very much no
 
based on a Scratch tutorial
but I never read a single docstring
that too I was using turtle
 
@mousetail that sounds like the right thing to do. Thank you
 
def x(*n):
    """Note that some grumpy programmers want a better docstring"""
    a,b,c,d,e,f,g,h=n
    print(a,b,c,d,e,f,g,h)
 
No one suggested global variables :)
 
@Simd I don't Python, but it is becoming a common style for modern APLers. We don't care about type safety, though.
 
12:36 PM
@Simd I was about to, until @mousetail interrupted me
 
@UndoneStudios you are the maverick in the class
 
Global variables are bad
 
@mousetail yes. It was a joke
 
@mousetail But I agree with this. You have to use global everywhere
 
I know you know, just unsure if undone knows
@UndoneStudios Not if you only use them as input
still a very bad idea though
 
12:37 PM
To be fair to undone, (s)he isn't done yet
 
@mousetail I think I should change my username with how you lowercased it and how it now looks bad as you wrote it
@Simd I'm a "he"
 
Next question, how should I write my variable names
 
@Simd Semantically
or atleast conforming to PEP 8
 
likeThisAndThat or like_this_and_that or something else?
 
@Simd former
Even PascalCase could do
 
but I recommend camelCase
 
@Simd In python variables are written in snake_case
 
Then use that if you hate Pascal and camelCases
 
@mousetail thanks. How about functions?
 
12:42 PM
@Simd up to you really. Just make sure you're consistent. That's the important part
 
@Simd camelCase
 
@Simd Functions also, snake_case but classes are CamelCase
 
@lyxal that's a very good point
@mousetail ah thanks!
 
Isn't it camelCase?
 
12:42 PM
Explains nicely if not golfing
 
@lyxal Consitency with library code is also important though
 
@mousetail of course. I more mean once you pick a style for whatever reason, stick with it.
 
Yep
from PEP8:
Function names should be lowercase, with words separated by underscores as necessary to improve readability.

mixedCase is allowed only in contexts where that’s already the prevailing style (e.g. threading.py), to retain backwards compatibility.
 
I stick with a style in which I do not have a particular style to stick to
 
12:44 PM
@mousetail thanks!
 
> For example, do not rely on CPython’s efficient implementation of in-place string concatenation for statements in the form a += b or a = a + b. This optimization is fragile even in CPython (it only works for some types) and isn’t present at all in implementations that don’t use refcounting. In performance sensitive parts of the library, the ''.join() form should be used instead. This will ensure that concatenation occurs in linear time across various implementations.
TIL
 
That's interesting
 
@lyxal will help you in fastest-code
 
Nobody uses python in fastest code though
 
12:46 PM
@mousetail I did, and I regret it
 
Maybe pypy but not cPython
 
@mousetail CPython
 
cpYthon
 
heresy!
 
@mousetail CpYtHoN
@lyxal Something's wrong with your text
but yes, it's not golfy
 
12:48 PM
it's an image
 
so spaces are dots?
 
yes
 
@lyxal strange
One more thing: I was working on a 3D module, this is the source code (unreleased)
from turtle import *

CAM_X, CAM_Y, CAM_Z, NP = 0, 0, 0, 30
sx1, sy1, sz1, sx2, sy2, sz2 = 0, 0, 0, 0, 0, 0
VF = 150
pensize(1);speed(0)
Plane = Screen()
Size = Plane.screensize()
XSize = Size[0]
YSize = Size[1]

def pset_1(x1, y1, z1):global sx1, sy1, sz1;sx1, sy1, sz1 = x1, y1, z1
def psset_1(x1, y1):global sx1, sy1;sx1, sy1 = x1, y1
def pset_2(x2, y2, z2):global sx2, sy2, sz2;sx2, sy2, sz2 = x2, y2, z2
def psset_2(x2, y2):global sx2, sy2;sx2, sy2 = x2, y2

def zclip():
global sx1, sy1, sz1, sx2, sy2, sz2, NP
huh markdown sucks
hope this is better
 
@UndoneStudios All lines must start with 4 spaces
 
@mousetail Did that, but for some reason it didn't work
 
12:56 PM
There is probably one line that has 3 spaces
 
I literally indented with 4 spaces
@mousetail there isn't
 
Anyway this might be more suitable to codereview.se
 
I did not expect that to onebox in that way
 
No I meant which question
 
1:12 PM
@mousetail pep 8 in one sentence:
 
hi
 
look I have flower
 
cool
 
Favourite hat so far .P
 
1:27 PM
@mousetail Heh, with my user style, CR's onebox almost becomes just the red dot.
 
It's a work of art
What user style do you use? That looks quite nice
 
 
1 hour later…
2:41 PM
@mousetail we used to get answers in rpython
Also nim!
Not sure why they stopped
 
Because not only is the performance bad, you have very little control over it, making it less interesting to optimize
 
@mousetail what was that in reply to?
 
3:00 PM
Ngl, I''ve been confused about how I kept getting the Heads Up hat on seemingly random sites, before I remembered about Charcoal :P
 
3:15 PM
Is there a tips for
 
Hmmm I might post it
 
This search doesn't bring up any results either
 
@mousetail excellent idea
 
Is it going to be language-specific or just general?
 
3:26 PM
General
 
The main tip is to use Julia :)
 
Well the score is per language so language choice doesn't really help
 
Sounds like a good idea
 
@mousetail that's a good point
Also rust is good if you can actually understand it
I am really glad that @cairdcoinheringaahing has shown we don't have to fear 128 bits
 
What did I do?
 
3:31 PM
0
Q: Tips for imporving your score in fastest code challenges

mousetailFastest code is a scoring method on this site where the goal to write code that is as fast as possible. From the tag wiki: The winner of a fastest-code challenge is determined by the runtime performance of the submissions. For fairness, all submissions should be benchmarked on the same machine, ...

 
@cairdcoinheringaahing gave an awesome C answer
 
I have never answered once with C :P
 
Oops...wrong person starting with a C
I meant ceilingcat
6
A: Implement the Riemann R function

ceilingcatC (gcc), 193 183 173 165 154 bytes typedef _Float128 X;X logq(X);i,k;X r(X x){X y=k=1,q,a=1;for(;k<200;y-=(ldexp(a*=logq(x)/k++,-k)-a)/q)for(i=99,q=0;--i;)q+=(i%2?k:-k)*pow(i,~k);return y;} Try it online! This estimates the Riemann R function from the Gram series. -1 thanks to @Simd. Slightly g...

 
That makes more sense :P
 
I just really like how little overhead there is
@cairdcoinheringaahing sorry for confusing you with a cat
 
3:36 PM
The gravest of sins, truly :P
 
And how many warnings you get :)
@cairdcoinheringaahing the shame
I really hope to get at least a Rust and a Julia answer soon
 
I'm trying to imagine a universe where caird posts C answers.
 
:) what does it look like?
 
I mean, I could, but they'd never be competitive
 
What's your favourite language?
 
3:42 PM
That depends on your definition of "favourite" :P
To use in golf, that I've created, to use in practical use, etc.
 
One from each please :)
 
Jelly, probably Rutger, and Python :P
 
I need to look up Rutger
 
JHT rating ?
 
3:49 PM
JHT has a bunch of challenges. The JHT rating is A-B, where A is the number of those challenges I've done in that lang, and B is the total byte count
 
Thanks
I don't quite get the jelly cult I am sad to admit
I am going to go and fight with pandas soon....gulp
 
Aren't pandas endangered? I'd avoid fighting them
 
@Simd It's not really a cult :P
 
When you try to create benchmarks for a fastest code tip and the "bad" example is significantly faster than the good example
 
4:05 PM
@cairdcoinheringaahing shame :)
how is it different from a cult?
@mousetail :)
@mousetail well if they will steal my bamboo!
 
@Simd We're acknowledged by the CGCC government, meaning we're a religion, not a cult :P
 
@cairdcoinheringaahing then you have rights!
 
There are different forms of language organisations: Vyxal is a corporation, Jelly is a religion, etc. :P
 
:)
 
4:26 PM
I've always thought of Pyth as an undercover gangsta.
don't ask me why
 
The Pyth mafia
 
Rust is a cult for sure
 
JS is a therapy group :p
 
JS is the reason I need therapy /j
 
Vyxal: Corporation
Jelly: Religion
Pyth: Mafia
Rust: Cult
JS: Therapy
What else?
 
4:36 PM
C: Government
 
Eliminate C!
 
4:53 PM
Python: Fraternity
 
All haskellers are BFFs too
 
5:06 PM
All I know about JS is from wtfjs
@mathcat C23 will save us! (Umm...)
 
5:36 PM
CMQ: Can a GNU sed answer specify a file to take input from?
I read this answer as saying that if a certain file is required for an answer that counts as a new dialect of the language
Thoughts???
 
6:12 PM
@cairdcoinheringaahing what do you think? I need to know this to post an answer
 
6:32 PM
Also: What happened to Best Of 2022???
 
I hope it will appear in the next few days
 
I'll do it, one second
Okay, ready to post
(@hyper-neutrino @cairdcoinheringaahing @RadvylfPrograms @Bubbler @pxeger @lyxal @emanresuA)
 
That was fast
 
@mousetail yeah, I (mostly) copied last year's text, which is (mostly) a copy of 2020's text :p
 
Categories will stay the same?
 
6:38 PM
that depends on what ones are proposed
to clarify, the question I am ready to post is the category request one
 
Oh right
 
but I'm not going to post w/o approval from the mods/ROs
so I'm waiting for that right now
 
gonna be honest, I don't actually remember exactly how to run the Best Of cuz I wasn't really involved last year besides putting up all of the voting comments. @WheatWizard sorry to bother you but I think you posted the posts themselves last year so I'll summon you
 
I'm sure it's not very hard
 
Seems PXeger hosted it last year
 
6:41 PM
I want to do it this year
not because of rep or anything of course, I just want to contribute to the community
 
It's all on meta so there is no rep
 
There is reputation, and then there is reputation.
 
True
I aim to win every category this year
 
good luck d:
 
6:54 PM
Also why close the "call for categories" as duplicate?
 
I can run it if needed
 
Hmmm sadly I'm not sure if I can qualify for every category. Stupid me posting a single answer in 2021 so I'm not technically a rookie
 
Can somebody link Best of 2021?
 
@Ginger Feel free to run it. Call for categories for 2 weeks, then nominations for 2 weeks, then voting for another 2 weeks is the standard IIRC
14
Q: Best Of CGCC 2021 - Call for categories

pxegerWell, 2021's come to an end, and so that means: Best of 2021! In this thread, we'll consolidate the categories for our Best Posts of 2021, and eventually we'll vote on which posts will win for each category. In this thread, we are looking for two things: Categories to classify exceptional posts ...

 
Also, is there a chatroom?
 
7:06 PM
Do we expect sufficient spam around this topic as to make it unsuitable for here?
 
What topic?
 
@cairdcoinheringaahing best-of, I s'pose.
 
@mathcat There's usually a new one each year
 
7:23 PM
@pxeger thanks for that, but I messed up, so would you mind updating Charcoal on ATO to 49787e5e9011153d0dc26c712184603ae0c39641?
 
@cairdcoinheringaahing Cool! Posting now...
 
0
Q: Best of CGCC 2022 - Call for categories

GingerWell, 2022's come to an end, and so that means: Best of 2022! In this thread, we'll consolidate the categories for our Best Posts of 2022, and eventually we'll vote on which posts will win for each category. In this thread, we are looking for two things: Categories to classify exceptional posts ...

 
@cairdcoinheringaahing pin?
(also, could someone remind me once the two weeks is up? I'm not sure if I'll actually remember myself q:)
 
Don't worry, Wheat Wizard didn't either
 
lol
 
7:34 PM
Community wiki maybe?
 
the last one wasn't
 
¯\_(ツ)_/¯
 

 Best Of CGCC 2022

Discussion & bounties for Best Of CGCC 2022! codegolf.meta.sta...
@hyper-neutrino Is this worthy of an event in the events list?
 
yeah I think so
 
cool
(@hyper-neutrino the event says "Best Of 2022" but should say "Best Of CGCC 2022")
 
7:50 PM
oh
 
eh, we're only human [citation needed]
 
8:08 PM
Isn't a neutrino a subatomic particle? I don't think many subatomic particles are human
 
8:21 PM
Also any tips how to search for all python answers that don't explicitly list a version number, or only list python 3 without the minor version?
 
@cairdcoinheringaahing Haskell: Elitist academics
COBOL: Old boys' club
@mousetail Would their going extinct actually mess up the ecosystem though?
@Simd i686, Intel Core 2 Duo
 
@user Unfortunately data scientists are a very fragile species, with a diet that consists almost entirely of pandas. If pandas where to disappear the whole ecosystem could collapse, and once again developers would be asked to copy-paste SQL queries.
4
 
@Simd I've seen that article (or at least ones like it) in the past but I've just been a little afraid of trying out the more obscure distros. Thanks for reminding me those exist, though, I should try out at least a few of them at some point if I'm going to become an elitist Linux bro :P
Newer releases of Linux Mint and Ubuntu flavors no longer support 32 bit :(
@Ginger Thanks! It looks like their goal is specifically supporting old computers, which is nice (mine isn't that old, it's from around 2011, but it doesn't have the best specs ever)
 
8:54 PM
@user Happy to help!
@user jooooooooin uuuuuuuuus, uuuuuuuuseeeeeerrrr
 
I might grow a beard and try Linux from scratch :P
 
Bad idea. Down that road lies madness
You spend all your time compiling kernels and never do anything
@user If you do elect to install RPi OS, you should 100% also install a new desktop like KDE Plasma or smth
it's actually really easy to do, I can help you if you want
 
That'd be great, thanks
I'm assuming they have decent docs given it's got a good community so hopefully I'll be able to do it myself without much trouble
 
@user The docs are OK, but specifically for installing a new desktop there actually is [One Weird Trick!!! Click here to find out!] that makes it way easier
 
Do you happen to have a link to the one weird trick?
 
9:04 PM
er
@user no, I forgor 💀 where I found it
but it's simple: the tasksel command
it's basically an installer that lets you easily set up a bunch of different desktops, and it comes prepackaged with RPiOS!
 
Thanks, found some articles after googling tasksel
 
I installed Cinnamon to replace LXDE a week or so ago and I have no clue why I didn't do it earlier
it is SO MUCH BETTER
see these messages for before and after screenshots
 
Are those two virtual desktops or something?
 
I have two monitors :p
 
Ah ok
 
9:08 PM
@user but your cpu is 64 bit isn't it?
 
No it's 32 bit (i686) :(
 
@user do you have a URL for it? I can't seem to find the 32 bit version
 
 
Or do you mean a URL for the CPU I have?
 
9:12 PM
@user yes
 
@Simd Debian is slow to get updates though
 
For the cpu
@user fussy :)
 
I like my OSes like I like my knives: bleeding edge
@Simd No apt packages being outdated is an actual problem occasionally
 
How about mx Linux?
 
Another Debian stable base :|
You know what, screw it, I'll just use Debian itself
Can't get away from all these Debian derivatives
 
9:15 PM
:)
But I still want to know about this cpu
 
Trying to find it
All the sticker says is Intel Core 2 Duo
Possibly one of these?
 
Have you got any os running in it?
When you have an os you can get more info
 
Yeah, Gentoo, booting it up right now
 
I hate Gentoo...:)
 
lol
Okay, it says the processor is "Intel Core(TM)2 Duo CPU T6500 @ 2.10GHZ", it's got 2.9 GiB of RAM, and the graphics processor is "Mesa Mobile Intel GM45 Express Chipset"
This thing, I guess
 
9:26 PM
It's 64 bit
 
Wait what
lscpu says it's i686, which is 32 bit, right?
It says it supports 32 bit and 64 bit op modes but that doesn't mean it can actually run 64 bit applications, does it?
My brain is breaking right now
 
9:44 PM
@NewPosts laughs in 200 rep never received from the previous best of
 
@lyxal On which answer?
 
@user print x without x
 
Which answer is the bounty supposed to be on?
 
As is emanresu and aaroneous for that matter
@user any one of the many cracks we posted
Well, any three
 
Asking because I can award one of those. Which of the answers are you most proud of?
 
9:57 PM
Because it was a 3 person nomination
2
A: Print X without X (cop's thread)

lyxalVyxal, score 250, cracked properly by Aaroneous !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVXYZ[\]^_`abcdefghijmnopqrtuvwxyz{|}~¡¢£¤¥¦§¨«¬¯°±²µ¶¹»¼½¾×Þßæð÷øĊċėĠġİĿŀŻżƈƒƛǍǎǏǐǑǒǓǔȦȧȮȯɖɽɾʀʁΠβελτḂḃḊḋḞḟḢḣḭṀṁṄṅṖṗṘṙṠṡṪṫẆẇẊẋẎẏ‛„‟†‡•…‹›⁋⁰⁺⁼⁽₀₁₂₄₅₆₇₈₌₍€₴℅⅛←↑→↓↔↲↳↵⇧⇩∆∇∑√∞∧∨∩∪∴∵∷≈≠≤≥≬⊍⋎⋏⌈⌊⌐□⟇⟑⟨⟩꘍...

My final cop post
 
nvm I don't think I can award bounties anymore lol
No bounty button
 
07:00 - 22:0022:00 - 00:00

« first day (4356 days earlier)      last day (499 days later) »