« first day (4629 days earlier)      last day (65 days later) » 

12:05 AM
A: Sandbox for Proposed Challenges

emanresu AComplement an infinite list. In this challenge, we define the complement of a list of positive integers as all positive integers not included in that list. For example, the complement of the even numbers [2, 4, 6, 8...] is the odd numbers [1, 3, 5, 7...]. Your challenge is to, given a monotonica...

So... I just found that one of my sandboxed questions is an almost-exact duplicate of a question from seven years ago. However, I think my version is better explained and more solidly specified, especially considering that question has a score of 4 and a single answer. Thoughts?
If you want to replace the old one, you'll need to ask on meta
1:00 AM
Sandbox posts last active a week ago: (untitled)
they're definitely very similar but in terms of actual implementation i wouldn't say completing the equivalence relation is equivalent to identifying the equivalence classes
also, not that it's easy to tell because the older question is written poorly, but it seems to be the case that it permits taking the relation as already guaranteed reflexive and symmetric
in short, at least undelete the sandbox post so there isn't a rep barrier for weighing in on it :P
1:36 AM
like, if you have the equivalence classes you can get the full relation from cartesian squaring each one, and there's all kinds of ways to go the other way, but neither of those transformations is entirely trivial and depending on the language using them may or may not be the shortest
...though incidentally that does give me an idea for a solution that does go through the classes :P
True... I've undeleted it for now
1 hour later…
3:07 AM
@Simd "The allowed modifications will leave your program syntactically valid and will not cause it to crash.", this question uses a special form of radiation which only mutates you and does not kill you :P
They got that Comic-book radiation
3:36 AM
lmao; cmegac write a program that calculates pi - gaining a digit of accuracy for each byte removed
3:51 AM
33, Removing either byte makes the tens column more accurate.
4:04 AM
@thejonymyster (Math.PI+"").slice(0,17-"aaaaaaaaaaaaaaa".length)
Wait got it backwards
Remove up to all 15 as and each one adds a digit of precision :p
1 hour later…
5:12 AM
Q: Write a set as a union of ranges

emanresu AIn this challenge, we define a range similarly to Python's range function: A list of positive integers with equal differences between them. For example, [1, 2, 3] is a range from 1 to 3 with a skip count of 1, because there is a difference of 1 between each item, and [4, 7, 10, 13] is a range fro...

@NewPosts feels like a dupe but i might be remembering something that's the other way around lmao
oh wait i didn't catch the bit about step yeah it's definitely not a dupe
@SandboxPosts this q says you can take input as a "stream", im kind of noob and i only have a feint idea of what this means ; is there a meta or somethign i can read up on this? or like, would this allow a language like bf to take infinite input as just assuming theres no EOF (just keep taking input with ,)?
yippee (ty)
5:39 AM
@Simd Unary, 789 bytes. Outputs "\0", and with one byte removed outputs "\0\1".
A: Sandbox for Proposed Challenges

guest4308Listing all words following a pattern Words are composed by joining syllables together. Syllables are composed of a number of vowels with some number of consonants optionally to the left or right. Your code should take in: Consonants Vowels A structure for syllables in a format you define; the f...

2 hours later…
7:37 AM
A: Sandbox for Proposed Challenges

emanresu ATranspose a multidimensional array Transposition is an operation on 2-dimensional arrays that flips every element across the main diagonal: [[1,2,3], [[1,4], [4,5,6]] -> [2,5], [3,6]] If we call the above array m, then the 2 is the second item of the first row of m, or m[0][1]...

2 hours later…
9:37 AM
A: Sandbox for Proposed Challenges

flawrRegex Autogolfer NOTE: Just a rough idea so far: programming-challengetest-battery Given two sets of strings, your task is outputting a regex that matches each of the strings in the first set, but none of those in the second set. The goal is making the regex as short as possible. Details The Reg...

1 hour later…
10:55 AM
A: Sandbox for Proposed Challenges

