« first day (4144 days earlier)      last day (701 days later) » 

12:03 AM
@cairdcoinheringaahing I feel like it kinda depends on how complicated each of those pieces of information is, gimme a min to read this challenge
 
One of the bits of info is the proof of the Riemann hypothesis, another is the complete works of shakespeare, but where every letter is replaced by the script for the bee movie :P
 
sounds perfect :P
 
I see no issues here, it should work fine
 
this does seem like a pretty good KOTH, still reading though
definitely will require complicated bots though, there are a lot of pieces to this
i feel like im not quite certain I fully understand double conveyor belts, do those always move the bots twice or can they chain if you get moved from one conveyor to another?
 
Basically, the double conveyers "activate" twice, whereas the single ones only "activate" once
 
12:13 AM
I do feel writing good bots for this will be hard though, there are kinda a few too many moving pieces
yeah, the more I think about this the more complicated i realize it would be to code a bot for it that actually does well
 
So, the thing I found about playing the IRL version of this is that even the best laid strategies can go chaotically wrong. I suspect a simplistic bot might actually do quite well
 
quite possibly
 
@Wezl'lo-ol' I'm tempted to remove walls from the spec tbh, they're a bit of an annoying edge case
 
I feel like if i wrote a bot for this it would mostly consist of various conditionals for what it wants to do in certain situations, like if its on the big conveyor loop in the center stay on that until its close to a checkpoint, move towards a checkpoint if its in the right area, etc etc
removing walls might help, or just turning them into completely impassable spaces instead
I do feel like some sort of graphical controller that actually shows the bots moving around the field is almost necessary for this
because otherwise it would be too hard to debug stupid shit your bots are doing
 
0
Q: Fill the rectangle

badatgolfChallenge In this challenge, you have to fill an \$M\$ x \$N\$ rectangle grid with the most \$A\$ x \$B\$ rectangle pieces possible. Requirements: The sizes of the \$M\$ x \$N\$ rectangle grid is always bigger than the sizes of the \$A\$ x \$B\$ rectangle pieces. In other words, \$min(M, N) ≥ ma...

 
12:27 AM
probably not that hard to whip up something basic with pygame that just draws a bunch of rectangles and circles for everything
 
I'm going to write a normal controller first, then maybe turn it into a graphical one :P
 
1:00 AM
Sandbox posts last active a week ago: Sell cinema tickets, ITEXTIN - Is This an EXTended Initialism?
 
1:14 AM
 
1:39 AM
user image
3
when you try to be funny naming classes
 
2:14 AM
0
Q: Two In One: Guess That Language

NobodyTwo In One: Guess That Language - Cops This robbers-and-cops challenge challenges the robber to create a script such that it runs in language A forwards and language B backwards. Language A and B must be distinct. By runs, a program must not ask for input and can only give text output to STDOUT a...

0
Q: Two In One: Guess That Language - Robbers

NobodyTwo In One: Guess That Language - Robbers This robbers-and-cops challenge challenges the robber to create a script such that it runs in language A forwards and language B backwards. Language A and B must be distinct. By runs, a program must not ask for input and can only give text output to STDOU...

 
> (except or the case of Perl 5 and Perl 6)
That's weirdly specific
Also, 2 months is a crazy long time for answers to wait before being safe
 
@cairdcoinheringaahing OK then
@cairdcoinheringaahing Because, they aren't actually the same language
 
@Emanyalpsid did you Sandbox this challenge?
 
@cairdcoinheringaahing Yes
0
A: Sandbox for Proposed Challenges

NobodyTwo In One: Guess That Language This robbers-and-cops challenge challenges the robber to create a script such that it runs in language A forwards and language B backwards. Language A and B must be distinct. By runs, a program must not ask for input and can only give text output to STDOUT and not ...

ANd awefully long ago I almost forgot it
Thanks + Thanks
Another upvote and I'll be 777 rep!
 
It's generally a good idea to ask for feedback before posting a zero score cops-and-robbers, especially if you haven't really gotten any feedback before. It's not too bad as in, but could've done with a bit of cleaning up before posting
I'll give it a quick edit
 
