« first day (493 days earlier)      last day (4457 days later) » 

sbi
2:00 PM
^"
Sigh.
 
This is what all build system talk will arrive at.
We desperately need something new.
 
2:17 PM
I hereby declare war on the C++ Language room.
 
Have fun.
 
I didn't even know that room existed. Was it created before or after this one?
 
a few weeks ago
but virtually nobody talks in it, there's been like, four messages in the last four weeks
 
Tin
i didn't even know it existed
 
It would be silly to think that on C++ the topic is just C++ ;-)
 
sbi
2:20 PM
@IntermediateHacker What for?
 
I see. So if I ignore it, it might just wither away in a few weeks.
 
Or you could just not care.
 
@sbi for indirectly giving a pun on us.
 
sbi
@IntermediateHacker Even if it doesn't — what's your problem with the room? If users want a room to discuss only the C++ language, and if we don't want to restrict this room to that, why shouldn't they have their room to do just that?
@IntermediateHacker Eh?
 
@sbi I guess you are right.
 
2:25 PM
After all he had us distracted from the build tool topic.
 
sbi
If we were fighting to have this room's users not leave for other rooms and this one dwindling to insignificance, then I would question splitting the room's user base. (But blindly wanting the other room die without changing what caused it to be created wouldn't help then either.) As it is, however, if anything is wrong with the number of users in this room, it's that it is too popular rather than the opposite.
 
@sbi I was just trying to use US Foreign policy on that room.
 
^ Python <--> C++ wars
1
A: Why is splitting a string so much slower in C++ than Python?

Cheers and hth. - AlfAs a guess, Python strings are reference counted immutable strings, so that no strings are copied around in the Python code, while C++ std::string is a mutable value type, and is copied at the smallest opportunity. If the goal is fast splitting, then one would use constant time substring operati...

 
lol, wrong link.
 
@CheersandhthAlf Actually, both Java and C#'s standard string split operations run in linear time.
They make copies.
 
2:32 PM
@RMartinhoFernandes For silly thread safety, I presume?
 
@CheersandhthAlf thread safety is silly?
 
I think it's mainly an oversight.
 
@IntermediateHacker some kinds of perceived thread safety are silly
 
There's nothing wrong with having in C# a substring reference class like the one you wrote.
But for some no reason they didn't put it in the box.
 
hey, this is irrelevant, but in what language was the Java compiler made?
 
2:36 PM
It was probably bootstrapped with C.
But nowadays it's Java.
@CheersandhthAlf Strings there are immutable already, so keeping a reference to an existing string doesn't bring any threading issues.
 
2:49 PM
@CheersandhthAlf I tried to find out what the hth meant, and google pointed me back to your SO user page.
 
@Xaade lol! Hope this helps.
 
0
Q: How Can an Implementation of a Language in the Same Language Be Faster Than The Language?

IntermediateHackerIf I make a JVM in Java, for example, is it possible to make the implementation I made actually faster than the original implementation I used to build this implementation, even though my implementation is built on top of the original implementation and may even be dependant on that implementatio...

 
@jweyrich No didn't help. Still don't know what hth means :P
 
@Xaade it means "Hope This Helps"
 
@Xaade hail the hitler, maybe.
 
2:51 PM
@Xaade true?
 
@CheersandhthAlf Google search "Cheers and hth"
 
@IntermediateHacker Code compiled by GCC can run faster than GCC itself (assuming you have a meaningful way of comparing the speed of GCC with the speed of the code you compiled, of course).
 
@Xaade he he :)
 
@Abyx <SARCASM>true</SARCASM>
@CheersandhthAlf See, now I can't @Alf. Which may be a good thing for you....
 
@IntermediateHacker it's all about optimizations
 
2:54 PM
Hey guys, what happened to /b/?
 
/b/ sucks
 
@RMartinhoFernandes That's slightly different though. The code compiled by GCC wasn't written in GCC as a language. Like, the code compiled doesn't implement the GCC code.... agh.... look, I don't know how to say it.
It would be like writing a GCC compiler that's faster than the original GCC compiler you used to compile it with, but at the same time, using the libraries used by the GCC compiler.
 
@daknøk /b/ was superseded by /c/, which itself was superseded by /c++/.
2
 
lol the background music
 
@jweyrich But.... isn't /c/ more efficient than /c++/ :P.
 
2:58 PM
@Xaade Why does it have to use the same libraries? You can compile new libraries.
 
@Xaade I reserve myself the right to answer to that only in front of my lawyer. sigh
@DeadMG ping
 
I object to being disturbed for little reason
 
