« first day (4581 days earlier)      last day (560 days later) » 

01:36
y'all ever just forget to set members in a constructor and then wonder why those members are null elsewhere only to realise you forgot to set them?
I do
I use languages that don't permit that mistake :P
(In the strangest decision of all time, Swift permits this for fields typed T? but not Optional<T>, even though they're two different spellings of the same thing.)
@Bbrk24 you mean Swift constructors require you to set all members in the body of a constructor?
Yep -- except for those typed as T? (but not Optional<T>), which do default to nil
Also, Swift, following Objective-C, calls it init rather than a c'tor
@Bbrk24 then it's the equivalent of forgetting to set the T? field
Yeah but you can't forget to set an int-typed field the way you can in Java or C#
01:43
Morning
Today, Aug 15th, is the Korean Independence Day.
@Bbrk24 tbf I didn't choose to use java :p
Timezones :tm:
@lyxal if it were up to me, I'd have used something like scala
@Bbrk24 that's a you problem :p
@lyxal yeah fair. If I had to use the JVM I'd reach for Kotlin myself, but I'd rather use a non-JVM language if given the choice
@lyxal Why's your date backwards
why's yours?
01:54
Reminds of those developers who couldn't choose how to order the date, and released their product on Nov 11th.
Nov 11th is not a Korean holiday, but is known as Päpäro day, and Päpäro is a Korean knockoff of Pocky.
Release a product on the 9th of June and then re-release it on the 6th of September and you can claim it was released on 6/9 no matter your date system
 
4 hours later…
05:36
Do we ever get Go answers here? I don’t remember seeing any
i saw one i think two days ago but yeah they're rare
05:49
Reminder:
5
Q: Is "parallelize as much as possible" a valid winning criterion?

Dannyu NDosI'd like to propose a new winning criterion: Parallelize as much as possible. A challenge of this type is to give a code that involves parallelization. Let \$T\$ be the running time when run on a single processor. Due to Amdahl's law, as there are more and more processors to be run on, the overal...

Go will do very well for such challenges.
06:23
@DannyuNDos True. Do you know how to search for Go answers?
@UnrelatedString I wonder why
@Simd Dunno, maybe search codegolf.stackexchange.com: Go on Google?
@DannyuNDos sadly no luck. You get the board game
Oct 13, 2022 at 16:11, by Grain Ghost
Go is pretty boring for golfing.
@mousetail that's in the eye of the beholder surely
06:38
If you read the conversation there are some good reasons given
The language just isn't very flexible
understood but lots of languages are very uninteresting to a group of people
I can't stand Jelly for example
and Java is definitely not a golfing language!
but people still enjoy using them here
I agree with mousetail :)
For sure, but there are trends. Some people like golfing in Go but on average it's less popular
Julia is used much less than I would expect here too
given that it's like python but cool :)
Be the change you want to see :)
:)
It might be because TIO has an ancient version
06:45
Convince Pxeger to add it to ATO
@pxeger What do you think?
They generally seem to be happy to add new languages
Especially if you just submit a PR yourself to add it
that's cool
07:05
go itself isn't especially popular to begin with outside golf either
even if the limitations make it very good at parallelism/async they don't seem especially entertaining to work around in a golf context when there's proper tarpits out there :P
07:19
@UnrelatedString I am not sure. It's an official Google language and seems high up at tiobe.com/tiobe-index
in between scratch and matlab
@UnrelatedString right. Above R, Ruby and rust !
it's definitely got its presence, especially at google, but it's hard to imagine someone sitting down and deciding their new project that isn't tied to the go ecosystem and doesn't especially need goroutines is going to be in go
I am surprised scratch is so popular
does tiobe actually publish its methodology
07:22
I don't know Go well, but are goroutines just for parallelism?
the scratch community is massive and there's a ton of materials aimed at making it an even better educational tool so it definitely has a big presence in terms of just online content to find
i... think so?
@UnrelatedString I have definitely seen it in the past
"
The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. "
good for pay rises!
ah yes
my favorite language
nosql
07:25
any comments on this? bpa.st/RPEQ
@UnrelatedString that always sounds like a nose querying language to me ;)
improved version bpa.st/3EQA
oooh
also reminds me, did scratch ever add any kind of concept of local variables
"How do you make a variable local in Scratch?
By clicking on the button that says Make a Variable, a window will pop up that will allow you to create your own variable. Window to create a new variable. If you want your variable to be global select the option “For all sprites” if you want your variable to be local select “For this sprite only”."
I am no scratch expert
so there's still no scoping more granular than the sprite level
wacky
i guess teaching kids how to write code doesn't have to entail teaching them how to write good code :P
@UnrelatedString en.scratch-wiki.info/wiki/Variable#Local_Variables is more informative
@UnrelatedString I am tempted to post my challenge
07:41
yeah i was thinking something more like a conventional local variable
what scratch calls a local variable is more like an instance field
I don't know about instance fields
like a non-static field of an object in a traditional oop langujage
iirc scratch doesn't even have a way to reuse code between different base sprites or non-statefully
there used to be scratch answers here
I am sure they use whatever tricks are possible
huh, looks like berkeley snap actually does add a bunch of praclangy features scratch doesn't have
i remember back when it was just called byob :P
I didn't know it existed!
I like byob :)
there is no berkeley scratch tag on SO
07:52
0
Q: Iterate over strings II