2:24 AM
ok
thanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksthanks
 
Actually hang on, no, I'm going to leave some comments instead
 
Why is this of course
could've been 5000 characters ;-)
 
@Emanyalpsid Perl 6 isn't a thing
And Raku is generally considered a completely separate language to Perl
 
@cairdcoinheringaahing Just to avoid confusion
As technically it IS called perl6 and raku
 
I'd suggest changing "An answer is safe if it is not cracked until two months after the question is posted." to "An answer is safe if it is not cracked until two months after it is posted.", and potentially lowering the time (7 days, or 2 weeks are normal for CnRs)
Also, if you're going to copy-paste rules/specification from other challenges, at least edit it to make sense for your challenge
 
2:33 AM
Wait what
I'm confused
This robbers-and-cops challenge challenges the robber to write ... The cop should provide the following information:... Maybe is it supposed to be cops
 
Yes, Robbers are supposed to find the hidden information
 
oh ok
fuck it
Congratualations to me for writing cop for robbers and robbers to cops
so um basically i copy pasted the flag part and i want to edit it to - Flags must be revealed to avoid obscure combinations.
@cairdcoinheringaahing you there?
 
why delete this
The shortest safe answer by byte count wins.
 
That doesn't make sense for Robbers
 
2:39 AM
oh ok
 
In a Cops and Robbers challenge, the Cops have a different winning criteria to the Robbers, as they're trying to do different things
 
yeah done
phew, cnr is a strange thing to me...
Thank you pretty sure you gave me that upvote
 
I didn't actually
Been too busy editing the challenges into shape :P
 
um
nvm
 
Don't worry, I tend to only upvote challenges I answer, and I have a couple of ideas for this I might try
 
2:45 AM
found this gem in the OpenAI docs
> When we give examples of politeness but remove the word polite things totally go off the rails in the first response. Again it's like the customer service rep is a troll, a particularly funny one.
 
I tend to only upvote challenges I answer? hmm
idk why but i always star stared messages
 
@Emanyalpsid I only upvote challenges I think are a net positive to the site, and I only answer challenges I think are a net positive to the site, so, very often, they go hand in hand
 
My Homework:

Original: I drove five giants into chains, chased All of the race from the earth.
Paraphrase:Beowulffoughtfivegiantsandimprisonedthemall.Eventuallyhekilledofftheentirerace.
Teacher, I think your space bar is broken...
 
3:00 AM
Hai guys
 
Am I that bad at JS?
 
Lol
 
It turns out I just used a ++ instead of -- in a for loop (for a shuffle)...kinda wack that it SIGILL'd
Bug maybe?
 
Yeah, I'd try to repro it if I were you
It's gotta be a compiler error, right?
(Also, you might have discovered a major security vulnerability)
 
Maybe, but it's unlikely
And trying to boil this down into an MCVE isn't going to be fun
But y'know what, I don't have anything else to do
I've already boiled it down to 6 lines yikes
 
3:15 AM
Maybe try running it in v8 if you can isolate the version your browser uses?
 
This is it:
var points = [...Array(2)].flatMap((_, y) => [...Array(2)].map((_, x) => [x, y]));

for (var i = points.length - 1; i > 0; i++) {
    [points[i], points[0]] = [points[0], points[i]];
}
It takes about two seconds to awsnap the tab for me
 
i>0, i++?
i have no context but that seems wrong :P
 
Yeah, it is
It's a minor bug that should just do an infinite loop
It awsnaps after over 100 million iterations
Let's see if it's a consistent number
It is
112813857
 
@RadvylfPrograms How did you get this?
 
Interesting, this number shows up elsewhere: github.com/xtuc/webassemblyjs/issues/718
@emanresuA console.loging every 1000 iterations, to get a rough estimate, then logging every i after that estimate until it died
 
3:21 AM
So, you just reached the JS heap limit. Oh well :P
 
