« first day (1724 days earlier)      last day (3102 days later) » 

8:00 PM
@Calvin'sHobbies I did, too.
 
Unless the challenge uses your name alongside the word FILTHE. Then it's okay to skip it. Otherwise I think it might be mandatory for you to answer.
 
@MartinBüttner For the mods one? (Have I made a Martin challenge? Am I totally blanking??)
 
@Calvin'sHobbies Doorknob made a 10k-rep challenge when I hit 10k
 
Oh yeah, I remember that
 
Anyway, now that we've talked about stale sandbox posts and narcissistically answering challenges about yourself, does anyone have an opinion about that Transistor sandbox post?
 
8:01 PM
@MartinBüttner Take out the "recent" part
Other than that looks nice
 
:D
@quartata I can't even tell how sad it makes me that that's the most important change :D
I think one reason I didn't post it was that I wasn't sure if restricting to N <= 16 would make hardcoding the best solution (as, I think, Peter pointed out)
 
Can you take input as both the number you have and the number possible (currently only 16)?
 
I was just wondering about that
 
Should break hardcoding if nothing else.
 
like how many (1 passive + 1 active + 2 upgrade) slots you have
oh, the other problem was that I didn't have a reference implementation to generate test cases
 
8:06 PM
Just post it from a low-rep sock. Nobody expects them to have test cases :P
 
:P
okay, edited that bit
now the reference implementation...
 
You know the nights are getting lonely when you're watching the telnet Star Wars as an escape from homework. o-o
3
 
You know, when you need help procrastinating, we are always here for you...
11
 
XD Don't I know it.
 
@VTCAKAVSMoACE There are other things you could be watching telnet-style that would be signs of a higher degree of loneliness.
 
8:18 PM
Oh?
 
nethack?
 
Um, yes... I meant nethack >_>
 
@VTCAKAVSMoACE are you watching it in color?
 
Umm... what's the address for the IPv6 version? I only have IPv4 connectivity as of now.
 
Ah, I love how I can always count on Ell to answer my trickier challenges :)
0
A: Program the Cup-Stacking Robot

EllPython 2, 64,515 Hey, beats the house! (just in one test though; could be a mistake in the test cases?) Not golfed at the moment. import sys input = map(str.rstrip, sys.stdin.readlines()) width = (len(input[-1]) + 1) / 2 for i in range(len(input)): indent = len(input) - i - 1 input[i]...

 
8:23 PM
same address.. but it seems that the color is a lie :/
"Well, the IPv6 version is exactly the same as the IPv4 one."
 
why thank you
 
@MartinBüttner Had a random number in my chatbox and just wondering what I had clicked to respond to 10 mins ago :P
 
@aditsu The IPv6 is a lie.
 
:24808346 Immortalized forever.
 
8:28 PM
@Calvin'sHobbies the alternative would have been opening http://chat.stackexchange.com/transcript/message/N#N (where N is the number)
 
Hmm. Should've linked it before removing it.
 
nah, ipv6 is true, and will save the world
 
@MartinBüttner so much more work
 
You'd think at that point they'd just do something besides making more of them.
Learn how to merge transformers-style maybe.
 
8:30 PM
Or stop using reference IDs.
 
Telnet Star Wars? What is this
 
telnet -4 towel.blinkenlights.nl 23
 
Oh my god what is happening
 
Is this the ENTIRE movie in ASCII?
Who made this and more importantly WHY?
 
8:33 PM
Yes
 
Just the first Act.
 
Oh
 
@VTCAKAVSMoACE Oh OK phew
 
Not the entire movie. c: They tried to finish it, but failed. :c
 
there's an ASCII Matrix too
 
8:34 PM
Of course there is. There simply couldn't not be one.
 
It features aditsu as Neo.
 
hahahaha
 
And Geobits as Trinity.
 
@quartata To answer the latter... probably cold winter nights. And severe, severe boredom.
 
also the disastrous feeling that you have this cool idea you just can't give up on, no matter how many days it's eating away
 
8:38 PM
years*
 
"Cool" idea
 
@aditsu Wait, there is?!
 
yeah.. but I'm not sure if there's a telnet server for it
 
Aren't there ascii players for arbitrary videos? I don't get why this is a big deal.
 
8:42 PM
Oh, thank McJesus, final question... >.> Man. That should've taken 20 minutes.
 
:O
 
@aditsu ...cool, but I think, not as good as the Star Wars one. Thanks for sharing though, didn't know this existed.
 
