« first day (838 days earlier)      last day (4109 days later) » 

7:00 PM
@Rapptz Plus, it's way easier in C#. Environment.GetEnvironmentVariable("PATH").Split( new char[] { ;` } );` <--- And now you just File.Exists for the editor you want. Try doing that in C++. :D
@JerryCoffin system/women32
 
@ThePhD probably not as bad.
 
But if you want more bang for your buck, you should really get a 64-bit woman. Now she'll be able to address all your needs!
ZING!
I blame @sehe for all my corny puns.
 
@ThePhD Why are you talking about maize?
 
@ThePhD _searchenv("Myeditor.exe", "PATH", file_path); Oh, and no need for File.exists either, since it'll only find files that exist. Seems quite a bit simpler to me.
 
@EtiennedeMartel Because I don't want everyone to get lost!
 
7:04 PM
Too bad the question is linux only.
 
what's wrong with just execlp() and check the return code?
if you want to start it up anyway, you don't lose anything by trying.
and you're going to have to end up doing that sooner or later... the exec could still fail.
 
@LucDanton Are you sure? I only remember talking about the const function in Haskell.
const x = \_ -> x
 
@FredOverflow Haskell...
 
@ShotgunNinja What about it?
 
7:08 PM
Is there really any limit to how long a single string can be?
 
@Crowz The amount of memory you have available to you.
 
or 2^size_t, whichever comes first
 
@Crowz std::numeric_limits<size_t>::max()? ;)
@rici That would be 2^(2^32) or worse :)
 
@FredOverflow Does anyone still use Haskell? I'd love to hear some justification for learning more about this language I know nothing about.
 
@FredOverflow,true, it was sloppy
 
7:09 PM
@ShotgunNinja Search for "Haskell" in this room. Everybody loves it.
Also, what do you mean by "still use Haskell"? Haskell is clearly on the rise, it has gone from hundreds of programmers to thousands of programmers in the last decade :)
 
@ThePhD So 1000 characters should be no problem at all?
 
"Is the rise in Haskell users exponential?" - "We don't know, it's too early to tell!"
 
@Crowz Hardly.
 
@ShotgunNinja The only justification I had for learning Haskell was "it's a totally different way of thinking about programming, and it's so much fun".
 
So does C++ think of chars and strings as seperate things?
 
Ell
7:11 PM
@FredOverflow apart from me ;)
 
@Crowz std::string::max_size();
@Crowz C++ doesn't think. (but yes).
 
@JerryCoffin C++ does think. It's plotting to destroy us all.
 
@Crowz No, that's computers in general, not one specific language.
 
Edited title to stop blaming well-tested library code. — djechlin 12 mins ago
 
who blames library code? Library code is the best code
 
7:16 PM
Half of SO noob questions blame library code.
There's a guy on the mingw-w64 list that blames C++ for everything he codes wrong because he refuses to read documentation.
 
@rubenvb No, only about a third. [Most of] the rest blame the compiler.
 
I was just accused for a very serious bug we just found. I looked into it, and as far as I can tell, that bug has been in the code since two years before I got hired, so apparently I'm not completely to blame.
 
@MooingDuck you didn't fix it. They should fire you.
 
@MooingDuck Blame is not about how really did it. It's about who's in the poorest position to defend himself.
 
@MooingDuck Did it have to do with your terrible internal language?
 
7:20 PM
@JerryCoffin I rewrote a big part of that module recently and introduced many bugs, so it's completely natural for them to accuse me first
@ThePhD not this time
 
user142019
@FredOverflow Psst! We used it before it was cool!
 
@MooingDuck See what I mean?
 
Ell
@Zoidberg only cos you're a hipster ;)
 
user142019
Shush.
 
@Ell *you're
 
Ell
7:23 PM
ta :)
 
I need another name for "OS". For toolchain, I got "vendor" and "toolchain". Anyone have an idea for "OS"?
 
@rubenvb platform?
 
Ell
platform/arch ?
 
@ShotgunNinja platform = arch + OS.
 
Ell
what's wrong with os anyway?
 
7:24 PM
both suck.
 