Sam DeanThoughts on a scoring system that rewards "popular" languages. Divide the byte length of a program by a "popularity" metric e.g. Wikipedia page views in the last 30 days (or esolangs.org) Wikipedia edits questions on Stack Overflow tagged with that language Idea would be to encourage golfing in...

11:22 AM
@SandboxPosts A somewhat interesting idea in theory, extremely exploitable if you're using edits/views, and not plausible if you're using SO data
Jelly gets a score of 6000+ and JS a score of 13, I don’t see how that succeeds to "level the playing field between golfing languages and common languages"
If anything that makes the perception of the gap even worse, just in the other direction
Because it's scored using esolangs.org edit count, the jelly score can very easily be improved by spamming edits
as can any language's esolangs.org page
also, a page might not be edited that often on a wikipage because it may not need editing for a long time
Also a big problem with language and compiler versions
because there’s usually only one page
Any popularity metric can and most likely will be gamed
Imo the most "objective way" to level the scores would be to get a list of "classic" and varied challenges with the best-known golfed solutions for the language, and compute some kind of ratio between the current answer and some average length on the classic challenges
tl;dr score an answer based on how long it is compared to usual answers of the same language
But ultimately I don’t think it solves any real issue
People use Jelly instead of Java not because it gets better scores, but because Java has shitty expressivity
11:42 AM
@SandboxPosts this is one of those things that seems like a good idea but isn't, like JS or communism
JS never seemed like a good idea.
it draws you in with promises of... something and then warps your soul like a plastic sheet left in a hot car
that also describes async programming in JS
ugh, hate that
12:38 PM
A: Sandbox for Proposed Challenges

PhilipposForward foo, reverse bar, but avoid dead code So simple: Provide some code that outputs foo and with the reversed source outputs bar. But before you come up with something like this python: print "foo"#"rab" tnirp you should know the score: You multiply the number of bytes with (1 + dead bytes),...

What the fastest possible way to compute the dot product of two arrays of float64s on an intel Xeon processor?
what are you trying to do???
why do you always ask these crypic, oddly specific questions lmao
Fast code πŸ‡πŸŒŠ
Pretend the 🌊 is like those lines people draw behind characters to indicate fast
I didn't find any more suitable emoji
Also rabbit didn't have a face the other way version
12:58 PM
rabbit 27.0.3 (running on Java 17 SE; /opt/rabbit/interpreters/27.0/rabbit-27.0.3-dist.jar) confirmed?!
@Ginger it's the way my brain works :)
why does your brain have an Intel Xeon processor
I want to do millions of dot products and was wondering what the absolute fastest way to do that is on a modern cpu
I don't really understand simd, fma etx
@Ginger :)
I knew someone would ask which processor so I chose one
ARM ftw
@Ginger I sadly don't have access to one
1:01 PM
don't you have two perfectly good ones right there? or did lyxal steal them already
Stolen arms! πŸ€‘πŸ€‘πŸ€‘
@Ginger he did
$tolen arm$
smh lyxal
Arms trader
I know he has a tasty PFP but you should at least ask nicely first
1:03 PM
@Ginger I steal as I please
Because it's how I roll
It be like that πŸ˜ŽπŸ€‘πŸ˜ŽπŸ€‘πŸ˜Ž
@SandboxPosts I feel like it's quite hard to classify "dead code" in other paradigms / esoteric-y languages
The answer might actually be that the limiting factor is memory speed so if you want your dot product to be really fast you need the arrays to be in L1 cache
Which is hard to arrange!
@mathscat it's basically impossible to universally define objectively
1:52 PM
@Simd It's just gonna be SIMD multiplication I'm sure
@lyxal One exists: πŸ’¨
@RydwolfPrograms ah ok. What is fma for?
Also Xeons range from single-core CPUs from like 2002 up to modern ones with dozens of cores at 5 GHz. You're gonna need to pick a more specific CPU :p
AVX512's probably going to be the answer
@RydwolfPrograms one with dozens of cores :)
@RydwolfPrograms interesting. I know very little about that
It supports doubles so you'd just load 8 at a time and take their products, then you'd just need to sum them
Looks like the summing would be called horizontal sum
2:05 PM
Oh true forgot those instructions exist. Not sure AVX is going to have that
A: Improving performance of floating-point dot-product of an array with SIMD