@aditsu That just looks auto-converted from film frames though
 
8:44 PM
^O^
@MartinBüttner Pretty sure it is.
 
yeah I guess so
 
That's what I thought too.
 
It is.
You can tell by the letterbox of R's.
Still cool.
 
@feersum the Star Wars one seems to be hand-made though
 
And here goes another hour.
 
8:45 PM
Pfft. That probably means it's not hi-def.
 
4K 60 FPS or bust, broseph
 
@VTCAKAVSMoACE I have to say that HW never gets finished if you don't focus and that The Nineteenth Byte is a really really good way to not focus.
6
I think aditsu says it best
> abandon all work, ye who enter here
 
@quartata I keep mentally inserting "all" between the comma and "ye"...
 
Me too
 
And possibly also taking out the current only "all".
> abandon work, all ye who enter here
 
8:48 PM
I just saw ><> in the ASCII star wars
 
> reconsider your decision lest you be sucked into the abyss, ye who enter here
 
It was on Luke's face
 
@quartata Luke, use the napkin, Luke!
2
Speaking of which, has anyone not seen either Grocery Store Wars, or Thumb Wars?
 
Me
 
Me
 
less than 6 million people have seen it
 
So it's more than 10,000. Whatever. They're all missing out.
Thumb Wars is more popular.
Pretty sure there are other movies too. Like a thumb version of Titanic or something. Haven't seen them though.
 
1
Q: The Light Up Game

user3502615The Challenge The game Light Up! is a simple puzzle game where the objective is to light up every cell in an n-by-n array with light bulbs. However, there are blocks in the way that will prevent light from traveling, and no two light bulbs can be put in the same row or column. Each light bulb ha...

0
Q: Illustrate the square of a binomial

NBZGiven (by any means) two different natural numbers, output (by any means) the square of their sum as in the examples below: Given 4 and 3, output: 12 12 12 12 9 9 9 12 12 12 12 9 9 9 12 12 12 12 9 9 9 16 16 16 16 12 12 12 16 16 16 16 12 12 12 16 16 16 16 12 12 12 16 16 16 16 12 12 12 ...

 
9:10 PM
How an emulator-feuled robot reprogrammed Super Mario World on the fly:
http://arstechnica.com/gaming/2014/01/how-an-emulator-fueled-robot-reprogrammed-super-mario-world-on-the-fly/
 
@feersum I remember trying to watch a World Cup match via a telnet ASCII stream. Must have been in 2006. It was really quite hard to follow.
3
 
lol
 
Anyways, I thought that the secret aquarium one was really cool as it was an amazing demonstration of programming errors + physics
The hyperspeed at the beginning is caused by being in and out of the water simultaneously
 
@MartinBüttner I appreciate your checking in, though I trust your edits, so feel free to go wild (both on that post and any others).
 
@ChrisJester-Young I'll give it a shot tomorrow :)
 
9:18 PM
:-D
 
