« first day (1236 days earlier)      last day (3609 days later) » 

 
2 hours later…
5:04 AM
I just fell victim to a user with the XY problem: in this question
I solved the problem (Y) the user had, but the user was really trying to do something else (X) that he commented on the other answer. The other answerer edited his or her answer to accomodate the X.
 
 
1 hour later…
6:23 AM
I was going to play with the dots and boxes on my lunch break, but instead I read the Snobol chapter in this 1975 data structures book. I've been home for two hours, but it all went to the video game. :/
So I've got nothing to share.
Just lurking out.
 
7:21 AM
@luserdroog not to worry :)
@luserdroog but it's great you are looking at it
 
7:42 AM
I have done a little playing now.
 
@luserdroog what do you think?
 
I'm multiplying out the adjacency matrix now.
To do an edge-vertex incidence matrix, we'd still need that crazy edge stuff to index the edges.
 
 
3 hours later…
10:31 AM
0
Q: Sandbox-Question: Convert repeating decimal to fraction

flawr The goal is to write a program that accepts a positive fraction in decimal form, e.g.: 4.2 14.013 0.001 which has to be converted to a fraction e.g.: 21/5 1/1000 23/13 so that the greatest common divisor of the numerator and denominator is 1. Shortest code (in bytes) wins. No standard loophole...

 
11:18 AM
0
A: Proposed Question Sandbox - Mark XIII

flawrSandbox-Question: Convert repeating decimal to fraction The goal is to write a program that accepts a positive fraction in decimal form, e.g.: 4.2 14.013 0.001 which has to be converted to a fraction e.g.: 21/5 1/1000 23/13 so that the greatest common divisor of the numerator and denominator ...

 
 
3 hours later…
1:56 PM
hi
 
@user2179021 Hi!
 
I am mostly here to advertise codegolf.stackexchange.com/questions/30313/… :)
@luserdroog any luck?
 
 
1 hour later…
3:15 PM
Yo, I haven't been here in a while.
Still got my 122 consecutive days on codegolf.se, just haven't participated at all :P
Exam season, bleh.
 
Yo @undergroundmonorail!
 
@undergroundmonorail I know that feel
 
3:59 PM
Exams....what are those things?
 
You know, where you go to the doctor and they check your vision and hearing.
 
...
 
:D
 
Hmm, doctor
I haven't been to one since the guy failed to diagnose me with mono
After 3 visits in 3 weeks
That was like a decade ago
 
4:06 PM
While I tend to avoid visiting doctors as well, that's a bit like saying "I got food poisoning at that one restaurant once, so I stopped eating."
 
Hmm, that is an interesting analogy.
 
I'd argue that food is required to live, while doctor's visits aren't.
 
@Geobits not the point... ^^
 
I get that you're saying you shouldn't avoid all doctors because of the mistakes of one, but "I'll starve myself to death" is quite a bit of hyperbole from "I don't go to doctors any more".
It's more like saying "I don't go to restaurants any more", IMO.
 
yeah I really wasn't getting at the food-is-remotely-related-to-well-being part at all... restaurants and food were just the first thing that came to my mind.
but yes not going to restaurants any more might have been more appropriate, but now I can't edit any more :P
 
4:19 PM
Write a userscript that will search/replace that exact phrase and distribute it to all regular users of the chat. ;)
Hmm, a question I answered on Skeptics made it to HNQ. Weird, only one answer and 8 total votes between question and answer.
 
how long has it been on HNQ?
 
I just noticed it in the sidebar now, but not sure when it actually got there. Asked and answered about 2 hours ago.
I just thought it was odd that it got there with such a low vote total.
 
PPCG question get there with even less votes I think
 
I thought HNQ was views based?
 
I know it's supposed to depend on site traffic, average votes, and timing among other things, but it's still odd when I see something there with what appears to be low counts for everything.
 
4:36 PM
@m.buettner PPCG + HNQ = weird
 
@Doorknob Yeah, I've noticed that. But so far it's only been good for us I think. (in terms of traffic... I realise, this is part of the reason why code-trolling happened)
actually I'm pretty sure, I found PPCG through HNQ myself
2
 
Me too.
Along with Skeptics, Parenting, and SciFi/Fantasy
 
