« first day (697 days earlier)      last day (4477 days later) » 

16:00
I got 149 friends. Not too shabby.
@Drise mark her as an "acquaintance" and she wont pop up anymore, but still on friends list.
@R.MartinhoFernandes I dislike Facebook in it's entirety.
@EtiennedeMartel So far you're winning!
@MooingDuck ooo good point
@Drise There's a cure for you.
16:00
@R.MartinhoFernandes nope. I have 400+
@R.MartinhoFernandes I've been trying to bleed off facebook and just outright delete my account.
-9
Q: well known c-likers c++ - dislikers

grunge fightrI do not like c++ but i do much appreciate c. I do not know to much people with the same opinion like mine, one exception i heard is Linus Torvalds (probably). Mostly I meet c++ fans and c-dislikers. Do anyone know some other well known programmers with such (c up, c++ down) attitude? It would ...

@R.MartinhoFernandes fail
@R.MartinhoFernandes Apparently, having something about "universal" in there is a good thing (both Reverend Moon, and the aforementioned "Catholic" went for that).
@TonyTheLion Should we mention the Cat there?
16:02
@R.MartinhoFernandes yes. :)
@Drise You played Borderlands?
ok time to go buy my TV :)
Woo :)
@EtiennedeMartel I was hoping someone would get that.
Rip the flesh, salt the wounds! — Drise 29 secs ago
Can't play Borderlands. No game budget until Xmas (though I have some spare in case there's a special sale for Skyrim's or Civ V's expansions).
-15 before a mod stepped in
that will hurt some... wait. does that count towards negative rep?
16:04
@Drise No mods were involved.
> deleted by Doug T., jalf, NikiC 52 secs ago
@TonyTheLion Am I the only one who thinks of those as "big monitor -- oh, yeah, with a tuner built in"?
@R.MartinhoFernandes Well, might as well skip it and get Borderlands 2 then.
user784668
@Drise Hurt? That's three answer upvotes.
the = 42
sucks = 0
fail = the `mod` sucks
16:06
@EtiennedeMartel Not until Xmas. I promised myself I'd only waste money on books until then.
@JerryCoffin I used to use my 40" as such, but the only problem was that to use the 40 inches, I had to sit so far from the screen, that text was unreadable, and I was always using chrome's zoom.
It was nice to watch movies on tho.
My TV is 32". I don't need anything larger.
@Drise Oddly, I've never actually used one as a display for the computer, but I still think of them that way.
@EtiennedeMartel I just bought a 50"
@JerryCoffin It had it's perks, but to be honest, nothing like a 24-27" monitor
@Drise I have a 55" -- I'm hoping prices keep dropping, so I can always keep it larger than my age, but that's looking pretty chancy.
16:09
@JerryCoffin If you go plasma or LCD. LED is expensive as balls
But sooo pretty
@JerryCoffin Hehe. There's another way of keeping that, but you probably won't like it...
plasma is just rediculously hot, and it seems to do that screen stutter/flicker that old CRT's used to. It gives me headaches.
@Drise My house is at about 7000 feet above sea level. Regardless of what Pioneer may claim, plasma does not work well here at all.
@JerryCoffin What?
@Drise Plasma has serious problems at higher altitudes. Pioneer now claims they work at up to 10,000 feet. They apparently have a much looser definition of "work" than I do.
16:14
"It totally doesn't catch fire and asplodes."
@R.MartinhoFernandes Only the good die young! Sorry, but at that rate I'm going to live to be quite old.
I asked the best buy guy once "Do plasmas still have the screen burn-in problem" His reply? "Yea, they are the hottest and most power consuming out of all the tv's we have"
@LucDanton What if it partially catches fire?
@JerryCoffin Ah, so the secret of eternal life is to suck?
Actually, re-checking, it appears I remembered incorrectly -- Pioneer only claims 7500 feet. Doesn't leave much cushion...
@R.MartinhoFernandes "No, there's no catch*."
16:18
@R.MartinhoFernandes At least if Billy Joel is to be believed...
@R.MartinhoFernandes Hey, I find myself writing lots and lots of operator() these days. Not that I mind, but I'm not sure how many overloads I should provide. Esp. considering ref-qualifiers will be coming one day or the other. What's your take on all that?
@LucDanton Ref-qualifiers are that feature I really really wish didn't exist so I didn't have to pretend it didn't exist :(
Not that I find them useless, but man, are they a pain to support.
I'm currently testing a CRTP-based approach‌​.
Also, I have been in crunch mode with Android lately, so I haven't written much C++ :(
What are ref-qualifiers?
16:22
@NikiC In this context those would be the ref-qualifiers for member functions (there are other kinds of ref-qualifiers). They somewhat mirror cv-qualifiers for member functions. void foo() const&;, void bar() &&; and the like.
struct x { void f() &; void g() &&; };
x one;
one.f(); // fine
x().f() // compiler error
one.g(); // compiler error
x().g() // fine
Ah, I see
That looks complicated
What's the use-case for this?
You were just shown one! I.e. more compiler errors!
Yes, yes, we need more of that
@NikiC It lets you control the type for which a member can be invoked (e.g., can only be invoked on an rvalue).
16:26
But those don't seem to contain 30 kilometers of template traces, so they don't count as real compiler errors :P
Xeo
Xeo
39
A: What is "rvalue reference for *this"?

