« first day (1774 days earlier)      last day (3062 days later) » 

12:01 AM
@NathanMerrill IDK :P
It wasn't a well-developed thought
 
@CᴏɴᴏʀO'Bʀɪᴇɴ My life story
 
Public service announcement: Communication among bots in the Connect-n koth (codegolf.stackexchange.com/questions/65977/connect-n-time) challenge is disallowed.
I thought is was one of the standard loop holes so I didn't add it.
 
okay :3
Also, how do I get the numeric equivalent of a date in java?
 
Has anyone seen the SAO Abridged Parody?
 
12:14 AM
No ?
 
Hm :/
That's too bad.
 
@AlienG Anyone else hate anime?
 
Sorry I'm a newb to Java, but can I store information within a class?
Like, this.rowIndex = 3, and then modify it?
 
@JAtkin How are you going to disallow it?
 
12:20 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ yes, declare the variables outside of any methods but add the static keyword to the front
 
What if I make a bot that senses if a different bot makes a sequence of moves that's characteristic of the other bot in the pair, and if so cooperates with it?
 
static int test = 3;?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ yep!
 
put a public in front to access it from different classes
 
12:21 AM
I can modify it merely by referencing it?
 
yep
 
@GamrCorps oh thanks :D
static int test = 3;
int makeMove(){
	test += 2;
}
 
@CᴏɴᴏʀO'Bʀɪᴇɴ wait, is it running multiple simulations at the same time?
 
@GamrCorps I dunno
It calls makeMove multiple times, if that's what you mean
 
@CᴏɴᴏʀO'Bʀɪᴇɴ is it the connect n challenge right?
 
12:23 AM
yeah
> The simulations are multi threaded. If you want to turn that off, go to Runner#runGames() and comment this line (.parallel()).
 
Yeah, multi threading could be a problem, let me check really quick
 
@ThomasKwa Can't I make it a rule in the main post?
 
@JAtkin ?
I'm saying it'll be difficult to enforce "no communication"
 
Couldn't you just look at the code to tell?
 
12:28 AM
@JAtkin What does int[][] getBoard() return if the cell is empty?
 
-1
 
Thanks. I'm not a Java-fluent person :P
How can I get the ID of the bot?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Ah, so apparently the multithreading creates multiple instances... shoot. Well here is a rundown: use static if you want all instances of your bot to access the variable (ex. static int botCount = 0; public Bot(){botcount++;}), dont use it if each instance should have their own version of the variable. So in a sense, the static keyword is like a global keyword. Better explanation.
 
@GamrCorps I get that.
Ish
If I understand you, using the static int x = 3; public makeMove(){x++;} would increment x every time makeMove is called, and this x would be preserved throughout the execution of the simulations?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ It would be preserved in every instance of that object
 
12:34 AM
Say you have 2 bots of the same class put a random number into the variable x. With static the 2nd bot will overwrite the 1st bots number, without it, each bot will have their own random number
 
static just keeps fields/methods separate from objects.
 
/me is applying for a job
 
@El'endiaStarman \o/
 
> How soon can you start working?
 
12:36 AM
Good luck!
 
/me can choose year 2030
 
@GamrCorps so if I wanted to keep track of a row number in a game, what would I do? All this Java stuff is swimming in my head
 
My TV just turned on to Cartoon Network, which is playing a show called "Supernoobs". This is also a word I use to describe myself when Dennis outgolfs me.
 
@phase Dennis outgolfs everyone, not just noobs.
 
12:39 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ try it without the static, but if that doesnt work, just ping me or someone else and we will help you. Here is a good explanation of static: ideone.com/CMSy9H
 
@GamrCorps thanks ^_^
 
> Date:
Format: M/D/YY *
/me is tempted to put C/7/16
2
 
I should make a star-based KotH
 
That reminds me of something @El'endiaStarman
 
Anonymous
This is the only time this will ever happen:
2
 
