« first day (398 days earlier)      last day (4553 days later) » 

3:00 PM
@RMartinhoFernandes no intellisense I think
also my mac screen is smaller
 
Can a platform that doesn't support multithreading implement C++11 at all?
 
@KerrekSB you could do userspace threads
 
I think the threads are only required for hosted environments.
 
@KerrekSB and IIRC it was possible to do Java thread implementations that ran purely sequentially by the letter of the spec
 
@KerrekSB I can't think of a platform that can't support multithreading. I remember we did multithreading on Z80 computers in college. No big deal.
 
3:02 PM
Well, you would need a clause that allowed the thread constructor to block.
 
Only <atomic> is required in a freestanding implementation.
 
@KerrekSB is it prohibited from blocking?
 
@AlfPSteinbach What if you don't have any atomic primitives in your hardware? Then you can't implement scheduling correctly, non?
 
@KerrekSB That's just a question of efficiency. If you can emulate an i8080 then you can do anything. Alan Turing proved that.
 
@awoodland I'm not sure.
@AlfPSteinbach Turing worked on multithreading?
 
3:04 PM
@awoodland It is required to start a new thread of execution.
 
@RMartinhoFernandes but can that thread of execution be serialised in any way the implementation sees fit?
 
@KerrekSB no, he did the Turing theorem before WWII. I think in 1936.
 
@AlfPSteinbach Not sure that applies. Just because you can perform any abstract computation on any computer doesn't mean that a detail like concurrency is universal.
 
> Implementations should ensure that all unblocked threads eventually make progress.
@awoodland I guess that it can.
(Note the "should".)
 
@RMartinhoFernandes that matches this "note" too: "Usually the execution can be viewed as an interleaving of all its threads."
 
3:06 PM
Makes me wonder if someone is actually going to try to write a C++11 implementation for a platform that has no support for multithreading.
 
And in any case.
 
"Under a freestanding implementation, it is implementation-defined whether
a program can have more than one thread of execution" solves the problem
 
@KerrekSB it is, when you consider how to do concurrency on an i8080 (which was just about the first usable micro-processor, ignoring 4004 and the 8008). I used an 8080 computer in high school. Did not quite grasp assembly, but I had to try...
 
@AlfPSteinbach Was it correct, though, or held together by hope and dreams? (Like Java for the longest time.)
 
so tempted to try and do a basic implementation of threading that serializes everything into one process by just swapping the stack pointer at sensible places
 
3:09 PM
@KerrekSB huh?
 
The thing with concurrency is that you can make something incorrect that is indistinguishable from something correct most of the time.
 
 
@AlfPSteinbach That was from Hans Boehm's tech talk: Apparently, hardware limitations made it impossible to implement Java correctly until the mid-2000s.
 
good night,(洗洗睡), lol
 
Nobody seemed to have cared :-)
@awoodland If you wrap everything in "atomic computation units" that clean everything up, then perhaps you could make it so that switching only occurs between those units.
 
3:14 PM
@KerrekSB i'm not sure that you're paraphrasing Hans Boehm correctly here. it doesn't scan. you can take any early 1990's pc and emulate a current one, just very slooowly. then you have a logical contradiction. Hans Boehm is not dumb, I think.
 
@AlfPSteinbach No, of course not. Just the Java implementations.
Which were in fact incorrect.
Of course what's going on is that the JVMs were just using the "obvious" hardware instructions.
But those turned out to be insufficient to implement the Java programming model correctly; i.e. there was room for corner cases in which the behaviour was undefined due to concurrency issues.
That isn't to say that someone couldn't have made a mathematically correct JVM. Only that that would have been totally beside the point. (I mean, did you really want it to sacrifice performance for correctness?)
 
As if the JVM doesn't sacrifice enough performance for correctness already.
 
@RMartinhoFernandes Hehe. Perhaps. Are there any other well-known correctness issues with it?
 
