« first day (1168 days earlier)      last day (3666 days later) » 
01:00 - 22:0022:00 - 00:00

1:23 AM
Finally just did it as Nike would say; I present: SpyWolf
 
Wow, over 40 answers in under a week. Nice job, @Rusher.
 
1:41 AM
You guys have no idea how disappointing it is that [chr(i+97)for i in range(27)] is one character longer than 'abcde...xyz'
I felt really clever coming up with a way of getting the whole alphabet and it turns out to be longer
If you use range enough to justify a R=range at the beginning then it becomes worth it. Otherwise...
 
@Rusher the ECMAWolf is just about ready. Finally got it close enough that I felt comfortable just making the fixes for OP
so I'll be putting up a Gist with the code and a compatible wrapper soon
 
@undergroundmonorail Or, if you're already importing string, you could use string.ascii_lowercase.
 
I've never imported string in my life, I don't know what the use case would be :P
 
wait... you'd have to range it anyway, nvm
<-- has used python for one or two golfs in his life, that's it
 
sed 's/^/ /g' some_program.py | xclip is probably one of the more common commands in my entire shell history...
 
1:56 AM
@Geobits Are you turning into vzn? :P
 
it's contagious
 
<-- will never, ever catch the disease
 
@Doorknob Huh? I don't knwo what you mean. If you're saying that I use too much formatting, I don't understand. That's the main transgression I've seen him guilty of.
 
@Geobits Heh, I mean the <-- thing
 
Oh, bad habit from old chatroom days, I suppose.
 
1:58 AM
/me doesn't think this is a whole lot better ;)
 
I don't do it often, and debated it just now before I did. The dark side won.
 
@undergroundmonorail Is that for posting python code here? Why not just copy/paste from the file and into a post?
 
@Doorknob I'd have to either add all the spaces myself or use the mouse for longer than I'd like
 
@undergroundmonorail ctrl+k
 
@Doorknob Huh. Does that work for posting answers or just here?
 
2:00 AM
Ctrl+k is for winners. Answers.
 
@undergroundmonorail I actually didn't know that worked in chat until now :P But yes, it works in all posts.
 
(Either way I still use the command for posting to reddit, which has almost identical markdown syntax)
Cool
@Geobits Oh hey, including all the letters was a massive waste of characters anyway. Neat.
I only ever care about letters that are actually in the input, so I can just use a set of the input.
 
Hah, nice. Doing daughter's alphabet, I assume?
 