@DeadMG good then, because I had none. It's carnival holiday here - the only positive thing :D
 
Carnival is no longer a holiday here.
I'm still not sure if I'm happy or unhappy about it.
 
3:20 PM
@jweyrich Just tell him <random god> loves him, he'll rant for half an hour.
 
@RMartinhoFernandes The first time I looked at one of those and didn't branch once.
@DeadMG Random Number God loves you.
 
user784668
3:39 PM
@Xaade lol
 
I'm catching up on the number of Nice Answer badges :-)
How come SO doesn't have Good Flame badges?
 
user784668
@CheersandhthAlf Because there's no point of having a badge everyone would have.
 
4:30 PM
I feel like I'm spamming project showcase.
More people should add stuff.
@Fanael Like: Finished #1 in sperm race!
 
@StackedCrooked Well, I'll put my wheels there. It's the only thing I have I can call complete in any form, because it's basically a bunch of loose things I drop there.
 
That's good.
 
This thing actually exists. It weighs about one kilo, and costs more than two thousand dollars.
 
I'm trying to imaging using the knife. Seems awkward.
 
@StackedCrooked Try imagining the toe nail clipper then
 
4:45 PM
@RMartinhoFernandes I wonder if I can sneak that through airport security? Does it look like a knife?
 
I doubt you can.
There is now one bladeless model that was created just so it can be carried in airplanes.
 
@CheersandhthAlf there is no such thing as a good flame. Having a good flame badge results in more server load only :)
 
markdown fail?
 
5:03 PM
I'd appreciate help specializing a function for objects that have a common base class. For example, I'd like to specialize the function Foo for the classes A1, A2 and A3 have a common base class a.
 
do you mean specializing as in overriding the base class function, or specializing a template function foo?
 
I mean in specializing a "third party" function Foo for the base class a, so that the specialized Foo is called for all derived classes of a.
Note that I've got more than two base classes and I need to perform the specialization for the other base classes.
 
5:49 PM
I hate my coworkers. This project has "GLOBAL.h", "globals.h", "GLOBAL.h", "Global.cpp", and "globals.cpp".
Actually, each of these projects does, they seem to have merged into each other somewhat
 
You mentioned GLOBAL.h twice.
Though a single one is already bad.
 
user784668
I'll probably add several "global.h" to each of my projects.
 
user784668
They will never be included anywhere.
 
user784668
And every single line of code in them will be just as inefficient as possible.
 
@RMartinhoFernandes second should have been .cpp, there's five total
 
user784668
5:55 PM
Now imagine all these poor people trying to optimize without measuring. They'd waste much time to optimize code that never even gets compiled, let alone executed.
 
sorry for the interruption, do you know maybe good article about file management in big projects, why avoid include in .h when use forward declaration etc. Thank you
 
I don't understand perl. I have a variable that I set continue = false; Now I can't figure out how to go into an if statement only if continue is set to true. if (continue) always enters, if(continue=true) always enters, if(continue==true) always enters.... I eventually got if (continue != false).
 
@sbi Yay, we are popular!
@RMartinhoFernandes In case your IKEA bed falls apart on the airplane, you can use the allen wrench to fix it.
 
6:16 PM
@Xaade That's a killer feature.
 
@StackedCrooked So you advertise a multi-tool without blades so it can be brought on airplane by listing off it's killer features?
 
why isn't there a C programming room?
 
@Xaade Why not?
 
@AdamScottRoan why would there be?
 
@AdamScottRoan For the same reason there isn't a COBOL programming room.
 
6:17 PM
Why wouldn't there be?
 
well, I use C.
 
There's not much to say about C
 
Everyone is free to create a room :D
 
There's even a C++ room!
 
@AdamScottRoan Because C Programmers aren't as popular as we are?
 
6:18 PM

C++ language

A room strictly for discussion regarding the C++ language, bes...
 
user784668
@MooingDuck lol. Another dead room?
 
@Fanael I just posted there.
Should I make a meta rant room?
 
user784668
@Xaade Oh, that would be awesome. Wait. There's already one. It's called Lounge<C++>.
 
@Xaade "No mods allowed"
 
District C++.
 
6:21 PM
Let's see how long it lives!
 
@Xaade not on chat.meta.stackoverflow.com ;)
that would be very meta
 
user784668
@awoodland That would be too meta.
 
You can't complain about meta on meta.
That's like telling your mom how much you don't like your mom's house rules.
 
@Xaade meta.meta.stackoverflow.com?
 
@awoodland Server not found
 
6:24 PM
is meta like rvalues references? does meta.meta.meta collapse to meta like &&& goes to &?
 