would you mind unaccepting the accepted answer if I do?
(the edit would also involve allowing languages created after the challenge was posted, as we've so far done for all catalogues)
 
9:39 PM
Is it possible to have an image where every pixel is a different color but every 2x2 group of pixels has the same average color? Is the upper limit an image with all colors?
 
@Calvin'sHobbies I have a feeling the answer is "yes" to the first question. If so, we should be able to construct an example with small integers.
 
Well a 2x2 image obviously satisfies the first constraint. Making it bigger is the tricky part.
 
0 2 ?
3 1 ?
Hmm. We can't really have 0.
 
There's only one 2x2 group of pixels I mean so the averages are trivially the same
@AlexA. Huh? My last sentence was a continuation of the question in the first.
 
@Calvin'sHobbies Huh?
 
9:45 PM
7 9 ?
6 8 ?
...oooh. I have an idea.
10 9 11
14 8 13
 
@AlexA. I'm asking: What's the largest (square?) image where every pixel is distinct but every 2x2 group of pixels has the same average?
 
10 9 11
14 8 13
12 7 13
Ah, that gets close.
 
@El'endiaStarman To what?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ 0 as n -> infinity
 
@AlexA. Ok, now you're definitely trolling.
 
9:48 PM
@Calvin'sHobbies Help me out, then? ^^"
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Sum of every 2x2 block of adjacent integers is the same where each and every integer in the whole is different.
 
@El'endiaStarman Oh, like a magic square (sort of)?
 
@Calvin'sHobbies I can't seem to recall an instance where I was in chat and not trolling.
 
This is (basically) equivalent to @Calvin'sHobbies's attempt to get each 2x2 square of colors to have the same average.
 
9:49 PM
Ohhhh that sounds fun
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Yeah, sorta. (See my orig msg: chat.stackexchange.com/transcript/message/24810050#24810050)
 
The wrinkle there is that you have three different color channels.
 
@Calvin'sHobbies Ahhh
 
@El'endiaStarman Well they could all be the same
 
Except for the duplication of 13, I think my small 3x3 example serves as a proof of concept that there are non-trivial solutions.
@Calvin'sHobbies Yeah, grayscale. That probably limits the size though.
 
9:51 PM
@PeterTaylor Surely it would have been clearer in UTF-8.
 
Because you go from 16,777,216 colors to 256.
Anyway, I think the key is to choose values that are far apart so you have more freedom (more ways) to make the same sum.
1 9 3
8 5 6
4 7 2
The relevant sums there are 23, 23, 24, and 20.
That might be the best you can do with 1-9.
 
@MartinBüttner Not yet. Looks interesting though. Thanks!
 
9 1 7
2 0 4
7 3 5
works but for the 7 7
 
Ooh, nice.
Hmm. sum(0..9) = 45. You can only get all four 2x2 sums to be equal if you drop 1, 5, or 9.
0..8 might be possible!
 
1 7 2
8 0 6
3 5 4
is
16, 15, 16, 15
 
10:03 PM
0 8 -1
4 3 5
2 6 1
drat
...wait a minute...
1 9 0
5 4 6
3 7 2
 
@El'endiaStarman That works!
Right?
 
Yes, it does!
I don't know how!
:P
 
@El'endiaStarman Nice!
 
Clearly, I was wrong about having to drop 1, 5, or 9. :P
Next question: what are all of the 0-9 solutions?
 
1 2 3
4 5 6
7 8 9
0
 
10:05 PM
@AlexA. No
 
@Calvin'sHobbies Yes
 
@AlexA. TROLLLLL....IN THE DUNGEON....
(Thought you ought to know.)
 
@El'endiaStarman Well the middle one can be whatever since all squares use it
 
@Calvin'sHobbies True.
1 9 0
5 8 6
3 7 2
 
Is there a pure 0-8 or 1-9 answer?
 
10:07 PM
Probably not, but I don't have a proof.
However, I do note that the solutions I found both drop a number that is divisible by 4.
Hmm. If we could figure out how to drop 0, a pure 1-9 answer might be possible.
 
3 9 1
5 0 7
4 8 2
3 9 1
5 6 7
4 8 2
There you go, @Calvin'sHobbies!
 
0
Q: What's my math assignment?

DanTheManThe Challenge I always write my math assignments down in the same way. For example: pg. 420: #25, 50-56, 90 pg. 26: #50-60 evens, 70-80 odds, 90-99 3s pg. 69: #12, 16, 18, 37 But I need you to tell me the individual problem numbers. For example: input: pg. 420: #25, 50-56, 90 output: 25, 5...

 
@El'endiaStarman Cool
 
@NewMainPosts You're a duplicate of something The Number One posted a while back but I can't seem to find it.
 
10:14 PM
Yeah, I too thought it was a duplicate.
@Calvin'sHobbies Come to think of it, subtract 1 from each cell and you have a 0..8 answer.
 
Now I'm gonna write a Python program to find a 4x4 solution. :P
 
Good. I might make a challenge involving this :)
 
.....oh dear. :P
 
Well you'll have a leg up!
 
10:23 PM
You don't even need to make it about colors. I think just doing integers is hard enough, y'know.
I'm gonna call them "magic mini-squares" for now. :P
 
@El'endiaStarman Yeah. Numbers are simpler
 
0
Q: Program a speeddate event with n people in groups of 3 or 4

kevinJamesI want to organise a speeddate event in groups of 3 for a social gathering. I will have n guests where n = 3 x t, where t is the amount of tables with 3 seats. I will have r rounds of 20 minutes for the 3 guests per table to mingle. Each table has a get to know you game. Say if n = 15, I have ...

 
10:53 PM
Brute-forcing 3x3 now. It's taking a while.
 
Are you only using 0-8 (or 1-9)?
 
0-8
They're equivalent.
 
I mean you're not looking for other solutions wit higher nums
 
right
It took a couple minutes to go through all possibilities for the first 2x2 block.
And then stopped, because I didn't write the following code right. :P
I basically go through all possible 2x2 blocks and pick ones that fit together and build this up to the full solution.
 
4 hours left on my PBASIC answer
Would it be bad form to post another cop on that challenge even though it is starting to wind down?
I guess it isn't since Dennis is still posting answers despite having basically already won
 
11:00 PM
No, post whatever you want. Unless there's an explicit end date beyond which submissions won't be considered, nobody cares.
 
And they're all J answers too ugh
 
Dennis learned J? Looks like no one else has any chance of winning anything ever again.
 
He's always known J
I mean basically if you know APL you know J
 
That's not true. I know APL fairly well but I don't understand J.
 
Huh
 
11:06 PM
¯\_(ツ)_/¯
 
@El'endiaStarman I found 376 solutions for 0-8:
With this code:
#abc
#def
#ghi
import itertools
perms = itertools.permutations(range(9), 9)
solns = 0
for p in perms:
	a,b,c,d,e,f,g,h,i = p
	s1 = a+b+d+e
	s2 = b+c+e+f
	s3 = d+e+g+h
	s4 = e+f+h+i
	if s1==s2 and s1==s3 and s1==s4:
		solns += 1
		print 'Solution', solns, '(sum=' + str(s1) + ')'
		print a,b,c
		print d,e,f
		print g,h,i
#print solns
 
...of course that'd be faster.
[sigh]
Tried to be all clever and such... :P
 
@Calvin'sHobbies -14 bytes if you use s1==s2==s3==s4
 
@Sp3000 I wasn't sure I could so that :P (and this aint golf Sp!)
 
Also, so much whitespace!
 
11:11 PM
Even I would leave the comments out if I were golfing it ;)
 
