« first day (2097 days earlier)      last day (2753 days later) » 

5:00 PM
@NathanMerrill Thanks. Just to be clear, do all entries actually need to print the output (i.e. functions that return the text are not allowed)?
 
Functions can print (most shouldn't, but...)
 
functions are allowed
either a full program that prints the output, or a function that returns a string of the output
 
Someone's posting on all the function entries saying they're invalid; could you edit the question to make it more clear that functions returning the string are allowed? Right now it does sound like only programs are allowed
 
thanks. updated
 
Thanks :-)
 
5:17 PM
can I just say that I think its pretty impressive that Github makes money
the majority of usage comes from the terminal, which makes it no money from ads, and nearly everybody I know uses their free account
 
They're probably supported by corporates, but yes, that is quite impressive.
 
I have an algorithm type question/puzzle if anyone is feeling brainy
I want to a random walk on non-decreasing lists is integers of length p. Each integer can be 1 to p^2.
 
...is that it?
 
5:32 PM
well yes :)
here is the problem
if I just choose a random index and try to change the value
it's likely it can't be changed much
as the list has to remain non decreasing
 
why are you trying to change the value?
 
because I want to a random walk. So I have one list, say [1,5,7] and I need to go to another one, say [1,6,7]
 
oh, you're walking from one list to another list?
 
I would like the stationary distribution to be uniform.. that is all sorted lists should be equally likely in the end
@NathanMerrill exactly
 
0
A: Sandbox for Proposed Challenges

ETHproductionsWrite a (hic) quine Your challenge is to write a hiccup-quine. A hiccup-quine is a program or function which, when run, follows these steps: Generate a random integer n between 1 and 10, inclusive. Wait n seconds. Print the next n chars of your program's source code. If there is code left to p...

 
5:35 PM
@Lembik is [1,1,4] a valid list?
 
@NathanMerrill yes
I could just throw away the list each time, sample a random one and sort it
but that's terrible :)
does it make sense?
 
-1
Q: What is the smallest set of characters to make Python turing complete

asmeurerWhat is the smallest number of characters you can restrict Python to and still have it be Turing complete? For example, with Javascript, you can restrict it to six characters. Note that "Turing complete" does not mean "all of Python". It just means that it is able to simulate any computation. ...

-2
Q: Perform several mathematic operations

Mega ManThe task: You have to input 2 numbers and output the results of several operations done with them. Details: Input 2 numbers, x and y. Output x+y, x*y, x^y, x-y, y-x, x/y and y/x Standard loopholes apply, the shortest code wins. Good luck!

 
@Lembik wait, I don't think "walk" is the term
walk usually means you are going in a direction
aka, after [1,1,4], you'd either go to [1,1,3] or [1,1,5]
you just want a random sorted list with values of 1 to n^2
 
@NathanMerrill well... it is walk but I haven't defined a step .... which is really my question
 
its still unclear, sorry
 
5:40 PM
@NathanMerrill No that's not it. I want a cheap random change to a long list so that eventually the probability of being at any list is equal
imagine I didn't care about the sortedness. Then you could just pick a random index i and a random value x from 1...p^2 and do L[i] = x, where L is the list
that would work fine
is it clear now?
 
ok, so a step is changing exactly one value of a list
 
yes
but is it even possible?
tricky eh? :)
 
I'm no math major, but I'd guess the dumb algorithm of "select a random index, set a random value between its neighbors" will work
 
interesting.. so [1,2,3,9]
what happens when you select index 2 (counting from 1)
it's an interesting idea
I suppose you just don't move then?
 
C++ has some... unfortunate naming choices. Googling "std::list" brings up some rather unpleasant results.
 
5:53 PM
@DJMcMayhem lol
 
@DJMcMayhem ah yes :)
I like the the url is beforeplay.org !
and the one below is cpppreference :)
 
And "std::map" brings up Google maps for planned parenthood...
 
negative :)
 
@Lembik Haha yes clearly there are two very different types of results people are looking for
 
:)
 
5:55 PM
@NathanMerrill You get a problem with stuff like [1,2,3,4], where only the largest value can change. So really, you should select an index among those that can change.
 