Loops in Java 7 were broken by the optimizer.
This was fixed last month by update 1.
 
@RMartinhoFernandes That's mildly embarrassing!
 
3:20 PM
anyone happen to know a cheap/reliable (online) way of booking train tickets for cross border train travel within mainland europe?
 
@KerrekSB So embarrassing that they tried to erase mention of it. Look at the bug tracker.
(Yes, that link is correct.)
 
"This bug is not available". Hehe.
 
They didn't mention the fix in the release notes either.
But since the tests that were once broken now pass, one can only assume it's fixed.
0
Q: How to get a list of days from an interval of timestamps

PatéI'm trying to write a function that would give me an array of days that exists between two timestamps. For example getDays(int startTimestamp,int stopTimestamp); the output would be 2011-11-05 2011-11-06 2011-11-07 Is there anyway of doing this in a clean way without having to do some hea...

"So I have these timestamps <shows function that takes int parameters with timestamp-like names>". "What are the ints?" "They're timestamps."
Does Unix time count leap seconds?
 
Unix time, or POSIX time, is a system for describing instants in time, defined as the number of seconds elapsed since midnight Coordinated Universal Time (UTC) of Thursday, January 1, 1970 (Unix times are defined, but negative, before that date), not counting leap seconds, which are declared by the International Earth Rotation and Reference Systems Service and are not predictable. It is used widely in Unix-like and many other operating systems and file formats. It is neither a linear representation of time nor a true representation of UTC (though it is frequently mistaken for both), as it...
wikipedia says no
man time(2) says no also
(also says clocks don't have to be synchronised to a standard reference!)
 
Yeah, I checked that. Thanks, anyway.
@awoodland I only wanted to know if I could count on days with 24*60*60 seconds.
Boost 1.48 is out.
 
3:41 PM
@RMartinhoFernandes That's so old news, it's older than Your Mamma
 
Oh, yeah, 2 days ago.
Why did I only get this mail today?
 
@RMartinhoFernandes Your mail service is UDP?
 
Oh, right, maybe because I didn't check my mail for two days.
@KerrekSB lol
 
Anyway, I've been converting to Islam with Boost since yesterday. The joys! Boost.locale, yay.
 
@RMartinhoFernandes Nerf news. It's never fair and balanced.
@awoodland Nerf real time, it can't be accurately counted by a machine counting x seconds since date.
 
3:48 PM
hi
 
What's happening?
 
Nerf hi. It's faster than hello, and has superior aggro control, getting people to pay attention to the speaker.
 
Stuff.
Pretty much nothing.
 
Pretty much nothing sounds nice.
I'm waiting for a movie to download then I'm going home.
 
3:50 PM
@LewsTherin You can't download at home?
 
OMG you're downloading a car?
Oh, wait it's a movie.
What movie is it?
 
@Xaade I can't take the risk that the movie is shit
 
car? Don't get that?
 
@RMartinhoFernandes The Thing
 
QFT: waiting for am movie to download.
 
3:52 PM
@Xaade "You wouldn't steal a car..."
 
@Xaade ?
 
@LewsTherin eh? Does it cost more to download from home?
 
@Xaade I have a limited bandwidth... 40gb I believe. No idea how much I've used it
@RMartinhoFernandes loooool
Hey, I'm appreciating the movie by even watching it...
 
"And then steal it again!"
 
3:54 PM
@LewsTherin What is this limited bandwidth? Is this some communistic bandwidth sharing?
 
That is so funny though
@Xaade My ISP has a limit on how much bandwidth I can use per month. I don't know, but I'm not the bill payer so.. :(
 
> What I can't understand is what we have to watch these warnings about piracy and pirate movies because it is a crime so therefore we don't do it but look at Johnny Depp - he made a fortune out of pirate movies.
 
@RMartinhoFernandes It's not stealing anything. It exists and I download it. I didn't steal, it's just data.
 
@RMartinhoFernandes lol
 
They could be smart like hulu, and let you download only if you watch a few commercials.
 
3:56 PM
@Xaade Hulu blocks anyone not from the US
 
But they want me to pay for a version for my blueray, a version for my pc, a version for my psp, a version for my phone.
If it's truly IP, then I should pay once for it in any format.
A license to use whenever where ever.
 
Well, how would they make insane amounts of money then? geez you are so unreasonable
 
@hexa It's even more unreasonable to pay for a movie that's absolutely shit.
 
Well, don't pay for it, don't pirate it. Stop giving money to people that make shit. Stop advertising for people that make shit.
(At least, don't seed it.)
 
I download a lot of movies
And I don't care.
I still go to the theaters, buy original blu ray media and stuff
 
4:00 PM
@hexa It's either IP, or it's a damn disk. Either I get the data to play on any device, or I get an anonymous disk that I can make blind copies of. Stop double dipping. It's annoying, and the primary reason I avoid buying altogether (movies, songs, etc). I either record off of a live service, or I listen to it whenever I stumble into it (radio, etc.). I'm tired of all the Politically Correct IP and licensing issues. It defeats the intent of IP, and makes the marketplace unfriendly to consumer
 
I'm not seeding... I just watch it. I download it, curse myself for wasting 2hrs of my life if the movie is shit, then delete it
 
@Xaade Ok, but you do know that it was Martinho that talked to you abou IP right? ;)
 
No, I didn't!
There's nothing here.
 
If I buy a hardcopy of a game 10 years ago and lose it, I theoretically bought a license, so I can download the game from anywhere (even pirated locations) because I paid for a license.
 
@RMartinhoFernandes God damn ninja! hahah
is that a new chat feature?
 
4:02 PM
No, it's old.
 
@RMartinhoFernandes I know I don't buy IP, I buy a license.
 
Done! Later guys
 
But point being, is the double dipping, must buy a license, but only for this type of device.
 
4:04 PM
If I buy a PS2 game, I can ISO and play on my PC. However, if I'm downloading a bunch of copies of PS2 games I already own, I might get in trouble... Then I have to prove I own the game, which may be hard if the game fell out of my car one day.
@RMartinhoFernandes how do you move messages?
 
@Xaade room > message admin.
Dammit, can't find a video of the full double dip scene on Seinfeld.
 
1 message moved to Sandbox
 
gotta hate now that youtube has ads
bleh
 
What are you talking about?
I don't see anything.
> I never sleep in planes, I don't wanna get incepted. — Jack Donaghy
 
@RMartinhoFernandes Surely "incepted" isn't a word... "inceived"?
Yay:
0
Q: Why does x[y] = y[x] in c++?

GabeSomeone told me this... I didn't believe them at first but it does work. If x and y do not change throughout the code, why does this work: int x [5] = { 0,1,2,3,4}; int y = 3; if(x[y] == y[x]){ cout << "Why..." << endl; } How does x array's value in index y is = the x index's va...

 
@KerrekSB Well, I didn't say it :)
But Jack has a point.
 
When are we getting those "pointless question" filters that will answer things like that automatically?
 
4:28 PM
Nuked.
 
I love Java ... ... ... NOT!.
0
Q: NoClassDefFoundError in Eclipse RCP application

StackedCrookedIn our application we sometimes (about 1 out of 10 times) get a NoClassDefFoundError when trying to instantiate a class. It happens when a project is opened from without our application. The full stack trace looks like this: !ENTRY org.eclipse.jface 4 2 2011-11-18 12:45:33.941 !MESSAGE Problems...

Actually, I don't hate Java, but I do hate Eclipse.
@KerrekSB Hey, that's me in that avatar! (Or is it my evil twin?)
 
@StackedCrooked Eerie.
 
> ee·rie: Strange and frightening: "an eerie green glow in the sky".
Aha. Indeed.
 
a numericUpDown has a Text propert and Value property
changing Value doesnt seem to affect Text, any ideas why?
 
"Where does Dracula spend his holidays?"
 
4:37 PM
a coufin
 
"Lake Eerie."
 
4:49 PM
so, what's "fuzzy tree"?
 
5:10 PM
hello, I have on excel a 44* 44 matrix I need to store it in C++ to use it in my program, I tried to use the infile thing but nothing seems to be copied,any suggestions?
I copied the excel file in the directory where Im working
 
what is the infile thing? You should probably best save it as an easier format (e.g. CSV) and read that one in using fstreams
 
i saw it on google to infile if u want to read something
I can directly save it from excel to CSV?
sorry it was written like that ifstream infile ("file.txt")
but still nothing seems to be copied
 
@mona in order to use a simple text mode ifstream to read it, you have to save as text file (CSV-file) from Excel.
how to save from excel probably depends on the excel version.
 
I saved it directly
into CSV
put it in my directory
but still dont have my matrix
 
of course not, you really have to parse the file. I suggest you go out and read some more about fstreams in C++ ;)
 
5:20 PM
you can look at that file with Notepad. if it isn't OK in Notepad then it isn't OK for the C++ logic either
 
hehe thanks for the suggestions :)
 
