« first day (417 days earlier)      last day (4533 days later) » 

2:00 AM
no
 
If you imagine C++ without variable declarations, it seems like it does what I was previously thinking of
 
don't model a language on Lua, it suck
s
 
What should happen then
 
C++'s rules as they stand are just fine
access nonexistent variable -> error
 
This is supposed to be more scripting-language like, such as Perl, Python, Ruby, Lua, etc
 
2:02 AM
but why?
why build a language based on them?
what real, beneficial properties do they have?
 
perl has my $var; :P
 
except being slow as all hell
 
Not based on them, but like them in that respect (lack of variable declarations)
 
but why would you want it to be?
it's error-prone with no upsides
 
Because I like it that way :)
 
2:03 AM
then you need help.
lol
 
pretty much what @cHao said- then you need to further your programming education
 
Languages without variable declarations are probably not good to discuss in the C++ channel :)
So do you think that all people using the languages I mentioned are just uneducated and wrong for using them
 
maybe they don't have a choice
 
So if they choose to use them, then they are uneducated and wrong
 
the fact this is the C++ channel doesn't mean much -- i actually like perl and vb.net, and i tolerate php. :) but to want variables to magically spring into existence...is insane
 
2:05 AM
at least, if they view this respect as an advantage
we haven't discussed any other aspect
 
Yeah, true
 
but what you should know is that scripting and interpretation, versus idiotic variable and typing rules, are orthogonal
there's no reason why you couldn't take C++, strip off, say, templates, add some reflection, and interpret it at run-time
 
Yeah, I see what you mean
 
it's just not done because these people are too busy being cargo-cults and "AMAGAD DYNAMIC"
to actually think about whether or not dynamism is a good thing
hint: it usually isn't, ever, at all
 
dynamic stuff has its place...i rather like it. but it shouldn't be everywhere
 
2:08 AM
What are the bad things exactly? I know of the reasoning that simple typing mistakes being catastrophic, variable lookups are slow (sometimes) but not really of any other disadvantages
 
and there's certain stuff that just shouldn't be at all
 
well, it's pretty simple
every time the C++ compiler throws an error, that is a bug that didn't make it to the end-user
that you didn't have to write and run unit tests for
that you didn't have to spend hours debugging
 
syntax errors aren't bugs.
 
every single error and warning is a great and good thing, it's extremely efficient to get the compiler to do it
 
If you remove the types from a C++ program, the compiler will go mad but it doesn't make the program's logic incorrect
 
2:10 AM
actually, it may well make the logic incorrect
 
I wouldn't call all the yelling it does "preventing errors from reaching the user"
 
how would I assign a std::string to a short?
that's a bug, and the compiler prevented it
 
If you took a working program I mean
 
so what? the working program is after the compiler has done it's job
 
But it isn't necessary
 
2:11 AM
it is absolutely necessary
do you know how much of a time waste it is not to have interpreters error on stupid variable references?
 
That's like saying Python programs are all logically incorrect because there aren't any type errors that the compiler gives you
 
or silly type errors?
no, that's like saying Python programs must be more incorrect than their C++ equivalents
 
I've written quite a bit of stuff in interpreted languages and didn't experience what you're saying
 
which they are; because the compiler can prove that the C++ version contains no type errors
 
"type errors" are some shit from static-type languages :P
 
2:12 AM
I've written in Lua for three years
but I changed to C++ because I was sick of it's shit
and I got the same experience from PHP
 
i don't blame you...i didn't like what i saw of lua...lol
 
Lua is excellent imo
 
debugging my Lua scripts was ridiculously painful
 
I really like it
 
2:13 AM
whereas my current project in C++
if the compiler doesn't error, it works, (almost) every time
 
That's because it lacks the tools to debug programs like C++ has
 
partly
 
nah
printf debugging was fine
that's mostly what I use the VS debugger for anyway, except they get printf into the debug window
 
Then your C++ program must have been far less complicated than your Lua program :)
 
2:14 AM
i personally don't use debuggers much at all. especially with c++, they can be a pain
 
oh no
my C++ programs are much more complicated
 
So you had problems debugging a far less complicated Lua program?
 
yep
 
I don't think the problem is with Lua then :)
 
some people just can't handle the fact that an int isn't always an int.
 