@m.buettner That's how I did it too
 
I'm tempted to gain up some rep on parenting just so I can downvote some of the ridiculous answers I see there, though. Probably not the most constructive use of my time, but I'm constantly shocked by what some people are spouting as advice.
 
Parenting is definitely not a site I'm going to participate on any time soon :P
I don't even remember how I found PPCG.
 
4:43 PM
There's a few billion parents in this world, and just as many opinions about what is the correct way to parent kids
But I'm pretty sure I'm doing it right
3
 
Oh I know... I can't shake the feeling that it probably shouldn't pass out of beta. There are some examples of good questions on the site, but 80% of them are just pure subjective.
I'm doing it right, too, so there are at least two right ways to do it ^^
 
Is quine pronounced with a "ine" or "een" at the end?
 
I always pronounce it 'ine', just as in 'wine', but I don't know if that's right.
 
5:01 PM
@KyleKanos en.wiktionary.org/wiki/quine#Pronunciation It's the same vowel as in my or rice
 
@PeterTaylor damn it, you beat me to it by 5 seconds :D
 
@PeterTaylor Awesome! Thanks
 
@Geobits Parenting actually coined the term "good subjective". They now abuse it, but there are a few people there who remember what it means.
Something about "personal experiences are better than pure opinion". It didn't make any sense to me.
 
Well hell, let's start up a Anecdotal Health Care stack while we're at it. "Rubbing this snake oil on my wound improved my joint pain by 400%, it should work for you, too!" :p
 
Small print: "The pain isn't any less than before. But it's better now!"
3
 
5:22 PM
For anyone that was reading my good versus evil challenge idea yesterday, I decided to let ELU determine the word that I will ultimately use as the abstract class that all submissions in my challenge will be extending.
I'm writing a wrapper class for submissions that want to use other languages. It worked once, so it should work again.
 
class AI extends Impressionable ?
 
I vote for Gullible.
 