Anonymous
12:46 AM
 
@El'endiaStarman what about Jan 25, 1970? Would it be 1/O/-T?
 
@GamrCorps ¯\_(ツ)_/¯
 
@El'endiaStarman forums.xkcd.com/…
 
I'm actually not really sure how I have 252 rep so far this week and Dennis has only 200.
 
Anonymous
I'm not sure how I have 208, either
 
Anonymous
12:52 AM
I ended up with 197 yesterday because I downvoted somebody, and lost 5 more today because somebody unupvoted my dice challenge
 
The better question is why did Dennis let 4 people beat him at something?
 
@Mego That happened to me a couple weeks ago
 
Anonymous
@GamrCorps He's letting us get cocky so that, when he crushes us, it'll be even more satisfying for him
 
Anonymous
@phase Absolutely not never ever
 
12:53 AM
@Mego That's what I thought, just making sure
 
Anonymous
The only acceptable edits to an answer are fixing formatting and spelling/grammar, imo
 
@ThomasKwa I'm not sure what you're trying to point out.
 
1 hour ago, by Doorknob
That doesn't really apply here. Our policy is "never edit code in someone else's solution."
 
Anonymous
If an answer is invalid, poorly golfed, or has an incorrect byte count, let the answerer sort that out. If those problems persist because the answerer hasn't fixed them after a while, flag it as low quality and let it get deleted.
 
Anonymous
And most importantly, do not change 𝔼𝕊𝕄𝕚𝕟 to ESMin or Seriously/gs2 code to UTF-8
5
 
Anonymous
12:58 AM
(forgot gs2 also uses cp437)
 
Anonymous
 
Anonymous
Looks so good
 
It does.
 
ConnectNController.java:510: error: incompatible types: possible lossy conversio
n from double to int
                                                        return (double)getBoardS
ize()[0] / 2;

         ^
1 error
Press any key to continue . . .
 
12
Q: Suggested Edits: Reject Golfing?

JustinEvery now and then, I see an edit where somebody does some golfing (most recent). From what I can tell, our standard is to reject those edits as invalid and post a comment saying what was suggested, because we feel that golfing tips should be comments. And I have always done so (after I learned)....

@CᴏɴᴏʀO'Bʀɪᴇɴ if you want to end with a double, add a ".0" after the 2. If you want an int, remove the "(double)"
 
1:04 AM
@GamrCorps oh.
:P
 
Anonymous
@GamrCorps Waste of a byte, just do 2.
 
"(\\\\/|/\\\\|\\\\\\\\|//)"
 
> Please record your password for your records.
 
writing regular expressions with literal backslashes in them, in an environment that requires me to escape backslashes in strings
 
@Mego ?
 
1:05 AM
so \\\\ is a single literal \
 
@Sparr I feel for you. Which language?
 
Anonymous
@GamrCorps You don't need the 0, merely appending a . will make it a double literal instead of an int literal
 
@CᴏɴᴏʀO'Bʀɪᴇɴ YAML
 
@Mego yep forgot about that. You are right
 
@Sparr That sounds like a type of oatmeal
 
1:11 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ Just so you know, you don't need the statusBroken thing
Breaking inside the if breaks out of the for loop
 
@quartata I know
I need to break out of both for loops
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Oh, OK.
 
But wait, you don't check the statusBroken in the other for loop
 
¯\_(ツ)_/¯
Iᴛ ᴡᴏʀᴋs :ᴘ
 
1:19 AM
finally getting around to writing a syntax definition file for marbelous
 
Anonymous
Uhh
 
@Mego oh yeah same
 
Huh, we don't have a cross product question
 