@rubenvb I have lots of words for OSes -- none repeatable though.
 
user142019
You suck.
 
How about 'faction'?
That's effectively what each OS is...
 
I need to map os::MacOSX to both "mac" and "Mac OS X", depending on the situation.
one for nice output, one for string checking and in Ambrosia project files
Great, FF just crashed. The bastard.
 
What about osLabel?
or osName?
 
7:26 PM
ah, os_name_map
thanks
 
no problem, dude.
 
user142019
Separate UI from internal representation.
 
One of the two most difficult problems in Computer Science, solved.
"There are only two hard problems in Computer Science: cache invalidation and naming things." - Phil Karlton
 
@Zoidberg that's what I'm doing. This map would be the interface between the enum class and the string representation.
 
I wish efficient maps of the names of enums were created for you when you created an enum class.
 
Ell
7:29 PM
@ThePhD you mean so you could to_string an enum, and it give you a name?
 
@Ell Yeah.
 
@ThePhD ah yes, but then I wouldn't have the ability to deviate both the internal enum member name and the string.
 
@rubenvb Yeah, true, but for the most part you usually don't want to change it up.
 
@ThePHD couldn't you write something like that with variadic macros?
 
I can't seem to find GCC-dw2-4.6.3-2
 
7:31 PM
@Cubic Shrug. I wouldn't know, and I don't think it would work for non-contiguous array values. Unless you kept an indexing array or something.
 
it's in gcc-dw2-4.6-release
 
What's the dw2 for?
 
@rubenvb Oh thanks. I thought it was supposed to be in the clang release.
 
@Cubic well, you could just use an actual map though. Or do you need this to be incredibly fast?
 
@Rapptz nope it's completely independent. Only Clang depends on that GCC version.
 
7:33 PM
@ThePHD I just wrote to myself - sorry, sleep deprivation
 
@Cubic Go to bed. :D
 
I'm one upvote away from rep cap.
 
@ThePhD it's GCC's exception handling mechanism.
dw2 is faster than sjlj, but can't pass exceptions through windows callbacks for example. There's also seh for x64 which is the best of both worlds, and the default in GCC 4.8, although it's 64-bit only.
 
@Rapptz Nice!
 
Anyway, does anyone here know/use the GLM library? It seems good, but are there any alternatives I should be aware of?
 
7:35 PM
@rubenvb Can there be a backport of of seh to 32-bit?
@Cubic Just use either glm or eigenvector/eigen/whatever the fuck its name is .
 
@ThePhD no. 32-bit has a patented and even worse documented SEH mechanism. Only MSVC and Intel implement it.
 
@rubenvb Sounds like shit. :c
 
And probably stuff like Borland from way back.
@ThePhD just use 64-bit and dump x86.
 
@rubenvb You've lost me. :D
Oooh, you by dump you mean never use x86.
 
@ThePhD x86=32-bit, 64-bit is the new hot stuff that you should be using.
yes
 
7:37 PM
I still get that pesky dll error
 
not stack dump or something silly.
 
But what about all the x86 peasants out there who can't use that x64?
WHAT ABOUT THEEEM?
 
@ThePhD name one CPU for sale today that can't do x64.
 
All the ones that aren't for sale that people still have? :D
 
Seriously, x86_64 was available since the Athlon64. And the last generation of Pentium 4.
I hate old hardware.
 
7:40 PM
@JerryCoffin woo! I explained myself to my manager and offered to fix it anyway, so now he's mad at the guy who tried to pass the buck to me! :D
 
@MooingDuck Nicely done! Well, not on getting him angry, necessarily, but still offering to fix it is clearly the right thing to do (then he can decide whether that takes priority over whatever else you need to do).
 
@MooingDuck VICTORY GET!
 
@rubenvb I still think you should provide 32 bit executables, just in case. Though I'd have to agree with the notion that you should generally assume that you have a 64 bit environment available and optimize for that.
 
it did help that I think I can fix the code. Normally I wouldn't be able to, but since I already broke everything else in this file, I'm rather familiar with it.
 
@Cubic Isn't this a little backward from the previous convention?
 