@El'endiaStarman Yes. The problem is I have no feeling for what the stationary distribution is for this type of move
 
@Lembik Monte-carlo it?
 
I am trying to make a primality checker in SHENZHEN I/O
 
I think you can still demonstrate that the distribution is not uniform. [1,2,3] can only be reached from a small set of lists whereas [2,3,4] can be reached from a lot more lists.
 
@El'endiaStarman aha
so what to do?!
 
6:14 PM
Adjacency matrix for 2-element lists, using Nathan's transition rule:
   11 12 13 14 22 23 24 33 34 44
11  0  1  1  1  0  0  0  0  0  0
12  1  0  1  1  1  0  0  0  0  0
13  1  1  0  1  0  1  0  1  0  0
14  1  1  1  0  0  0  1  0  1  1
22  0  1  0  0  0  1  1  0  0  0
23  0  0  1  0  1  0  1  1  0  0
24  0  0  0  1  1  1  0  0  1  0
33  0  0  1  0  0  1  0  0  1  0
34  0  0  0  1  0  0  1  1  0  1
44  0  0  0  1  0  0  0  0  1  0
Now I'm gonna plug this into WolframAlpha and raise it to some high power.
 
@NewMainPosts Just got to reading this, and one of the examples made me think of this joke --
 
Aw c'mon, too big to fit into WolframAlpha's character box. >.<
 
> A man owned a store called "This and That" and hired another man to make a sign for it. When it was finished, the owner inspected the work and discovered the spacing was wrong, so he said "The space between This and and and and and That is different. Please fix it."
 
Alrighty then, Numpy it is!
 
pl makes the trick or treat challenge too easy. I have about a dozen pl + X combinations I could post.
This is all your fault, @quartata. :P
 
6:26 PM
What is pl?
 
@TimmyD It would have been more clear if you had put quotation marks before This and between This and and, and and and, and and and, and and and, and and and, and and That, and after That.
 
How did that +2 get in? Shouldn't I have been rep capped?
2
 
Some rep coming from a bounty?
 
@Riley Precisely.
 
@TuxCopter No it says its from an upvote, also it's only 2 rep
 
6:35 PM
 
@El'endiaStarman it is interesting :)
 
@1000000000 congrats on mortarboard!
 
0
Q: The Last Monday

TimmyDMonday, October 31st, is Halloween. And it got me thinking -- I wonder what other months have the last day of the month also be a Monday? Input A positive integer in any convenient format representing a year, 10000 > y > 0. The input can be padded with zeros (e.g., 0025 for year 25) if require...

 
2
A: Trick or Treat polyglot

Dennis2sable / pl, 8 bytes 0000000: 74 72 65 61 74 93 d0 cb treat... Both programs have been tested locally with the same 8 byte file, so this is a proper polyglot. 2sable: trick This is the program in code page 1252. treat“ÐË Try it online! pl: treat This is the prog...

 
on the subject of strange rep
 
6:41 PM
what does "detab 100;" mean in k&r? what does it mean in c99?
 
everytime I edit a tag wiki I get 4 rep instead of 2
why?
 
@DJMcMayhem Thanks, that answer is now responsible for more than half of my non-assocation-bonus rep
 
@1000000000 I think you can get it if you get downvoted but then reach cap but then get un-downvoted, or something like that. I remember reading something similar on Mother Meta.
 
@Dennis Sorrrryyy :/
 
@WheatWizard It's because it's two edits. The wiki and the description
I also vote to approve them separately
 
6:45 PM
ok thanks
 
@WheatWizard Is that because you're editing both the tag description and the tag wiki?
Aw, DJ ninja'd me while my screen was scrolled up.
 
@TonHospel Your code is very impressive. i = 31 236749312694943744 (took 10.0781638622 seconds)
i = 32 253599876468703232 (took 10.0682039261 seconds)
i = 33 -2720941644516950016 (took 44.5673849583 seconds)
that's a clever trick
 
@TimmyD Hmmm... I don't think I've been downvoted though
 
@TonHospel How hard would it be to make it work with floating point inputs?
 
6:46 PM
@1000000000 I checked and you haven't
 
