« first day (1912 days earlier)      last day (2934 days later) » 

7:00 PM
Seriously has no abilities to generate random numbers.
I like falsy values. seriously.tryitonline.net/…
 
@wizzwizz4 J is uniform
Oh wait you were joking. Oops
 
@wizzwizz4 That URL sounds like a clickbaity advertisement.
 
When did this become a meme?
 
7:04 PM
Apparently, it isn't.
 
-1 for implying something that's been going on for a few minutes is a meme
 
pl seems like it would be a better fit.
 
10
0
1
148.413159103
2
[2]
1
3
[]
125
2
is nowhere near the real answer.
 
@Sp3000 It's been going on for a few months at least.
 
I thought you mean putting random things in the interpreter then link it :/
Also @CᴏɴᴏʀO'Bʀɪᴇɴ have fun polyglotting, I think I'm too tired to continue :/
 
Say something false! outputs 1 twice, but Say something true! outputs [0] and then 0.0!
 
@wizzwizz4 Seriously, Seriously?
 
7:13 PM
At least Hello, World! works!
 
@wizzwizz4 I don't think your link linked properly
 
Say something falsy! outputs [] and then 1.
 
I did it again people!
 
Say something truthy! is the same as Say something true!.
 
I posted a challenge that's probably way too hard for codegolf: codegolf.stackexchange.com/questions/78396/…
sometimes I wish I could post code challenges without a winning criterion, where everyone that manages to complete it is automatically a winner
 
7:17 PM
 
At least it's not Tetris in GoL :P
 
[]
2
1
[0.0, 1.0]
@wizzwizz4 hrm
 
@orlp that would attract too many users saying "Solve this bug in my code to win!"
 
I wish Google had left some documentation on this. It can't just be the plain old Perl interpreter and I have no idea how to interface with it
 
@Downgoat would it?
right now you could post a code-golf where the goal is to solve the bug with the minimum amount of characters changed :P
 
7:18 PM
Maybe I should try loading it and sending it a message?
 
@orlp would this not be an rng with period 10^8?
 
@Maltysen not necessarily
consider the rng that cycles through 1, 2, 2, 4, 1, 2, 2, 4, 1, 2, 2, 4, ....
it has period 4
but it's not a permutation, as 2 occurs twice
 
I see
 
1
Q: Shuffling too many integers in too little memory

orlpToday your goal is to shuffle the first 1018 integers ({0, 1, ..., 1018-1}). A shuffle function takes a seed, and returns one of the permutations of the array, uniformly chosen from the possible permutations, based on the seed. E.g., if were to shuffle the first 5 integers, these might be 5 poss...

 
> 1018 integers
 
7:22 PM
@orlp why 1018, and not 1019?
 
@Downgoat it's 10^18
and I dno
 
just chose something
 
@orlp you didn't clarify this but we aren't allowed to actually generate P right?
 
@NewMainPosts hmm interesting
 
7:23 PM
@Maltysen I mean, I feel it's pretty strongly implied from the title and "However, 10^18 numbers is way too big to hold in memory, and shuffling all those numbers would take way too long."
 
@orlp but then, "As 1018 is way too big to test, your answer must include some explanation as to why your algorithm works. It is preferred if you also include a non-golfed implementation with a tweakable limit (e.g. 100 instead of 1018) that can be examined & tested."
 
@Maltysen yes?
 
kinda gives the opposite impression, cuz generating P would work for limit of 100
 
10^18 is way too big to test for things like duplicates
 
@orlp oh
 
7:25 PM
@Downgoat actually I remember why I chose 10^18
>>> 10**18 < 2**63
True
>>> 10**19 < 2**63
False
 
@orlp oh, so the program must work of 10^18, but just wont't be tested?
 
@Maltysen correct
 
got it
 
@orlp must it actually work or only theoretically work?
 
@Downgoat actually work
 
7:26 PM
ok
 
@orlp also, you never said if all P's must be generated by some p
 
@Maltysen I did
P is a uniformly random chosen permutation
 
Challenge: find a language in which 2g3 outputs 2.
 
the limit of some uniform choice not being chosen out of a finite set as the number of choices goes to infinity is zero
 
> pseudo-random permutation
 
7:28 PM
@Maltysen fair enough
I guess if you reach the limits of your RNG, and your RNG isn't loop-holey, then you're good
 
k, then
this is hard
 
it is :)
I have a working implementation based off a paper
and the algorithm is actually quite elegant and simple
@Maltysen the program that solves this is actually useful though
let's say you make an URL shortener
and you want to generate guaranteed unique 6-letter strings, in an unpredictable order
 
@orlp is the paper called "Random Sampling with a Reservoir"?
 