7:44 PM
@ShotgunNinja conventions change
 
Tradition is the corpse of Wisdom.
Fuck the status quo/the man/the conventions/the police.
 
@rubenvb problem is half the world still has 32bit Windows
 
@MooingDuck Who is half the world in that statement?
 
@Zoidberg Exactly when did Haskell become cool?
 
user142019
@FredOverflow not yet, that's the point! :D
 
7:46 PM
@ThePhD At least with the female police I've seen, no thanks (unless you count a "meter maid" as police -- years ago I knew one who was seriously hot).
 
@Cubic A horrifying number of people still have WinXP32 and Win98.
 
:7477111which half of the world? All major PC vendors sell 64-bit Windows virtually exclusively since like... 2 years ago.
but alas, everyone has their trusty WinXP box.
 
@JerryCoffin Yeah, but see, if you get really close and stuff then you can't do illegal shit because they'll always have that tick in the back of their head wanting you to be legal.
I'll be damned if I'm ever told to stop speeding or to park in the correct spot.
 
I don't have a car yet, but I'm already all worked up for when I do get one. Which will be never, because I really don't want to ever drive ever. :D
 
7:48 PM
@rubenvb I still have WinXP32 at both home and work
 
@MooingDuck Well, whether that horrifying number actually matters really depends on whom you're targeting though. E.g. for PC games it's reasonable to expect that your target audience has fairly new systems. For other applications the situation may of course be different.
 
@MooingDuck where does it say WinXP32 vs WinXP64?
 
@Rapptz doesn't distinguish, but virtually nobody has WinXP64
 
What about Windows 7 32 vs 64?
 
@MooingDuck Yeah, I didn't even know WinXP64 even existed until like a year ago.
 
7:49 PM
@Rapptz Vista and everything after was mostly 64 bit
 
@Rapptz Most distros of Windows 7 are x64 I think. I think.
 
I know at least 5 people with 32-bit Windows 7.
 
On the bright side, WIndows XP will be dying off soon.
 
So I didn't think it was rare.
 
As of April 2014, Windows XP won't be supported anymore.
Trigger the scare-move to Windows 7, and hopefully more 64-bit goodness.
 
7:50 PM
that's still a friggin' year. and some months
 
And no one likes Vista.
 
@Rapptz I'm less certain about Vista and 7, but that was my uninformed opinion
 
I find it funny that Vista wasn't even mentioned throughout all of that.
 
@ThePhD IMO, the problem with police is less about them wanting you to be legal than about them just being way too cynical for anybody's good. Granted, being around criminals constantly I can see how it'd happen, but it's still no fun.
 
@ShotgunNinja nobody cares about the "every other" version.
 