-1, too many tabs
 
Oh my goodness. I let the queue get up to 4.3 million elements.
Whoops...
That's clearly NOT the smart way to go!
[steals Calvin's idea]
 
El'endia is yours running slowly or something?
 
@Sp3000 What it does is generate all possible 2x2 blocks, then sorta-recursively puts any blocks that can fit onto the current structure, building up to full solutions.
Instead of actually being recursive though, it uses a queue.
 
Is there an operator in Dyalog APL for determinant?
 
11:15 PM
Ah, no wonder :)
 
yeah
Like I said, tried to be clever...
 
Out of curiosity, how are you implementing the queue?
 
It's just a list. For the current in-progress solution, I do q = queue.pop(0). I loop through all 2x2 blocks (for p in permutes) and any that fit into the next slot are appended to the queue (queue.append(q+[p])).
 
... yeah that's your other problem :P
 
Lol, indeed.
 
11:17 PM
Try from collections import deque (.pop(0) is expensive)
 
I didn't expect there to be THAT many partial solutions.
 
No?
Hey @Dennis does APL have an operator for determinant?
 
@Sp3000 Probably would still be slower than Calvin's solution though.
 
I'd be kind of surprised if it doesn't since it has inverse and some other matrix goodies
 
Would be, but at least removing the first element isn't O(n) any more :P
 
11:19 PM
Haha, true.
 
@quartata Quick search says maybe -.×? Not sure
 
Hmm
Yeah looks like it
I'll try that
 
Source: link
 
Hmm what does ws full mean in tryapl
 
ws is workspace. It means you need to clear your workspace.
)clear
 
11:24 PM
Throws it even when cleared
Sounds like numbers 2 big
 
Numbers 2 big?
 
2big4tryapl
 
oic
How big is it?
 
-.×679678 4567567 3456 ⍴ 67869 47456 2352534
Pretty big
It's just 12 year old me playing with a new shiny calculator
 
Haha
APL doesn't have a builtin for calculating determinants, FYI.
 
11:26 PM
Yeah I figured that one out
-.× appears to do the trick though
Short enough
 
Does it?
 
Huh it's throwing syntax errors
This just worked a second ago
 
Yeah, it doesn't work for me. I recall trying -.× at some point and having no luck.
 