Yeah
The regex that powers my syntax highlighting refuses to believe that '' is valid syntax for an empty string, which wouldn't bother me if it wasn't for THIS
(halfway through that i switched from a list comprehension to a generator expression. oops. pretend there's a ] at the end or no [ at the beginning, your choice)
 
List comprehension this, generator expression that... blah blah blah python. I really should get around to actually learning it some day. Then again, something more functional might be fun, and more of a mind-stretch.
 
2:15 AM
@undergroundmonorail Lol, what kind of IDE is that
 
xkcd.com/378 panel 1, the lamest of all coding environments
the fact that i use nano is my greatest shame
 
You know, running notepad.exe under WINE might work for you :p
 
I'd rather have broken syntax highlighting than none at all ;)
 
Well, at work I have to use MyEclipse SuperDuper Professional 2013 with uber-addon-goodness. It bogs me down something terrible. I can't say much about nano.
 
2:19 AM
So, I end up doing about half of it in notepad++ anyway.
 
yeah, I just use vim
too much IDE makes me want to pull my hair out
sometimes it's useful but often it just slows me down
 
I've been meaning to learn vim but I'm super lazy and don't feel like figuring out a decent dvorak shortcut layout.
 
vim's not so hard once you get into it. easier than remembering a bunch of ctrl combinations, just straight keystroke combinations
 
I still use the IDE for the Java parts. Since it's bogged down with the entire Hibernate/Struts/Spring/Whatever packages, code completion and hover-javadoc is very helpful. For all the jsp/xml/whatever else, it's neither helpful nor correctly working anyway.
 
When I was first installing a non-ubuntu distro linux I got myself into visudo and had no idea wtf to do
 
2:28 AM
Yeah. That's the only time it helps me out, @Geobits
 
I couldn't even figure out how to quit. Instead, this happened
 
I like showing people that video and saying "yeah, linux is so hardcore that the text editors will ruin your day"
 
Hey, I've done that before! Not with visudo, but somehow.
 
:q
that's it
 
2:29 AM
Can't remember for the life of me, was playing with video card settings.
 
I know that now :P
 
hehehe :P
 
The hardest thing about programming in brainfuck is remembering not to punctuate your comments.
I've broken so many programs with "This should fill cells 5-10 with ones"
or whatever
 
3:07 AM
No wonder Peter Taylor has so much rep en.wikipedia.org/wiki/Sybil_attack
 
I'm sure that's a hilarious joke that I just don't understand
 
@Geobits Thanks! I guess I'll leave it open and just run results every couple of weeks then. I guess they'll understand.
Does anyone else have that point of no return where they decide that they are just going to keep downloading crap onto their computer because they already have so much crap and then just WIPE IT when you are tired of dealing with it?
 
@Rusher I stopped using antivirus software years ago because I was wiping the drive clean every couple months anyway.
I've since slowed down significantly, but I use linux now so it's not really an issue anyway
 
I wonder if Wolf will make it to 100 favorites. That'd be 3 gold badges from a single question.
That makes up for the stupid "Find the Majority" question I asked that got 1 vote
 
3:37 AM
I love tiny coincidences.
I'm writing a brainfuck program to identify a winning move for someone in tic tac toe. The input is this:
X      <- The player who's turn it is
XX-    <- The board, with dashes representing blank spaces
-XO
OO-
The ASCII value for a capital X is 88. O is 79 and dashes are 45.
If it's X's turn, a winning move can be made if a row, column or diagonal has two Xs and a dash. The sum of 2 Xs and a dash is 221.
O's looking for two Os and a dash, or 203.
...Wait hang on, while explaining it I realized it's not a coincidence at all, rather, a provable aspect of the math
It happens to work out in my favour but it absolutely had to be this way
anyway
I can subtract 79 from the first input, double the result and add 203 to get the sum I'm trying to find.
It makes the math easy :)
 
4:29 AM
That was exhausting. Gnight!
 
 
3 hours later…
7:24 AM
codegolf.stackexchange.com/a/25676/6741 Is it me or if he didn't include lengthy results of performance test he would totally have enough space to include his code in his answer?
 
 
1 hour later…
8:36 AM
Well at least he explained what his wolf does which is nice already.
 
@plannapus Almost. The post limit is 30000 characters, and his code is 31420. He could probably golf it to fit, although it would still be rather long.
 
8:50 AM
uh i thought it was 32k and not 30k. ok fair enough then (though there is quite a lot of what seem to be unneccessary whitespace in his code).
i still think that all those test runs that people include in their answers do not bring any added value.
2
 
9:18 AM
@plannapus I agree. The only test runs that matter are the ones Rusher does. Otherwise it's just a case of "well, it works well on my machine..."
@Rusher I take it my latest jar didn't work for you? What can I do to help you run my wolf too?
 
9:32 AM
I'm driving myself nuts with this apl stuff. I'm stuck trying to get this function to work on inca: ` r<:(>1+~<y);((0{:").0!1+~y);((0{:u).0!1+~y);(>@~<y);(0=1+~y)` it's part of making a triangular matrix. But it doesn't work.
It's trying to do dynamic code generation.
 
 
3 hours later…
12:56 PM
@Gareth I added the jar to my project and tried to refer to your class by name and it wouldn't compile. After my MTG tournament this weekend, I might just translate your submission into Java. The language doesn't look that different
 
1:30 PM
Any statisticians in here?
 
I moonlight at work
but, sadly, no
 
Someone said 5 trials isn't good enough. Good enough isn't a mathematical term that I am familiar with. I want to quickly relearn whatever formula involved sample size and "stability of results" but apparently that's not a technical term either
 
Then I can run x trials and say with confidence that I am y% sure that the results are in the correct order
 
Yeah, good enough isn't mathematical.
 
1:37 PM
Technically they said "5 trials isn't great"
But not "great" and not "good enough" are the same thing I think.
 