@Maltysen nope
reservoir sampling is not the solution to this problem
@Maltysen A very important ingredient that the solution I made uses is a PRF, a pseudo-random oracle. Given some inputs it always returns the same, random, answer - think like a hash.
 
@QPaysTaxes I think he means he has a sequential, non-random, history
 
7:39 PM
@QPaysTaxes oh, you have a counter
but the counter isn't unpredictable
 
@orlp I was thinking of hashing [p, n]%10^18 but it might have duplicates
 
@Maltysen it will have duplicates with overwhelming probability :)
1000000_36?
well, you guys keep talking about odds
the permutation is a hard requirement
correct
it must be a true permutation
 
@orlp can this be done in O(1) or merely sublinear?
 
I had a bit too much faith in prolog's CLP(FD)
a(N,P):-Z#=10^18-1,N in 0..Z,labeling([random_value(P)],[N]). returns ERROR: Out of global stack
:(
 
@orlp I actually had that problem about unique ids. I ended up using the time, base-converting it and using only the least few significant digits. I wish I knew about this back then :P
 
7:48 PM
@Maltysen O(log n)
 
@orlp sorry didn't specify, this is in memory right?
 
@Maltysen both memory and time
 
0
A: Sandbox for Proposed Challenges

DenkerAffeReplace magic numbers Tags: code-gold string Introduction Magic numbers are a common problem in software development, since they tend to make software hard to maintain. Best practise is to use named constants instead of raw numbers in the source code. In this challenge you have to clean up som...

 
@orlp Is the output supposed to be deterministc or different every time?
 
@feersum deterministic
 
7:55 PM
Why can't we throw away the p parameter?
 
@feersum because then you can only generate one permutation
the p is your source of pseudo randomness
 
What's wrong with that?
 
@feersum what good is a shuffle function that always shuffles in the exact same way?
 
I don't know; it's your question.
Given a list of permutations, can you give me an algorithm to tell me whether it's "random"?
 
Which privilege allows users to close- and deletevote questions?
 
7:57 PM
@feersum no, (pseudo-) randomness is always a property of the process that generates output, and not an inherent property of the output itself
 
@LegionMammal978 I think it's trusted user
 
@Downgoat K, just checking
 
access to mod tools allows you to delete questions, trusted user allows you to delete answers
 
@orlp So I could have two algorithms that performed exactly the same computation, and one of them is pseurorandom and the other isn't?
 
@feersum I don't understand your question
 
7:59 PM
The point is that "random" in your question lacks a definition.
 
are you trying to debate the meaning of pseudorandomness?
 
> code-gold
 
@zyabin101 All of my code is gold
 
@feersum I accidently used the word "random" once, all instances of "random" should be pseudo-random in my challenge
 
Ok.
The point is that "pseudorandom" in your question lacks a definition.
 
8:03 PM
@feersum it's standard terminology, the only thing I didn't specify, on purpose, is the security bound
pseudo-random means that if you do not know the seed, the function is hard to predict
 
Is poping faster than shifting?
 
@orlp Well what's your objective criterion? How do you decide if an answer is valid?
 
@feersum through explanation and inspection of the algorithm
 
Well maybe this should be a popularity-contest then...
 
@feersum why?
 
8:06 PM
@Downgoat In response to your first revision, they're synonyms.
 
oh-so-many answers get posted on PPCG daily that are impossible to run for even the smallest inputs, let alone verify
 
No objective validity criterion
 
that's never a problem, because we look at whether the algorithm works
how is this any different?
 
@orlp .|_:
 
In those cases, whether the algorithm works is not subjective.
 
8:07 PM
@orlp I don't understand why my approach wouldn't fulfil the uniformity criterion, but with the memory/time restrictions it doesn't matter now.
 
You decide whether the outputs, were it to run to completion, exactly match the expected values
 
@MartinBüttner it would fulfill the uniformity, but not the pseudo-random part
 
What is your criterion for sufficient randomness then?
 
@feersum and here it's decided whether the outputs, if it were evaluated for every n in {0, ..., 10^18-1} are a pseudo-random permutation
@MartinBüttner pseudo-random, for some acceptable security level (e.g. determined by your language's RNG or hash function)
 
Whatever... I'm VTC as unclear for now.
 
8:10 PM
pseudorandom permutation is standard terminology
 
@Downgoat It depends on the implementation. In Python, .pop() is O(1) while .pop(0) is O(n), but with collections.deque, you get .popleft() which is also O(1).
 
ok, I'm using JavaScript so everything is probably O(n^n)
 
@Dennis Why did I read poopleft()?
 
Or just poop(). That would be as funny.
 
8:13 PM
ohhh, I think Dennis read it as:
> Is pooping faster than shiting?
 
@Downgoat JS uses plain old arrays I think so pop from the tail is O(1) and pop from the head is O(n)
 
What complexity is reversing?
 
With an array? O(n)
 
var iliekavocad = this.shift();
console.log(iliekavocad);
 
@CᴏɴᴏʀO'Bʀɪᴇɴ same for linked list
 
8:16 PM
I use the best variable names
 
k
Do we have a chess KotH?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ yeah
 
22
Q: Chess Tournament

ManuThis is a chess-KOTH with simplified rules (because chess itself is already complicated, playing it via a simple program doesn't make it easier). At the moment it is limited to java (version 8), but creating a wrapper-class isn't that difficult (in case someone wants to do this). Chessboard The...

 
I hate persons who call / text to ask if I got their e-mail...
 
8:18 PM
Do you think a minichess KotH would be interesting?
 
@mınxomaτ Depends on the time frame. If I hadn't done that I wouldn't have a PhD position right now.
 
whatever
think I'll just delete my challenge and post the paper/a quick explanation here for those interested
 
\o/ \o/ \o/ \o/ \o/ \o/ \o/ I got Cheddar's evaluation to work!!!!!
 
is anyone except @Maltysen interested in the solution?
 
@Downgoat Yay!
 
8:21 PM
(assuming Maltysen is)
 
@orlp I'm interested in seeing your approach
 
@orlp I'm always interested in stuff.
 
@orlp i am indeed
 
let me make a separate room
 
Hello @wizzwizz4!
 
8:30 PM
@Downgoat Hello.
Good to see you're Downgoat again!
(Note to self: that happened yesterday)
@ping
 
Is anyone familiar with Parlett's notation for fairy chess?
 
I have a customisable program.
 
0
Q: Unspoken challenge rules

Dr Green Eggs and Ham DJThe barrier for entry for new users to write challenges is too high. I think there's a problem with how we are closing challenges. There are only two reasons we can close a challenge as "off-topic": This site is for programming contests and challenges. General programming questions are off-topi...

 
Add more rps to add more arrays.
Add more ` `s to make them longer.
 
8:48 PM
To which category do "orthogonality" and "diagonally" belong?
 
3
Q: Permutations with Indistinguishable Items

qwrGiven a list of integers, output the number of permutations of the integers, with indistinguishable permutations counted once. If there are n integers, and each group of indistinguishable numbers has length n_i, this is n! / (n_1! * n_2! * ...) Rules Input will be some form of list as argument...

 
@CᴏɴᴏʀO'Bʀɪᴇɴ words
 
>_< that helps a lot
 
@CᴏɴᴏʀO'Bʀɪᴇɴ adjectives
angles?
 
I'm talking about chess move types
 
8:56 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ chess move types
 
I'm looking for a word to use in code
Right now I have "type"
:P
 
moveType
 
That'll work I guess
 
Then why didn't you just ask the actual question? I.e. "what should I call this ..."
 
sounds like the x y problem!
 
8:58 PM
@mınxomaτ idk
@Maltysen the what?
@ಠ_ಠ
 
@CᴏɴᴏʀO'Bʀɪᴇɴ perlmonks.org/?node_id=542341
 
@Maltysen SO is currently developing the XYX problem. This happens when answers try so hard to find Y that they ignore the possibility that the question is really about X.
 
@Maltysen Ohhhh
@Maltysen Enlightening.
 
We should finally start making a better description
 
Agreed
I encourage you to make a meta post and then we can compile suggested text
 
9:10 PM
Then we need to collect the corresponding meta discussins first
 
@mınxomaτ oh man, this, so hard when I ask advanced questions on SO
 
@AlexA. A draft feature would be nice=)
 
so, now that the random permutation question is finished
I want to make a challenge out of this:
26
Q: Is it possible to invert an array with constant extra space?

orlpLet's say I have an array A with n unique elements on the range [0, n). In other words, I have a permutation of the integers [0, n). Is possible to transform A into B using O(1) extra space (AKA in-place) such that B[A[i]] = i? For example: A B [3, 1, 0, 2, 4] -> [2, 1,...

 
@AlexA. So would you just make a meta post asking for proposals?
 
@flawr Well, you could use stackedit.io
 
9:14 PM
When did Software Recommendations get their design? When did they even graduate? I thought they were still in beta
 
@orlp I was thinking about making a meta post about the issue, but it would probably get downvoted to a completely new circle of Dante's Inferno.
 
Anyways their new design looks interesting
 
@flawr Yeah, that's what I was thinking. Say something like but more eloquent than "The popcon description sucks here's some related posts how should we make it better pls suggest text"
 
@orlp restricted complexity questions aren't my favorite
 
Software Recommendations <-- link so we can see design
Yeah, it's alright
 
9:22 PM
It's a little plain but I like that.
 
I love Puzzling's suggested design.
 
78
Q: Puzzling Design Pitch - Congratulations, you're graduating!

StéphaneI'm Stéphane, a senior product designer at Stack Exchange. First, I wanted to announce that this site is now starting the process of moving out of beta to become a fully-graduated site! Congratulations! Graduation and Your Site Design Graduation comes with a few perks, which should come out...

 
Oh yeah, I forgot about that
 
9:25 PM
Serious ಠ_ಠ that they're getting their design before us and they even still have the beta label
 
Yeah XD
My only complaint about their design would be that the favicon looks a lot like workplace.SE's
 
@AlexA. if they're graduating, why does it still say Puzzling beta?
 
damn, that's nice
@Downgoat cuz SE hates us
 
@Maltysen ??
 
pretty sure we will end up getting a golf stick or golf ball in the design -_-
 
9:27 PM
I swear if that happens I'm marching to SE HQ and demanding a different design, armed with golf clubs.
 
@Downgoat That part of the graduation process hasn't happened yet. "I wanted to announce that this site is now starting the process of moving out of beta" I guess means that the process has started but not much has happened yet.
 
@AlexA. oh
 
I guess the design devs were more inspired for a puzzling theme than that off a code-golfing theme
 
@Optimizer SE does seem to actually read site design idea pages. And we've specifically asked for a non-golf balled based design
 
time will tell
 
9:29 PM
A design for code-golf is difficult to think of
 
1 graduation site design later...
 
@Optimizer Please. Time is notorious for keeping secrets.
It'll never tell.
 
It'll happen, 6 to 8 weeks from now
 
(weak joke)
 
(weaker pun in response :)
 
9:31 PM
(week joke)
ba dum tss
 
crickets
 
grasshoppers
 
bleets
 
9:34 PM
flails arms about
 
@mınxomaτ ducks haev arms?
 
My humor is clearly too highbrow for you types.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ do you know why export CheddarString new Map(); would throw an error?
 
Your humours are clearly too high for our types
 
9:36 PM
@Downgoat Arms are the new wings.
user image
3
 
oh wait, nvm
 
@Downgoat Idk about JS's export command
 
@mınxomaτ fake, this is a bird not a duck
 
@AlexA. I just scrapped my second draft for making this meta post. Can you maybe give it a try? I'm already struggling with the right wording...
 
9:38 PM
@mınxomaτ where do you find these
 
@flawr I don't think I'll have much time today to devote to it
 
@AlexA. Neither do I. Only 21 minutes of today left anyway.
 
Am I the only person here with a normal sleep pattern
 
9:41 PM
Burning the midnight oil is so overrated. Causes carbon emissions too.
 
You're getting hard to outpun
 
@Maltysen ok fixed the scoreboard thing. I also worked out the alien movement equations Just y =mx+b but with the weird default coordinate system that took some time. Plus aliens are coming in from the right -> left so it was weird.
 
when printing should I only print it if it can be cast to string or should I just print it's internal representation?
or should print call a repr function?
 
@mınxomaτ thats messed up =/
 
@AshwinGupta I know. Why does it need a paddle if it could just use it's feet.
 
9:47 PM
@mınxomaτ what's even more messed up is that it's using a paddle and it's not even in a boat
 
@Downgoat How Python does it:
>>> class foo:
	def __str__(self): return "Hello!"


>>> foo()
<__main__.foo object at 0x0332A8D0>
>>> print(foo())
Hello!
>>> class bar:
	def __repr__(self): return "World!"


>>> bar()
World!
>>> print(bar())
World!
 
@El'endiaStarman whaaat. Is it printing __repr__ or __str__?
 
>>> class baz:
	def __str__(self): return "Hello"
	def __repr__(self): return " world!"


>>> baz()
 world!
>>> print(baz())
Hello
Forgot to add the both case.
 
oh ok
should I syntax highlight the REPL?
 
So, it looks like Python will try to do print(str(x)), and then print(repr(x)), then just its class, name, and memory location.
IDLE has syntax highlighting.
 
9:51 PM
okay
 
I just enjoyed a delicious Fuerte avocado.
 
@El'endiaStarman I believe that the way it works is that repr is by default the class, name, and memory location and __str__ default is just calling __repr__
 
@Downgoat I'd say that should be relatively low priority though.
 
Insert avocad joke here
 
@Maltysen Yeah, that's how it is.
 
9:52 PM
@quartata enjoy : juic :: avocado : avocad
ba dum tiss
(that was horrible)
> new CheddarEval(new CheddarShuntingYard().exec(new CheddarExpression("2+2", 0).exec())).exec()
< CheddarNumber { value: 4 }
\o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/
 

« first day (1912 days earlier)      last day (2934 days later) »