@Rusher Sociopath? As in, doesn't care if they are good or evil as long as it's for their own benefit? (Sociopathy does kinda mean that, doesn't it?)
 
The dark triad is a group of three personality traits: narcissism, Machiavellianism and psychopathy. The use of the term "dark" reflects the perception that these traits have interpersonally aversive qualities: * Narcissism is characterized by grandiosity, pride, egotism, and a lack of empathy. * Machiavellianism is characterized by manipulation and exploitation of others, a cynical disregard for morality, and a focus on self-interest and deception. * Psychopathy is characterized by enduring antisocial behavior, impulsivity, selfishness, callousness, and remorselessness. The dark triad may...
class AI extends Machiavelli
=D
 
If you're Machiavellian, it means that you'd be doing the manipulating, not being manipulated yourself. This could work as "caring only for yourself", but it doesn't really work for the ELU question, which seems to be asking for someone easily manipulated.
 
5:30 PM
@m.buettner That implies that the subject is self-serving and doesn't care about the spectrum at all.
 
@Rusher yes, isn't that the case with your bots?
 
hm. maybe I misunderstood the challenge.
was it something like: "each round choose to be good or evil. if you're in the majority, you get a point" ??
 
I would call a good bot responsive (reacting quickly and positively), but again, that doesn't really work for the ELU question, so I'm not sure exactly what you're looking for.
For the ELU question as written, I agree with the comment saying impressionable works just fine.
 
You are given information, and you have to choose a side. You do care about the spectrum because choosing the right side is important to you, although ultimately self-serving.
It doesn't really matter to me what the bots do. I just want to provide a theatrical back story.
 
@Rusher I don't see how that doesn't fit. You care about picking good or evil, but not because they are good and evil. You just care about picking the side that is currently most beneficial to you, regardless of any moral implication. That does sound sociopathic to me. (If you just don't want to call you class a Sociopath, I can understand that, we don't need to argue about this. :P)
 
5:42 PM
I don't think your ELU questions really squares with the bots, though. Bots are self-serving, and will only care about "sides" as far as it benefits them (no morals involved). Your question doesn't convey that at all, and instead asks for something meaning they are being swayed by moral arguments.
 
I guess my thought was that everyone would write a bot that is easily influenced by the behavior of every other bot.
 
everyone is correct! bots are both self-serving and influenced by other bots.
 
And so I have two premade classes, Angel who is always good and Demon who is always evil. Everyone else needs to extend sociopath/Fallible(how do I turn that into a noun?)/insertWordHere.
 
Human
Mortal
I mean, if we're going with the angels/demons theme, why not make it simple like that?
 
it also makes sense that the author of the challenge would view it in terms of how bots influence each other, and potential contestants take the angle of what-my-bot-does.
neat.
 
5:48 PM
Oh I remember now why I was looking for an adjective.
I decided that extending a class was dangerous because of reflection, so I moved to an interface
So now, everyone must implement Fallible/insertWordHere
It didn't make sense to implement Human (which is how you just reminded me)
 
Okay, do your base classes of Angel/Demon implement the same?
 
They will have to, unfortunately, so that I can add them to an ArrayList<Fallible> with giving them special treatment
Even though they are not technically fallible
 
'implements FreeWill'
 
LMAO! I love that
But it should look more like implements FreeWillable
 
Fallible is a horrible word for this, by the way. Someone who has only good motives/morals can still be fallible.
Infallible means not making a mistake, not unchanging.
 
5:51 PM
'implements Agency'
 
Inflexible is more like what your angels/demons are.
Or constant, immutable, etc.
 
@Geobits Only if you consider Angels, faith, and justice to be Right. I've seen movies where the Angels were just ruthless idealists, and you could also be fallible towards their end of the spectrum.
 
@Geobits the angels and demons have just as much a choice in their behaviour. It's their moral foundations that heavily weight it one way or the other :)
 
That's what I'm saying, though. Being infallible doesn't have anything to do with your beliefs.
 
I do think "Agency" is the word you want here.
from wikipedia: "agency is the capacity of an agent (a person or other entity, human or any living being in general, or soul-consciousness in religion) to act in a world. The capacity to act does not at first imply a specific moral dimension to the ability to make the choice to act"
 
5:57 PM
@Geobits I don't even understand how one can be infallible if they have no beliefs. If you believe killing a fatally injured person is morally wrong, and you kill a fatally injured person, you are not infallible. An angel who smites evil may be infallible, but a human who murders criminals may be fallible. It has everything to do with human beliefs.
 
I like MorallyFlexible
sounds like a very good euphemism for "sociopathic" :D
 
public class RusherBot implements MorallyFlexible{}
Anyway, I'll keep writing and see what people on ELU say. Thanks for the input.
 
@Rusher I should say, being absolutist doesn't make you infallible. Yes, an Angel might think itself infallible, but the Demon would disagree, and think itself infallible. Anyone at all could convince themselves that they are themselves infallible, so I'd say the word has basically no useful meaning at all.
 
6:12 PM
ACK! After all that it turns out that you can't use the final modifier on Interface stubs.
 
Just make it a class and forbid reflection :)
 
I guess I'm gonna have to. I hate enforcing security with policy and then hoping nobody breaks policy with a language that I can't read.
I can't even imagine all the weird loopholes people will find this time.
So this works fine in Java:
final int i;
i = 3;
 
It's no different than saying "don't hardcode answers" in code-golf. Sometimes it has to be policy. I wouldn't worry about the "language I can't read" problem much. Others can, and will normally call out rule-breakers.
 
You can declare final variables and then assign them later, but can't declare final method stubs and provide a definition later :(
Is it sad that I'm too scared to ask SO for help with that?
I feel like SO is a pack of carnivorous beasts that don't care about your question at all.
 
Ah, I always thought them more caring about the question than with the person asking it ;)
 
6:25 PM
@Rusher Why would you want to define the method later?
 
@Quincunx Suppose you have 50 different children of the Car class, and all you want to do is call "Drive" without worrying about the details of each type of Car.
You define a Car, and you make it abstract because it has an abstract method called "Drive"
That means that every single concrete implementation of car must be able to drive.
 
Then why would you want the method to be final?
 
I have a reason for not wanting the method to change ever again.
Let's say I am a driver's education teacher and I am teaching you to drive properly.
 
OK
 
After a while, you lose your right leg.
You lose the ability to drive.
 
