« first day (777 days earlier)      last day (4157 days later) » 

@Cheersandhth.-Alf Yeah, that's what I've been trying to do.
I'll try adding these if it helps:
/MANIFEST /ManifestFile:"Debug\Launcher.exe.intermediate.manifest" /ALLOWISOLATION
 
@Mysticial maybe you should add /MANIFEST, or just provide a whole .manifest file
 
@Abyx Except there is no manifest file.
 
@Mysticial write one
 
@MooingDuck Ops, std::sqrt does not exist. Its just sqrt from <cmath>
 
12:02 AM
BTW this class is unsafe. calling f(new A<void*>()) and then f(new A<void* const>()) results in a double definition error of f. — Johannes Schaub - litb 14 hours ago
 
@JohanLundberg why are you squaring sigma only to take it's sqare root? Why not std::abs?
 
the only practical way i found of doing UAC elevation at run time was to invoke a COM object in process server
 
sure. you can write sqrt(2)*abs(sigma) instead of sqrt(2*sigma*sigma)
 
I should also fix all those unreachable code warnings that I'm getting...
 
12:03 AM
@JohanLundberg MSVC10 doesn't have erf?
 
@JohanLundberg std::sqrt is valid too.
 
the main obstacle there was that the exectuable needed a special string resource
 
@Rapptz really? according to the standard???
 
it was like, no connection at all between the requirement and the goal. just a sort of technical obfuscation
i meant "in a process server", i.e. process not DLL
 
@JohanLundberg ideone.com/XQ7Wam
You can put std:: on almost all C inherited functions.
 
12:05 AM
@R.MartinhoFernandes This is reportedly a talk on modules by Doug Gregor. He is the chair of the working group on modules and at Apple -- reportedly Clang implements most of the described features for C and Obj-C, C++ being a WIP. Reading it atm.
 
@Rapptz yes it works but is it according to the standard?
 
FINALLY!!!!!!!
SUCCESSS!!!!!
 
Yes? I don't see why it wouldn't be, nor where I would find it in the standard though.
 
I needed:
/MANIFEST /ALLOWISOLATION /MANIFESTUAC:"level='requireAdministrator' uiAccess='false'" advapi32.lib
All of that... for it to work
 
@MooingDuck as it turns out.. no(!) hmm
 
12:07 AM
yeah, compile stuff it's not like write 200k LOC
 
Now to update the rest of the scripts.
 
@JohanLundberg boost has it apparently, trying that now
 
7
Q: are C functions declared in <c____> headers guaranteed to be in the global namespace as well as std?

Evan TeranSo this is something that I've always wondered but was never quite sure about. So it is strictly a matter of curiosity, not a real problem. As far as I understand, what you do something like #include <cstdlib> everything (except macros of course) are declared in the std:: namespace. Every ...

 
@JohanLundberg yes
 
Now to get it to work on the intel compiler...
 
12:09 AM
with boost you just use normal_distribution ;)
 
@JohanLundberg excellent!
 
Track down whoever created a void operator== with side effects, and punch them soundly in the head. — Henning Makholm 18 mins ago
3
^I approve of this
 
@JohanLundberg This might be the first time I used boost for anything
 
void? wtf? even without any side effects
 
It is supposed to be just a way to learn how to do overloading — user1743628 5 mins ago
what better way to learn than being wrong!
 
12:14 AM
Hey, you learn from mistakes :))
"Now that you've learned all these concepts, you know what never to do."
 
@MooingDuck,
http://stackoverflow.com/questions/2629421/how-to-use-boost-in-visual-studio-2010
 
He knows how to use boost, I'm 100% sure.
 
@Rapptz good for him ;)
 
@JohanLundberg I've used the oddball function that ought to have been in Visual Studio, but never really used it before.
 
12:20 AM
Does the backslash \ work as a line continuation in .cmd files?
 
actually I never used it in VS. usually work on linux or mingw
 
