« first day (3035 days earlier)      last day (1791 days later) » 

1:23 AM
@Mego hmmm, WebStorm is a strong JavaScript IDE if you go through lots of trial-and-error to configure it properly.
 
 
2 hours later…
3:51 AM
0
A: Sandbox for Proposed Challenges

HyperNeutrinoBalanced City Splitting graph-theory fastest-code Right now, there exist N cities that are connected by N - 1 roads in a tree. All is well, but unfortunately, the country's infrastructure is unable to support so many cities and as the population has gone down, it is both practical and necessary...

 
 
5 hours later…
8:30 AM
@primo yes! I am really not sure when the question was closed
I mean, is it actually unclear?
 
8:50 AM
s/when/why
 
CMC: As the nursery rhyme "Hot Cross Buns", goes, "If you have no daughters, give them to your sons." Given a list of children, output those who get hot cross buns. Examples: D -> D, DSD -> DD, SS -> SS
 
 
2 hours later…
10:41 AM
what shall I do with codegolf.stackexchange.com/questions/185842/… ? I mean I can't delete it and if I change it that's very annoying for the existing answer?
maybe I'll ask on meta
@someone hi.. could you give me a hand with my closed question please?
 
11:30 AM
 
@Neil Are trailing spaces OK?
 
only if it's consistent e.g. due to your default output format
 
@Neil The idea is always outputting 2 chars.
 
well, that wouldn't work for an input of e.g. SDSDSDS or DSSDSSD
 
@Neil Shouldn't both of those give DD?
 
11:43 AM
why wouldn't the third daughter get a hot cross bun?
 
I understood that you have 2 buns and prefer giving them to girls, but will give any remaining to boys.
 
@Anush i don't think it's unclear at all. the code-golf tag tends to degrade people's reading comprehension, though
 
@Neil Do you mean that if there are any girls, return the girls, otherwise return the boys?
 
ah, no, SD should become D for instance, as you do have daughters
right
 
11:48 AM
is there a list of APL functions by character somewhere?
 
@Neil You mean just a table of characters with links to meaning, or a list with adjacent descriptions (Jelly-docs style)?
 
either
 
so, you're intersecting the input with 'D' and 'S', and then taking the first item?
 
@Anush You have successfully reached me, even if that is not what you were trying to do. What can I do about your question? And what changes are you trying to do to it?
 
12:03 PM
@Neil Yes, and then finding the intersection of the input and that first element (which will default to space if the input is empty).
@someone someone should use the handle @all
 
12:14 PM
CMC: You have N hot cross buns, and give them to your daughters D before your sons S. Given a list of your children, return the list of children that get buns. Any leftover buns O should appear at the end. E.g. 2;SDDDD and 2;SDDS and 7;DSDDSDDDSSOO
 
CMC As the nursery rhyme "Hot Cross Buns", goes, "Two a penny, One a penny, Hot Cross Buns". You're generously buying buns for all of your children. Well, not that generously: if you have an even number of children, you're buying the value buns. If you only have an even number of sons or daughters, then they get the value buns, the others you have to splash out on the premium buns. Example: 3 daughters, 2 sons -> 3 premium buns, 2 value buns = 4 pennies
 
We need a tag…
@Neil Why don't you buy two value buns for the first two daughters and a premium one for the remaining daughter? Because they'll be envious?
@Neil Why not DDDSSS → 3×2 value buns by splitting the last bundle across genders?
 
a) yes b) yes, that comes under "even number of children"
 
@Neil Oh wow, then it is all of a sudden a much more complex issue, as the genders cannot simply be treated separately.
 
@Adám Out of context statement of the day?
 
12:24 PM
@AdmBorkBork Actually, I think I can beat that:
@Neil Add a pricing scheme and LGBT+ into the mix, and you've got a real challenge.
 
@Adám 78 cents on the dollar
 
@Adám I'll let you post that one to Main!
 
@Neil That seems like a lot. I have 19 in APL.
 
@Adám I have 40 in PowerShell -- $a,$b=$args;(($b|sort)+,'O'*$a)[0..--$a]
 