2:15 AM
That's because you suck and introduce bugs even in simple programs.
 
lol
 
I was going to say "while I'm awesome I don't do that."
 
Static typing (is that the word that encapsulates the entire difference?) does make you plan more, which I think is good
 
But the program just finished running.
> Main.exe: Ix{Int}.index: Index (1000) out of range ((0,999))
 
no, the problem is that Lua will accept any old shit
 
2:16 AM
Damn.
 
and it doesn't have to make sense or work
 
heh
 
whereas Visual Studio, for all of it's many, many, many, major, glaring, massive, flaws, certainly will tell you if your program doesn't work on certain levels
 
Oh, so you're a Windows C++ programmer eh?
I think that's all that needs to be said :)
 
lol
 
2:18 AM
I am too...
 
I think you're a moron
 
don't go hatin' on the windows programmers
 
I'm kidding
 
i'm one too ;P
 
I need Windows to play games, and I'm not gonna bother dealing with multiple operating systems
 
2:18 AM
:)
 
I "need" Windows to play games, lol
 
besides, Visual Studio's compiler might be sub-par, but the IDE as a package is pretty good
 
Yes, the IDE is superb
 
@DeadMG Same... Not too many FPS for Linux out there
 
Have you tried the dev preview of VS 11
It's improved a lot (the IDE)
 
2:19 AM
@DeadMG Actually, there are some (corner) cases where VS's compiler outperforms everything...
 
It denotes local variables, etc
 
meh
 
59
Q: how to achieve 4 flops per cycle

user1059432How can the theoretical peak performance of 4 floating point operations (double precision) per cycle be achieved on a modern x86-64 Intel cpu? As far as I understand does it take 3 cycles for an sse add and 5 cycles for a mul to complete on most of the modern Intel cpu's (see e.g. Agner Fog's ht...

 
VS 11 has no more C++11 features
 
Read the OP's edit
 
2:20 AM
@DeadMG yeah it does, aren't strongly typed enums C++11?
 
@RMartinhoFernandes If it weren't for video games, I certainly would never have been interested in programming.
 
rofl, strongly typed enums
 
I'm not using index 1000 anywhere dammit.
 
what about variadic templates, for example?
 
You said "no more C++11 features"
 
2:21 AM
or fixing their shitty SFINAE support?
or constexpr
 
Are strongly typed enums C++11?
 
or template aliases
 
It only takes one :)
 
They need to add C99...
 
sorry, I meant "useful" ones
 
2:21 AM
Then you're right
 
@Mysticial What part of it?
 
@Mysticial No, they don't. C should go rot in a corner.
 
lol
 
Lack of variadic templates was very disappointing
 
I knew someone would pull that on me... :P
 
2:22 AM
I pulled it on your mother first
 
Will VTs be in the final version or are they completely not going to add them
 
Dammit, I can I be using index 1000 if I'm only trying to sort the first freaking 10 elements?
 
Xeo
Variadic templates are going to be "post VS11" which doesn't necessarily mean "VS12"
 
That's dumb
 
Xeo
@RMartinhoFernandes Blame haskell, switch back to C++ :P
 
2:25 AM
@RMartinhoFernandes At minimum, they should add at least single-line comments and intermingled declarations and code.
 
@Mysticial The people using C should just switch to C++.
 
Oh, you mean C99 support when compiling as C.
 
I never knew why a language would have multiline comments but not single
so annoying
Or even more annoying, single but not multi
 
Turns out I was using index 1000 after all...
"Here, build me an array with indices from 0 to infinity..."
 
heh
 
2:26 AM
Most of the HPC code that I write now is a sub-set of C99 and C++, and will compile in both
but it gets kinda annoying after a while though
 
yay laziness!
 
Xeo
I wonder if it's possible to bring infinite ranges to C++ easily
 
@Mysticial Are you talking about VS C99 support? I'm pretty sure it has those two things. Simply because C++ has those things. The things it's lacking are mostly the things that C++ doesn't have.
 
you know, a language like c++ would have made it obvious when you did that infinite array thing.
lol
 
@cHao No, it wouldn't.
 
2:27 AM
sure it would.
 
array(rangeFrom(0));
 
c++ isn't lazy. :P
 
@BenjaminLindley The "main" annoying thing is that I need to rename all the .c to cpp and back when I move code back and forth between Linux and Windows
 