Andrey SemashevSome of the suggestions were already mentioned in the comments, but I will try to suggest something in addition to that. Most SIMD floating point instructions on Haswell and newer CPUs have reciprocal throughput less than its latency, which means the performance could be improved if multiple inst...

Not that I really understand it
For someone named Simd you probably should learn more about simd ;p
I am scared and intrigued by them
What's scary about nice simple instruction names like PHMINPOSUW
2:48 PM
@Simd Millions would take a split second even with no optimization
You're probably prematurely optimizing here
A bug in Chrome's dev console let me hit enter twice
So I ran an empty snippet
And it printed window
3:07 PM
any idea as to why?
@thejonymyster It took a few seconds for initializing the function to work, it was likely the console trying to evaluate the result to preview it, and some sort of optimization running that blocked for a while. And in the meantime I hit enter a second time thinking the keystroke had been missed.
Chrome's console's snippet return value previewing is kinda buggy, I once spent HOURS debugging this hundreds-of-sloc function because it was behaving in this really weird nondeterministic fashion, only to figure out it was the console preview accidentally mutating some state
3:21 PM
and then also how come it gave you window? i wonder if theres a non buggy way to get it to run that same blank snippet?
eval("") just gives undefined
ok yea that makes sense i retract my surprise
No it's still interesting that running an empty snippet gives window
Since it differs from eval
i retract my retract..ment? retractal? retraction
CMQ: On a scale of zero to PHP, how cursed would it be to represent bytestrings in JSON as strings of Unicode with codepoints ranging from 0 to 255?
3:27 PM
so as a list of chars?
or wait no you said strings of unicode...
so just.... representing bytestrings as strings?
that seems about as normal as it gets :p
@thejonymyster No like, the bytestring 61 00 20 af 7f ff would be a\x00 ¯\x7fÿ
Where it gets weird is with Unicode
ΰ² _ΰ² 
that's like Python but worse
@RydwolfPrograms zero.five
E.g., the string å would be represented with UTF-8 as c3 a5, so you'd represent it in this JSON representation as Ã¥
3:30 PM
And any Unicode outside the range 00–ff would just be a parse error
that's... no
please do not do that
forgive me for thinking that seems really normal
but isnt that like unambiguous and like, a regular representation of those bytes
@Ginger To clarify the reason I need something like this is that bytestrings can't be represented directly with JSON
One option I've seen is an array of ints but that's a) way bigger b) less readable for anything but non-ASCII c) just as capable of encoding invalid data
3:32 PM
like how would you normally print those as a string? is there some other method?
just convert them to hex first
@Ginger I am considering that too
It would be shorter for strings mostly consisting of non-ASCII byte values
Which I don't expect to be super common, but maybe
well i could blather on but you know where my vote is at this point; feel free to ask on meta and i'll be sure to pop in and follow up
So it's basically intentional mojibake
mojibug or mojifeature?
3:37 PM
right i forgot the term but yea
also rydwolf while youre here what on earth did you mean by this sandbox
You'll be given a code snippet and you have to golf it
Your score is the total number of bytes you golf off a dataset, minus your code length
so if I answer it in MGS does that make the output golfedmetagolfscriptmetagolfedscript?
So if you golf an average of 1 byte of a dataset of 700 Python programs, breaking 25% of them in the process, and your code is 335 bytes, your score is +190
Probably minus some penalty for breaking programs that I haven't devised yet
@Ginger The language you write the answer in doesn't need to match the language(s) your program golfs
how on earth do you expect that to be possible :P does the name "alan turing" mean anything to you
3:46 PM
@RydwolfPrograms interesting concept
Well the idea is you might bork some subset of the inputs, but there are certain patterns you can golf 99% of the time and still get a functioning result
so its like youre writing your own mini ai assistant :-) thats funny
(except that its deterministic)
(i presume)
@thejonymyster ... which is golfed, too
see "mini"
that wasnt just a flavor word :P
ok now i understand the challenge and will politely leave it alone as it is leagues above my capabilities
Python 3, 53 bytes (excluding import): lambda r:"".join(c for c in r if random.randint(0,5))
I call this one Russian Roulette
3:51 PM
How about Python, 26 bytes: lambda n:n.replace(" ","")
ooh, that's a good one
you might have to tweak the penalties a lot so that snippets like this don't have an absurdly high score
thats making me realize it really also depends on how the dataset is
youd be finding common errors of the sites past, and i have a feeling extra space isnt super common... but perhaps i am mistaken
at least, not without changing something else in the code to allow for the space to beremoved lol
is the input dataset pre-golfed?
I assume so, if it's sourced from CGCC
And how are different versions of the same language dealt with?
3:58 PM
@thejonymyster For inexperienced golfers it is ;)
If each version is considered a different language, that would exclude a lot of golflangs with ongoing development from the dataset
4:26 PM
feedback req; is [this sandbox]'s worked out example clear enough, or do I need to write a formal spec?
@RydwolfPrograms this >>>>
@RydwolfPrograms (if anyone's wondering this is a way to have a thread abort other threads if one fails; once one fails it sets all the bools in the Vec to true, which the other threads see)
I should probably be using Tokio lol
@thejonymyster good lord i forgot the link
Is this sandbox's worked out example clear enough to go by, or does it need a proper written out spec?
I have some random unneeded space in my golfed code quire often, when you have a lot of mandatory spaces it's hard to sometimes see which ones are not actually needed. The rules for when a space is needed are quite complex
yea it also depends on what language you pick, very different sorts of hurdles
4:40 PM
I'd love to see a refined version on main!
if let Err(err) = interrupted!().then_some(()).ok_or(CreateCtrError::Interrupted) || fs::write(format!("/rto/conts/{}/{}/config.json", inst_id, id), oci_config_from_config(&config, inst_id, &id)).map_err(CreateCtrError::WriteConfig) || interrupted!().then_some(()).ok_or(CreateCtrError::Interrupted) {
    if unsafe { libc::umount(cs_root.as_ptr()) } != 0 { panic!() };

    fs::remove_dir(format!("/rto/conts/{}/{}", inst_id, id)).unwrap();

    return Err(err);
Not sure whether this is elegant or disgusting
what am I looking at here?
5:14 PM
1. Use `interrupted!()` macro to check if should abort (and convert that to a `Result`)
2. Write a file
3. Do another `interrupted!()` check
4. If any of those returned `Err`s, unmount `cs_root` and delete `/rto/conts/[inst_id]/[id]`
A: Sandbox for Proposed Challenges

thejonymystercompression? code-golf Golfy Fairy Chess Notation + Validation Design an encoding for fairy chess piece movement which encodes all of the following information: Where a piece can move (INCLUDING arbitrary length movement)* Whether those movements are "jumping" or not Whether those movements are "...

@RydwolfPrograms maybe billions :)
It's also my time-golf :)
I just enjoy getting the last nanosecond off
6:17 PM
A guide somewhere said it was alright to bug you guys in here about sandbox proposals, so I have come to collect your opinions on codegolf.meta.stackexchange.com/a/26054/119818 Do y'all think it's better with or without the filter part? that makes it more cool/interesting/useful to me, but does it make it less fun to golf? ie, does it feel more like a dumb requirement added on at the end, or an interesting challenge to optimize?
This is the correct place to bug people about sandbox proposal yes
@guest4308 IMO the filter part is redundant, I don't think it offers any new ways to optimize the code, but most answers will do something along the lines of filter(lambda string: banned not in string, lst)
cool challenge idea though
6:45 PM
@AdΓ‘m added
2 hours later…
9:07 PM
any ideas on how to close this loophole in my challenge? codegolf.meta.stackexchange.com/a/26052/108687
> In the current form 21 will be the optimal solution in all languages allowing implicit output (assuming the empty program does not print a number) –
Change the scoring criteria I guess
Maybe make it based on longest program, since that's harder, and ensure it's near-impossible to create an arbitrarily long program
@noodleman Additionally, this rewards smaller programs, whilst longer programs are objectively harder.
Perhaps would fix it outright?
good idea
okay working on an edit
Oh that's basically what Emanresu said lmao
Means that the best "Simple" answer most can do is 987654321
should code bowling do longest code in bytes or by character count?
i feel like people could just shove a couple of high byte characters in there
9:16 PM
I'd say character because the radiation is on the character level. But maybe both should be byte?
i'll go with character
i feel like u can still get arbitrary length out of it
idk i wouldn't be able to answer it myself tbh
no i mean yea me neither but if it is answerable, i feel like theres something to the effect of like
code"long string"code where the code bits handle themselves as well as the long string
@AdΓ‘m Pip, 28 bytes with a very imperative-programming approach: Ta<Yo*:U#llPUoFbl{Pa//ba%:b}
9:24 PM
and you just find the location of the disturbance in the long string
so as long as you can write a portion which can handle itself as well as the string, youre cookin
but i digrest
@thejonymyster Whilst possible, you'd also have to harden the parts that aren't the long string. Which is substantially harder
right but you already have to do that for the main challenge
so if the main challenge is possible; it doesnt seem that hard to also add the long string element
especially using regular radiation tactics
but yhea ofc i could be wrong and its inordinately hard to screw with but like
thats my take on it
9:40 PM
@thejonymyster It's good that you dig rest. Rest is necessary for all of us. ;)
<-- sleepiest chatmember tbh
-_- honk shoo
That's an interesting onomatopoeia.
but yea idk i think its very easy to say "this will surely be impossible so i dont need to worry about it" and it has happened to me as well
@DLosc lol i was under the impression it was fairly standard :P
in The Sand Trap, 8 hours ago, by lyxal
@user it'll do be is like that sometimes
@thejonymyster I think the fake snoring noises are pretty standard, but I've never seen them spelled out (or thought they could be spelled at all)
9:54 PM
are you more of a snork mimimi?
it was kind of big in the memosphere to do it for a while so this isnt just coming out of nowhere
@thejonymyster What do you think this is? A jschlatt video?
> I've never seen them
@lyxal dont tell me theres another crazy js framework going around...
@thejonymyster video
I've only ever seen/heard zzz. Honk shoo sounds vaguely familiar but I can't remember any specific places I've seen it
9:58 PM
wow its been a while since my experiences have been non universal
@lyxal lmao good
Either you've been spending too much time in echo chambers or you're the most average person ever lol
i was hoping for more sfx tbh i want his keyboard to be the claka claka claka
@user Ah, true, I've seen zzz. Also something like snrx in webcomics.
9:59 PM
@user im the normal one. You guys are the crazy ones. Crazy? I was cra
in The Sand Trap, 2 days ago, by lyxal
Is this what it feels like to be dlosc? :p
I think I've even heard people say "gonna catch some Z's" (or maybe I read that in a book?)
I didn't that meme in knowledge
@user absolutely yes heard that plenty
I've lost touch with the zoomer population despite being one
10:00 PM
ok boomer
Shut mouth user
I'll shut your ventilator, grandpa :P
Also idk about you but I don't type with my lips :P
@lyxal In a way, that is what it feels like to be me. I'm frequently out of touch with the millennial population despite being one. ;)
Or tongue, I guess. Lips are too big to precisely press keys. With your tongue, you might be able to achieve better precision
@user someone clearly hasn't watched bottom gear
10:03 PM
Ah, it was a reference
> Man of Scat
mathscat reference??!
Wait this is TNB, this is wayyy off topic lol
I say it's fine
No one asked
You asked
Oh damn you got me there
10:06 PM
are there any silly challenges about turning a group of emojis into a group of related emojis
like maybe one to toggle between cat and not cat versions of emotes :P
2 hours later…
11:48 PM
damn what was that it was deleted so fast
post author deleted it
oh wow

« first day (4629 days earlier)      last day (65 days later) »