@Mysticial it may be ^ but I'm not sure
 
@Abyx Yeah, you're right
186
A: Hidden features of Windows batch files

Chris NoeLine continuation: call C:\WINDOWS\system32\ntbackup.exe ^ backup ^ /V:yes ^ /R:no ^ /RS:no ^ /HC:off ^ /M normal ^ /L:s ^ @daily.bks ^ /F daily.bkf

Fuck, I can't upvote that.
 
huh, according to this test, MSVC blew GCC out of the water
 
@MooingDuck in 2007?
 
12:27 AM
@MooingDuck that's gcc 3.4 ...!
via cygwin...
 
@R.MartinhoFernandes "There is no document (yet) that proposes modules as implemented in Clang. We hope to have one for the Bristol meeting." from Doug.
 
If you need to break a long conditional statement in two lines, do you break before or after the operator?
 
Before. I do that for any kind of expression or operator.
 
@StackedCrooked it depends
return x
    && y;

some_long_line = x &&
    y;
 
@LuchianGrigore Whhhhhhhhhhhhhaaaaaaaaaaaa.
 
12:35 AM
I think breaking before the operator is better because the operator is more visible.
 
@LucDanton Thanks. That was posted here about a week ago, though.
 
@R.MartinhoFernandes Ya but you asked for proposals not long ago. Now you know there isn't any!
 
There's that talk on modules. Is that the same work? isocpp.org/blog/2012/11/…
 
still transferring data from ideone...
 
12:40 AM
@Cheersandhth.-Alf don't forget to transfer it back later
 
Any idea why 'o' is deprecated in the VC++ cmdline compiler?
> cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
 
@Mysticial there are /F* now, IIRC
 
i can't see how that compiles?
 
@Abyx ah
 
I thought it was C++ .. but its not
 
12:42 AM
@Mysticial for incompatibility
oh, "language: bash"
 
@Cheersandhth.-Alf Yeah, I can see why they did that now.
 
I was shocked to learn that std::array<int, 2> a{{1, 2}}; is not guaranteed to work
despite many ppl saying "currently there is no brace elision, so you should use double braces".
Daniel Kruegler told me the truth
 
@JohannesSchaub-litb Why not? How to fix?
 
Implementation magic?
 
12:49 AM
std::array<int, 2> a = {{1, 2}}; ???
 
g++ has/had a tendency to warn if not using double braces
 
the spec just says that you can initialize it with = { 1, 2}
@Pubby not guaranteed to work
 
-4
Q: Information Hiding C++

user1267401What is the principle of information hiding and how does C++ support it. Also does C++ allow me to violate information hiding?

 
So... have to use a local variable to return an array or what?
 
I feel like this should be closed
but I'm not sure for what reason
 
12:50 AM
@LucDanton currently, indeed :)
 
Ya I'll keep my double braces.
 
but they allow to say return { 1, 2 } now since they fixed it in a DR
 
std::array<int, 2> x = {1,2}; doesn't compile though
 
as far as the spec is concerned I think the std::array<T, 0> specialization can be an empty class
in which case std::array<int, 0> a = {{}} will be ill-formed
 
@JohannesSchaub-litb What is DR?
 
12:54 AM
Well as long as std::array<int, sizeof...(T)> a = { (void(t), 0)... }; works.
 
note that the copy/move ctor of the aggregate cannot be used by the inner {}
 
Defect report
 
How is return { 1, 2 }; going to be implemented in all likeliness?
 
i think you can say std::array<int, 2> f() { return [](std::array<int, 2> a = {1, 2}) { return a; }(); } to make use of brace elision without a separate definition ?
lol
 
I like power outages.
 
1:01 AM
I like turtles
 
No. I love them.
 
I love you
 
Oh thank you!
 
oh... since when the chat became such a dangerous place?
 
It always has been
 
1:08 AM
deja vu. Power outages are like lightning!
 