XeoFirst, "ref-qualifiers for *this" is a just a "marketing statement". The type of *this never changes, see the bottom of this post. It's way easier to understand it with this wording though. Next, the following code chooses the function to be called based on the ref-qualifier of the "implicit obj...

@JerryCoffin Yeah, I got that. But I can't think of any cases where you'd need this, that's why I'm asking :)
More seriously though much like you can overload a non-member on value category, you can as well for a member (for the implicit parameter). No reason not to be symmetric.
@NikiC You can overload on them (i.e. renaming g to f above would make all those compile, but invoke different functions). You can use that to provide optimized implementations for temporaries by reusing resources or something.
Xeo
Xeo
See the example with the heavy resource (which needn't be a conversion operator).
16:28
@LucDanton Ah, that makes sense
By the way there is an area where the symmetry is broken. constexpr implies const, yet you can write e.g. constexpr int non_member(foo& f);. How dumb is that?
So my CRTP thingy can't have a constexpr operator().
C++ is not particularly known for its symmetry.
I don't know, I've never felt weird about the implicit parameter. Despite the 'modifiable rvalue' part.
@R.MartinhoFernandes Could anything be symmetric and retain any degree of compatibility with C?
@JerryCoffin Yes! Make it C, but between <pick some character that can't be used in C source code outside of comments and string literals> all the characters in the source are treated as if they were in reverse order. Basically, pre-pre-processor step that reverses those segments and drops the marker.
:P
16:35
@R.MartinhoFernandes Hmm...sounds suspiciously like Objective C's approach: we'll make it symmetric by surrounding it with infinite ugliness everywhere!
Objective-C is fun.
Aahahhahahahahahahahahahahahahahahahaha.
No.
@daknøk Haskell is fun
@MohamedAhmedNabil I agree.
16:37
@daknøk I read some basics in it. Seems extremely interesting. Especially for a math junkie like me
@MohamedAhmedNabil huh, musta been someone else who said they wanted to be a programmer but couldn't do math. Thought it was you. Apperently not
Haskell is great.
@MooingDuck I like maths, i just hate long division
@MohamedAhmedNabil long division is an odd thing to hate. What grade are you? 9th? So that'd be... Geometry and Algebra 2 ish?
@MooingDuck starting 10th soon
16:48
Calculators ftw.
@MooingDuck I was talking about something completely different btw. I was saying that no1 I dont like the way maths is taught with calculators and not putting modern stuff in like tau instead of pi. And I also mocked what they are calling "algebra" since it is just primarly algebra which isnt that much and I thought that logic is alot more important in algebra than maths skills
@MooingDuck No actually algebra 1 and geometry still
Ell
Ell
Haskell is not great.
@MohamedAhmedNabil "modern stuff like tau instead of pi"
4
@MohamedAhmedNabil I'm not sure what you're saying about tau/pi
16:49
@MooingDuck Tau should be used instead of pi
@MohamedAhmedNabil I think I know which article you've read, but I feel that you took the wrong conclusion from it
@Ell Indeed, it's not great, it's legendary!
@NikiC I probably explained myself incorrectly
16:51
@MohamedAhmedNabil oh. I've always believed that, but never knew it was a "thing". I certainly never heard of that in school
@MooingDuck @NikiC Check this
@MooingDuck I highly doubt that it is a "thing". There might be a small minority hipster group that uses tau, but generally people use pi and I think they'll keep using it.
@MohamedAhmedNabil Btw, what kind of stuff are they teaching you in algebra?
It doesn't make a heck of a difference.
Stop making excuses for Pi
@R.MartinhoFernandes Exactly. It just confuses things a lot.
16:53
You get what? A 2 or a 4 out of some formulae? Really? That's what makes formulae complex?
And it adds a /2 or /4 or /8 to a lot of other formulae ^^ => no improvement
Xeo
Xeo
Ha, finally got the guru badge for the ref-qualifier answer
@R.MartinhoFernandes it simplifies things slightly
Euler's identity becomes Euler's mildly interesting fact.
Also, if you're math inclined, you'll know you can just start all your calculations with "let τ = 2π".
Xeo
Xeo
16:55
You and your fancy greek letters. Been a long time since you used them.
I am inclined to say you're not math inclined if you think using tau helps anything.
All the formulae remain the same. If you can't see that, you're not math inclined.
@R.MartinhoFernandes did you check the video i posted?
@R.MartinhoFernandes no, because it removes the constants from a fair number of forumas
@MooingDuck And adds it to others.
@R.MartinhoFernandes your argument it like saying that the empircal system is just as good as metric.
@R.MartinhoFernandes you might be surprised.
16:58
@MohamedAhmedNabil "pi over 8... you'd think that should be one eighth of a pie, but it's not". Erm.
@R.MartinhoFernandes just see it to the end
@MooingDuck When I see formulae, I care about dimensional analysis, not units.
@R.MartinhoFernandes in that sense they're the same then. But when it comes to units, tau is superior to pi. It removes constants from way more formulas than it adds to.
@MooingDuck It's a dimensionless constant. Which is not my argument is not like what you said.
Seriously, small integral constants make formulae complicated?
@R.MartinhoFernandes small integral constants make formulae more complicated than they would be otherwise. It's just silly, and makes forumae harder to memorize.
17:02
Memorize. That's why you're doing it wrong.
7 mins ago, by R. Martinho Fernandes
I am inclined to say you're not math inclined if you think using tau helps anything.
@MohamedAhmedNabil Yep, the whole video seems to hinge on the fact that fractions of pi radians don't correspond to fractions of a circle. I don't buy that.
I think you're doing physics, not maths.
@R.MartinhoFernandes I find working in portions of a circle far more intuitive.
Well, explain to me what ideas does it make simpler.
17:09
I think a lot of the tau argument is from a math education standpoint, rather than a we-should-rewrite-all-the-formulas standpoint. It's a little more intuitive for the uninitiated.
Say, does it make understanding the area of a circle easier?
@R.MartinhoFernandes A=ΤR seems simpler than A=2πR to me
@MooingDuck But it's not that.
@MooingDuck uh?
That's circumference ;)
@MooingDuck It's πr^2 or (τr^2)/2.
17:11
@James oops
@R.MartinhoFernandes yes, it complicates that formula
Also, I'm not talking about the formula. I derive that formula whenever I need, because I understand the idea.
And in that instance I associate the 2 belonging to the radius more than the pi.
I can do it with pi or tau or x = pi/32424.
@R.MartinhoFernandes right, so that's not an argument for or against any particular contant
@MooingDuck My argument is that the constant doesn't matter, that focusing on the constant is focusing on the wrong problem.
17:13
posted on September 12, 2012 by Jennifer Leaf [MSFT]

As you may have seen, Soma announced today that Visual Studio Express 2012 for Windows Desktop is now available for download.  For C++ developers, the Express for Windows Desktop includes many of the new C++ investments we made in Visual Studio 2012, including C++ AMP, improvements to C++ 11 Standards conformance, improvements to the compiler and linker, and the IDE.  It also includes

I don't think memorizing formulae helps.
@R.MartinhoFernandes I don't think any real understanding of circles is going to lead you to πr^2 other than memorizing a formula
@MooingDuck It's not merely a non-argument though. It's an argument that no such change in a constant can lead to any substantial improvement.
@JerryCoffin He's right that it wont improve understanding of geometry or whatever, it merely makes certain equations more intuitive and easier to remember.
17:15
And the formula for the area of a triangle is easily understandable from the area of a square.
so I guess VS2012 is launching officially now
@R.MartinhoFernandes well, that's awesome O.o
@R.MartinhoFernandes you still have to get 2πr though
I love how arstechnica and other techy sites are reporting live from the apple announcement, and nothing from VS
@MooingDuck Though it's rarely taught, yes, there is. Take a circle and "unfold" it into an even number of pie-slice shaped pieces. Then cut that in half and fit the two pieces together into a rectangle with scalloped edged. If you do, you'll get a roughly rectangular shape with scalloped edges. Its width will be the radius of the circle, and the length roughly Pi times the radius (and the more slices we start with, the closer we get to exactly Pi*r for the length).
@MooingDuck There are other methods for that, which I must admit I have forgotten :S I'm sure wikipedia can reveal one. :P
17:19
I still like tau. :(
Sure, go ahead and use it.
@Ell GTFO
τ = 2 * pi
^ Haskell is awesome.
I caused enough debate here
I originally came for help with this ideone.com/hoSto Something is wonrg and i dont know what
π = stonehenge
17:29
@MohamedAhmedNabil switch should have a default case. At least throw an exception there.
@StackedCrooked The part before it prevent the user to enter anything else
@MohamedAhmedNabil Fixed your code.
Btw, ideone can't read from stdin.
@StackedCrooked There is something wrong in either readrec or writerec. I cant fix it.
Also you really don't need to add this: //------------------------------------------------------------
@StackedCrooked What does it read from then?
17:32
@StackedCrooked makes it look pretty
@StackedCrooked yes it can
@MooingDuck FTR, I was taught these things the way I say I like, instead of "so, the area of a circle is pi times radius squared; remember that and let us compute some areas" (yes, I'm exaggerating for dramatic effect; sue me). I don't think this last method is good, regardless of what the formula in question is especially in modern times where memorizing stuff is getting less and less necessary.
@LucDanton I don't know.
@StackedCrooked So, if it comes out of std::cin, and you don't know where it reads from, I'm inclined to think ideone does read from stdout.
@MohamedAhmedNabil always provide a default anyway. Prevents mistakes when someone changes your code later
17:34
The input box in ideone is used for entering stdin. Isn't it?
@Blank yes
Is the VS2012 Express released for Windows 7? I can see Windows 8.
@MohamedAhmedNabil always initialize your variables. Also, check for error conditions after reading.
Things come out of std in and things go in to std out. Screw Markdown.
Reading from stdin. Doesn't stdin mean user input from the terminal?
17:35
@StackedCrooked not always
@StackedCrooked It means standard input, duh.
Half-fixed! Or not.
@MooingDuck Ok, you can change the input buffe.r
No, one can redirect a file to stdin as well
ideone.com/2Dqi1 my problem is for example i write record 0 and when i read it, it gives me nothing usefull just a bunch or strange stuff.
17:36
@R.MartinhoFernandes Where does ideone get its input from?
@StackedCrooked stdin reads from wahtever the OS says it does
@StackedCrooked The textbox you put text in (click "upload with new input").
@StackedCrooked the input box at the bottom
./a.out < in.txt > out.txt can be used to redirect stdin and stdout.
I only see a textbox for Facebook.
17:37
@MohamedAhmedNabil ideone wont' open files
when I do this, I use stderr to print to terminal.
@StackedCrooked the heck site are you on?
@StackedCrooked at ideone.com there are three textboxes. code, stdin, and a note.
That's not even a circle.
17:38
dude, you could have drawn a neat ellipse.
@R.MartinhoFernandes yours looks different than mine
@R.MartinhoFernandes I don't have that.
@MooingDuck Maybe logged in vs not logged in?
@StackedCrooked You suck?
@R.MartinhoFernandes ah, maybe
In fact codepad.org doesn't have option for stdin.
17:40
Right there's a link that make the input box visible.
@MooingDuck copy the code and test it, there is a problem with it
@StackedCrooked I have that...
Ok, I found it now. However, it's not visible by default.
You don't have to be logged in.
What.
something wrong here?
17:41
Yes.
spacing is bad.
pobj).open(filename.c_str(), ios::ate|ios::in|ios::binary);, you're opening a file in append mode for reading? That doesn't make sense
Code walls go on ideone.
2
That's what's wrong.
@CatPlusPlus ok
@MooingDuck I dont want the original file to get overwritten and i want to read and write
17:43
It looks like this on my computer. I needed to press the "upload with new input" button to get the input box.
@MohamedAhmedNabil it's spelled "proper"
@MohamedAhmedNabil if you want to write you also need ios::out
@MooingDuck I heard the appending includes out
@MohamedAhmedNabil you're not opening for appending
@StackedCrooked What happens when you open a new one (i.e. on the home page)?
17:45
0
Q: C++: ios::app doesnt need ios::out in fstream

Mohamed Ahmed Nabili was testing with flags in file stream objects the other day And i did this. fstream binf("h.txt", ios::app); binf << "hey"; With fstream since i didnt use ios::out, the output operation shouldnt have worked , but it does work I noticed that the the output operation works with ios::ap...

Isn't ate "at the end", and not "append" (i.e. app)?
@MooingDuck I got told that ios::ate is the same as ios::app but it enables using seekg and seekp
@MohamedAhmedNabil that is correct. However: (pobj).open(filename.c_str(), ios::ate|ios::in|ios::binary); DOES NOT CONTAIN APP, IT HAS ATE
@R.MartinhoFernandes This.
@MohamedAhmedNabil ate does need ios:out
17:46
@StackedCrooked So, it's the same as this: i.sstatic.net/FUMnq.png.
Indeed. Never noticed that.
you want pobj.open(filename.c_str(), ios::in|ios::binary|ios::out);
@MooingDuck Won't that nuke the contents?
@R.MartinhoFernandes for an fstream no, for an ofstream yes.
Is there a difference between "Purely functional data structures" (Chris Okasaki) as the free PDF and the book on amazon?
17:47
ofstream has an implicit ios::trunc, but fstream doesn't.
@FredOverflow The trees? ;)
@MooingDuck wait wait, so fstream( , ios::out); keeps the contents?
@R.MartinhoFernandes The PDF is from 1996, the book from 2008 or something. Just wondering if he updated, revised, added stuff.
@MohamedAhmedNabil for fstream, yes. ofstream would truncate the file, but fstream doesn't.
@MooingDuck :O
17:49
@R.MartinhoFernandes Well played.
Gotta go.
Have fun in my absence.
> Submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy.
@MooingDuck so i dont need ios::ate or ios::app
Interesting, I never drew the connection between Haskell and Philosophy.
@MohamedAhmedNabil right. why did you think you needed them?
17:49
Should there be an std::ios::ape?
@LucDanton you're going to confuse him
@FredOverflow No idea how serious you are but that's Ph.D. Well, it may be.
@MooingDuck I thought because if i used ios::out that would just destroy the file, then i came yesterday with myproblem and they told me to use ios::ate instead of ios::app.
@MohamedAhmedNabil ate merely makes the "current position" be at the end of the file rather than the beginning. It doesn't do anything useful.
Current reading position.
17:51
@MohamedAhmedNabil app makes all writes ever to the file be concatenated to the end, rather than the current position
A lot of people here are using Haskell. Makes me wonder if I am missing the language. :-?
@LucDanton I can't find anything to validate that
@MooingDuck whats the difference when using seekp() in ate and app?
@MohamedAhmedNabil ate merely sets the position to the end when you open the file, and does nothing after that.
@MohamedAhmedNabil app will seek to the end of hte file just before every single write ever.
@MooingDuck what i use ios::ate in ofstream, will that nuke the original file?
17:55
@Blank Haskell is great.
Haskell wiki says "learning Haskell can make you a better programmer in any language."
Also it’s time to get a new phone soon.
@daknøk So is that statement true?
@Blank that's true for most languages
@Blank not all of them.
17:55
@MohamedAhmedNabil I don't know when an ofstream nukes and when it doesn't, other than I know it does if you don't provide flags.
@jalf Further evidence that PHP isn't really a language.
@jalf No, that can't be!
@JerryCoffin yup
But yeah if you’ve never done functional programming I really recommend Haskell.
I wantz iPhone 5.
@Blank It exposes you to (probably) new things: functional programming, lazy evaluation and a pretty neat type system that can do a lot of fun things
17:57
I saw prolog, and didn't like it
And being exposed to new things can often teach you something
@Blank No one likes prolog
@MohamedAhmedNabil "NOTE -- For output file streams the open mode out is equivalent to out|trunc, that is, you can omit the trunc flag. " stdcxx.apache.org/doc/stdlibug/30-3.html
@jalf That's true.
@Blank but having a bit of experience with Prolog can still be enlightening
@MohamedAhmedNabil so it appears that an ofstream will always nuke
no wait,
"If you want to extend an output file, you open it with the bitwise or of std::ios_base::ate and std::ios_base::app mode. In this case, the file content is retained because the trunc flag is not set"
This stuff is confusing
17:58
@daknøk So C++ counts in?
IMO C++ never counts.
C++ is a stupid language.
o_O

« first day (697 days earlier)      last day (4477 days later) »