The standard error is the standard deviation of the sampling distribution of a statistic. The term may also be used to refer to an estimate of that standard deviation, derived from a particular sample used to compute the estimate. For example, the sample mean is the usual estimator of a population mean. However, different samples drawn from that same population would in general have different values of the sample mean. The standard error of the mean (i.e., of using the sample mean as a method of estimating the population mean) is the standard deviation of those sample means over all po...
 
@plannapus Nice! Standard deviation over the sqrt(sample size) is something I can understand.
I do remember from stats that 2% error was acceptable in journals and stuff
Gah.. statistics is so useless unless you can remember the exact name of the thing you are trying to calculate
 
too often true
 
Wow the output Pi problem has 34 answers in less than 24 hours
Should this old question be closed? The author never decided which winning criteria he wanted to use, and just jumbled them up codegolf.stackexchange.com/q/5693/18487
 
2:03 PM
@Rusher Yes. It is off-topic because the objective winning criteria is missing, no matter how old it is.
 
@ProgramFOX Is that the rule for off-topic questions that were not off-topic at the time of posting?
 
@Rusher It is ok to VTC old off-topic questions:
13
A: What to do with old questions that are off-topic?

Sachin ShanbhagCleaning up old question will not be a noise for the moderators, and also this move would help them locate such questions faster. So just flag the question for moderator's attention and leave the rest to the moderators...

 
If that helps...
(just the mean with the standard error)
 
Those standard errors look small
 
@Rusher: That MSO answer says that it is ok to clean up old off-topic questions, but flagging is not necessary anymore, because now we have the Close Vote queue.
 
2:10 PM
That is my totally not scientific, non-numeric answer :P
 
eheh
well yes even if there is only 5 trials the range of values each wolf take is not that wide.
 
Honorwolf and LionHunterWolf have remarkably stable performance
 
OMG I found a bug in the Stack software.
When I edited the links in my post, surroundings[1][2] changed to surroundings[1][3]
 
Wicked!
 
Indeed, that's a bug. It should ignore square brackets inside code spans, but it doesn't.
 
2:15 PM
Ignore that. I'm a big boy and can find the bug report section myself
 
2:29 PM
@plannapus Am I correct in understanding that if I can get the bars to not touch, then I can be 100% certain that the results are in the correct order?
In other words, if the bottom of the winning bar is higher than the top of the second place bar, then there is an absolute winner?
 
at least 99.9% :)
 
Neat!
 
I think the challenge you will see, is that I doubt you'll get error bars that small
those top solutions are very close, you're going to be able to determine a winner, but I doubt with 99.9% certainty. Either way, good luck!
 
2:48 PM
@ProgrammerDan If I can modify your wrapper to support more than 100 instances of a Wolf and also reset between trials, then I can run hundreds or even thousands of trials.
 
Well right now, there is no limit on the number of wolves the wrapper will handle
 
Someone else tried to instantiate a non-java Wolf and the wrapper was not happy at all. I guess it's not related to having more than 100
 
The challenge is the programs themselves
for instance, the first wrapper-wolf uses a single memory object and shares experiences among all wolves
so, unless you do actually start a distinct process per trial run ... it won't be a distinct trial.
If you add something to Animal.java to "kill" or reset at the end of the round
 
I wonder then.... could someone instantiate a Wolf of that type and pass it false information?
If they weren't keeping track of how many were alive, they would be fooled.
 
I could add something to the wrapper rather trivially to support "winding down" the static Process handler and ready it for a new run
Yes, someone could definitely do that, same as with a Java wolf that used shared memory
 
2:52 PM
Oh I just had a brilliant idea. Why don't I just write another program. for i=1 to 100, ProcessBuilder (run wild). DONE.
 
Oh but it won't click on all the error boxes that show up. Is there a kill silently option?
Every time the C# wolf terminates, it complains
 
Process Builder has a non-friendly termination option
I don't know how well it will cascade
but you could certainly try it! I think it's Process.destroy()
 
A "destroyWithNuclearBomb" terminate would work fine. It doesn't have to be friendly. It just needs to write the results to the .csv file before disintegrating.
Doesn't cascade. We'll just modify the wrapper later.
 
I was tempted to ask you if you'd be open to a Shutdown Hook
perhaps you would be?
 