one problem is that exactly what you get, can depend on which language Excel was installed for. e.g. english -> commas, but norwegian -> something else, i think semicolons.
it's very silly
 
oh ok I see
 
microsoft even at one time translated the script language to norwegian etc., apparently just to make it impossible to exchange spreadsheets with scripts across national borders.
 
@AlfPSteinbach: same goes for the Dutch version ;), Dutch scripting language and semicolon "comma separated files" :p. I guess the last choice is because , is often used as a decimal point replacement.
 
5:28 PM
@KillianDS What's the Dutch Scripting Language? DSL? Is DSL a DSL in the sense of Boost.DSL?
 
@KerrekSB: funny
 
Thank you guys eveyrthing worked well now :) I have my matrix in C++
 
I like answering random SQL questions. I would love to get an SQL-related badge before a Java badge. I wonder if SO has a "disqualification" method whereby you can make one single devastating statement that will get you banned from even getting a certain badge. Like, "this is best done with the popular Singleton pattern", in C++...
OK, I'm now making an HTML page with my most frequent snippets of C++. "FPA", I guess, frequently pasted answers.
 
getline idiom; random numbers; replace new/delete
 
5:40 PM
I have that file, but for C. And it has only one line
 
@KerrekSB like: "sure, a[i++] = a[i++]++ + ++a[i++] is fine, it's probably just a compiler bug"
 