@1000000000 It wouldn't show on your rep list if it was un-downvoted.
Also, congrats on Mortarboard. You're well on your way to your username equaling your rep.
 
@TimmyD So you're saying that if you get downvoted then upvoted then undownvoted you can exceed the rep cap?
Or am I misunderstanding
 
@DJMcMayhem A terrible, horribly written golfing language I made many moons ago
 
@1000000000 If you don't get an answer here I would recommend moving this to the meta. I would like to know the answer
 
It's an interesting theory. Let's test it. One of you should downvote me, then 5 different people upvote, then the first person un downvotes so we can test it.
3
 
6:49 PM
One of the few instances I'm ashamed of my Perl code. I'm not sure what was going on when I wrote it but it shouldn't work
 
(Kidding)
 
@DJMcMayhem We need a larger sample size. I humbly volunteer.
4
 
@1000000000 Yeah, something like that.
 
@1000000000 In my experience, undownvotes actually cost rep.
 
@WheatWizard As tribute?
I can imagine my experiment going horribly wrong and getting 6 downvotes instead
6
 
6:56 PM
@quartata j/k The Retina + pl combo is exceptionally beautiful.
 
Oh dear
 
The fact that pl seems to ignore all code after the first linefeed is pretty handy here. Is that intentional?
 
@DJMcMayhem We are delving into arcane knowledge no stack exchanger was meant to know
 
@Dennis Probably? I do given (<>) instead of while (<>) so obviously I had something in mind
I think I wanted something similar to what Jelly does but hadn't implemented it yet
 
4
Q: Help me cheat at Cheat

HovercouchCheat is a card game where you're trying to get rid of your hand. A turn looks something roughly like this: Determine what card rank you have to play that turn. In most variants this is one rank higher than the previous turn. Play 1-4 cards, face down. These don't have to match the valid rank. ...

 
7:15 PM
@1000000000 Take a look at this: eightyeightgames.com/100000000-2
 
@DmitryKudriavtsev Two 0s short unfortunately
 
@1000000000 Still cool game
 
@Lembik n=34 should now be as fast as n=33
@lembik: Making it work for floating point would in fact simplify the code. It now does silly things to get fast bigint results..
For both Dennis and me it turned into a fast multiplication and bigint accumulate challenge. The permanent part is uninteresting :-)
I don't understand why n=34 is suddenly slow for you
Notice that for big matrices the result can be very imprecise since during the calculations it accumulates very big numbers which mostly cancel
n=33 using doubles is wrong from the 6th digit on
(for the all 1 matrix)
 
7:32 PM
@Lembik If I'm not mistaken, you could use strictly increasing lists instead of non-decreasing ones (since there's a bijection between the sets), and make one step by deleting a random list element, choosing a uniformly random new element that's different from the remaining ones, and insert it at the right position. That's O(p) instead of O(p log p), and I think the resulting graph is regular, so the invariant distribution is uniform.
 
@TuxCopter Tell me that you are not serious ...
 
...
 
My new sandbox post:
 
0
A: Sandbox for Proposed Challenges

Dmitry KudriavtsevCheating Semiquine Concept Write a program that outputs code in its programming language. That code, when executed, must output the original program. Rules Since this is a cheating quine, you can read the original source code. First output program must be in the same language as the origin...

 
Double vision.
 
7:43 PM
goddammit
 
goddammit
 
Oh i get it! Yodle said "Double vision" so Tux repeated what Dmitry said. Classic!
 
:)
 
@Zgarb interesting!
 
@MathematicaNerds: This might be a challenge for you: twitter.com/WolframTaP
 
7:57 PM
-1
Q: Code-Golf Conveyor Bit

jacksonecacConveyor Bit Consider a conveyor belt which moves in a clockwise fashion. ^ ---------------> | _ _ _ _ _ _ _ _ | | /O O\ | | \O_ _ _ _ _ _ _ _O/ V <--------------- Now lets drop some bits on the top left of it. | V 1 _ _ _ _ _ _ _ /O ...

 
@TonHospel I know you think I am making this stuff up.. bpaste.net/show/e5ee67988963
 
:)
 