Probably something boring like that, yeah. But SIGILL?
Weirder:
var points = [0, 1];

var x;

for (var i = points.length - 1; i > 0; i++) {
    x = points[i];

    points[i] = points[0];
    points[0] = x;
}
It doesn't have to do with using the [x, y] = [y, x], so OOM is less likely?
That changes the number of successful iterations though (increases by ~6000), so maybe it is just OOM and SIGILL (no idea what would be using more memory though)
 
@emanresuA thats stack based..
 
Oops
 
Hmm, it eats up 2 GB of memory instantly, so probably just...oh wait I'm an idiot swapping with incrementing is means that it'll grow the array to a larger and larger size
OOMing with a SIGILL is weird but probably intentional
 
@RadvylfPrograms It took me a while to realise that that didn't stand for Order Of Magnitude
 
3:27 AM
the sound a woc makes
 
3:48 AM
CMQ: Is there a way to pipe bytes that are invalid utf8 into a file?
 
@emanresuA which lang
and do you just want to store the bytes?
 
Nvm I figured out how to do it with xxd -r
 
4:34 AM
because that's what rational people do
 
Is this part of your computer science class?
 
it is
that's unedited btw - I think I must have started the quiz and just forgot to finish it, so it ran for as long as it could
mind you this is the same course that claims Windows Phone is a popular mobile OS
 
4:54 AM
Lol
 
5:07 AM
clearly this is a teacher who is knowledgeable about computers and should be teaching you computer science
 
well what do you expect from a course based on content from 2010?
 
it is definitely one of the top ten mobile os names that i have heard of
 
windowsphone.se is dead, but it's still getting as many spammers as before
 
i got the civic duty badge
in Wellscripted, 1 min ago, by PyGamer0
val collatz = (n: Integer) -> {
    var ar = [];
    while (n > 1) ar = ar.tack(n =
        n % 2 ?
        1 + 3 * n :
        n / 2
    );
    return ar;
}
 
5:23 AM
is that related to that quote?
askiing because im stupid
 
5:36 AM
@thejonymyster no
 
5:58 AM
CMC given a floating point number between 0 and 1, output the same number in binary
 
 
2 hours later…
7:40 AM
Woo got a B on Calculus BC!
 
what u got ur score back already ?
 
7:55 AM
@emanresuA BC?
 
8:15 AM
British Columbia?
 
8:54 AM
@AidenChow I'm doing a special course thing :P
Will probably sit the actual exam next May
 
Gosh I learn how to award a bounty the hard way.
 
@OldSandboxPosts hmm, maybe I should get my act together and actually post this
@graffe ES6: x=>x.toString(2)
 
9:16 AM
@Neil Wait what that works??? TIL
 
 
1 hour later…
10:54 AM
offline???
 
It seems so.
 
I just got randomly logged out as well
 
I'm currently working on a very detailed answer. I really hope I don't have to start over.
 
select all, copy into a separate document?
or was it just saved as a draft?
 
I'm not that worried that I would actually do anything.
 
 
1 hour later…
12:14 PM
@Neil does that really work?
Do we have a question about converting floats to binary? I can't find one
 
 
1 hour later…
1:37 PM
0
Q: Increasing permutation trees

Wheat WizardFor this challenge a "binary tree" is a rooted tree where each node has 0 children (leaf) or 2. The children of a node are unordered, meaning that while you might draw the tree with left and right children there isn't a distinction between them and mirroring the tree or a sub-tree does not prod...

 
 
1 hour later…
2:40 PM
0
A: Sandbox for Proposed Challenges

badatgolfSuper palindrome number Challenge A super palindrome number is a non-negative number that has only one digit repeating. For example, \$0\$, \$1\$, \$33\$, \$555\$, \$9999\$ are per palindrome numbers, while \$10\$, \$121\$, \$3332\$ is not. Your task is, given a number, output the smallest posit...

 
3:30 PM
CMC: Given 2 numbers find: x-(x+y)^2
example for 3&4: -46
ooh i have 3 bytes
flax, 3 bytes: -M+
 