it is: That is undefined behaviour
 
@awoodland That's definitely among the most popular questions! :-)
Wait: why not ++i[a++]?
 
Needs more plusses.
 
@KerrekSB already there - i was the array and a was the int :)
 
5:46 PM
Of course!
 
5:57 PM
I like to look for old, good answers with a score of 9 or 24 and then give an upvote. Am I sick? :)
 
I don't understand. What's so special about 25?
24 is much cooler.
 
badge
 
@RMartinhoFernandes Fewer factors.
 
I thought it was just some aesthetic thing.
 
5:59 PM
I like informing them that their good answers are still being read and considered useful.
 
@FredOverflow Maybe just unloved as a child? ;-)
(just kidding)
 
@KerrekSB I'll ask my parents next time. "Why did you never give me that badge?!?"
 
"Mama, look what I drew in class!" Downvote
Not a real drawing
 
How can it be "not a real drawing"?
 
> Eew, classes. You know I like templates better!
 
6:01 PM
Is it a photograph?
 
@RMartinhoFernandes "It's difficult to tell what is being drawn here. This drawing is ambiguous, vague, incomplete or overly broad."
2
 
> This is just a house with trees and people in front of it. Vote to close!
 
Exact duplicate
 
> It's hard to tell what is being drawn here.
 