SimdThis is a successor to a previous challenge. Input An integer \$1 \leq n \leq 5\$. Task Your code should produce all strings that satisfy the following properties: Your string should contain exactly two each of the first \$n\$ letters of the alphabet. It should not contain the same letter twice ...

looking at some of it it almost seems like it has too many features, but for an educational language that also lets you disable features, the more you let people run wild with the better
+1 for run wild
CMQ Is there a way to count how many different people have answered challenges in the last month?
08:21
@UnrelatedString bring your own blocks
that's what i thought it stood for too lmao
We having an educational programming party
With only the best music playing, including hits such as "bubble popping noise" and "overused scratch cat meow"
I've last used scratch 10 years ago yet I know exactly what sounds you are talking about
halo im new user
08:27
@Ginger ok I’ve enabled 2fa
@user no, you're user
You don't have new in your username
@mousetail they become baked into your head after you hear them in enough projects :p
@lyxal not bring your own booze
@TheEmptyStringPhotographer oh no
@lyxal haha
@Simd why?
I had to do it at some point
I used scratch on a old laptop with terrible speakers so all the sounds sounded like high pitched screeching
08:34
Aug 8 at 14:44, by mousetail
@lyxal Petition to make our 404 page a quine in "Lost"
Do people actually want this to happen?
@user glad you found it funny :p
CMQ Is it ok to post a cop answer to your own cops and robbers challenge?
@TheEmptyStringPhotographer just because 2fa is annoying
@TheEmptyStringPhotographer Stack Exchange doesn't really ever give us custom stuff so it's just a sky castle but we can hope
08:42
what is cmq ?
@user chatroom mini question?
I was hoping someone was an expert on querying the data
@Simd thanks
No one has pointed out a bug in my question yet which is good :)
is this the most chatty room ?
08:49
Yes!
@TheEmptyStringPhotographer There is no specific rule against it as far as I'm aware, especially if it is days or hours later
And the chat per person ratio is at record levels
Talking of which, is my latest challenge clear?
Comments gratefully received
It's not meant to be hard to understand
@mousetail yay
Haha, user user, user user, and user ‮A username
But if it is, please let me know!
09:04
@PetəíŕdTheLinuxWizard blue user and yellow user :p
I should add a ♦️ to my name
Pretty sure it's blocked
There is a whole list of blocked characters
09:09
Yea it deleted the character
@mousetail that's right
SE thought of that one ages ago :p
What about 🔹︎? (1f539+fe0e)
> Display Name can only contain letters, digits, spaces, apostrophes or hyphens and must start with a letter or digit
Whoa, that's new, then. I'm sure we've had users with purely symbolic names.
apostrophes are a interesting thing to include
09:19
@Adám the definition of letter is a little more inclusive than just Latin alphabet
E.g you can have Greek letters in your username
A delta kind of looks like a half diamond
@lyxαλ for example
@lyxαλ :64192776The Unicode property? That includes all-blank zero-width characters and this diamond: ۪
@lyxαλ for a second i thought you hadn't changed your name but managed to ping yourself with some kind of automatic transliteration scheme lmao
come to think of it i wonder if there is some kind of normalization like python has for identifiers
@unrelated
seems not
@unrelated
or maybe prefixes don't ping anyways
Most databases automatically normalize but using the less aggressive variant
09:34
@UnrelatedString why are the second and fourth points redundant?
@UnrelatedString prefixes need at least 3 letters
@Simd if the only non-letter is 0, then it follows from the last point that there can't be any zeroes at the beginning or end, and actually yeah i misread the second point is still useful
@Simd I second you should mention at the very beginning that the string should consist only of lower case letters and zeros
@mousetail I will add that, thanks
@UnrelatedString thanks. So are any of the points redundant?
Oh I see
(also the reason i thought the second point was redundant was i thought there had to be a zero for every pair of letters as well as the other way around)
09:45
Got you
I am really hoping someone can give a faster solution
Does that mean the word joiner (U+2060) cannot be used in usernames?
n=2 is too small
10:09
@mousetail the answer is yes but I am worried why you asked
Is something unclear?
Just making sure I'm understanding properly
Ok cool. Which part were you worried about?
There is just a lot of very mathematical language, which is sort of hard for me to properly visualize. I read it wrong at first as all letters need to be sorted but it seems only the first instance of each letter needs to be sorted
@mousetail understood. Sorry if I didn't make it clear
Is it better now?
10:52
0
A: Sandbox for Proposed Challenges