it'd take ages and crash
 
@cHao Doesn't prevent you from writing lazily evaluated stuff.
 
2:28 AM
so I end up having to tell VC++ to force compile everything as C++
since it's C compiler won't compile any of my C code
 
Intel's compiler is better for high performance anyway
 
Woo!
mean: 16.45570 ms, lb 16.12067 ms, ub 16.71071 ms, ci 0.950
std dev: 1.668422 ms, lb 1.656695 ms, ub 1.852295 ms, ci 0.950
Now I need neat stats for the C++ version too.
 
@DeadMG Not always... I've seen enough cases where it just fails... worse than both VC++ and GCC
 
@DeadMG I would expect people who manufacture CPUs to build a very good compiler
 
C++ gives me 10ms.
Not bad at all.
 
2:32 AM
Does the intel compiler support C++11 as well as gcc
 
almost
it's got some good C++11 support
 
Has some stuff GCC doesn't have yet (officially).
 
2:47 AM
when I'm done, C++11 will be crushed under my big, sharp, boot :P
 
What if by the time you're done there's a C++1x?
 
eh
as long as it still fits in the C box, it's got no chance
 
Xeo
@DeadMG BOOT#
 
lol
 
3:06 AM
Fuck GHC. The apparently crappy two-line quicksort algorithm gets super-optimized. I only gained 4 milliseconds, by adding 30+ lines of code.
Where are the crappy compilers when you need them?
Also, why didn't I fucking measure first.
 
3:19 AM
@RMartinhoFernandes you didn't think they'd let their darling fail, did you? I remember something somebody said about optimization...
 
@FredOverflow Who would do such a thing?
 
i DID
I do*
 
what do you think of this style:
for (auto x : xs) cout << x << ' '; cout << '\n';
 
@DeadMG OK. I missed the context...
 
you made a reference to people taking iterators by reference
I have code that takes iterators by reference
 
3:23 AM
@DeadMG Did the reference collapse?
 
infact both my parser and lexer do that
 
@keithlayne I prefer cout << xs :-)
 
yeah
 
@keithlayne Still fighting with Markdown? It disables itself on multiline messages.
 
but they're only lvalues and regular references so
 
3:24 AM
How about this:
for(/*whatever*/) do_something_repeatedly(); do_something_once()
just to confuse myself later
@RMartinhoFernandes I suck at life, thanks for noticing.
But now I have a whole quart of Monster, I'm good to go
 
What's Monster?
 
No. Fucking. Way.
Imma get rich by exporting it to Portugal.
 
What?
That's not making more sense.
 
Monster Energy is an energy drink that was launched by Hansen Natural in 2002. Distribution Though it is not widely advertised in the media, Monster receives a large amount of recognition from its sponsorship of various sporting events, including motocross and car racing. Hansen Natural Corporation announced a distribution agreement with Anheuser-Busch in the U.S. and Grupo Jumex in Mexico. Hansen Natural Corporation announced a distribution deal with PepsiCo Canada in February of 2007. Contracts with existing distributors were bought out in these markets. In Germany Pepsi is the Prod...
 
Xeo
@KerrekSB You and your pretty printer :P
 
3:27 AM
You guys drink weird stuff.
 
tastes better than cold coffee.
 
@Xeo Less code is better!
 
Xeo
@KerrekSB Well, is it really less if you include your printer code? :)
 
But it's write once, run anywhere!
 
Xeo
heh
 
3:30 AM
I have done templated pretty printers for stl containers before...it was a bad example on my part.
if you make a conversion operator to string, that almost makes more sense to me. But it starts to sound like java.
 
Alf should be banned! He keeps posting answers as comments!
 
Xeo
Guess why
 
Why?
100 bronze badges!
 
Xeo
He didn't like that he got a short suspension for always including "Cheers & hth." at the end of his answers. In a comment, that's allowed, so he only answers as comments now
 
are you serious?
 
3:35 AM
@Xeo Oh, he was suspended for that?
WTF.
 
Xeo
I think so
 
why he just post the answer
and then add the "Cheers & hth." in the comments
under his own answer
 
You could maybe suggest that to him next time he's around :)
 
That's not as strong a form of protest though.
 
Xeo
I wonder if anyone actually read the link I provided here -.-
 
3:37 AM
tl;dr
 