user784668
@awoodland What would be the place to complain about that?
 
@Fanael infrecur.meta.meta.stackoverflow.com
 
@Fanael USA Congress.
 
user784668
@MooingDuck you mean, repeat meta ++ ".stackoverflow.com"?
 
hey if you had too many levels of recursive meta-ness you'd get a stackoverflow
 
6:26 PM
In C++, maybe.
 
depending on platform ;)
 
@awoodland Unless the compiler realizes it doesn't need recursion and loops instead.
 
Tail recursion is still recursion, no?
 
With no stack consumption.
 
user784668
@Pubby Kind of. It gets optimized out to a loop.
 
6:27 PM
@Fanael Apparently I'm not worth reading.
 
You're not orange enough.
 
I'm not apple enough.
 
@CatPlusPlus ? I can't obtain frequency.
 
user784668
@Xaade You're not pineapple enough.
 
@Xaade Has anyone really been far even as decided to use even go want to do look more like?
 
6:29 PM
Your frequency is melon.
 
@MooingDuck I can do that too. Random word, random word, some more random words, oh and.... random word.
 
You forgot to seed.
Which, coincidentally, fits the earlier theme.
I'm so clever.
 
Random seed, asdf8ioxzcv, waeroa23, saiu23, sidaousdcvxz.
 
user784668
Random seed, zażółć gęślą jaźń.
 
6:31 PM
@Xaade You’ve got to be kidding me. I’ve been further even more decided to use even go need to do look more as anyone can. Can you really be far even as decided half as much to use go wish for that? My guess is that when one really been far even as decided once to use even go want, it is then that he has really been far even as decided to use even go want to do look more like. It’s just common sense.
 
user784668
@MooingDuck No shit.
 
I love 4chan
 
@MooingDuck I'm not sure that actually amounts to anything.
 
Isn't it obvious?
 
user784668
@Xaade It amounts to a pineapple.
 
6:33 PM
@Fanael I think I see one if I tilt my head.
 
Did the StackExchange newsletter just come out or something?
I don't know if anyone here is subscribed to it. I'm not...
 
@Mysticial Stupidity is a virus quickly killed by a boring question.
 
@Xaade huh?
 
Woo, my passive-rep-earning answer is almost at 100 upboats.
 
6:37 PM
WTL
 
Windows Template Library?
 
I was asking about Windows GUIs lately, but nobody told me.
It is probably worth a closer look, did anybody here use it?
 
@CatPlusPlus It happens. If it's an interesting question/answer and it's at the top of your list, it'll work it's way up. :)
 
@Nils What the L***?
 
It's based on ATL, so no. I like my stuff to be buildable with more than one compiler.
 
6:38 PM
?
 
And recently I don't really care about MSVC.
 
user784668
@StackedCrooked What the luck?
 
@Mysticial It's not really that interesting, though.
@Fanael What the lime, obviously.
 
@CatPlusPlus I've had one sit at 92 for a solid 2 months. It's kinda stupid actually... Hence no residuals...
 
@awoodland C++ has had reference collapsing rules before rvalue references, you know.
 
Xeo
6:41 PM
Yahoo o/
 
Chat desktop notifications are going crazy, displaying twice for each plink.
77
Q: Python datetime to Unix timestamp

Off RhodenI have to create an "Expires" value 5 minutes in the future, but I have to supply it in UNIX Timestamp format. I have this so far, but it seems like a hack. def expires(): '''return a UNIX style timestamp representing 5 minutes from now''' epoch = datetime.datetime(1970, 1, 1) secon...

 
@CatPlusPlus That's still a LOT more interesting than this:
44
Q: What is the difference between str==NULL and str[0]=='\0' in C?

johnI want to know the difference between str == NULL and str[0] == '\0': int convert_to_float(char *str, double *num) { if ((str == NULL) || (str[0] == '\0')) return(-1); *num = strtod(str, (char **)NULL); return(0); } I'm using gcc on Linux.

 
I wonder if qt is still completely owned by Nokia digia.com/en/Qt/Digia-is-Committed-to-Qt
 
My 113-point answer was at ~83 after the first day. It took about 3 weeks of slow residuals to hit 100. Most of those were from the question being #1 on the month list and from random passer-bys on my profile. (It was my highest voted answer at the time.)
 
Anyone knows Runge-Kutta method? I don't trust my calculations here (that's double pendulum simulation). Are third/fourth derivatives present there normal?
 
6:51 PM
@CatPlusPlus I've implemented it, but that was a long time ago - so I don't remember the exact formulas.
 
@CatPlusPlus Yep, looks good to me :)
 