3:00 PM
I'm considering writing a bot that can check Stack for submissions or changes to a submission and pull them into the project. I tried to do it, but I got stuck at "How do instantiate all classes in a directory?" I don't see a way to make the class loader dynamically grab classes.
 
You'd be better off having a program that rewrites the source code to include a new .class when a new .java file appears in the source folder
In reg: to the shutdown hook, I could register a shutdown hook with the JVM so that when the application terminates, my internal WolfProcess threads would cleanly terminate
then, when each round of simulations is over, you should get a clean exit from each subprocess.
 
I guess this is a good time to learn how to invoke the compiler programmatically
 
Yeah
could be fun
 
I need to abstract the wrapper class and just extend it with three classes that have TWO things. One - a cmd string. Two - a shutdown hook.
I said three classes because three classes have used it.
It's funny that I am a C# developer (just picked up C# last year), I've been studying Java for 7 years, and I learn more daily about Java than I learn about C#.
With C# and Visual Studio I'm just like "Press dot and see what options I have". I never read very far into it. I press Run a hundred times to see if what I did broke the project. No? Move on.
 
Heh, yeah. I've used C# for a few projects, and it's okay. Visual Studio isn't horrible any more, so those projects weren't too bad. But yeah, Java has quite a bit under the covers, and exploration is very encouraged.
Ok just did a quick test
if you have the WolfProcess static subclass as part of the abstract super class, only one WolfProcess will ever get created
so you'll have to do some more serious refactoring to get your idea into practice.
Just tested by creating an abstract class that handled the instantiation of a single internal static member, and extending it with two other classes ... then in a wrapper instantiating the extension classes, but the static member was only created once.
 
3:20 PM
@Rusher Moogie from the KOTH wrote something that you can probably go off of for that
 
You could perhaps have the abstract base class instantiate a new WolfProcess, one per instance class, by having an abstract base class that accepted as a param the Class of the child, and holding a Map of Class with WolfProcess ... or whatever.
Surprise me
 
@zenflux Whaaaaaaaat. That is too cool.
@ProgrammerDan Are you saying that an instance of one subclass shares static variables with instances of another subclass?
I'm going to test this....
 
I'm saying that if the static variables are in the base class
then they are shared
lemme throw up a gist to show you what I did
 
@Rusher In the same vein of reflection voodoo: Proxy
 
3:32 PM
Ok I'm convinced lol.
 
lemme show you how you could make it work, sorta. (one min)
 
WTH? Does anyone know why my bksp is not working in this text field all of a sudden? Every time I hit it my browser interprets it as <back>. Win 7, Chrome, started just now.
Just in chat, apparently
 
@Geobits Yeah, I've had that happen sometimes, I think it has to do with a certain ui component having/not having keyboard focus
Never went and figured out what actually makes it happen
 
I thought that, but I can type just fine, so I can't see how it wouldn't be focused.
It's just.... weird.
 
Very strange
 
3:36 PM
What happens after refreshing?
 
Refreshing didn't work, but I got it working right by closing the tab and opening a new one. Strange, but oh well.
So... that's the fix, lol. Just kill it.
 
Does anyone know if writing/reading all my challenge IO in a thread per submission would help/hurt my speed off hand? Just curious before I implement it and profile.
With a timeout of 200ms per, each turn could take a while if it's all blocking on one thread. That's my thought on it, at least.
 
@Geobits how many cores do you have?
 
@Geobits Possibly unrelated to your question because i understood half of it, but communicating with other processes more than triples the execution of my controller.
 
3:41 PM
@ProgrammerDan 4 cores, 8 threads
 
I wish I could find a brainfuck interpreter with a decent debugging interface. I have a bf interpreter on my computer but it's essentially a black box (code goes in, result comes out) so any "serious" (read: non-trivial) brainfuck "development" I do goes on here, which would be a massive pain if I didn't have access to the internet or the site went down.
 
You might see some benefits, then, if you're using the 64bit JVM and a decent OS, it should run some of the processes in parallel
 
Hmm, I might give that a go, then.
 
in general I don't see any downside to NOT block in one thread
and more downsides if you do
 
Why so? Each thread can only write its own pack's variables, so I'm not worried about concurrent mod.
Just have the main thread wait for a signal from each, when it receives packs.size() signals, continue.
 