@AdmBorkBork Nice, that method saves me 1 byte (so 18) in regular APL and gets me down to 12 in Extended APL.
 
20 - 1 = 18, got it.
 
51 mins ago, by Adám
@Neil That seems like a lot. I have 19 in APL.
 
1:19 PM
Oh, is your 25 / 23 / 20 for Neil's CMC? I got confused.
Ah, I see the linkage now. Durr.
 
2:07 PM
@Adám strictly speaking that's what I'm did with my Retina answers too, particularly the first one is almost a direct translation of truncating a string to a given length, which is why it's far too long
 
@Neil My original started by adding enough Os then sorting in a custom order (D,S,O) followed by truncation.
 
3:06 PM
Please help me with this question

https://stackoverflow.com/questions/56250062/how-to-calculate-the-double-integration-in-r
 
You seem to be in a wrong chat; though I'm not sure anyone has ever used chats like this anyway.
 
@noob Are you trying to attract attention to the question, or do you want help with reformulating the question, or are you suggesting it as a code-golf challenge?
 
 
2 hours later…
4:58 PM
@Neil If I've understood the challenge correctly, then brain-flak, 102 bytes: ({<(({})<(()())>)({}(<>))<>{(({})){({}[()])<>}{}}{}<>([{}()()]{}){{}({<({}[()()])>()}{})(<()>)}{}>{}})
Actually no, I don't think I understand the challenge correctly
 
5:14 PM
Oh, can we take input as two numbers instead of a DS-string?
 
5:46 PM
Hi.Need your advice guys. When stating a challenge about randomly generated data, what are the things I need to consider and explain about randomness to make the challenge clear
 
@LuisfelipeDejesusMunoz That it is pseudo-random, languages that need it can have a seed, and distribution (usually linear).
 
I know I should state if it is uniformly distributed randomness but what else
 
@Dennis True, and my attempt at reconciling those three was thoroughly down-voted.
 
@LuisfelipeDejesusMunoz In general, or for your Thanos question?
 
@DJMcMayhem For the Thanos challenge.
Im not used to deal with random things
 
5:54 PM
Pretty much all of the stuff I wrote in my comment lol
Must it be uniform, must every output have a chance to occur, and what happens to odd length inputs are the big ones I think
 
@DJMcMayhem Yep. I just added a note with that comments, but anything else is required?
 
> Each character in your code must have the same chance of appearing
So by that metric alone, I could just pick a random number from 1-N and then delete n/2 characters in a row. Maybe with wrapping
I think "each possible set of half the characters should have an equal chance of occurring" is more clear than "Each character in your code must have the same chance of appearing" and "Your random generation must have a uniform distribution".
 
And "Running multiple times your code should output different results" just negatively affects languages like C that have to directly seed the PRNG
I think allowing C etc. to always not seed the PRNG is standard
@LuisfelipeDejesusMunoz Looks good to me. Just one last question: Is an answer like this acceptable?
0
A: Build a random number generator that passes the Diehard tests

ChristopherBrain-Flak, 344/(pending) <>((()()){})<> push the amount of iterations to do for the PRNG (((((((((((((((((((((((((((((((((((()()()){}()){})){}{}){()()()()({}[()])}{})){}{})){}{})()){}{})()){}{})){}{})){}{}){}())){}{})){}{})()){}{})()){}{})){}{})){}{})()){}{})()){}{}) push M (one of the values f...

Brain-flak is fully deterministic, so it takes a seed for the PRNG that is directly implemented in the program it self
Wait, wrong example
Hmm, I could have sworn there was a brain-flak answer that used a PRNG in it somewhere
 
6:31 PM
@DJMcMayhem multiset
 
Fair
 
In other words, if your source code is "AAB", the set "AB" should be twice as likely as "AA"
Hmm...we talk about source code ideally being a "black box", but can you define random output without describing the source code?
The only way to know if the answer is correct is via source code inspection, as testing doesn't work
 
Wait, what? When do we talk about source code being a black box?
 
oh, just in general on the site. Like, challenges should be specified in terms of input/output. For example, we don't like challenges saying "Don't use math libraries" or "no builtins" for exactly this reason.
"Unobservable requirement" is the term :)
 