@CatPlusPlus I used to know it, but it has been a while. Shouldn't bee to hard anyways.
 
user784668
@CatPlusPlus It's in Polish.
 
It's in math.
 
This book has an example IIRC..
 
6:54 PM
Also, @StackedCrooked, you're a wiki mod now!
 
Cool.
 
I wonder how well WPF/C# integrates with a native app, I didn't try this so far..
Would putting a WPF GUI over a native C++ app be an option?
 
user784668
I can flag my own question? Cool.
 
"flag yourself" - I like how it sounds
 
Humm looking at the old MSFT gui stuff I can only conclude that Apple did the right thing with throwing away their "classic" Mac OS
 
7:03 PM
Augh, RPS reminded me of Realm of the Mad God.
Apparently it's on Steam now.
 
    //from Lua source code

    int add_numberK(double r)
    {
    ...
            /* use raw representation as key to avoid numeric problems */
            luaS_newlstr(L, (char*)&r, sizeof(r));
why such crappy things are allowed in C =\
double is not string ='(
 
@Abyx because C allows you to do anything you want, makes it crazy powerful
@Abyx no, but it's probably an easy/fast way to accomplish their task, needs more context
 
but this stuff works, and it WORKS FAST. A lot of C hacks make code faster =(
 
Fast inverse square root (sometimes referred to as Fast InvSqrt() or by the hexadecimal constant 0x5f3759df) is a method of calculating x-½, the reciprocal (or multiplicative inverse) of a square root for a 32-bit floating point number in IEEE 754 floating point format. The algorithm was probably developed at Silicon Graphics in the early 1990s, and an implementation appeared in 1999 in the Quake III Arena source code, but the method did not appear on public forums such as Usenet until 2002 or 2003. At the time, the primary advantage of the algorithm came from avoiding computationally ex...
 
@Abyx It's designed to keep the n00bs away from C development.
;)
 
7:10 PM
@MooingDuck > i = 0x5f3759df - ( i >> 1 ); // what the fuck?
2
lol
in GoingNative2012 we heard that C is crap, and C++ can make code faster. But I don't see it IRL. I work with that C code and it's fast. And I don't know how to make it faster if I'll remove such hacks.
 
7:32 PM
@Abyx C++ generic code is faster than C generic code.
also: you can do all that in C++ as well, so C can't be faster.
if (open(EDITED, ">$edit_file_out" )) {
  my $abs_path = abs_path($edit_file_out); //error, file doesn't exist
}
I hate perl. I'm getting errors because the file I successfully opened for writing doesn't exist
this just gets worse and worse!
oh hey, since when is // not a comment thingy in perl? (Always!)
oh, I bet I know what the error is. $edit_file_outis a relative path containing "../stuff", and abs_path can't handle that
nevermind, the one that works has the ../, the one that fails is just "prsyms.cpp"
is there a perl command to just "stop execution and return success"?
found it: exit(0);
 
8:05 PM
@Abyx Erm, are you still using the sqrt hack? SSE sqrt is much faster.
 
@FredOverflow The sqrt hack is awesome, but indeed outdated. There are new hacks for other things today.
Do the projects on the showcase have to be open-sourced?
 
@Mysticial for example?
 
double -> 64-bit integer via SSE2
gimme a sec to post the hack
Last time I measured, it was 10x faster than using a C-style cast.
 
0
Q: How many bytes does a string take? A char?

MosheI'm doing a review of my first semester C++ class, and I think I missing something. How many bytes does a string take up? A char? The examples we were given are: 'n', "n", '\n', "\n", "\\n", "" I'm particularly confused by the usage of newlines in there.

 
const __m128d MAGIC0 = _mm_set1_pd(4503599627370496.);
const __m128d MAGIC1 = _mm_castsi128_pd(_mm_set_epi32(0x000fffff,0xffffffff,0x000fffff,0xffffffff));

__m128d x = ...;                    //  Store two doubles
x = _mm_add_pd(x,MAGIC0);
x = _mm_and_pd(x,MAGIC1);
__m128i i = _mm_castpd_si128(x);    //  Two 64-bit integers
That's the 2 instruction hack for an unsigned double -> 64-bit integer conversion
The signed version is 3 instructions.
This runs 10 - 20 faster than using C-style casts on type double - not including the overhead to move in and out of the SSE register.
This hack rounds two `double`s to two 64-bit integers with the following restrictions:

1. The inputs must both be positive.
2. The inputs must be less than `2^52`.
 
8:57 PM
Did I scare everyone off? :-P
 

« first day (493 days earlier)      last day (4457 days later) »