4:12 PM
thats probably not even golfable in a lot of languages, like i bet in js the answer looks basically just like the expression
not that thats bad or anything i just find it interesting lol
awesome syntax idea
x=y assignment
x=y? comparison
 
bash: hello: command not found
 
 
1 hour later…
5:38 PM
@PyGamer0 what does M do?
 
square
 
5:49 PM
what
I think M squares an integer in flask
 
oh, SE chat seems to have done an oopsie
1 message moved to ­Trash
 
 
1 hour later…
6:54 PM
CMC: given a list, and two predicate functions f and g, find the index of the first element in the list which satisfies both f and g, but the index only counts for elements which satisfy at least one of f or g
e.g., if the list is 1, 2, ... 10, and f is "is even", and g is "is square", then the first element is 4, but the elements which satisfy at least one of f and g is [1, 2, 4, 6, 8, 9, 10], of which 4 is the 3rd element, so the output is 3. (or, if you use zero-indexing, the output is 2)
 
huh thats an interesting one
trying to think of a python solution, I fear its going to involve both dicts and sets
 
bonus challenge: generalise this to any number of functions
 
okay wait i think i might have a horrific python idea using del
oooor that doesnt work because del foo doesnt have a value
what am i doing modifying an iteratible while iterating over it doesnt work
 
7:12 PM
it works with lists
 
@pxeger Haskell + hgl: f%g=st<<g1((f*^*g)<cr)<eu<fl(l2(||)f g)
 
it doesn't work with dicts, unless you make a copy
 
Way to long there's should be a "find index of function".
 
my vanilla Haskell answer is also too long, because findIndex is in Data.List
 
7:15 PM
Slight improvement: f%g=st<<g1((f*^*g)<cr)<eu<fl(oR**f$g)
 
im still trying to figure out how to isolate the elements of the list that satisfy f or g in python while preserving their order
I cant use sets because i need order, which means dicts, which is irriating
 
Python, 90 bytes
try to beat that ha
 
@des54321 filter?
 
@WheatWizard python built-ins i did not know about until now: this :P
 
you could also use a list comprehension with an if clause
 
oh wow i'm too used to vyxal
 
o.0
 
@user Corrected, boringer, shorter version, 59 bytes: F=>_.filter(x=>F.exists(_(x)))indexWhere(x=>F.forall(_(x)))
 
@mathcat i sHouldN't HAVe SaiD ThAT
 
7:27 PM
works with any number of functions
 
Ah, ($i) is nice
The Scala version requires (x=>F.forall(_(x))) instead of something like (F forall _.$) :(
 
I wish Functor f => f (a -> b) -> a -> f b were a Haskell builtin
because I spent way too long messing with <*>
 
It's a builtin in hgl!
 
Try it online! I dont understand why this one doesnt work, or why it gives different errors in TIO and IDLE
its also fiendishly long
 
@des54321 you've got two things called f
 
7:31 PM
facepalm
hold on do i need the dict anymore
 
@pxeger Your Haskell confuses me.
 
I started with Data.List.elemIndex True, and just replaced that with a handwritten implementation (0%) without thinking too much
 
Your use of j was really strange though.
Like j was only ever 1 or 0 and once it became 1 it never went back to 0.
 
that's not true?
 
How so?
You call % in two places, one with 0 and the other with 1.
 
7:39 PM
j is the current index for the finding algorithm in (%)
oh I see
that's just a precedence error, which happened to work in the specific test case I wrote
 
Well j isn't needed at all you could do q(x:r)|x=0|1>0=1+q r.
 
it should have been j%(x:r)|x=j|1>0=(j+1)%r
 
Uh that's the same thing you wrote.
 
oops
I should go to bed ;)
 
Ah, well crucially your version wasn't wrong.
It always get's the correct result.
 
7:41 PM
hmm
 
I feel like I'm close to finding a short solution in python but I cant quite figure it
if there were a shorter way to write lambda x:f(x)or g(x) using filter would be much easier
 
use a list comprehension?
 