6:03 PM
@KerrekSB I guess many famous painters would not have much success on DrawingOverflow.
 
@RMartinhoFernandes "Where are my colours off?" Comment: "Ugh, that Vincent again. He should pick up a good book."
 
3 mins ago, by Kerrek SB
@RMartinhoFernandes "It's difficult to tell what is being drawn here. This drawing is ambiguous, vague, incomplete or overly broad."
dang didn't see this
gives me the lulz
 
I'm starting a frequently pasted answers collection.
 
"schlagwetter" indicates you're German, right? :)
 
Why not just collect a bunch of links to existing answers for duplicate shooting?
 
6:11 PM
clicking on "Video" doesn't do anything...
 
@FredOverflow Well, it's a minecraft server, and who's better at making up impressive sounding mining words than those pesky Germans?
I've had some good advice...
 
For the Portuguese-impaired that blog is titled "Atheism & Boobs".
 
@FredOverflow Haha, it's not a link, it's just motivational CSS styling!
@RMartinhoFernandes Those too would be very useful. And in fact they would go well under the current "Links" category facade.
 
You know when you make a change, and you're actually expecting everything to break, and are just waiting for the compiler to lead you to the errors that will be an easy fix, because you know they're coming and then... It compiles.
 
6:16 PM
@RMartinhoFernandes That means you're compiling the old version.
 
hi
 
@hexa If Jesus wouldn't have existed we'd simply have another dominant religion today. We wouldn't all be atheists.
 
@StackedCrooked Wait - we're assuming now that Jesus did in fact exist? OK...
 
@StackedCrooked At least what we had before Jesus: Judaism.
 
@KerrekSB Good point.
 
6:18 PM
@StackedCrooked If The Terminator existed I'd be whatever religion he told me to be!
 
@KerrekSB Let me rephrase that as "the concept of Jesus".
 
@RMartinhoFernandes You mean, like, a small, insignificant group of people who were alternatingly suppressed and ignored by the Roman empire had Judaism. Doubtful how much of a world-wide impact they had in those days.
@StackedCrooked Sure.
Ah, factories to the rescue:
0
Q: Generics based classes

user1054311If we are designing a class that will be used to create items in a generics-based collection what should we need for this and why?

 
@KerrekSB They had a big enough impact to make the Roman emperors worry. Esp Nero.
> He was known for having captured Christians burned in his garden at night for a source of light.
 
@StackedCrooked Christians, yes, but not Jews.
 
Yep. I didn't say anything about jews.
 
6:22 PM
Anyway, here goes my own "Will anybody buy this" crusade.
 
Oh wait. Never mind.
@KerrekSB Are you trolling there?
 
I'm wondering if there's a Java equivalent of the POMO.
@StackedCrooked plausibly-deniably so.
 
@StackedCrooked He's trolling with the truth
 
@robjb You know it's Java when a legitimate design pattern sounds like a bad joke.
 
Heh
 
6:26 PM
@KerrekSB Throughout history they've been oppressed pretty much everywhere they went. Yet they're still here. I don't think that Jesus helped them much.
@KerrekSB OMG two upvotes.
 