@NathanMerrill The only way to know the score of a code-golf challenge is via source code inspection?
Or whether a quine is correct
 
6:40 PM
oh, right, you can treat the source code as an input as well, but the actual "code" is a black box?
I feel like we've used that term before
let me metasearch
 
I think the reason we don't like "don't use math libraries" or "no builtins" is more because it depends on knowledge of the language in question/arbitrary terms to judge the validity. "That's not a math library, it's a standard library", "That's a module/header/include, not a library", "That's not a built-in, it's two" etc.
 
I agree, but the same is true for randomness, especially if it is supposed to be uniform
You need to know how the random libraries operate, and how the possibilities are being distributed. That non-observable
 
But the distribution itself is observable.
 
You can guess if the distribution is correct. You don't actually know.
actually...now that I think about it, that's true for every program.
I could have a program that rolls a dice, and with 1/1,000,000,000 chance, it prints the wrong thing.
Hmmm...so yeah, every program is non-observable, which basically puts the distribution challenges on the same grounds.
 
Or an OEIS sequence program that fails for absurdly high test cases (because of algorithm, not overflow)
@NathanMerrill It might be worth adding an addendum to that post that this doesn't violate , , or
 
6:47 PM
IMO, people here (PPCG) tend to get really hung up on the word "random." Like, we don't get as hung up around the word "sort" even though "in ascending order" is usually implied rather than specified.
 
random is way more interesting than sorting :)
 
Because you usually need to inspect the source code for those
 
This is especially true for new challenge writers. They'll put in something like "Randomly pick from these widgets." and get downvoted and ripped apart in comments to oblivion.
 
@DJMcMayhem yeah, the terminology is tough to get right here, though.
 
@AdmBorkBork Heh, "My assumption is that you want it lazy sorted which is just you leave the data ordered as it is"
 
6:50 PM
oooh, yeah even "sort ascending" isn't sufficient, because you could be sorting ascending where the key is the index
 
@NathanMerrill I like the way you worded it before: you can treat the source code as an input as well, but the actual "code" is a black box. "Source code" is just an arbitrary string that does some things. You can analyze metrics of a string, (does it contain this character? Is it a certain length? Does it match the output if it's a quine?) so this is fine. But the "program" is kind of an abstract thing that has functions and libraries and algorithms. Those are unobservable
Then again, most quines violate that meta post anyway. A "valid quine" cannot inspect it's own source code, but that's not something you can test of a black box
 
Yeah, it's just hard to define what the "code" or "program" is. Simply because..it's unobservable :)
 
Well, the source code is easy to define. The string that you are running.
Or submitting as your answer
 
Ceci n'est pas une pipe.
 
is there a quine challenge that takes the source code as input, and detects which character is missing?
Or, the inverse, the radiation-hardened quine that takes the original source code and detects which character is missing
I don't think the latter is possible
 
6:56 PM
There's one that outputs which character was removed from its own source code
But I don't think there's one that takes the original and diffs them
 
@Veskah really? That's effectively the second one I said wasn't possble.
 
7:55 PM
@Adám for the second cmc, sure, but for the first one, just a ds string please
 
@Neil APL (Dyalog), 14: +/⊢÷2*2∘|⍲2|+/
 
8:44 PM
0
Q: Can we still ban built-ins for \$\pi\$?

AnushI recently posed a challenge about computing a function of \$\pi\$. It was closed for being unclear and received a number of criticisms. One of the main ones I think was that banning built-ins for \$\pi\$ is not clear as there are always other equivalent built-ins one hasn't thought of. Lookin...

 
hm... very inefficient page...
 
ngn
10:24 PM
@Adám +/⊢÷2∨+/×⊢ (sorry for multiple pings)
 
11:17 PM
0
Q: Random Cake Bake

asmgxWarning : This is a bit lengthy I have decided to build my own random function I call it "Random Cake" Ingredients 1 x DateTime function 1 x Sin : Radiant 1 x π Here is the recipe Recipe Get Current Date and Time ..... (1) "23/05/2019 17:39:42.631" Break it into milliseconds,...

 

« first day (3035 days earlier)      last day (1791 days later) »