@WheatWizard I tried combining the last two cases there, but all I got was f%(x:r)|all($x)f=0|a<-0:[1|any($x)f]=last a+f%r, which is 47 bytes :(
 
instead of filter(...,lambda x:f(x)or g(x), write [x for x in...if f(x)or g(x)]
 
oooh that might actually work
 
7:44 PM
@user You can get 42 combining them, but I don't think you can beat 41. f%(x:r)|all($x)f=0|1>0=sum[1|any($x)f]+f%r
 
86 bytes, still painfully long though
 
and can be shorter as *.
 
i for i in a if f(x)or g(x) is shorter than filter((lambda x:f(x)or g(x)),a) but not by much
 
[*(...)] can just be [...]
 
And or can be shorter as +
 
7:48 PM
oh damn why do i still have that star in there
i for i in a if ... is still painfully unwieldy for having to use it twice
 
a very weird one: lambda a,f,g:sum(iter((f(i)*g(i)<1for i in a if f(i)+g(i)).__next__,0))
two-argument iter is such an oddly undergeneralised function for Python to have
 
What's the python record rn?
 
for this CMC?
 
Yeah.
 
7:58 PM
 
@WheatWizard that finds the first matching item, not its index
 
oh wow
 
I'm guessing you meant [o for... instead of [i for...
 
@pxeger Whoops replace i with o
 
you need extra parens around the f(i)or g(i) I think
 
8:00 PM
Oh yeah.
I sort of hate the walrus for python golfing.
 
60 (zero-indexed, unlike the previous ones)
 
I liked the elegance of not messing with state for lambdas. I felt like it brought a certain balance to things.
 
I enjoy Python golfing partly because of how janky it is
but without having quite so much jank to remember the mechanics of as JS has
 
Well let's be clear it was jank without the walrus. I mostly just feel that lambdas are too powerful with :=. And it's also a little bit annoying to have to know all the execution order info.
 
evaluation order is left to right with possibly as many as two exceptions
but, for example, Haskell golfing often produces relatively elegant code despite being golfed, but I like a good bit of raw jank in my golf
with Python, you get those "aha" moments of finding another oddly specific and utterly horrifying trick
 
8:05 PM
@pxeger This is very nice btw.
 
it ended up pretty much the same as my original Haskell answer
 
Haskell golf is really fun because you can just conjure infinities. Like if you need it you can just make the list of all square integers, no problem.
 
I like Haskell laziness so much that I tried to implement in Python, and fell afoul of confusing side effects
 
generators are basically haskell lists.
 
except that they have side effects, and there are not enough builtin functions that operate on them, and in order to be really useful you need some kind of caching to them so you don't have to keep reevaluating them
 
8:10 PM
Ah yeah.
I'm not sure how you are going to avoid side effects though.
 
switching to Haskell is the best option I've found ;)
 
i should really learn haskell, it seems like a fun language
 
Haskell is genuinely fun to learn
 
att
8:39 PM
I've been meaning to learn haskell for something like 3 years now :')
 
9:35 PM
@pxeger TIL HODOR
 
10:13 PM
CMQ: cahm-proh-mize or cahm-promise?
 
10:31 PM
definitely #1, but id say its more of COM-pruh-mize
 
^
@RadvylfPrograms could catstruct's operator encoding allow for digraphs?
 
Yes, the triad modifier with a nilad or monad
TNN: Trigraph nilad, TN: Digraph monad, TM: Digraph dyad, TD: Digraph triad (T, the triad modifier, is a dyad parsing-wise)
In theory there's also TTN, TTM, TTD, etc. for even longer n-graphs and higher adicity operators
If you wanted digraph nilads and didn't care about triads, you could have a digraph monad: XN is a digraph nilad, XM is a digraph monad, XD is a digraph dyad
 
11:27 PM
"Splenomegaly" is a term that describes what it means really well. "Big spleen. Oh no."
 
11:40 PM
I hate it when my splen is megaly ;-;
 

« first day (4144 days earlier)      last day (701 days later) »