6:31 PM
ouch
 
Now I call "drive" and you throw an exception.
Now I have crashed
Unless I handle your exception I mean
I apologize if this is the worst Object Oriented analogy ever. It's been years since I had proper education so memory is a little fuzzy
 
I do understand Object Oriented Programming.
I'm rather confused at why you need to do this though.
 
I want to make sure you don't lose your right leg.
 
That's not the parent class's responsibility, though, is it?
 
Exactly what I was trying to say (but failed at)
 
6:35 PM
Ok let me rephrase. I want to make sure I, the parent, do not lose MY right leg.
I basically want to say "Every Car has an implementation of Drive that cannot change at runtime."
 
final methods don't let subclasses change them. So why would you want to have a final method that the subclass implements? Ugh.
 
Ah, so you want to make the child methods final? Yea, that doesn't really work.
 
Sounds like you want Haskell.
 
I point again to this example:
final int i;
i = 42;
I know I want i to be final, but I don't know what I want it to be just yet.
So I declare it first, and assign it later.
 
Yes. You could do final int i; if(condition){i=0;}else{i=42;}
 
6:38 PM
I don't see why being final and abstract is such a confusing proposition, given that simple example.
final appears to mean "Once I am assigned, I can never change."
So what is wrong with "Once I am implemented, I can never change."
 
Well, what exactly are you trying to do? If I have a method: void drive(){if (someBoolean){throw new IllegalArgumentException();}someBoolean=true}, the method never changes, but what happens when it is called more than once does change.
So you are looking for "I don't want to implement this now (let the subclasses implement it), but don't let subclasses of subclasses change the implementation". I don't think the base class should worry about this.
 
I guess you're right. What I want to do doesn't make any sense.
I'll just wave a finger and say "Don't subclass another submission, don't use reflection, don't touch another submissions in a weird way, and don't crash my test machine."
So that they can find a way around my rules and break me anyway.
This is how much faith I have in PPCG -> | |
 
Of course, another alternative is to not use classes/extension and just do a stdin/out pipe.
 
I'm writing a wrapper for who can handle communication with non-java entries via STDIN/STDOUT
I named it Rapper, because public class Rapper extends Human was too funny
2
 
Just sayin, other koth challeneges haven't been as worried/harassed by reflection for a reason.
 
6:49 PM
They also weren't as popular
That wasn't a stab at anyone. My challenge wasn't better than anyone else's, but it was a lot easier to participate in if you already knew Java.
 
Yes, but that's why I'd recommend anyone write a simple extendable client in a widely used language, like I did for Hunger Gaming. It was literally "extend this and fill out this method".
 
any rubyists around?
 
Putting the clients in the same process as the server is more problematic from a security standpoint is all I'm saying.
 
I thought about doing that. I didn't know if communicating with 100 other processes would be easy or not.
 
Honestly, it's as easy/hard as communicating with one. The number of processes shouldn't matter to the comm protocol, just ask them serially what to do.
 
6:55 PM
Wolf, with the GUI removed entirely, completed a game in less than a second with Java only entries. With ProgrammerDan's wrapper and a R wolf, a Javascript Wolf, and a C# wolf, it slowed down to over 10 seconds per run. Imagine if all 50 entries were in other languages.
But I think it would be feasible this time because I am only asking a simple question. Are you good or evil? So maybe you're right.
 
Well, for Hunger Gaming the limiting factor was definitely not the processing speed of the clients, it was the number/grouping of prey that mattered.
The flocking behavior was the only thing that (noticeably) slowed it down. Once it got down to <100 prey, it ran >5k turns a minute no matter which contestants were left.
Interprocess communications is generally pretty damn fast.
 
I always thought it was odd that the most useful stream readers in Java are so complicated to construct.
BufferedReader reader = new BufferedReader(new InputStreamReader(myProcess.getInputStream()));
It has that middle layer weirdness.
 
Yea, a pet peeve of mine. Even for Java, it's a bit ridiculous.
 
7:11 PM
I just learned though that closing a BufferedReader closes it's underlying stream. So it's complicated, but at least it's responsible.
But if I hook to that stream again it had better be reopened. Now I'm not sure how I feel about that...
 