(From the 'Trust Me, I'm an "Engineer"' Facebook page.)
 
1:22 AM
@ThomasKwa what's that?
 
@ThomasKwa Bonus for 7D cross product? :D
In mathematics and vector calculus, the cross product or vector product (occasionally directed area product to emphasize the geometric significance) is a binary operation on two vectors in three-dimensional space (R3) and is denoted by the symbol ×. Given two linearly independent vectors a and b, the cross product, a × b, is a vector that is perpendicular to both and therefore normal to the plane containing them. It has many applications in mathematics, physics, engineering, and computer programming. It should not be confused with dot product (projection product). If two vectors have the sa...
 
Anonymous
1287
A: Breaking out of nested loops in Java

Jon Skeet(EDIT: Like other answerers, I'd definitely prefer to put the inner loop in a different method. This answer just shows how the requirements in the question can be met.) You can use break with a label for the outer loop. For example: public class Test { public static void main(String[] args) {...

 
Anonymous
Use dem labels man
 
whoa
cool story bruh
 
That's pretty cool.
 
Anonymous
1:24 AM
labels are aight unless it's C
 
Anonymous
labels in c be bad because thas how u get go2s
 
I'll probably include \breakN instructions in PyAcidic.
 
Anonymous
Who needs breaks when you don't have the ability to do nested loops? :P
 
Funnily enough, I do have (and often use!) nested loops in Minkolang...
 
In mathematics, the seven-dimensional cross product is a bilinear operation on vectors in seven-dimensional Euclidean space. It assigns to any two vectors a, b in R7 a vector a × b also in R7. Like the cross product in three dimensions, the seven-dimensional product is anticommutative and a × b is orthogonal both to a and to b. Unlike in three dimensions, it does not satisfy the Jacobi identity. And while the three-dimensional cross product is unique up to a sign, there are many seven-dimensional cross products. The seven-dimensional cross product has the same relationship to octonions as the three...
 
1:28 AM
No cross prod in the sandbox either
I think I'll write two challenges, one for 3d and one for 7d
Unless you want one @Mego?
 
why not one for n-d
 
There only exist cross products for 1, 3, and 7 dimensions for some reason
 
@ThomasKwa ah
 
Anonymous
@ThomasKwa Have at it
 
@El'endiaStarman That's like every O program I make ;-;
 
1:29 AM
@ThomasKwa 2^N-1 dimensions, I think
 
@ThomasKwa "for some reason" is explained here, which I'm reading now. :P
 
Anonymous
@Sparr Nope, 1, 3, and 7 only for binary cross products
 
@El'endiaStarman I added some basic framework to the Spacewar! repo. I'm not sure if it's what you want.
 
/me goes to log in with my college account
 
Should I allow builtins?
 
1:32 AM
/me tries to remember password
Sure, why not?
 
I have a most beautiful but frustrating language: it has a builtin for every task, but said builtin is always 1 byte longer than the optimal solution.
 
Anonymous
@ThomasKwa For a catalog yes, for a regular no
 
Anonymous
@CᴏɴᴏʀO'Bʀɪᴇɴ So Mathematica?
 
@Mego But better!
 
@CᴏɴᴏʀO'Bʀɪᴇɴ That would actually be an interesting problem.
 
Anonymous
1:34 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ So Python with itertools?
 
@El'endiaStarman What would? :/
@Mego Qu'est-ce que ce itertools?
 
Designing a language where every built-in is longer than the optimal solution in that language.
 
Excepting the most basic ones, like addition, etc.
 
It's impossible
 
1:35 AM
Are you sure? :P
 
It's not impossible
 
Anonymous
I'm not convinced it's impossible
 
Gimme a second
 
Just have builtins for only things you know you can solve in fewer bytes already
 
Anonymous
But the number of builtins would have to be infinite (countably or uncountably; not sure which)
 
1:36 AM
@mego is right
 
^^ that's what I was getting at :P
 
Anonymous
Probably countably since they'd be recursively enumerable
 
Anonymous
(finite alphabet and such)
 
/*wut is dis*/ comments all over my code
 
Basically, for every task T, there must be a task T' that emulates task T.
 
1:37 AM
It is impossible because you have to have ∞ builtin
3
 
@Mego wait, you lost me
 
> ∞ builtin
+1
 
@CᴏɴᴏʀO'Bʀɪᴇɴ ?
 
@ev3commander bad yolks
 
Anonymous
1:41 AM
@ThomasKwa For every string S in the language (Chomsky definition, not programming lanaguage), you'd need to assign a string that is length |S| + 1. Either the language does not have a maximal string length, and the number of builtins grows infinitely, or it does, and you'd end up needing strings longer than that maximum to name the builtins.
 
Oh, so the language needs to have a builtin for every task?
 
Anonymous
It needs to have a builtin that is 1 byte longer than the optimal solution for every task, so yes
 
For this theoretical problem, ignore practical considerations regarding infinity. :P
 
Anonymous
Tasks are countably infinite, ergo builtins are practically infinite
 
Anonymous
@El'endiaStarman Even theoretically, we'd need a universe with infinite energy, which comes along with other problems
 
Anonymous
1:46 AM
Infinite energy and infinite entropy
 
> Assume a spherical cow...
 
Anonymous
You would need an infinite amount of energy to define the language, and an infinite volume to contain it (thanks to the Bekenstein limit)
 
Are you considering built-ins from the future?
 
First n fibonacci numbers: mljm#'l
@quartata import future
 
Because if you consider only known tasks at any given point in time it seems like it would be finite, just very large
i.e only consider tasks in programming that have been considered before
not ones that are possible but have never been done
 
Anonymous
1:50 AM
@quartata Well duh, we want to (almost) win every challenge
 
Anonymous
We can't have builtins that existed after the challenges!
 
PPCG won't be around that long.
Just consider tasks that have been considered.
That'll cover every challenge.
 
Anonymous
@quartata Sure it will, we'll be in beta forever
2
 
I mean, I'm sure some drunk cashier has considered simulating a grocery store on a grid before
@Mego But you won't be in beta forever.
 
Human beta lasts about 18 years.
Private beta: 9 months.
 
1:52 AM
I hear it lasts about 70 years.
 
No, that's the "finished" product.
 
Fair enough.
If we're talking about it from a purely theoretical stand point btw a Turing Machine could run the interpreter for this language.
Actually, wait.
OK, it could run an interpreter
But it couldn't interpret it directly I believe, since the table of instructions has to be finite.
But if the instructions were all on the tape
 
Cross product is sandboxed!
 
ooh
 
@ThomasKwa link?
 
2:01 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ Wait for it...
 
@ThomasKwa wat
 
@CᴏɴᴏʀO'Bʀɪᴇɴ ☟
 
0
A: Sandbox for Proposed Challenges

Thomas KwaCross product of two vectors code-golf math geometry The cross product of two three-dimensional vectors a and b is the unique vector c such that: c is orthogonal to both a and b The magnitude of c is equal to the area of the parallelogram formed by a and b The directions of a, b, and c, in th...

 
What is that character anyways
 
2:02 AM
GG
@quartata pointed hand downwards
 
Oh, I see.
It's very faint on my computer.
 
0
Q: How long ago was this?

ev3commanderHow long ago was this? The Rules Each submission must be a full program. The program must take input as two comma-separated dates in the form YYYY-MM-DD, and print the number of days that has passed since the second date to STDOUT as if today was the first date (if the second date would be in ...

 
@NewMainPosts duuppeee
 
2:06 AM
You are now breathing manually.
 
@PhiNotPi Wait, what?
 
@PhiNotPi dammit
 
GOD DAMMIT
I just lost the Game too
 
hahaha
I'm not really breathing manually. Maybe half-and-half, now.
 
@Zgarb Which Star Trek movie did you see? The new ones are garbage.
 
2:07 AM
I LOST THE GAME AHHHHHHHHHH
 
HA!
 
That should be a challenge
 
I kind of want to make cross product a catalog, but I don't know if it meets the criteria to be a good one
@CᴏɴᴏʀO'Bʀɪᴇɴ a code-golf question? How would it work?
 
@ThomasKwa Eh, I don't think it qualifies as a standard "beginning" programming challenge
 
I think the whole breathing / blinking / tongue-position / nose-in-vision thing is a whole lot more fun than the Game.
 
2:09 AM
Has anyone done hooks on GitHub repos?
 
@ThomasKwa IDK - I was thinking "whenever the input contains something that is similar to 'the game' (i.e. fixed Lev. D), output "I lost the game""
@El'endiaStarman saywhat
 
!!!11!!
 
I think @PhiNotPi might've done that? You were planning on pulling KotH entries from GitHub, right?
 
idk
 
@CᴏɴᴏʀO'Bʀɪᴇɴ and then take input every N seconds or something
 
2:10 AM
I just used some kind of Git API or something.
 
Maybe output "You just lost the game" every (nextGaussian * some constant) seconds
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Hooks are things that happen at specified times. For example, I have a post-receive hook on my website's Webfaction server that, when I push to the git repo there, checks out all the files to their proper place, thereby updating the website.
 
Also, you guys literally just made me die in UNDERTALE thanks
So I really did lose a game.
 
@El'endiaStarman ooo
@quartata I feel no pity. You guys make me die in TF2 all the time :P
 
@quartata that's because you should be playing nethack instead
 
2:12 AM
Spy + The Nineteenth Byte = Skrub
 
@Doorknob shut up I wanna finish my true-pacifist run first
@CᴏɴᴏʀO'Bʀɪᴇɴ Right, but this was against Undyne. I have to do the flip spears segment all over again.
 
@quartata ¯\_(ツ)_/¯
 
Thanks.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ So, for instance, if I can set up a post-receive hook on the GitHub repo, then I can make the server code update when you push to GitHub.
 
Wow, I just realized we have eight 100+ point bounties out
 
2:13 AM
@El'endiaStarman I sort of get that. Generally.
 
#YODO (you only die once)
 
Also @Doorknob
A friend of mine was playing nethack
He was at level 8
He was in a corridor running from a "wasp" when a lynx showed up
He was playing in tile mode though
 
there's no such thing as a wasp
 
So he thought it was a little kitten
@Doorknob I think it was a soldier ant, he called it a wasp
 
wat
 
2:14 AM
Anyways, he threw a tripe ration at it
dead
He had jump too, so if he had actually used that turn he could have escaped
Basically just a tale of why tile mode sucks
 
um ok
 
Wow, 10/10 thrilling story!
 
Nethack is just like The Sims, right?
 
It was funnier when I heard it
@AlexA. Yeah, except your minions don't place statues of you at half a million population
 
@AlexA. ಠ_ಠ
 
2:16 AM
Or maybe more like Rollercoaster Tycoon?
 
Hello
 
Isänmesez
 
Edit apparently the thing had wings and it showed up the same turn as the lynx
So I'm guessing it was a vampire bat
Either way, he got pinned in
This is a really interesting challenge:
12
Q: Parse a two-dimensional syntax

ZgarbBackground Alice and Bob are creating a golfing language to win every single PPCG challenge. Alice wants to make a two-dimensional language, like ><>, but Bob prefers a prefix-infix syntax like in J. As a compromise, they decide to create a two-dimensional prefix-infix language. The parser is a ...

 
@quartata true
 
@quartata I agree.
 
2:19 AM
Bison2D
 
14
Q: Programming Puzzles and Taco Truck

Alex A.Programming Puzzles & Code Golf has opened a taco truck! The word is out and now users from all over the Stack Exchange network are coming to try our tasty, authentic ASCII tacos. We need your help to ensure that everyone gets their orders in a timely manner. There isn't a whole lot of room insid...

sumbudy du ma chelenj
 
@AlexA. too hard 0/10
 
D:
 
Every time I try to do it, I get hungry for tacos.
 
8
Q: Unfold musical jumps

DoorknobThe Dal Segno and Da Capo are two very commonly used musical terms. They mean "from the sign" (𝄋) and "from the beginning" respectively. There is also the idea of the coda (𝄌), which is the very end of a piece of music. It's what's played after the "main section" of the piece. A D.S. al coda ...

 
2:21 AM
Then I go eat tacos and forget what my code does.
 
sumbudy du ma chelenj 2
 
So, yeah it's too hard 0/10
 
u_u
 
> There isn't a whole lot of room inside food trucks, so you'll need your code to be as short as possible.
 
11
Q: Simulate a game of Craps

quartataCraps is a fairly simple dice game often played in casinos. Even if you aren't a gambler (which I'm not), it's still a fairly interesting game. Here's the rules: At the start of a game of Craps there's what is called the come-out round. The player rolls two d6s (six-sided die) and the two die ro...

sumbudy du ma ez chelenj in CJam
wtf y is ruby da winnah
 
2:21 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ True facts, broseph. Ever been inside a food truck?
 
@AlexA. yeah. it was not fun
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Can confirm.
 
@quartata cuz rube is gut
 
@AlexA. Oh, not you too
 
rube is da bezd
 
2:22 AM
Also, I'm still really proud of my joke Julia answer on that
 
@quartata ¯\_(ツ)_/¯
 
Anonymous
@CᴏɴᴏʀO'Bʀɪᴇɴ Heroku has that functionality built in
 
@Mego Okay.
I don't know what that is either.
 
@Mego Too bad Heroku is lazy and keeps falling asleep
I think it ate too much turkey on Thanksgiving
 
Anonymous
@quartata I've never had that problem
 
Anonymous
2:24 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ herokuapp.com
 
@quartata That was a long time ago
If you're still full from it you should see a doctor
 
I officially hate VirtualBox
it refuses to work
 
y
ÿ
 
Anonymous
@Doorknob Issues I have had with VirtualBox = 0 (unless it's operator error)
 
I use VMWare Fusion. Works great. ¯\_(ツ)_/¯
 
Anonymous
2:28 AM
As long as I'm not being an idiot, VirtualBox works great
 
Anonymous
There was that one time I tried to get a VM running using a real hard drive though
 
Anonymous
But that falls under "being an idiot"
 
One time openSUSE was installing updates and it didn't tell me it was doing it so I shut down the VM. It never booted back up.
 
oh I think this is caused by me being an idiot
why is my kernel version still 3.16.0 >_<
 
¯\_(ツ)_/¯
 
2:41 AM
@AlexA. This is why automatic updates are disabled on all of my devices.
 
[21:40] c_o_n_o_robrien: afaik
[21:40] Seiya : wtf does that mean
 
user image
5
 
Has anyone here built a computer before?
 
Like buying and assembling parts? Sure.
 
Cool!
My friend needs to build his own. Any pointers?
(not memory pointers)
 
2:49 AM
I pretty much grew up doing that. Laptops aside, I've never owned a pre-built computer.
 
Pointers for buying or assembling?
 
Did our challenge spree do anything other than ruffle up the chat room?
 
Both, I think.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Closed as unclear what you're asking. :P
 
2:52 AM
@Dennis XD
 
Turns out I stupided even more than I thought I did
apparently my Linux kernel version was on 3.16.0
the current version is 4.2.0...
turns out my laptop was using Ubuntu's grub and not Debian's
so I had to boot into Ubuntu, run update-grub2, and then boot back into Debian >_<
but hey! virtualbox works now \o/
 
@Calvin'sHobbies I decided not to submit any challenges today because they would get less attention due to crowding. But I'm sandboxing a lot, so they'll be released soon.
 

« first day (1774 days earlier)      last day (3062 days later) »