@Zgarb I suppose I just need a data structure that lets me do that efficiently
@Zgarb any idea what that would be?
 
8:10 PM
@Lembik Reality is just wrong. n=33 and n=34 must be about the same :-)
Sigh. So how to get a 10% speedup to get under 1 minute. I'm really out of ideas
 
9:10 PM
The sandbox have 222 updoots
 
@TimmyD I have so many ideas already, thanks
 
+225/-3
 
@TimmyD I might take you up on that, though. Looks easy enough to code.
 
what is it with this community and its obsession with alphabets
 
@TonHospel Well.. we could add in the floating point version :)
 
Anonymous
9:19 PM
@ConorO'Brien I don't know but I really hope it stops soon.
 
@TonHospel presumably the n = 34 matrix is bad in some way.
 
@Mego indeed. btw, did you get the call from google yet?
 
Anonymous
@ConorO'Brien Sort of. I got the call, but it was to tell me that apparently the SVPs never got a copy of my professional references. So, I resent that file, and they'll meet again next week.
 
oh, huh. more suspense, fun! /s
 
@Mego ;_; y we OK with 10000000 sequence challenge but hate any challenge that uses alphabet
 
9:23 PM
because there are only so many interesting alphabet challenges
 
Anonymous
@Downgoat Because the sequences aren't related other than the fact that they're sequences. The alphabet challenges can all be summed up as "print this string N times in X pattern". There is no Online Encyclopedia of Alphabet Patterns because such a thing would be uninteresting.
 
FWIW the first 2-3 were awesome. It's just that now people are overall sick of them
 
9:40 PM
@Lembik: what if you try another random seed ? Does it make n=34 then ?
 
I honestly think its a rather clever idea. The fundamental "build a pattern" is an interesting challenge style, but historically, every time a good idea comes around, an explosion of challenges happens
that said, due to the ease of creating an alphabet challenge, it made the explosion even bigger
 
10:02 PM
@Sp3000 and other ><> people: do you find the |-#/\` commands more indispensable than plain arrows ><^v`?
 
\/ are particularly useful, but not so much _|#
 
How about ! and ?. Very handy?
 
Yes, especially when used together as a equals zero check
 
@Sp3000 Even in a simplicity-over-golfability scenario? Say a mobile app where more buttons = confusing
 
@HelkaHomba I've been recently working on a reduction form of ><>, and have concluded that each arrow can be represented with the mirrors / and \ and trampolines !.
 
10:07 PM
If you were going for minimality then sure, you could drop a lot of things, but I'd arue !? is useful enough for me even if I'm phone golfing
 
My ><> is rusty. Remind me what # does?
 
@DJMcMayhem Must be the wet chainmail :P
 
Ah
Language idea: a fungeoid where each cell is a stack
 
agh
I just hit the nerve in my elbow
 
@DJMcMayhem all mirror
 
10:19 PM
@DJMcMayhem maybe then get a goldfish. Afaik gold doesn't rust :P
@Mego sequence challenges can be summed up in similar manner
 
@Downgoat I would not could not on a boat
(Or with a goat)
 
or a fox?
 
@DJMcMayhem would not could not with a goat?
 
@DJMcMayhem wat
 
I do not like them Sam I Am, I do not like green eggs and ham!
 
10:23 PM
@Zacharee1 ;_; y u dont liek @DJMcMayhem
 
@HelkaHomba Does the fox have any socks? And is it wearing them?
 
Trivia fact: a group of scarecrows is called a scaremurder YNO EM OJI?
 
11:01 PM
-2
Q: FPGA-based Calculator

TheBitByteYou just got your brand new FPGA-based calculator. It has a programmable chip, where you can input "rules" that the calculator has to follow. You could create a rule called "2 + 2 = 5", and then any other calculation would be based upon that rule. Inspired by a Quora post. Your task is to crea...

 
0
A: Sandbox for Proposed Challenges

OliverWrite a Poop interpreter In the language Poop, there are only six commands: eat - move pointer to the right puke - move pointer to the left poop - add pointed character to the string POOP - add pointer character to the string uppercased sniff - show the string flush - empty the string and set t...

 

« first day (2097 days earlier)      last day (2753 days later) »