Better than the alternative of having to close both the BufferedReader and the InputStreamReader, and having to remember which of the two you might have forgotten, which order to close them in, and what to do if you need to reopen. (IMO)
reader.close() is just... simple.
 
I was thinking that the Stream should be responsible for opening and closing, and the Readers should simply exist or not exist. That way, if I have multiple threads handling a stream and one of them dies, the rest can go on their merry way. Once every thread is done, the thread's manager can close the underlying stream.
It's nice for the case that I am using it, so my first thought was "Oh, stuff that closes other stuff for me? Great!"
That sounds more like reader.closeAndCloseUnderlyingStreamAndAlsoTakeOutTheTrashWhileWereAtIt()
On the other hand, without closing the underlying stream, it would be more like reader.closeButThisReallyDoesntDoAnythingAtAll()
 
7:27 PM
OTOH, it's rare (for me at least) that I'm reading from the same stream using multiple readers, so it's nice that closing the reader closes it all. For example, in your BufferedReader line above, if it didn't, you'd have to either create an additional InputStream variable to hold it until you wanted to close, or call getInputStream() again later only to close it.
 
0
A: Proposed Question Sandbox - Mark XIII

William BarbosaDessine-moi un mouton/Draw me a Sheep Let's pretend you're an aviator whose plane crashed. You're now trapped in the desert. As if this is not bad enough, a creepy kid who came out of nowhere is begging you to draw a sheep. Consider you suck at drawing and you really want the kid to shut up,...

 
7:50 PM
Nobody has asked a Magic: the Gathering question in three entire days. In fact, Board and Card Games has a grand total of two questions in the last three days.
I can't farm rep like this :(
 
@Rusher life is hard.
3
 
@m.buettner Remember the day that your friends stopped caring about fertilizing your farm on Farmville? This is worse than that.
 
Eww. Farmville? Totes lame :p
 
And that is my one and only use of the word 'totes'. Ever.
 
7:55 PM
I'd say the same about fedoras. To each his own?
 
Better a fedora than a block of dirt.
 
popcorn anyone?
 
Your house sits on a block of dirt. I hope it disappears while you are sleeping and you get eaten by tremors.
 
How do you know my house isn't built directly on bedrock? (plus concrete foundation, of course)
Besides, tremors can easily be fooled into running over cliffs.
 
Ok riddle me this
The stream that you are supposed to read when you create a process is myProcess.getInputStream();
So the process has an Input Stream that you READ from...
How is that not completely backwards?
 
8:03 PM
The parent is reading input from the child's output.
You couldn't make it an outputstream, because you can't read from that.
 
I can read your output. That makes total sense to me.
 
What would you call something that you read from, that acts exactly like every other InputStream?
You certainly can't call it an OutputStream, since that's already taken and you don't read from it.
 
If the InputStream were MY inputstream, then I would expect input from it.
If the input stream belongs to the process, I would expect to send input to it via the input stream.
I don't usually think the world revolves around me when the method belongs to another object.
 
The Process class doesn't belong to the subprocess, though.
It belongs to the calling process.
 
I don't understand. We went from Object HAS A Component to something completely different (relating an actual "process" to a "Process object")
 
8:08 PM
getInputStream() belongs to Process, which belongs to the main process. So, it should name it according to the main process's view, as input.
I agree that you could get away with wording it either way, but they had to choose one, and I think they chose right.
 
I guess I'm too used to C++'s cin and cout
If I output stuff, it goes to cout. If someone else wants to read my output, they have to grab my cout.
Likewise, if they want to send me something, they have to feed it to cin.
So I thought if I wanted to send a process some input, I would send it to the "process in"
My output becomes the process's input
 
Yea, pretty much.
 
my.output => process.input
But it's the exact opposite :-/
my.input => process.input is how it works in Java
 
Which makes sense if you look at it as "send <-> receive"
 
ha, I'm dealing with the same stuff in Ruby right now (figured it out now though... I was just missing a good old $stdout.flush)
 
8:15 PM
How was your popcorn?
 
Just think of it as:
input = input from process
output = output to process
 
I know that's how it works, I just don't understand why it works that way.
 