3:45 PM
Right, that's exactly what I'm suggesting
oh
I see what you mean
 
@undergroundmonorail I haven't looked at it much, but can't you just download the js in case you lose network?
 
@Geobits I haven't fooled around with js much, that hadn't even occurred to me
 
I was imaging you had a single controller process, that communicated serially with each child process (the submissions)
and that seemed horrible to me
 
I'd just have to figure out how to do that
 
Right now, that's exactly what it does. That's why I'm thinking about changing it ^^
 
3:47 PM
but if you have a single controller process, that communicates in parallel with each child process (or as much in parallel as possible) then you should be better off
Oh, so I did understand you! Ok :D
 
@Geobits Actually, I could even just clone the git repo
 
Yeah, I tried running a test with 24 of my naive packs, and one round took around 2 hours.
@undergroundmonorail Ah, didn't notice they had a git link.
 
I implemented that in the wrapper for @Rusher by having a single real "Thread" own communication with each "Process". When the control thread wants to communicate with the Process, I use a Future to have timeout-constrained communication with each Process -- and that Future is run on an ExecutorService owned by the real "Thread" that owns the "Process"
 
What did you write the controller in Geobits?
 
Java (not 8)
I've been going over it look for inefficiencies today.
 
3:50 PM
I know how to attach a profiler to NetBeans and see what is taking all of the CPU time. You can spent your time optimizing relevant things that way
 
Oh, I can profile it. I'm just bored and looking for obvious stuff right now.
I'm about 102% sure that almost all my time is spent with IO. When I had a non-IO class running, it was blazingly fast.
 
You are invoking submission processes how, again?
 
Generic ProcessBuilder method
 
and hooking into the STDIN and STDOUT, right?
 
Yea:

			ProcessBuilder builder = new ProcessBuilder(args);
			builder.redirectErrorStream(true);
			process = builder.start();
			stdin = process.getOutputStream();
			stdout = process.getInputStream();
 
3:53 PM
right, cool
is anyone having trouble getting to meta?
 
nope
 
No
 
sigh.
 
I don't actively use any languages that use // as their comment syntax but I still use //TODO:
def foo(): return True #//TODO: implement
it looks ugly but i think it's funny ><
 
What's wrong with # TODO: Implement?
 
4:04 PM
it's not as funny
 
Better make it #//'--TODO to cover VB and Haskell comment styles.
 
lol
now that's funny
 
Maybe throw a <!-- in there
 