1:23 AM
Anyone know how to merge an MSN account with Skype?
 
MSN? wtf is wrong with you?
:P
 
shaddap
 
i think pidgin has a plugin which implements skype
 
idc about that. MSN is telling me "QQ were dying plz use teh skype", but i already have a skype account. I wanna know if i can merge them together.
 
@alfalfa i believe they do this by communicating with the original skype client
kopete can do this too
 
1:31 AM
This is not a C++ specific question, but wondering if you can point me to a direction to search for algorithms. Given a graph where each edge has a "time to traverse" weight and a node, how can I find all nodes I can travel to within X time? I understand the problem and how to go about solving it, I just don't know what this problem is called (it's not exactly path finding). Any suggestions on what to be looking for are greatly appreciated
 
Merge complete.
 
@MichalisAvraam Dijsktra, should give you shortest time from origin to any other location you can then filter for each time < your cutoff.
 
@Borgleader Thanks. I was looking at that, but I assumed there would be a more general name of something to search for, like "service area algorithms" or something similar
 
@Borgleader RIP MSN.
:(
I'll miss you, old buddy
 
1:36 AM
I've been MSNing since like early high school
 
I've been MSNing since 1998
 
o.O
 
or 1999-2000
 
Thats a few years before I
 
it was during that time..
I just remember making an email in a computer lab where you had to pay $5 to use the computer for X minutes.
Those don't exist anymore, lol
 
1:39 AM
hahaha
 
I just ended up using mt.exe to build the manifest. Doing it from the linker just was too inconsistent. Sometimes it worked, other times it didn't.
 
@MichalisAvraam Depth first search, with depth limited by time. Dijkstra is about discarding routes unlikely to lead to the least time to a target, so it's not suitable here.
@Mysticial Real men build the manifest just like the executable: with HexEditor.
 
"Support is not guaranteed, but feel free to email me. (If you are a company or need guarantees for some reason, support can be purchased; email me for more details)" lol
 
1:58 AM
Downloading Saint's Row 3 right now. I wonder if it's any good. Oh well, I got it for a pretty good deal anyway.
 
@EtiennedeMartel It's fun.
 
@R.MartinhoFernandes Technically, I got it for 2.50$. Which means I need to play at least 2.5 hours for me to consider it a "good deal".
 
@EtiennedeMartel It's fun yeah. Repetitive, but a great lot of fun.
And laughs, too.
 
Looks like the new build scripts work. Now with the manifests to force UAC prompt.
 
@EtiennedeMartel It's double the fun in co-op.
 
2:13 AM
@EtiennedeMartel :|
 
@Rapptz What?
 
You pay that low for humble bundles?
 
posted on December 01, 2012 by Herb Sutter

I just saw a tweet that’s worth commenting on: Article from 2009 where Herb Sutter predicts CPUs in 2013 will have 256 cores drdobbs.com/parallel/desig… — Jan van Valburg (@janvanvalburg) November 30, 2012 Almost right, and we have already reached that. I said something similar to the above, but with two important differences: I said hardware [...]

 
lol. Never mind, just realised you need $5.71 for Saints Row 3
 
@Rapptz I assume 2.50$ is some fraction of the whole bundle.
 
2:14 AM
-2
A: Array of char* to pointer

RON PAULoh baby i like the question it makes me horny

-5
A: How do I align data vertically in python?

RON PAULoh me love sucking ricky off I just love nascar drivers they make ronnnie so so so horny me cant wait to have rickys huge cock in my mouth

dafuq
 
lol, George got in the last vote.
> I AM THE REAL RON PAUL MOTHERFUCKER!!!!
 
You can't flag accounts eh
 
Account nuked already.
 
Neat, it works! Now I can run PuTTY inside Console2 as well.
 
you can flag an answer or question
up 188 btw :D
 
2:17 AM
188 what?
 
I have 42 confirmed flags out of 42
 
useful flags
 
Oh. I thought that by now everyone had that badge.
I have 572.
 
That badge is free for anything at 10k.
I have 748
 
If you confirm a flag it counts toward the count?
I thought if I'd hit 10k I would never flag again
 
2:19 AM
You can't really "confirm" a flag unless you're a moderator.
You can add your flag.
And if it gets validated, it counts.
 
Why are flag histories public
 
-1
Q: C++ how to create an array of a class

Jean-Luc Nacif CoelhoIf i have a class x with a constructor, can i simply declare an array of initialised xs as such? class x() { x(); } x exes()[2000];

 
They aren't.
 
can we close this?
 
Oh they aren't just tried
 
2:21 AM
Oh WTF...
 
?
 
So now when I double-click on my launcher program (which does not request admin). It launches one of the binaries that need admin.
After the UAC prompt... It opens it in a new window.
Fuck UAC...
 
I think your anger is misplaced.
 
Making even trivial things so goddamn hard.
 
Blame Window 8 instead :P
 
2:23 AM
@Rapptz It was actually a problem since Vista. But in Win8 you can't completely disable UAC.
 
Elevated processes cannot run in the same window. That is fucking annoying.
 
If this is Windows 7, just disable UAC.
Well Vista sucked too so..
 
So now I have to manifest the launcher program as well.
 
aite', I'm out
see y'all
 
night
wait
this early?
 
2:24 AM
i'll probably log in later :P
I'm leaving work
 
Or are you back home?
oh
 
not yet
 
@LuchianGrigore Later. But hey, you're away from home. You're morally obliged to go do something that you couldn't get away with at home.
 
Windows 8 is really pissing me off. I can live without the start menu.
This UAC stuff can be worked-around.
But no Aero? No fucking Aero?!?!
That's like a bathroom without a toilet, a shower, or a sink.
 
@Mysticial Yeah, kinda falls into the "what the hell were they thinking?" category, doesn't it (or maybe just "were they thinking at all?")
 
2:28 AM
They clearly don't understand that aesthetics are very important.
Oh and Windows 8 sales tanked... haha serves them right!
 
@R.MartinhoFernandes Yup. Six games. I'll let you do the math.
 
@Mysticial Do those numbers matter? Won't the OEM thingies bring in money regardless?
 
@EtiennedeMartel Ah I gotcha.
 
@LucDanton I think OEM sales are down too.
 
2:33 AM
When someone gets the fuck scared out of them by some bizarre interface, they're probably gonna be a bit less likely to get a new machine.
 
@Mysticial They've gotten into a groove of every other version really sucking: Me: awful. XP: good. Vista: awful. 7: good. 8: yup, pretty sucky.
 
This whole bullshit about merging the tablet and the desktop.
Um...
 
What's the next version of Windows gonna be called? I hope it's Windows [Animal name here]
 
@Rapptz I think it's about time for them to go back to a year number, so Windows 2014.
 
I'm actually impressed they went consecutively with 7 then 8.
 
2:38 AM
It could also be that they simply don't wanna spend the money to maintain all the Aero source code. They have no competitors, so that's less to lose. This whole bullshit about power consumption and stuff - well hello, just turn it off be default!
 
@EtiennedeMartel Why would I bother doing the math?
yesterday, by Etienne de Martel
There, 15$ for all those games. Figured this was the least I could do.
 
@R.MartinhoFernandes Ah, forgot you got the mad archive skillz.
 
@Rapptz Then again, knowing how they keep trying, even with bad ideas, maybe it'll be Microsoft Bob II.
 
(That bitch took a while to find. For no reason whatsoever chat would not find that with "15", and for obvious reasons it was not happy with "$15")
Oh gawd, shut the fuck up.
 
Windows 7 isn't even the 7th version of Windows though
Why was it called Windows 7?
 
2:40 AM
It is.
 
@Rapptz The major number is still 6.
 
@Mysticial Why would Aero take all that much source code? All the heavy lifting is already in DirectX, and it's not as if they're going to drop that.
 
Vista = 6
Win7 = 6.1
Win8 = 6.2
@JerryCoffin I dunno, beats me...
 
@R.MartinhoFernandes Well, in Quebec at least, we put that $ sign after the number.
 
@Rapptz Win2K = NT 5. XP = 5.1. Vista = 6.0. 7 = 6.1. 8 = 6.2.
 
2:41 AM
@EtiennedeMartel Yeah, but "15" should have been enough.
 
There we go. Manifesting the launcher stopped the second window.
 
It's not news that chat search sucks, though.
 
@R.MartinhoFernandes I thought we already established that the chat system's search was crap?
 
@JerryCoffin Yeah. I know. I was saying how 7 != 6.1 :P
 
@Rapptz I think mostly to make it seem as different from Vista as they could (the number of people who consider 7 a lucky number probably didn't hurt either).
 
2:43 AM
My birthday is on the 7th.. Hm..
 
And "Windows 6.1" is not a great name.
 
But it sounds all tech 'n shit
 
@Rapptz You and about 209,212,153 others.
 
Did you check my month too?
 
@Rapptz Exactly what they think they need to avoid (but are almost certainly wrong).
 
2:45 AM
@Rapptz No, he pulled the number out of his arse.
Much easier.
 
@R.MartinhoFernandes Figured.
 
@R.MartinhoFernandes For once, no. Google says world population is 6,973,738,433 (or was recently, anyway). Multiply by .03 (~1/30) and you get 209,212,153.
 
Bold assumption.
Hm.. birthday paradox.
 
@EtiennedeMartel Good Lord! IPL-V is ancient history.
 
2:51 AM
@JerryCoffin Har har.
You are so funny.
You're like a bag. With jokes in them.
 
@EtiennedeMartel Hmm...I guess I really need to go take a shower if you can smell me from there.
@EtiennedeMartel Be sure to tip your waitress. I'll be here all week longer than you can stand!
@Rapptz Irrelevant here. Applies when you're trying to find a matching pair, not a match for a specific value.
 
I was just thinking about it
 
3:12 AM
@Rapptz ...and thinking quite deeply, apparently.
 
I just noticed the "Run with graphics processor" option when I right-click an executable on Windows 8...
 
@Mysticial Well.
 
@Mysticial I have that, but it's not from Windows. It's from the Nvidia drivers.
 
1
Q: Extremely fast is_iequal? (case-insensitive equality comparison)

MehrdadI'm trying to figure out how to write a very fast is_iequal function, optimized for ASCII, to compare if two characters are equal in a case-insensitive manner. The ultimate goal is for this functor to be used with boost::algorithm::starts_with, etc. So far my attempt has produced the followin...

A case insensitive compare only allows letters of different cases to be the same right?
So there aren't any "cases" to anything that isn't a letter?
 
3:29 AM
Hey!
 
So about that comparison. I don't think there's an efficient way to do it with only one compare.
 
@Mysticial Ah okay
 
Anything else will involve bithacks.
 
@Mysticial I see... btw I think I ran across something really cool, I think I solved the problem with your help
so apparently
 
I think it's possible to do an efficient branch-free implementation of what you're doing.
 
3:30 AM
oh interesting
 
@Mehrdad What did you find?
 
I found that if I swap an &&'s two sides, it goes a lot faster
like
template<class Ch>
struct is_iequal
{
std::ctype<Ch> const &ctype;
is_iequal(std::ctype<Ch> const &ctype) : ctype(ctype) { }
bool operator()(Ch const a, Ch const b) const
{
return a == b ||
('a' <= a && a <= 'z' || 'A' <= a && a <= 'Z') &&
(a & ~('a' - 'A')) == (b & ~('a' - 'A')) ||
a > SCHAR_MAX && b > SCHAR_MAX &&
ctype.toupper(a) == ctype.toupper(b);
}
};
as compared to
template<class Ch>
struct is_iequal
{
std::ctype<Ch> const &ctype;
is_iequal(std::ctype<Ch> const &ctype) : ctype(ctype) { }
bool operator()(Ch const a, Ch const b) const
{
return a == b ||
(a & ~('a' - 'A')) == (b & ~('a' - 'A')) &&
('a' <= a && a <= 'z' || 'A' <= a && a <= 'Z') ||
a > SCHAR_MAX && b > SCHAR_MAX &&
ctype.toupper(a) == ctype.toupper(b);
}
};
 
interesting...
 
I swapped the two sides of (a & ~('a' - 'A')) == (b & ~('a' - 'A')) && ('a' <= a && a <= 'z' || 'A' <= a && a <= 'Z')
 
but formatting fail :)
 
3:31 AM
haha yeah I have no idea how to format code blocks here
 
indent 4 spaces
 
oh I just used 'tab'
but yeah it brought the time down to 158 ms
 
There's that "fixed font" button.
 
... in chat?
I don't see it
 
yeah
it appears when you have multiple lines
 
3:33 AM
oh huh
ahhhh now I see it
cool
 
Wait, so 3x speed up from switching around a few things?
 
yeah...
just 1 thing, actually
looks like ('a' <= a && a <= 'z' || 'A' <= a && a <= 'Z') is a lot slower than (a & ~('a' - 'A')) == (b & ~('a' - 'A'))
so I just swapped them.
 
It also looks like you did the bit-hack?
 
Yup :) that's why your comment was also helpful
 