Rats :(
 
Ah yes, I've looked this up before. This is a one-liner for getting a determinant using Dyalog APL: {∇{⍵+(¯1*+/∧\⍺)×⍵⍵[⎕io;⍺⍳0]×⍺⍺ ⍺/1 0↓⍵⍵}⍵/(↓≠/¨⍳⍴⍵),0 0≡⍴⍵}.
 
11:30 PM
That's very long yipes
 
Yipes indeed
IIRC it's not that much shorter in J.
There's probably a shorter way to do it in K but I don't know K at all.
 
So far APL doesn't seem very useful for the string printer challenge since it does nice things like "[...30 lines of output...]" and scientific notation
grr
 
APL is probably one of the worst languages I've encountered for dealing with strings.
You can use thorn to format numbers as strings though.
<specification> <thorn character> <number> --> <string>
 
@Sp3000 @El'endiaStarman This code should work for any nxn grid (0 to n^2-1). It works for 2 and 3 quickly but n=4 is still running. (Python 2)
 
Right but remember the name of this challenge is "Mystery <s>String</s> Number Printer"
 
11:37 PM
def firstSoln(n):
	for p in itertools.permutations(range(n**2), n**2):
		grid = [list(p[i*n:(i+1)*n]) for i in range(n)]
		sums = set()
		for y in range(n-1):
			for x in range(n-1):
				sums.add(grid[y][x] + grid[y+1][x] + grid[y][x+1] + grid[y+1][x+1])
		if len(sums) == 1:
			return grid
 
@quartata I don't really know what challenge you're talking about, I'm just sharing APL knowledge.
 
@AlexA. Oh I see. Can you specify decimal places/no scientific notation like this?
@AlexA. The CnR
So like how in C print can specify number places like this: printf("%.xf",float);
Can you do that with thorn?
 
@Sp3000 Is .pop() O(1)?
 
Only from the back
.pop(0) is O(n)
 
11:39 PM
23
Q: Efficiency of using a Python list as a queue

Eli CourtwrightA coworker recently wrote a program in which he used a Python list as a queue. In other words, he used .append(x) when needing to insert items and .pop(0) when needing to remove items. I know that Python has collections.deque and I'm trying to figure out whether to spend my (limited) time to re...

 
@Sp3000 Why?
 
@AlexA. Ah-ha!
Thanks
 
:)
 
@quartata Take a data structures course and find out :)
 
11:41 PM
@Sp3000 Wait is this a list?
Oh der nevermind
I thought it was a deque
 
Yeah, not a deque (need collections.deque for that)
 
One of the problems of choosing to sit in a non-AC'd room is that stupidity quickly sets in
 
@Calvin'sHobbies Race to see who finishes first? :D (is your code still running?)
 
@quartata You can also use an array as the left argument to thorn. In that case, the first element of the array is the total width of the output string and the second is the number of decimal places. If the allocated length is insufficient to display the number, you get asterisks.
 
What are the underscores doing?
 
11:45 PM
The number in the string is right aligned; it's left-padded with spaces to the desired width.
@quartata Telling you not to do whatever you did.
 
@Sp3000 No, I stopped it to see if n=5 gave a quick answer. But I'm not sure if this brute force for n=4 is viable. There are 16! = ~10^13 permutations to check.
 
In that case let's do it again!
 
I don't think it's designed to enjoy large numbers.
 
I'll give coding a shot then :)
 
@Sp3000 Can we still ravage your chest if tit helps?
 
11:47 PM
Wrong chatroom :P
 
This is directly relevant to whatever you're currently talking about.
 
@Calvin'sHobbies I can confirm 376 solutions for n=3. I basically used your idea but made a function that does it more generally.
Now I'm running it for n=4 and it'll stop when the first solution is found.
 
@El'endiaStarman Same. I'm through 17 million of 10^13 permutations....
 
@quartata As far as I know, it doesn't.
 
11:52 PM
@NewMainPosts This might be a dupe of Tell me how many math problems I have to do!.
 
@Calvin'sHobbies ...wouldn't the first solution probably have a 1 at the opposite corner of the 0?
Well, not the first.
First solution for 3x3 case has the 1 in the next-to-last position.
If we were able to pick permutations randomly, we would probably get a solution far sooner.
 
@El'endiaStarman That's what I just started trying
I'm just shuffling 0 to n^2-1
 
ahh
That's probably the best way, yeah.
 
You know what El'endia said about building up the grid doesn't sound too bad
 
There's got to be a smarter way though.
Well, there IS.
 
11:58 PM
@Sp3000 Yeah, that's surely better than brute force
It's like a weird sudoku
 
@Calvin'sHobbies Life is like a weird sudoku.
 

« first day (1724 days earlier)      last day (3102 days later) »