Xeo
And that curiousguy is getting on my nerves
 
@Xeo Get in line.
 
wtf? why would anyone get suspended for posting "cheers & hth"...?
3
 
I'm actually wondering, how often do extremely long answers get heavily upvoted?
 
3 hours ago, by R. Martinho Fernandes
Let's hope you're not racy ;)
 
3:39 AM
i could see it getting edited out, but that's hardly disruptive or offensive or any of that crap
 
@Xeo You know what I mean!
 
you sure are friendly with him for not liking him
 
I'd assume that the majority of readers are just gonna tl'dr and gtfo
 
@Xeo "Reinvent the wheel less."
 
@Mysticial Happens fairly often IME, as long as it doesn't contain too many walls of code and is well structured (e.g. with paragraphs and snippets).
Walls of code are a showstopper though.
 
3:40 AM
@keithlayne Let's say I'm not vengeful.
 
hmm... cause I answered one yesterday
 
@Mysticial I think another question is how often do short answers get heavily upvoted?
 
it was 3 hours after the OP posted it
the question was already at 25+
and it was REALLY long
 
@RMartinhoFernandes clearly, and I appreciate that
 
and now, the long question is at 59, and my answer (which is even longer) is at 40
 
3:41 AM
you should be like @kerrek and just goad them into being more retarded
 
@Mysticial People like to reward effort.
 
@keithlayne Short answers are short, the passerbys read it, like it, or agree that it's correct
and upvote
 
It's been mentioned before, but absolute scores on votes are misleading when they can't be compared against the number of views. Maybe that question (and your answer) went viral?
 
at some point, I actually read the tooltip on the voting buttons and tried to conform more to that standard
 
Xeo
I wonder why so many C++ libraries and stuff use cxx instead of cpp
 
3:43 AM
It was this one to be exact
59
Q: how to achieve 4 flops per cycle

user1059432How can the theoretical peak performance of 4 floating point operations (double precision) per cycle be achieved on a modern x86-64 Intel cpu? As far as I understand does it take 3 cycles for an sse add and 5 cycles for a mul to complete on most of the modern Intel cpu's (see e.g. Agner Fog's ht...

 
@Xeo C preprocessor!
 
it's a very corner topic too
 
E.g. cpp on my end runs gcc -E or whatever the flags are.
 
@Mysticial yes, but I would guess it's relatively less frequent. I'm guessing that you didn't rep up by a zillion this quarter by writing tons of short answers...
 
actually I did...
that one is one of my only longer answers
 
3:44 AM
really?
I have not written a single answer in a while...probably a good thing for SO
 
I've decided that most of the questions that I could actually put some work into solving may not be worth it...if no one else had bothered to do so, and it was within my reach, then I probably wouldn't be helping a whole lot of people. Plus I'm a lazy bastard.
 
Being first doesn't always matter.
 
I realized I was rushing to quickly answer trivial questions...not that I think bad questions shouldn't be answered, but I'm pretty sure there are a whole bunch of people out there who will take care of that. IMO a bunch of nearly identical simple answers may help the OP, but don't necessarily help SO.
 
Sure but sometimes you can provide a better answer while everyone else is busy posting trivial answers.
That works nice for me.
 
3:56 AM
or just not care about rep, that works th best
 