bsoelchOdd than even Your task is to find out how often you need to shuffle a given list with the following operation until you get back the original list. start with a list: (1 2 3 4 5 6 7 8 9) split it into the elements at odd and even indices (1 3 5 7 9) (2 4 6 8) concatenate these two list (1 3 5 7...

 
2 hours later…
12:27
0
A: Sandbox for Proposed Challenges

Joao-3Walk by walls code-golf Challenge You just entered a room. Here's how it looks (you are the X): |\ /| | \/ | | X | | | |----| You challenge yourself to see if you can reach where you started by following the walls. You go right until you find a wall. Then you follow the next appropriate dir...

@Joao-3 Wait a few days before asking for feedback, it was just posted here an hour ago
...
14:21
@Adám I have to zoom in to realise that is not a piece of dirt on my computer screen…
14:43
0
A: Sandbox for Proposed Challenges

bsoelchThe product over a rectangle It is possible to generalize ranges of numbers to the Gaussian integers (complex numbers with integer real and imaginary part) by taking all numbers contained in the rectangle enclosed by the two ends of the range. So the range between two Gaussian integers a+bi and c...

15:00
CMC: Given an input of 4, output 64
There's a trivial 2 byte answer for most auto-output languages, but can you do it in 1 by using the input?
aw, that one's no fun in non-golflangs
Try a snippet
Take x=4 and transform to x=64
Again, there's a trivial answer (x=64 or equivalent), but can you find a shorter one?
Python: x**x/x
Desmos: xxx
heh funni
15:15
lambda x:'6'+x
const 64
15:37
@cairdcoinheringaahing Any golflang with a cube builtin should do it
Before I realized const 64 was Haskell, it looked like a snippet from a really cursed language where you have to define all the integers yourself
PFFF
@cairdcoinheringaahing i got a non-cube 2 byter in jelly that might be 1 byte in some other golflangs
(namely, æ«)
I searched for "jelly language" and got this (a different Jelly language for Siri shortcuts)
@UnrelatedString Ah, that's clever
15:53
also there might be some language, probably stack based, where 6 works
I was thinking that there would be a 1-byte replacement for 64 in this answer of mine, given it's a niladic link that starts with 4
Does that take advantage of how Jelly turns dyads into monads by using the same argument on both sides?
16:27
@Simd It's hard for me to understand exactly which language you were talking about here - do you mean Julia or Go? Both of those are already on ATO.
 
2 hours later…
18:05
@pxeger I was thinking Julia 1.9 but I am sorry if I missed that it is already there
 
2 hours later…
19:36
hello?
20:09
would it be possible to golf in python 3.12.0rc1
Why not? It is a programming language, no?
yes, but we need a reliable try it online alternative
also known as ATO
a reliable tio alternative to run python 3.12.0rc1?
Can you run it via pyodine maybe?
20:23
what is pyodine
also it's not like you need an online interpreter to submit something
it's just conventional to link one for conveniencew
true, but i want to anyways so people actually know my answer is true
i don't think pyodide supports 3.12.0rc1
i'm interested in 3.12 specifically because of the type alias system
and type generics
20:59
@Joao-3 I say just do it.
ok what do you mean by that? if you don't want to keep answering me you don't need to
21:23
Ooh, I hadn't been following python 3.12 much, but type T[A] = B looks really cool (and useful for golf too)
yea, also type I=int would break even against int after 5 uses
Hmm…I missed out a rule in my challenge…. :(
I am not sure how much difference it would to existing answers
i guess i need to wait until october for at least a reliable online interpreter for python 3.12
@Joao-3 is the official release date?
yes, read PEP 693
also this is gonna be useful for debugging, improved error messages
tells you that import ... from ... is incorrect
21:34
Impressive if they can stick to that
tells you to use self.foo if foo is undefined
you can also reuse quotes inside of f-string brackets
you can nest f-strings
strings inside f-strings can now have backslashes
21:56
@pxeger When would it be useful for golf? I wouldn't think you'd ever use types in Python golf.
Joke CMC: Write a program that asks for your name, then greats you. Example: input Peter -> output Peter the Great
Inspired by a typo in an Esolang article
@DLosc ARBLE, 16 bytes. "%s the Great"%n
@cairdcoinheringaahing Vyxal has a 1 byte bulletin for 64
22:18
@DLosc Python, print(f'{input("What is your name?")} the Great')
Some Pip options, 14-16 bytes:
a." the Great"    ; Concatenation
Oa" the Great"    ; Output one, autoprint the other
[a" the Great"]   ; Put both in a list
\"\a the Great\"  ; String interpolation
23:17
@cairdcoinheringaahing I can still only do it in 2 bytes in Jelly: æ«
Y'all these jelly variations are getting out of hand
The red one is clearly fractional protein
Can't believe they finally made a fracprot encoding

« first day (4581 days earlier)      last day (560 days later) »