And a C-style /*
 
#//*'<!--TODO
 
4:08 PM
:)
 
And put it in a "comment" on Stack Exchange
 
The bug with code brackets and links was already found like last year. How long does it take for them to fix stuff like that?
Correction... it was found in 2012, and has 31 upvotes.
 
Which bug is that?
 
@Rusher Currently, the oldest bug report that is not a duplicate, not closed, and has no status tag is from 2011.
See this search term:
@undergroundmonorail This one:
1
Q: Editing links in a post that contains array indices

RusherMy post had inline code like myArray[1][2] and a few links. In a revision, I added another link, my indices mysteriously changed to myArray[1][3]. See the revision number 14 here. I have since corrected the indices in revision number 15. Should brackets inside of code spans should be ignored whe...

 
4:26 PM
Huh
 
Why 'huh'?
 
Someone out of the blue asked me why my indices were out of bounds. I was like... I didn't write that. Then I figured it out by looking at the revision history, and submitted that bug report after I couldn't find a similar one.
 
@ProgramFOX I didn't have anything better to say
:P
 
Lol
 
 
2 hours later…
6:03 PM
NOOOOO
Dont do it doorknob chat bot
I posted on the wrong site lol
Phew he spared me.
 
6:15 PM
Haha @Geobits too much information
I was trying to make him waste time figuring out tiny bugs
 
True... but it's not you can't just change your name to anything he's not looking for anyway.
 
@Geobits I was thinking "Maybe there is a way to get the current process that I am currently executing in."
 
If so, you could probably just DQ on the basis of "screw off" :p
Besides, that's easy: System.exit(0) should work, right?
 
6:32 PM
System.exit(0) works like a charm.
 
Nice. Time to submit CowardWolf! If surroundings contains more than one wolf, exit().
@ProgrammerDan Threading the IO worked like a charm. Much better with 10+ packs.
I fixed the flocking code up a bit, too. Not only faster, but 33% more beautiful movement.
 
6:47 PM
Hello Hello. I'm at a place called Veeeertigoooo
 
@Geobits Awesome!
 
Haha rentacoder.com redirects to freelancer.com
 
7:19 PM
Would it be too boring to use Code Golf to build the world's smallest compiler? Each challenge would be like "Smallest lexical analyser wins" "Smallest parser wins" "Smallest optimizer wins"
I bet we could do it, and use it as an advertisement for the site too.
 
Have them try to beat this guy: muppetlabs.com/~breadbox/bf
BF compiler in 240 bytes
Later improved to < 200
Although using BF for "smallest compiler" is a bit cheeky
Aha, down the page a bit is a linux executable, compiler in 166 B
 
Is it still 166 bytes after you build the compiler into a .exe?
I meant a REAL smallest compiler.
Not something that blows up when you build it, but looks great on paper
 
> The executable is 166 bytes in size.
 
Oh wow. I stand corrected :X
 
I assume that's what it means.
Yep, pretty crazy
 
7:27 PM
I think my compiler from college has 50 times that many lines of code and probably double that after all the imports are resolved.
And it only parses basic algebraic expressions and "print" lol.
 
I might have to learn GolfScript or J and try my hand at this madness
 
If you use Python you can compete with me :)
I just try to do better than the other Python/Java entries
 
I've golfed with Java (HA HA), but it's just not the same
 
@ProgrammerDan Won one of them with Java.
 
Currently hold #1 on all Hackerrank golf challenges, filtered by Java
That's my claim to fame right there
 
7:30 PM
He was the only one that answered it though. It was a tedious algorithm.
Is it user name or username? Quick vote don't Google (Google is undecided anyway)
 
username
 
I guess you are the majority then.
 
What's your opinion?
 
I think it depends on context
My username is Rusher. I enter my user name.
Wow that looks weird.
I think if someone else says username, you should also say username to avoid looking awkward.
 
Agreed. So let it be written.
 
7:37 PM
Speaking of awkward (
 
<lisp> noooo mah lithps won't compile now [/lisp]
 
I guess Doorknob's chatbot died.
 
7:58 PM
@Rusher that's right, that's my claim to fame -- winning with Java on a challenge no-one else wanted to participate in, haha.
 
I read the first half of your sentence and, for a second, thought your claim to fame was killing Doorknob's chatbot
 
mwahahahaha
 
"Hack a chatbot in as few lines as possible"
 
 
1 hour later…
9:23 PM
hi
Would the following be ontopic on codegolf?
Asking for (Java) test code that looks like valid test case and fails if a new inner class is added to an existing class (as a tricky way to prevent devs to create lots of inner classes - usually with lots of indentation levels).
 
If you can turn it into an interesting and objectively scorable contest, then it is on topic. That doesn't really answer your question. You know why? Because the view of the crowd is all that matters here.
For the life of me, I can't figure out how to make "Protect against inner classes" interesting.
But your biggest problem right now is that if two people succeed at completing your task, who wins?
 
@Rusher, care to weigh in on the new submission TotallyAStone?
 
I thought about the most creative solution but it doesn't seem objective
 
I beleive (as I commented) it is in violation of the rules
 
@zenflux I'm still thinking about it. Should I just make two scoreboards? One with everyone included and one without?
 
9:39 PM
That's always an option, but I feel like that gives everyone free reign on the cheaty scoreboard to do all kinds of crap that ends up being who gets loaded last wins.
If you do it though, you could call it the DMZ
or No Man's land
Speaking of which, perhaps wolf initiation should be done in randomized order?
 
@Rusher: Thanks for the answer!
I have to go now, bye
 
I can randomize the initialization. Rather than create a cheaty board, I'm just going to give honorable mention to the Wolves that did something cheaty, and I'll briefly explain their approach to winning. I'll provide links to their answer so they can get upvotes. That makes everyone happy, right?
Otherwise, I'll be randomizing shit for weeks until all the cheaty wolves are happy.
 
01:00 - 22:0022:00 - 00:00

« first day (1168 days earlier)      last day (3666 days later) »