« first day (1363 days earlier)      last day (3626 days later) » 
00:00 - 19:0019:00 - 22:00

12:35 AM
@RobertHarvey you have to use a generic constraint where T : new()
@RobertHarvey generic constraints hint the compiler that "anytime somebody tries to use this and supply a T that doesn't meet this constraint, fail to compile" - the new() constraint says "The type T must have a public parameterless constructor."
@Dr.Ibb ah but we Haskellers live happily free without intellisense or autocompletion, notepadding Haskell is easy because it takes very little Haskell to complete your program! :)
 
user55340
1:36 AM
I've tweaked the to say "code reviews go over there". Some additional wording might be useful.
 
user55340
@JimmyHoffa Why use notepad when you could just use ed?
 
3:38 AM
This has to be the dumbest language rule I've ever seen. What were they thinking?
0
Q: Comparing wrapper Integer objects

user3639306I am comparing two Integer objects with following code....Why output is "Both integer are not equal..." though I have read somewhere Integer or int will be equal only within range of -128 to 127. Why not 128? Integer i1 = 128; Integer i2 = 128; if(i1!=i2){ System.out.println("Both integ...

 
user55340
3:57 AM
@RobertHarvey Its a side effect of the Flyweight.
 
user55340
You shouldn't be using == or != to compare Objects. It just happens that the -128 .. +127 range is part of the Integer cache and when using auto boxing will be drawn from that cache. 128, outside of it, isn't an auto boxed value from the cache and so gets a new object.
 
user55340
4:14 AM
And as to what they were thinking JLS:
 
user55340
> If the value p being boxed is an integer literal of type int between -128 and 127 inclusive (3.10.1), or a boolean literal true or false (3.10.3) or a character between '\u0000' and '\u007f' inclusive (3.10.4), then let a and b be the the results of any two boxing conversions of p. It is always the case that a == b
 
user55340
> Ideally, boxing a primitive value would always yield an identical reference. In practice, this may not be feasible using existing implementation techniques. The rule above is a pragmatic compromise, requiring that certain common values always be boxed into indistinguishable objects. The implementation may cache these, lazily or eagerly. For other values, the rule disallows any assumptions about the identity of the boxed values on the programmer's part. This allows (but does not require) sharing of some or all of these references. Notice that integer literals of type long are allowed,
 
user55340
As this was written by Gosling, Joy, and Steele... this is exactly what they were thinking.
 
@MichaelT I know, Ed, man! !man ed
 
4:36 AM
@MichaelT C#'s behavior makes more sense to me. All numerical types are comparable by value, even when using ==. Comparing numerical types by reference is just not ... interesting.
 
5:30 AM
@RobertHarvey all value types are (including any struct you create), the string reference type is the only one which has an == implementation for value
they weren't making a decision in C# about numbers specifically, they just made the decision regarding any value type since an equality comparison makes sense when you have a stack value
as well as in the case of reference types - since they are references it's logical for equality to compare pointers since the memory layout of each object may be different though they have identical "value".
 
6:02 AM
@JimmyHoffa All true.
Thank God I don't have to use Java. I've seen many things in it that I don't like.
 
 
7 hours later…
1:03 PM
So of course, I immediately had to link this question to @JimmyHoffa
0
Q: What language is Haskell written in?

AndreyAlso (besides the title question), is there source code available for different impure Haskell functions like IO? I don't mean the Haskell side of the code, but whatever Haskell implements to do IO.

 
that is not the only haskell question
2
Q: Relation between objects

phaazonFor a few weeks I’ve been thinking about relation between objects – not especially OOP’s objects. For instance in C++, we’re used to representing that by layering pointers or container of pointers in the structure that needs an access to the other object. If an object A needs to have an access to...

 
@ratchetfreak There's another one??!
 
@durron597 haskell's reach extends far and wide young man
 
1:21 PM
@MichaelT If you think I'm gonna click that, you'd be wrong.
I haven't even had my morning cup of coffee, but I'm not THAT dumb
 
2:06 PM
CRCs are hard yo
Have to do a CRC across platform. One is an embedded microcontroller C environment, other is an embedded linux running python. Why can't serial communication just suck less?
 
cause errors
 
Yeah, cuz it has 0 error checking. So now we CRC ALL THE THINGS
figured out my problem though. the embedded solution seeds the CRC for god knows what reason
 
user55340
@Ampt You know you want to click it and find out what nugget of wisdom I've put in there.
 
@Ampt uninitialized variable maybe?
 
@ratchetfreak no, it's very explicitly stated as the CRC Seed, so they meant to do it. I just don't know why
@MichaelT Rick Astley has no nuggets of wisdom left for me.
 
user55340
2:22 PM
@Ampt Maybe its something about CRC and uuencoded data?
 
@MichaelT Maybe it's a guy with red hair in a trench coat trying to woo me?
 
user55340
@Ampt I'm not sure how one would do that with a bit of code on ideone... its an online 'run some arbitrary code for me' site.
 
@MichaelT I might buy that if redirects weren't a thing
 
user55340
It can't redirect!
 
user55340
#!/usr/bin/perl
my @lines = <DATA>;

for (@lines) {
    my $uubuf = unpack('u',$_);
    print $uubuf;
}

__DATA__
M3F5V97(@9V]N;F$@9VEV92!Y;W4@=7`*3F5V97(@9V]N;F$@;&5T('EO=2!D
M;W=N"DYE=F5R(&=O;FYA(')U;B!A<F]U;F0@86YD(&1E<V5R="!Y;W4*3F5V
M97(@9V]N;F$@;6%K92!Y;W4@8W)Y"DYE=F5R(&=O;FYA('-A>2!G;V]D8GEE
E"DYE=F5R(&=O;FYA('1E;&P@82!L:64@86YD(&AU<G0@>6]U"@``
 
user55340
2:34 PM
It just runs that code for you.
 
user55340
Its a rather neat site... ideone.com
 
user55340
 
user55340
Whee... XKCD what if...
 
user55340
 
user55340
 
2:46 PM
@MichaelT ....
 
user55340
I think if I register, I could set a specific label for the url... something like ideone.com/rickroll - make it more clear what the code does... but what fun would that be?
 
@MichaelT I have nothing nice to say to you right now
I should have known that nothing good could ever come of perl
 
user55340
@Ampt just be glad I didn't try to implement it with this.
 
3:17 PM
@MichaelT ...weiiirddd
a whole what-if just about drinking blood...
> I'm not a doctor, and I try not to give medical advice in these articles. However, I will confidently say that you shouldn't drink the blood of someone with Ebola.
 
user55340
@JimmyHoffa btw, I rickperl'd @Ampt
2
 
I think the squirrel sensor image will start popping up for other NSFW stuff
 
@ratchetfreak Iduno, I've just taken it to be the glyph that means vomitting blood
 
user55340
 
@MichaelT why would you link a dung beetle youtube video?
 
user55340
3:21 PM
Watch it.
 
18
Q: Why doesn't Mono implement WPF?

Hasan KhanI haven't been able to find a reasonable justification of Mono team not working on WPF. What could be the possible reason? Especially when they've already implemented Silverlight.

@NathanCooper: So why are we treating it like a discussion forum, then? He said in eight paragraphs what others managed to say in two, three years ago. Since the question keeps attracting the same answers, I've voted to close it as "primarily opinion based." — Robert Harvey 1 min ago
 
3:52 PM
@MichaelT alright, good start to the morning
 
Any morning in a chat room that includes the words "vomit," "blood," "dung," "ebola" and "NSFW" all on the same page is a good morning.
 
it's not morning it's the afternoon by now
 
It's friday for me, suckers
 
Not here in druggy kalifornia.
 
4:35 PM
The ending message here is possibly the most surprising of any what-if I've read- usually they're colorful with a fairly common sense message "That will go boom" or whatever, but this one genuinely ends with a message that is totally unintuitive if it's true... what-if.xkcd.com/91
 
if you make a lot of money, you don't have to worry about your power bill
makes sense to me
 
4:56 PM
@Ampt ? I find it surprising that you could make that much money just selling some bottled water from your tap
90 seconds of bath tub flow -> $25
!? I want to create a water stand now.
 
@JimmyHoffa lol bottled water is more expensive than Gasoline
 
user41796
@JimmyHoffa Look at how much you can make from selling just an ounce of a plant that grows in the wild and is pretty easy to cultivate....
 
supply and demand, yo
 
@GlenH7 around here? Not much anymore... :P
 
user41796
@JimmyHoffa pre-legalization, it was ~$200/oz I thought. I'm curious to know how far down the prices have gone.
 
5:00 PM
$200/oz? Seems low... Aren't the legal places at like $1200?
 
@GlenH7 the legalization just completely changes the risk situation. Why would anyone risk putting themselves in jail for something that is relatively cheap in a legal store down the street?
 
@JimmyHoffa No risk to the buyer as I understand it
 
@Ampt Is to
 
Only the seller can get in trouble
 
pretty certain the buyer as well is breaking the law
 
user41796
5:01 PM
@Ampt No, that's ridiculously high
 
$300-$400/oz I think?
 
user41796
MMJ generally pushes black market prices down. In CO, it was ~200/oz prior to legalization.
 
user41796
@JimmyHoffa possession being illegal varies by jurisdiction, I think
 
@GlenH7 they put like a 25% or some odd amount tax
@GlenH7 it's not possession, it's just an illegal transaction, the possession is legal, a gift is legal, but a sale is not without proper licensing
like booze
the regulation is very much just like booze
 
user41796
Yes, always remember to pay your taxes!
 
5:04 PM
@GlenH7 it's paid at purchase, not something you claim
apparently the states coffers are already filling from it, and politicians are argueing about what to do with the loot
 
user41796
@JimmyHoffa Probably not worrying about paying the power bill...
 
user41796
Hopefully they don't get overeager and think the initial influx will be a sustained rate.
 
@GlenH7 I've heard talk that they're accounting for that
@GlenH7 last I heard we trade our water for power. That's why Arizona and Nevada are turning into tropics, all the water from the Colorado that we route to them
 
user41796
Water battles in the SW are something fierce, yes.
 
user41796
Parts of AZ are trying to combat the growth by requiring a 100 year reserve of water before allowing construction. But from what I understand, accurately predicting reserves like that is easier said than done.
 
5:11 PM
@GlenH7 yeah, lots of Coloradons have been mad for a long time about the interminable draught we've been under for years meanwhile we'd sold first rights to much of our water basin, we're one of the most water rich in the area because of our snow melt but so much of it is dammed and routed away from us...
 
user41796
You didn't want that nice, fresh, pure as the alpine snow, mountain melt water anyway. Quit kidding yourself.
 
> The river system is one of the most heavily developed in the world, with fifteen dams on the main stem of the Colorado and hundreds more on tributaries. Collectively, dams in the Colorado River basin can hold four to five times the river's annual flow, generating hydroelectricity and supplying irrigation and municipal water for over 35 million people.
This is a list of dams in the Colorado River system of the southwestern United States and northwestern Mexico. The Colorado runs from the Rocky Mountains to the Gulf of California, draining parts of seven U.S. states and two Mexican states. The river system is one of the most heavily developed in the world, with fifteen dams on the main stem of the Colorado and hundreds more on tributaries. Collectively, dams in the Colorado River basin can hold four to five times the river's annual flow, generating hydroelectricity and supplying irrigation and municipal water for over 35 million people. ...
> The Colorado River Compact apportioned to each basin the use of 7,500,000 acre-feet of water per year from the Colorado River system in perpetuity.
^-- that refers to the amount 7 different states are allowed
 
user41796
@JimmyHoffa And those 7 states continue to squabble over how much they get....
 
user41796
Every now and then, Mexico weighs in on the fight too. As they no longer receive anywhere near as much of the that water that they used to. It's had some really negative impacts upon their wetlands.
 
Man, I guess I take for granted living off the coast of one of the worlds largest freshwater lakes
of course between milwaukee and chicago polluting it, it's pretty dirty close to shore...
 
user41796
5:25 PM
@Ampt I thought Erie was pretty heavily polluted. The others are relatively okay though
 
user41796
That's a really good overview there.
 
5:42 PM
Is it really bad to leave two jobs in a row after being there for <= 1 year?
 
user41796
Can be, yes
 
Hmm...
 
Depends on the reasoning, I would suppose
 
Well, for the record, my jobs prior to the last two lasted between 4-5 years.
 
user41796
If I were skimming your resume, it would raise a flag.
 
5:43 PM
If you've got legitimate reasons, I'm sure they won't hold it against you too much
 
user41796
@Ampt - the challenge is that a reviewer may simply pass instead of bringing him in for the interview and asking
 
Right, and I've heard that a lot of cover letters don't get read so trying to address it there could be problematic.
 
user41796
@Dr.Ibb - have things already gotten that bad since your boss left?
 
user55340
It tends to take a few months of investment on the part of the employer to have an employee up to speed and useful. If you leave before that ROI is paid off, the next employer may have qualms about if you will meet the ROI.
 
user41796
FWIW, I at least always skim the cover letter. If it's anything beyond generic bore-me-to-death boilerplate, I'll actually read it.
 
5:45 PM
@GlenH7 His leaving hasn't helped, but it's mostly just the state of a project I'm on coupled with a general "ill-fit" when it comes to the company culture and direction.
That and my wife and I are thinking about relocating to a different area to be closer to family.
 
user41796
ah, relocation can be a golden ticket from that point of view
 
user55340
Its something outside of your control (to an extent).
 
user41796
Make sure you put relative locations of your previous employers on the resume if that's what you choose
 
user41796
Then the reviewer has an obvious answer as to why the recent jump is there
 
Yeah, and obviously I'd point that out in a cover letter, as well.
 
user41796
5:48 PM
But I wouldn't want to jump to a new job and then relocate and get another job. Too stressful for you and definitely looks bad on the resume
 
@GlenH7 Yeah, my plan isn't to jump from here to another short-term thing and then leave. Way too much chaos.
 
user41796
If you're targeting companies in the new area, you can put a simple "I'm wanting to relocate to the wonderful city of Foo..." in the cover letter to help make it clear. You don't need to specify family reasons if you don't want to.
 
@GlenH7 Makes sense. Thanks.
 
user41796
And I should admit my bias against job hoppers. The places I have worked generally have a non-trivial ramp up time. And we definitely want to see some sort of return on that investment before they jump to another gig.
 
@GlenH7 Yeah, my jump wouldn't be immediate. I want to finish out this project I'm working on (even if it fails), and get some other things stabilized. But I don't know if I want to commit to another 3-5 years or whatever.
 
user41796
5:52 PM
Had one candidate who had been at one or two places for ~4 years, and then 4 < 1.5 year stints. And the rest of the resume was average at best. So we passed on the candidate.
 
user41796
@Dr.Ibb Have you had any general talks with the new boss about the company's direction?
 
user41796
And / or your feelings of not fitting in?
 
And I would be happy to stay if they were willing to hire on another developer/IT person, but that seems unlikely.
@GlenH7 I haven't. Still trying to gauge his receptiveness to such discussions.
He may or may not care, as he was supposed to retire within a year before the previous manager left and threw a wrench into that plan, and he's not even around on Mondays and Fridays.
 
user41796
Your boss may have similar worries. He may want / need you to stick around due to their investment in you. And he may have a very vested interest in making sure you at least feel comfortable there. So he might be able to change some things or give you a different perspective on the company / culture.
 
user41796
And if you leave, what does that do to his ability to retire? Sounds like he's sticking around to help the company. May have a strong need to make sure you can do likewise.
 
5:55 PM
@GlenH7 Very true. Good point.
 
user41796
And he'll be in the best position to tell you if they can bring in a 2nd dev. They don't want a bus factor of 1 either.
 
user41796
His being near retirement can actually work very well in your favor. He's got little to lose so he is more able to speak up and talk candidly with upper management.
 
user41796
Seniors in the workforce can be an amazing ally that way. And he likely has a measure of political clout now because of his sticking around to help the company while in a bind.
 
and, if you eat his heart, you gain all of his strength!
wait....
 
user41796
One tack to consider is to go and ask for advice. Tell him that you're worried about fitting in. Tell him you're worried about the project's chances of success and the impact that can have to the company. He'll be more willing to listen and help if you pitch it as trying to be part of the company and help the company.
 
user41796
5:59 PM
@Ampt thought that was the other way around...
 
@GlenH7 If you eat his strength, you gain his heart?
I take it back @Dr.Ibb, I'm not sure you want an old guys heart.
Prone to failure and all
 
user41796
Shhhh. Don't say that too loudly. Scares the youngin's.
 
Yeah, it seems like it'd be a little tough.
Probably wouldn't make a very good Osso Buco.
 
user41796
It's the old guys doing the eating....
 
The nice thing is that he's pretty hands off, so I've retained a lot of my autonomy.
But in some ways that's not so great considering how new I am with the company and still trying to gain my bearings with everything that's going on.
 
user41796
6:01 PM
2 hours ago, by Robert Harvey
Any morning in a chat room that includes the words "vomit," "blood," "dung," "ebola" and "NSFW" all on the same page is a good morning.
 
user41796
^^^^ And now add cannibals to the mix
 
It's like a delicious morbid stew.
 
user55340
Well... if you drink more than a pint of blood...
 
@MichaelT It comes in a pint?!
 
user41796
@Dr.Ibb All good things come in pints...
 
user55340
6:02 PM
 
user41796
I know it's cheating, but I unpinned Austin's comment just so I could have the top star slot....
 
user55340
> ... but anecdotal evidence from online forum posts suggests that any normal person who tries to drink more than about a pint of blood will vomit
 
user55340
I feel sorry for Randall doing that research.
 
user41796
yeah, I can't imagine the .... that he saw along the way.
 
Ugh. Can't knock you off the top spot with any of those other top comments
Time factor OP
please nerf
 
user41796
6:07 PM
@Ampt There. Beat that.
 
@GlenH7 you're a dirty cheat.
 
user41796
Goes hand in hand with being old. If you're good, you pick up lots of tricks along the way.
 
user55340
I'm still debating other ways to rickperl @Ampt ... I wonder if I could build it into a response code of a certain web server.
 
@GlenH7 Cheating != tricks. You play dirty and you know it.
@MichaelT I'm just going to mute you
 
user41796
@Ampt Your tone implies that it's a bad thing....
 
6:11 PM
@GlenH7 There is no tone on the internet. Perhaps it's just your own guilt manifesting itself?
 
user41796
Nah, "dirty" in this sense is pretty clearly negatively loaded.
 
Can someone explain the difference between duck-typing and dynamic typing to me?
 
I believe the difference is that dynamic typing requires you to still have a type "tag" and only a certain set of tags are allowed past a point
duck typing means that any class that provides all the methods necessary is allowed to pass
 
Ah, gotcha. So it's based more on "What can this thing do" instead of "What type of thing can this thing be"?
 
That sounds correct, yes
 
6:15 PM
Cool.
Thanks.
 
I learned that the hard way in python... although it makes for some interesting errors haha
 
I just picked up Go so it's the first time I've heard of it.
 
user55340
@RobertHarvey I dare you to rick-code the lounge.... get some nice obscufcated C++ that prints out the lyrics and ask the lounge to help you figure it out.
2
 
@GlenH7 if you say so!
 
user41796
Bam! Yannis on the prowl
 
user55340
6:25 PM
@GlenH7 Thomas isn't any slacker either...
 
user41796
Happened to notice the most recent Q on the feed was shut down by Yannis
 
@Dr.Ibb walks like a duck, talks like a duck, don't care what it is because I needed something that walked and talked like a duck, so it'll do. That's duck typing. Dynamic typing refers to a "dynamic" type checker as opposed to a "static" type checker -> static type checkers do static compile time analysis for types, dynamic type checker does dynamic runtime type checking. Generally you're going to find a duck typed language is a dynamic typed language - though you can do duck typing that is
statically checked at compile time, so that would be duck typing that's static, not dynamic
 
duck typing that's static -> confusion
 
Dynamic just means runtime type checking (if any at all), static is the opposite (compile time type checking). strict type system would be more the opposite of duck typing where a strict type system says if you ask for a duck, nothing but a duck can be supplied. Handing a duckbot that quacks won't be accepted
 
Can I hand it like, part of a duck?
 
6:34 PM
@Ampt nonsense, you try to compile and it says "Well hell, this function asks for duck, but on line 42 you just gave it a dog, that doesn't quack!"
@Dr.Ibb so long as it's the part it needs. If it needs quack and you give it the foot, it's going to complain
 
@Ampt D does it
 
@ratchetfreak Go in a way as well
 
Got it. So I could give it, say, a guy in a duck suit that quacks and waddles, and it would be like "Hey, it does the stuff I need it to do"
 
@Dr.Ibb yes. If the code calls .Quack and you hand it a train that happens to have that method, it'll be happy.
 
I think the best thing about Duck typing is the set of absurd examples we can provide.
"Monty Python's Flying Type System"
 
6:37 PM
so strict/strong and duck/weak typed are opposites (in my head, though there are more details than just that... but they aren't necessary to know), and dynamic and static typed are opposites. You can have dynamic and strict or weak, as well as having static and strict or weak.
 
Got it.
I've mostly played around with dynamic and weak type systems, e.g. JavaScript.
 
user55340
$foo->quack(); --- you don't know if $foo can quack or not, you just call it. If it can't, it generates some runtime error if appropriate.
 
So that would probably be like "foo has no method 'quack()'"
As opposed to "Expected type bar but got foo."
 
user55340
Note that in message passing languages (Objective C, Smalltalk) it may not even care.
 
user41796
6:47 PM
@JimmyHoffa How did you know I just put in a 294 character tooltip? How appropriate.
 
@GlenH7 hah, I'm sure that's a helpful tooltip...
 
user41796
I can truthfully state that it's something ....
 
@GlenH7 think of perhaps making such things information bubbls instead, like when you click the [1] or any such links here what-if.xkcd.com/90
little ? icon that you click that has the info might be better than accidentally passing your mouse over something for 30% of your screen to get covered by a yellow wordbox you didn't purposefully open
 
user55340
 
user55340
Ever see a pileated woodpecker? (My parents have a pair in their woods...)
 
user55340
6:51 PM
 
user55340
 
user41796
@JimmyHoffa At this point with this internal user .... things are in a just git-r-dun mode.
 
user41796
@MichaelT That makes Woody the woodpecker seem tame.
 
a crow sized woodpecker? Ok that's creepy.
 
user55340
@GlenH7 a crow sized woodpecker... not a small thing.
 
6:53 PM
@JimmyHoffa We use the little (?) icon pattern on our site. I'm leery of action-on-hover stuff because of user confusion and mobile interactions.
 
user55340
user image
2
 
@Dr.Ibb yeah that's why I mentioned it to @GlenH7, when your tooltips get that large user confusion goes way up
 
@MichaelT I imagine that this is what @JimmyHoffa looks like while writing Haskell.
 
user41796
Apparently Silverlight tooltips have an upper length that's allowed
 
@Dr.Ibb but I use gravity boots too, that part's not depicted there.
 
6:55 PM
@MichaelT He looks mean
 
user41796
@JimmyHoffa "The client knows best."
 
user41796
And I warned them about making the tips too long. They chose to ignore my advice.
 
@GlenH7 So long as you have the paper trail. Get'r'done and move the hell on. Sometimes that's the best approach to certain projects.
 
@GlenH7 "We want you to draw three blue lines."
2
 
user55340
 
user55340
6:56 PM
 
user55340
Woodpecker, dinosaur.
 
user41796
@MichaelT Kinda pretty
 
user41796
> Not all Silverlight objects are suitable for use within the limited presentation surface that appears for tooltips.
 
6:57 PM
Woodpeckasaurus? I don't buy it. That thing clearly ate hominids.
 
user41796
 
If birds came from dinosaurs why are there still dino-- oh wait.
 
user55340
I pledge the extinction of all dinosaurs... one visit to KFC at a time.
 
Python's negative list indexing is incomplete
 
00:00 - 19:0019:00 - 22:00

« first day (1363 days earlier)      last day (3626 days later) »