Because it doesn't see it as different from any other stream. If you want to get something from a file, it's input. If you want to get data from a web request, it's input. If you want it from another process, it's input.
 
@Rusher I hate popcorn
 
process.inputStream sounds like the input of the process, not input from the process
Why are we treating a member function as though it belonged to me instead?
the input stream belongs to the process. It is the process's input stream.
The process HAS A input stream.
 
8:17 PM
Because it does belong to you. The Process class does not belong to the actual subprocess, and only exists in the calling one.
 
No! It belongs to the PROCESS. I am calling Process.getInputStream() to get it.
I don't understand how the dot operator works in your brain.
 
Process != process
 
Is that supposed to mean something philosophically?
 
The Process class is just a utility class to interface with the process. It's not the process itself.
It absolutely belongs to the caller, not the process it represents.
 
I understand that the process belongs to the caller. I create a process. It is my process.
 
8:20 PM
Not what I meant.
 
I HAVE A Process.
Well explain what you mean in object oriented terms then. I understand that my computer desk is not the same as class ComputerDesk but I don't really get why that is important.
 
If you rename Process to ProcessHandler, it might make more sense intuitively.
 
If I write an Object to represent some sort of real world object, then from the perspective of the rest of the program, that object IS the real world object.
 
You're not saying "Hey process, give me your inputstream", you're saying "Hey Process, give me that process' stream as input."
 
If I create a Car class, I understand that I haven't created an actual car when I make one.
But when I ask for the wheel of the car so I can change it, I don't say "Hey car, give me your car's wheel."
I just say "Hey car, give me your wheel."
Thus myCar.getWheel();
 
8:24 PM
Right, that's why I said thinking of it as the process's handler might make more sense.
 
So in other words, you agree that something is off, but you don't agree with my interpretation of how to rename it so that it makes sense.
You would rather change myCar.getWheel() to myCarHandler.getwheel()
 
Basically. You'll get no argument from me that the standard Java libraries have some naming issues. We might argue over which ones have issues, though ;)
In general I wouldn't change to myCarHandler, no. I'm just saying that's the way it works in this case.
 
I know the way it works, hence my original comment that it is weird.
I feel like this entire time, you have been trying to convince me of how it works
If I didn't know how it worked, I wouldn't be able to say "How it works is weird"
 
Even the Javadoc is ugly for this one: "The class Process provides methods for performing input from the process..."
 
Or this: This method returns he input stream connected to the normal output of the subprocess.
 
8:28 PM
It doesn't even try to pretend it represents the process itself. It really should be some kind of Handler class.
 
Or this even: The java.lang.Process.getInputStream() method gets the input stream of the subprocess.
Even you would have trouble arguing that that is wrong.
 
I'd love to argue some more, but I need to head out. :)
 
Buettner, you're up. Geobits, tag him in to the ring before you leave.
 
I have absolutely nothing to say about naming decisions in the Java standard library :P
 
And he taps out! Rusher claims the championship belt once and for all!
 
8:33 PM
congratulations
 
Thanks. I'm the champion of nothing. :)
 
I thought that but I also thought it would be rude to say it, so I went for "congratulations" instead :D
 
8:44 PM
I hate missing variables :(
 
 
1 hour later…
9:53 PM
We have that kind of rain going on where you can literally see the wind as it blows. It folds the rain like a bed sheet hanging out to dry.
 
That sounds nice
 
Is that a cover for something rude that you didn't want to say?
I suspect everything you say now Buettner.
 
;)
no I just like rain
 
10:16 PM
sweet, process communication works fine now, so I can work on the actual controller logic tomorrow. vector racing coming by monday next week!
 
Nooo! I need to focus on proving the correctness of my optimisations to codegolf.stackexchange.com/a/31707/194 , and vector racing will be a major distraction.
 
Haha, don't worry, I have no doubt you'll find a few loopholes or other insufficiencies in the challenge/controller which will delay the challenge by at least a week ;)
 
The thing is I'm quite easily distracted. Today I wrote an automated recurrence searcher to see whether that would shed any light on the numbers which can be communicated by stone-throwing. And that distracted me onto revisiting an old program I wrote to look for Riordan arrays in the OEIS database.
 

« first day (1236 days earlier)      last day (3609 days later) »