What's your input data?
 
3:37 AM
oh it's just that program I'm running, it's a random ASCII string.
0
A: Extremely fast is_iequal? (case-insensitive equality comparison)

Mehrdad@Mysticial's comment together with a little bit of tweaking really seemed to help. First I tried this: template<class Ch> struct is_iequal { std::ctype<Ch> const &ctype; is_iequal(std::ctype<Ch> const &ctype) : ctype(ctype) { } bool operator()(Ch const a, C...

 
Oh haha, completely random.
 
yup
 
I bet switching it puts the less random test first.
So it's less likely to go in the second part of the test.
 
either that, or it's putting in branches or something... I haven't looked at the disassembly very carefully
oh but yeah
no I think you're right
:)
it's so unlikely for them to collide on accident that it's faster :)
 
And of course ~('a' - 'A') collapses to a constant.
 
3:40 AM
yup :)
 
Guys I got a question
 
@Mysticial haha okay I'm gonna get going, thanks!
 
The probability of it passing (a & ~('a' - 'A')) == (b & ~('a' - 'A')) is exactly 50%.
Hmm...
@Mehrdad cya
 
Is there any algorithm which is good at finding where planes shift?
 
@Crowz planes?
As in geometry planes?
 
3:42 AM
As in, you see a picture of someone, and they're standing in front of... say the grand canyon. Is there a computer program which understands the shift in planes?
(one plane is at this z value and the other is at this z value)
 
By "shift" do you mean "distance from point A to point B"?
 
Not quite. More like depth.
 
You mean the depth of the person as opposed to the canyon in the background?
 
this object is at this z value, and due to some number of variables, this other thing is at a different, bigger z value
@Borgleader Yes
 
This essentially.
(I know that's not a ready to use program, but it seems to be the principle you're referring to)
 
3:47 AM
Ah yes sir, indeed... the abstract is good as well. I'm interested in visual things
I want to develop an algorithm that will compare two pictures as well for their purely outlined detail.
So that if an artist draws something to a reference image, the algorithm will spit out "this is 90% the same as the source image" or something
 
for the record my google search was: compute object depth in picture
that pdf was the first result
 
man xfire is so buggy now :(
RIP Xfire too?
Everything I'm using is falling apart
 

« first day (777 days earlier)      last day (4157 days later) »