...and obviously you guys are much betters sources of answers for nontrivial questions. Even if/when my knowledge surpasses all of yours (after, I'm the smartest person in the world) I'd still feel weird about it.
 
I think I don't any more, but I'm pretty sure @DeadMG still has me blocked.
 
Or if you're into collecting badges, then there are certain games you have to play...
 
Yesterday I found a question with three crappy superficial answers. I spent 15 minutes writing my own. Meanwhile two more answers were posted. In the end my answer got 10 votes against 3 of the second most voted answer and was the accepted one with a "thank you" comment from the OP.
@DeadMG Do you still have keith on ignore?
 
3:57 AM
yep
 
lol
 
So, I'm talking to myself.
 
I didn't know robots did that.
 
I know he's here and chatting
 
Invisibility is my superpower.
 
4:01 AM
Yeah, but apparently he can smell you.
(Dogs have a good sense of smell)
 
Unsmellability would be a pretty sweet superpower too.
 
He's probably got the right idea, I talk too much.
 
Damn, not this profile silly. Chat profile.
I have posted over 40k messages in this room.
 
where do you see that?
 
4:07 AM
I don't think people mind much.
 
ok
 
I think I'm the chattiest!
 
I'm already at almost 2k
 
Having nothing to do, and slacking when you do have something to do really helps.
 
I wonder if the proportion of chat messages here vs the Haskell room is roughly equivalent to the number of lines of code to express the same program in the two languages.
 
4:11 AM
lol
 
Xeo
Answer, I want answers!! :(
 
@Xeo Place a bounty.
 
I want your mother
but she ain't here
 
Xeo
Can't yet
 
Oh, still needs to wait a few hours.
@DeadMG Are you sure?
 
4:13 AM
lol
no
 
@Xeo I'll do it for you, since I've established that I don't care about rep.
and it would support my cheap badge quest
which was (embarrassingly) my first motivation for dropping in here
 
was that for enlightened?
 
@Xeo Yes, he's prone for doing that.
 
@Xeo can I flag it as "this guy is an asshole"?
 
Xeo
4:15 AM
lol
 
I had a moderately long discussion with him about class invariants and then it ended with him asking what I meant by "invariant".
 
Xeo
Fuck it, why is my wlan so damn slow suddenly?
 
A mod should be coming soon to sweep up the comments, I'm sure.
 
Xeo
I even got a connectivity of 5 bars out of 5
 
Signal strength is measured in dBm. A bar is a unit of atmospheric pressure.
2
:P
 
Xeo
4:19 AM
ha-ha. :P
 
maybe I'll ask a question for once
 
Xeo
No really, if there's one thing I really hate, it would be a slow internet connection
 
Ask it here before posting, so we can get to the reps first!
(Kidding.)
 
I'm the baus
 
I asked a little before, but I don't know that it was resolved.
 
Xeo
4:20 AM
And that's what I am currently having it seems. /slowly losing it
 
@DeadMG That what?
 
Xeo
Okay, brb restarting the router. Sometimes that helps
 
> if i get 100 likes, during a test ill scream like a boss then say im gonna fuck your fishes brains out!!!!!!
 
Xeo
4:24 AM
back
 
fixed?
 
Xeo
@DeadMG That thing is funny
 
@Xeo it's cause of all those torrents you're downloading making your router choke :)
 
I know
they are a good band
 
Xeo
@keithlayne I don't have any running currently. :(
 
4:27 AM
@Xeo maybe you have a problem upstream?
 
Xeo
No, downstream
 
That reminds me I have to finish seeding the humble bundle.
 
Xeo
Youtube loads fucking slow
Seems fixed now though
 
Yes, I'm a weirdo that seeds.
 
Xeo
:O
Slap him!
 
4:28 AM
"humble bundle"?
seeding is unamerican, so I can't be bothered with it
 
@keithlayne It's a bunch of games. humblebundle.com
 
@RMartinhoFernandes that looks like a pretty cool concept. The average payment by platform is interesting.
 
@keithlayne I can't find the stats for how the money was distributed, but when you pay, you get to pick what portion goes to charity, what portion to the devs and what portion to the humble bundle guys.
 
that's pretty cool.
 
4:43 AM
> This ain't my dad. This is a cell phone.
 
> duh!
 
lol
I should just configure Chrome to block YouTube so I waste less time on it
 
 
1 hour later…
6:05 AM
@sbi By "value types", do you mean structs, or do immutable classes like C# strings also count as value types?
 
6:23 AM
@FredOverflow Apart from the special casing necessary to handle Unicode which effectively mandates an override anyway?
 
@DeadMG An override of what?
 
operator==
which is what he was talking about in the message you referred to
 
You can't override operator== in C#, can you? It's a static method. I was talking about overloading.
Even if C# strings were ASCII, overloading operator== would still make sense, right? What does Unicode have to do with it?
 
that's true
 
6:29 AM
that's good
but I think that it's a bad article
did they remember to account for general trend increases in music sales?
 
Sales increases? So what's the music industry complaining about? :)
 
exactly
plus, it's worth noticing that many of the left-hand-side are attractive women, and virtually all of the right-hand-side aren't
 
popular != good
 
Right, see almost any popular programming language :)
 
6:40 AM
'nuff said
 

« first day (417 days earlier)      last day (4533 days later) »