@RMartinhoFernandes No argument that they're surviving well, but I'd say their impact is far lower than that of christianity. Just because you said earlier that if christianity hadn't developed, we'd have judaism in its place. I doubt that.
@RMartinhoFernandes The question is, if I keep posting the same text on Java questions in the future, how long till anyone catches on?
(It'll become an FPA anyway.)
 
@KerrekSB I like the way you think.
(You're evil btw)
 
@RMartinhoFernandes deniably so!
 
How can that answer have two upvotes?
It's pure nonsense.
@KerrekSB Did you make it up, or do you have a generator somewhere?
 
@StackedCrooked some days ago you said, there are parts in accelerated c++, which are outdated, could you tell me again which they are and what the more modern concepts are, just that I can keep it in my head, when reading that stuff. thanks
 
6:30 PM
@RMartinhoFernandes I gave it one because it made me laugh.
Probably not a good reason in hindsight.
 
@RMartinhoFernandes That was my own manual mental Java generator speaking... I haven't yet written a generic one.
 
Sounds like a fun project!
WTF is an "abstract wrapper for concrete types"?
Man, you're good at this.
 
@bamboon Chapter 14: Managing memory (almost) automatically
@bamboon You should still read it and do the exercises. But these days you can use boost::shared_ptr (or std::shared_ptr in C++11) for reference counting.
 
@RMartinhoFernandes Yes he is... I feel guilty for upvoting lest someone take it as the truth.
Too late now.
 
> The Enterprise Java Bullshit Generator — Now with Patterns!
 
6:37 PM
@RMartinhoFernandes wait does that exist?
 
Yes, it is called CS graduate
 
@awoodland No, I'm quoting from an imagined future.
 
It's between Kerrek's ears ;)
 
@hexa I was building up to that punchline :)
 
oh sorry :P
 
6:37 PM
1. Click the make bullshit button.
2. Watch bullshit appear in the box.
3. Repeat to taste (use your Enter/Return key).
 
LOL
reintermediate holistic architectures
 
embrace best-of-breed communities
 
> This is very clever, but your verbs are often real verbs. As anyone who has worked in a web-related business for two months (as I have) knows, most verbs are not verbs at all, but nouns. — David S.
 
Oh wow
Someone else up-voted that answer of Kerrek's
@KerrekSB You should make a minor edit so I can remove mine, I'd rather not be a part of the bullshit machine ;)
 
6:47 PM
@StackedCrooked of course I will do. thanks you for the hints, I will keep them in mind.
 
When I worked through Accelerated C++ I marked my progress by writing the current date in the margin. The first one was 13th of November 2004.
Can't believe it's already 7 years ago.
 
Ugh, you write on books?
2
That's sacrilege!
 
something slow.;
 
@RMartinhoFernandes Yep, because Marilyn vos Savant says it's ok to do so. (Not kidding, I used to never write on books until I read one day that this sacred treatment off books is irrational. Then I forced myself to start doing it.)
 
ahahaha
nice example
 
6:51 PM
@robjb Hm, let me see... I can't really think of anything to change, though.
I mean, it's not actually incorrect.
 
Ah, then don't worry about it
 
@StackedCrooked Of course it's irrational. But it's right. That's what matters.
 
@AlfPSteinbach This is brilliant
 
@RMartinhoFernandes Sorry, I'm chaotic neutral.
 
Heh
 
6:53 PM
@StackedCrooked Ooh, that's a lame excuse. Everyone claims to be chaotic neutral just so he can do as he pleases!
 
I should re-read Accelerated C++. It's fucking good!
 
"But you killed the poor farmer's son!" "What's the problem? I'm chaotic neutral."
 
@RMartinhoFernandes Hah, your reasoning is dangerously close the basis of the reasoning that attempts to defend Christianity. (The idea that there is inherent right and wrong.) At least that's how C.S. Lewis reasoned.
 
There is! Writing on books is wrong!
 
@StackedCrooked Example?
 
6:55 PM
@RMartinhoFernandes You can buy two copies. One to keep safe and one to work in.
 
@StackedCrooked Really, I couldn't bring myself to do it.
It's not something I can fight.
I'm a bit like the Librarian when it comes to treating books.
 
@RMartinhoFernandes Then buy the PDF and print it out :D
 
oh hai
 
@StackedCrooked As I recall C.S.Lewis invented the idea that pretty girls always smell good and don't have any nasty bodily functions, in his novel about a trip to Venus I think it was. The princess there was otherworldly. And this means that we have to endure comic strips about it today.
 
YHELLO
 
6:58 PM
Once I lent a book to my brother, and he wrote something on it. I never touched it again. It's tainted forever.
And I really liked that book.
 

« first day (398 days earlier)      last day (4553 days later) »