7:51 PM
I think Windows 8 looks nice but :(
 
I have a Answer that's close to a badge, is it bad form to ask people to up/skip/down vote as they want: stackoverflow.com/a/14486705/845092?
 
@ThePhD ...and 5 years from now it'll still be dying off soon.
 
@JerryCoffin support ending will mark the beginning of the end IMO
 
@MooingDuck Yeah, but it'll still take a while. =[
 
Did Microsoft really sell 40 million copies of Windows 8?
 
7:52 PM
It's packaged with so many PCs right now.
 
Why do I find that hard to believe?
 
You can't not get Windows 8. =[
 
Oh man.
It's 60 million now. zdnet.com/…
 
@Rapptz they have deals with all the hardware manufaturers and sales companies and everything. They sold 60 million, but far fewer consumers bought it yet.
 
@Rapptz Estimates at ~30 million dissatisfied customers?
 
7:54 PM
@Rapptz Probably -- but that's mostly bundled versions. Most of them would probably have taken Windows 7 if they'd been given a choice. I believe they're now also counting phones and tablets along with computers, which inflates the number even more.
 
@JerryCoffin I'd assume as well
 
Windows 8 would be fine, if they made the search a bit better, allowed me to actually customize my freaking start menu screen with folders and shit without having to install secondary programs and hacks.
 
@ThePhD Well, I don't buy my PC's with preinstalled cr- -- goodies so I'll probably get around it for a while. Unless everyone suddenly jumps on the metro train (which I kind of doubt) I'll be fine that way too. Not that I'm using Windows for anything other than games to begin with anyway.
 
It would also help greatly if they got rid of that... what is it called, Charms Bar ?
What the fuck, CHARMS-BAR?
You get rid of the Start Menu but add a Charms Bar?!
 
@ThePhD ribbon UI?
 
7:56 PM
lol charms bar
I choose you, IE!
 
0
Q: Odd behavior by #define

Jbad26I have this code in C++: #include <string> #include <iostream> #define true false #define false true int main() { std::cout << true << std::endl; std::cout << false << std::endl; } It produces this output: bash-3.2$ ./a.out 1 0 I do no understand why...

 
Let's be more direct: it would help a lot if it wasn't really Bob 2.0.
 
@Rapptz Why the downvotes? It is not a bad question.
 
I didn't downvote it
 
8:00 PM
@Rapptz It's clearly because the return statement is missing.
 
user1182183
 
@ThePhD Doesn't look.. that bad.. I guess.
 
@Rapptz But if you're going to get rid of the Start Menu and replace it with the Start Screen, why have that bar there at all? It doesn't help. I can't even customize the Charms bar to any significant or insignificant degree.
 
@ThePhD Can you at least hide that thing?
 
@Rapptz It's not. It's worse. Seriously, it's a complete mess. The UI is pretty much a web browser with the back button removed.
 
8:02 PM
It's a space-waster. I'll just go to the Start Screen. Why give me what is essentially an utterly washed out, beer-bellied Start Menu that uses a completely different shortcut key and opening macro (the topright corner, and NO, you're not allowed to change it) from the original start menu!
It was a last-minute addition to populate the 'corner' of a tablet with a USELESS piece of junk. It's not nearly as useful or customizable as a Mac OSX dashboard. It doesn't show me all my applications open. It doesn't tell me anything useful. It just gets in my way and, for some DUMB reason, activates whenever I swipe my fingers to the right on my touchpad, which was the DUMBEST UX idea by either MS or Toshiba/Lenovo/& friends.
 
Yeah as if I can see it. :(
 
Right, forgot you were a nub
 
Hmm...doesn't onebox either.
 
@EtiennedeMartel only a little.
 
8:09 PM
I can't think of this word...
 
@EtiennedeMartel Wait, does that even work?
I don't care if it's UB, but would it actually work on a typical compiler?
 
@Mysticial Hence the "funny" part.
 
@Mysticial As edited, yes.
 
damn you guys
 
8:12 PM
@Mysticial Even with the true/false, yes. A macro will be expanded, then re-scanned for further expansion -- but if it expands to its own name, that will not be re-expanded (would inevitably lead to infinite recursion).
 
god, obj-C is weird
 
@Mysticial :D ty
 
I don't suppose anyone here secretly understands the language well enough to explain stuff to me?
 
@jalf No point in telling god -- Objective C is clearly the work of the devil.
2
 
@jalf Oh, it's no secret. Lots of people here PUBLICLY understand the language well enough to not only explain stuff to you, but to understand stuff that they cannot explain due to its complexity in comparison to your current level of understanding.
 
8:14 PM
This answer explains the behavior that's observed, but not the reason for the behavior, which is the fact that the preprocessor makes two passes over a file. And the cause of the observed behavior has nothing to do with self-referential macros, which is the target of your gcc.gnu.org link. I am at a loss to understand why your answer is getting tons of up-votes, while the correct answer (mine) is getting none. — phonetagger 3 mins ago
Is this guy right?
Someone downvoted him :(
 
See: Difference between 'validity' and 'rightfulness'...
Stroustrup's book...
actually lol no.
 
@ScottW The swan book.
 
@ScottW I don't know, I picked up C++ by knowing a bit of Pascal, then reading a bunch of crappy online tutorials and then spending the next 1 or 2 years unlearning half of the practices I picked up with those.
 
@FredOverflow hmm, which is that?
 
What's a word for "chaotic" with a positive disposition?
 
positive connotation*
 
I found the topic
But you need to be #
 
@Crowz "chaotic in a good way"
 
@Crowz Unrestricted.
 
8:20 PM
10 points to Puppydor.
5
 
@Pubby Not really. The number of passes isn't fixed at two. The expansion of a macro is always re-scanned for further macro expansion. That could be twice or it could be hundreds of times. It only stops when the expansion no longer contains any macro names (that haven't been already been expanded once).
 
@FredOverflow ah, now I somehow remember that name
 
@ScottW yep.
 
@bamboon Well, there's swans on the cover :)
 
those swans are weird
 
8:21 PM
@Crowz Entropic? Dissonant? Random? Spontaneous?
 
like, look at their wings
 
@JerryCoffin That's what I thought (I linked him a GCC page which says that). Except now I'm losing upvotes and he's gaining them :S
 
@Pubby huh, I've got a recursive macro right here. Works really well
 
Good suggestions there
 
some logging code I copied from a blog post
 
8:22 PM
Each one has slightly different connotations, but in specific contexts, they each can mean "chaotic".
 
@jalf Huh? Can I see?
 
@Pubby sure. Well, it's kind of recursive. Sec, let me dig it up
 
@ScottW Inorite. I've got some more stuff going on that I haven't uploaded yet.
right
that's why I made these
they don't suck
mostly
 
@Pubby Looks like he's realized his answer was wrong.
2
 
> A young man from Slovenia, just 23 years of age, writes his first book documenting a difficult computer-programming language, in English, which is not his native language. Given these facts, you'd think the odds would be stacked deeply against any measure of success for him. Yet it appears that, with his book Learn You a Haskell for Great Good!: A Beginner's Guide, Miran Lipovaca has almost smashed the ball right out of the ballpark.
He was only 23 when he wrote that book? Wow. Maybe we can do it, too!
 
8:28 PM
@FredOverflow Does that explain the strange title?
 
@Pubby I'm pretty sure he did that on purpose :) Otherwise the complete text would sound strange.
 
It is a pretty good name. Much more marketable and easier to remember than real world haskell.
 
I wouldn't say Haskell per se is difficult though. It's mostly the libraries and ghc extensions that throw you off (of course it's a bit weird if it's your first time with a functional language).
 
@Pubby The robot is working on a Haskell book titled ((.).(.))
 
the gcc documentation explaining the preprocessor behavior is crystal clear imho
 
8:34 PM
@doug65536 I agree
 
user142019
Meh.
 
user142019
@FredOverflow awesome (typo: -ed).
 
5
A: Visual C++ 2012 cout crashes during run time

DeadMGYour CPU is in urgent need of being junked. Your compiler is probably set for a CPU from this century. You may be able to disable the newer instructions like SSE2.

and many had to apologize
 
user142019
lol
 
8:42 PM
@Zoidberg Did you pwn your teacher yet?
 
user142019
@FredOverflow Damn! Forgot!
 
user142019
I always forget everything.
 
old athlons only had SSE (no SSE2), therefore only floating point SSE
 
user142019
Except the very details of every programming language. :P
 
user142019
 
8:45 PM
I wish he would have used -march=native and see if gcc actually has a bug
 
@doug65536 Not just that. Only single-precision floating-point.
 
@Mysticial yes I was going to go into detail but decided to let sleeping dogs lie lol
 
@Zoidberg Doesn't seem like you know too much about Java though :)
 
user142019
@FredOverflow shush
 
Just sit down for 1-2 hours, and you should know everything there is to know about Java.
 
8:46 PM
I haven't had a 0 score accepted answer in a while.
 
(Sit down and study, that is. Just sitting down will not teach you Java.)
 
user142019
@FredOverflow I was told many things about Java by a friend in half an hour.
 
Who was that Java whore?
 
user142019
I never touched Java code before, yet I wrote the best Java code of the whole classroom during the first lesson.
 
Sure, because you wrote code.
 
user142019
8:47 PM
@FredOverflow github.com/arianvp, a friend of mine. He knows everything about Java but he hates it since he started learning other languages such as CoffeeScript and Haskell.
 
user142019
@FredOverflow :P
 
@Zoidberg Java and CoffeeScript sound very similar, surely they are basically the same language, just like C/C++?
 
user142019
He’s an I/O master. He knows everything about I/O. xD
 
@Zoidberg His hair looks like Clojure.
 
user142019
@FredOverflow they’re quite irrelevant.
 
user142019
8:48 PM
@FredOverflow lolwat
 
The guy who invented Clojure has hair like that.
 
@Zoidberg Whoosh.
 
user142019
Oh. :P
 
user142019
CoffeeScript and Java have in common that they both have classes and inheritance.
 
user142019
And that’s about it, I think.
 
8:50 PM
> BSODOS: A little joke kernel, displays a BSOD and halts.
lol
@Zoidberg CoffeeScript has inheritance? Because JavaScript does not. Just checking.
 
user142019
@FredOverflow yes.
 
Well, I don't care. Inheritance sucks.
 
user142019
class Foo extends Bar
    myMethod: (x) ->
        super(42)
 
@Zoidberg Coffeescript compiles to Javascript, which we all know really is Java.
 
@FredOverflow interesting, I wonder who in this room leaked the info?
 
user142019
8:51 PM
In CoffeeScript you can access this using @, and this.foo using @foo. One thing I really like about that is that you can do this:
 
whoa! There's a visual studio one!
 
user142019
class Foo
    constructor: (@a, @b, [@c, @d], {foo: @e, bar: {baz: [@f, @g], qux: h}}) ->
        alert h
 
@FredOverflow Reminds me -- April coming soon. Time for the BSOD screen saver...
 
user142019
And it will assign this.a, this.b etc... and alert h.
 
wtf, the visual studio one is wierd. "Ignoring directive '#include', which cannot be used in this online version of the Visual C++ compiler. Automatically importing the Standard Library headers which match this online version of the Visual C++ compiler"
 
8:52 PM
@FredOverflow why do you say javascript has no inheritance? It's accurate to say barely anybody uses it though.
 
@MooingDuck I saw that -- and wondered if it was even allowed.
 
@MooingDuck It's by microsoft
 
@doug65536 Because JavaScript uses prototypes instead of inheritance.
 
It seems like it anyway.
 
@Borgleader I'm trying! I am planning to finish the next one today since I don't have class tomorrow. It's not part 4 of the tuples, though. I pushed that one for later.
 
8:53 PM
@FredOverflow It has inheritance -- but no classes.
 
compiles but doesn't execute :(
 
@FredOverflow ok, making sure you knew that :)
 
Oh okay, I stand corrected. JavaScript uses prototypal (sp?) inheritance.
 
It has the concept of an "Object" though.
 
user142019
CoffeeScript classes are just syntactic sugar for a constructor function (one used with new) and a bunch of classname.prototype.foo = ....
 
8:54 PM
@R.MartinhoFernandes Looking forward to it :)
 
I think javascript is half decent for a dynamically typed language
 
So how does one copy things in JS? I never understood all that new stuff and constructors.
 
@Pubby stackoverflow.com/questions/122102/… yes, basically manually
 
@Pubby At least in most JS code I've seen, the answer seems to be "badly".
 
user142019
8:57 PM
@Pubby Copying lists is by slicing them, at least. That’s all I know.
 
jquery is proof that real javascript looks nothing like C
 
Well, then how do make new objects?
 
user142019
In my ø library I have a function ø.list which does that; ø.list = (xs...) -> xs and called like xs = [1, 2, 3]; ø.list(xs...).
 
user142019
@Pubby new Foo().
 
user142019
Where Foo is a function. :P
 
user142019
8:58 PM
Let me give an example.
 
function foo() { foo = new Foo(); return foo; }
I probably fucked up the syntax on that
but closure'ing a new variable seems confusing
 
user142019
function Complex(real, imag) {
    this.real = real;
    this.imag = imag;
}

var myComplex = new Complex(2, 3);
 
@Pubby here's what I meant: ideone.com/cNHdPa It's not exactly recursive but... kind of. :)
 
user142019
Complex (in this case) is comparable to a ctor.
 

« first day (838 days earlier)      last day (4109 days later) »