« first day (367 days earlier)      last day (4564 days later) » 

2:00 PM
It's an implementation of an iterative quicksort
 
but I'm not sure that it's actually invariants-violating, if it causes UB or some form of error when the argument is not the top
 
It's just weird that it gives "C++ code" that doesn't compile against any known stack API
 
@robjb Then it needs none of that crap. It should do with just push and pop().
 
yeah
 
half of it is just pseudo-code in C++ syntax.
 
2:01 PM
the interface for a stack is, push(item) and pop(), and top(), at the most basic level
 
@robjb What book is it?
 
@RMartinhoFernandes There is amazon.com/Computer-Algorithms-Ellis-Horowitz/dp/0929306414 which gives strictly pseudo-code
And an exact reprint of that book with every pseudo-code example substituted with supposed C++
 
Ouch, that's even more expensive than Cormen's.
 
That makes sense.
How easier to learn algorithms than from convoluted C++ code.
 
Heh
I've largely been using the non-C++ version, but since I wanted to compare two algorithms' performance, I figured I would use the already written implementations
Surprise surprise, neither compiles
 
2:05 PM
> I had to buy this book because I was taking an algorithm class (2 years ago) and the instructor was the co-author of the book. I didn't learn much from this book. As far as I can remember, part of contents are copied from another yet poorly written book by Horowitz (can't recall the name). Almost everybody in my class had to buy another algorithm book (Cormen) to pass the class. This book was useless to me and many other students in my class. Don't buy it!!
Third most helpful review.
 
whistles
 
That's a destructive review.
 
Wish I'd seen that before I was at the University bookstore.
 
You bought it?
:(
 
Ah, the "I wrote a book, read it, dammit" classes.
 
2:06 PM
You should have bought Cormen's.
 
@RMartinhoFernandes: I made the mistake of thinking "this would be a good book to keep around after the class"
I'm going to return it and get Cormen's, lol.
 
Captain Hindsight strikes again.
4
 
@CatPlusPlus It's more "I wrote a book, buy it, dammit"
 
> ** rep this year (2011-01-01 - 2011-12-31): 16315
I should have 100k by 2020.
 
Right, when Jon Skeet is at the million mark.
 
2:11 PM
They'll invent infinity rep somewhere along the way.
 
sbi
The @Cat would fare much better at cynicRemarks.stackexchange.com. Unfortunately, nobody has proposed that so far.
 
Can you use underscores in domain names?
(I mean, without that crappy system they use for Chinese and such.)
 
sbi
@RMartinhoFernandes How would I know?
 
I'm not sure.
Tracking DNS RFCs is pain in the ass.
 
sbi
I think the rules are defined by the specific NIC. (For example, there used to be a rule by DENIC that you couldn't register a domain name with less than three letters. I think this is gone now, though.) Of course, there might be universal rules, applying to all NICs. As I said, I know next to nothing about this.
 
2:14 PM
Original spec says
<label> ::= <letter> [ [ <ldh-str> ] <let-dig> ]

<ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>

<let-dig-hyp> ::= <let-dig> | "-"

<let-dig> ::= <letter> | <digit>

<letter> ::= any one of the 52 alphabetic characters A through Z in
upper case and a through z in lower case

<digit> ::= any one of the ten digits 0 through 9
 
No underscores there.
 
Nope.
 
sbi
Ah, so cynic-remarks.stackexchange.com would be fine then.
 
And I have never seen one in the wild.
 
sbi
@RMartinhoFernandes A domain with a hyphen?
 
2:16 PM
With an underscore.
 
Well, IDN use hyphens.
 
Hyphens I have seen. (expert-sexchange :)
 
sbi
@RMartinhoFernandes Oh yeah, famous one, that. :)
Debbie strikes again:
I bet your ass gets pretty jealous of all the shit that comes outta your mouth!!
 
sbi
Whoa!
 
2:21 PM
What does this mean?
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Does it mean if I access it from a different thread I get a different object?
 
No, it means you can read/write to them concurrently without introducing data races.
(They're most likely readonly though.)
Surely foo(const std::tuple<int, int, int>&, int_type<1>) can match foo(std::tuple<T...> const& t, int_type<N>), no?
@sbi What happened?
 
sbi
@RMartinhoFernandes I like the girl. :)
 
I like everything but the girl.
 
@RMartinhoFernandes I'm looking at the System.Collections.Hashtable.
What would be the best collection type for storing an threadId and an object.
 
2:31 PM
Ugh, that pre-2.0 (no generics). Are you sure you want that?
 
To allow lookup by threadId
 
System.Collections.Generic.Dictionary<int, foo>.
 
mawnin
 
If what you want is a thread local variable, you can have it without emulating with a map.
 
Hmmmm
 
2:35 PM
@RMartinhoFernandes The error says that N is not independent
look at the final message
 
I'm going to go sell this book and use the cash for a second monitor, it's lonely coding with only 1 screen on my home machine
 
prog.cpp:13:6: note: candidate is: void foo(const std::tuple<_Elements ...>&, int_type<sizeof (T ...)>) [with T = {int, int, int}]
int_type<sizeof(T...)>
 
ttyl guys!
 
that won't match int_type<1>
no, wait, I'm dumb, ignore me
 
Right, but why isn't the other overload in the candidate set?
 
2:36 PM
because, you didn't default the other overload's argument
it takes an int_type<sizeof(T...)>, and you only passed a tuple
 
@RMartinhoFernandes I'm not familiar with best-use of C#.
Feel free to inform me. But don't assume I know what I'm doing and choosing the worst option.
 
foo(t) where t is a tuple<...> won't match foo(x, y) where y is not defaulted
whatever types x and y are
 
@Xaade Well, unless you really need heterogeneous collections, just stick to System.Collections.Generic and ignore System.Collections.
@DeadMG But the call that fails has two arguments (line 17).
 
ok iFail
 
I know that GCC error messages can be confusing to the untrained eye :)
 
sbi
2:39 PM
Everything but the Girl (often shortened EBTG) was a two-person English band, formed in Hull during 1981, consisting of lead singer and occasional guitarist Tracey Thorn (born 26 September 1962) and guitarist, keyboardist, and singer Ben Watt (born 6 December 1962). They are currently inactive although vocalist Tracey Thorn hinted that they may reform someday. They have not performed publicly since 2000 Watt and Thorn are also a couple; they are very private about their relationship and personal life. It was not a publicised fact for some time that they were a couple, or that they had...
That one?
Uh, oh, oneboxing fail again.
 
That shouldn't be surprising.
It would be a surprise if it worked.
 
well, the first overload clearly doesn't work because the template argument to int_type is 1 instead of sizeof...(T)
 
@RMartinhoFernandes Thanks.
 
@Xaade However, have a look at this msdn.microsoft.com/en-us/library/… and see if it fulfills your needs. You may not need a collection. (Make sure you take care of initialization though)
 
as for why the second doesn't, I'm not too sure
by the way
I find it curious that both template arguments are deducible, but you listed them in reverse order
 
2:44 PM
@sbi Yep.
 
You mean, the integer first?
 
yeah
usually for deduced types, you list them in the order of arguments to which they are related
 
Artifact from a previous attempt.
 
the real question is, why isn't it allowing the second overload in the set?
it's clearly a match
 
Right. That's what baffles me.
 
2:46 PM
I think it would be simpler if refactored so that the default was a different overload
but even when that's done, it won't recognize the second overload
GCC bug?
 
That's possible.
I don't have any other variadic-template-enabled compiler at hand.
 
Is there any other?
 
Doesn't EDG have it?
see, the problem I have is that you're effectively partially specializing
perhaps it would be clearer and compile correctly if you simply did the traditional workaround of sticking it in a class as a static function?
 
Oh, I have already worked around the issue. But I'm still curious.
 
ah
 
2:52 PM
@DeadMG Oh, that's a good point.
 
so I feel that, even though I'm not sure about how you've expressed it, your code shouldn't compile
 
@RMartinhoFernandes cross thread sharing info.
 
is it just me, or does ideone enjoy randomly taking forever?
 
Yeah, that happens sometimes.
 
curious
when I do the class version, GCC wants me to pass the packs between them as T..., not T
 
3:00 PM
It would be cool if ideone performed client-side compilation with JS. Would probably be a large chunk of JS code.
 
@DeadMG Yes, that's supposed.
 
It would kill your browser dead.
 
You cannot not expand parameter packs.
 
seems strange that the functions didn't require it, then
 
3:01 PM
then how come your original example compiled at all? You didn't.
 
Not to mention that blindly compiling others' code is a silly thing to do without extra layers of protection.
 
@DeadMG I had all parameters deduced.
 
oh, yeah
 
ideone has compiler locked up on a VM, in a software jail inside VM and probably something else.
 
oh, note to self
do is a reserved word! numpty
 
3:02 PM
I'm being silly. I asked Luc about a much easier way of doing this that I found in his code yesterday.
 
-2
A: Invalid conversion from (some-class)** to void**

deft_codeReady to have your mind blown? There is no such thing as a void**!! void* just means untyped pointer. Foo* => void* Foo** => void* Foo*** => void* ad absurdum In either case when you want to remove the type of a pointer c++ requires you use reinterpret_cast. Foo f; Foo* fp = &f Foo** f...

Lol.
 
Is ?: short-circuiting?
 
how could it short-circuit?
it's quite clearly an A-THEN-B thing
 
@CatPlusPlus I think his mind was blown.
@DeadMG Er, I meant lazy. true? f() : g() calls g(), right?
 
@RMartinhoFernandes I think so.
 
3:05 PM
might well do, if the compiler is optimizing
I'd certainly expect if (true) g(); to be optimized into g();
 
@RMartinhoFernandes It'll call f, silly.
 
@CatPlusPlus And not g()?
 
uh, I think it's if(true) f(); else g(); actually
:P
 
int g() { std::cout << "yay"; return 42; }
 
3:06 PM
> Conditional expressions group right-to-left. The first expression is contextually converted to bool (Clause 4). It is evaluated and if it is true, the result of the conditional expression is the value of the second expression, otherwise that of the third expression. Only one of the second and third expressions is evaluated.
 
irritatingly close
 
I SFINAEd it: http://ideone.com/5w1IS Oops, wrong conditions. ideone.com/8CzUS
 
fair enough
 
3:33 PM
Arggh, ideone does not support brace initialization syntax.
 
in my windows form application the Form_Shown even it not running
any ideas what could be missing
 
so, you've come to the C++ chat to ask about a .NET technology, and given us basically no information whatsoever, and asked us to solve the problem?
I liek ur stiel, in a not at all kind of way.
 
every time i try ask for help on SO chat some guy comes along, "hush hush this is not the right group"
i am sick of these people
 
then find the right group?
 
3:39 PM
We know C++.
Do you ask your mechanic for health advice?
3
 
and even if we were the .NET lot, then you still gave absolutely no information that we might basically require
 
@DeadMG ok i am using c++, .net 3.5, its windows form project, i want to start a background worker thread when the form loads for the first time, Form_Shown is the right place for it , but it does not get fired when the form is firs diplayed.
 
Er, Shown is supposed to occur only when it's first shown.
 
and, we're still not the .NET room
 
@DeadMG i dont want to get suspended otherwise i would have had a nice time with your attitude
 
3:45 PM
what, the attitude that questions should be in their proper place?
you have a question- we have a site for that. It's called Stack Overflow. Here, let me direct you to it: www.stackoverflow.com. There's a big "ASK" button on that page.
 
what are you like chat group police if you don't wanna answer just ignore
 
Yay! I got it to compile! ideone.com/ZTx0k
Yes, it's a lot more code, but the machinery is reusable (I stole the idea from Luc).
 
actually, I am a chat owner, so arguably, I am what passes for chat group police
2
 
And the EXPAND macro would be a construction of an initializer_list temporary, but GCC 4.5 won't let me do it.
 
sbi
4:01 PM
@jaminator You might want to start out reading the newbie hints, linked to from the right. Next, starting to think would be helpful. You were coming here to get help. However those already here react, attacking them is very unlikely to get you helped, listening to what they have to say might, however.
Don't forget that "In the cloud" is also the place where Lando betrayed Han and Leia.
 
@jaminator @DeadMG can be abrasive, but what he said is valid. Maybe you should try placing yourself on the other end of questions like "Not werking, wat I du rong?" "I cant haz good outputs, can u help me."
 
to be more accurate, "can u help me with .NET when u do C++"
 
After hundreds of those, and working with people with those questions, and getting spoon fed less than helpful bits of info, and trying to guess what questions we need to ask to get the info we need to answer the real question.... we've given up. We no longer help people with less than clear questions supported by all relevant info.
 
also, being abrasive can be fun
 
Robots asking their mechanics for health advice makes some sense.
 
4:10 PM
I think another way of saying it, is we no longer help people who try to circumvent negative rep by asking bad questions in chat.
 
damn, I wrote a two-line throwaway comment on Programmers and it got +12
could really use that rep on Programmers :P
 
The cloud won't sell very well unless people are allowed to backup their cloud data locally. At least not to people like me.
 
programmers is odd. I got +50 rep for saying "drink coffee and draw on a whiteboard"
 
I'm thinking some technology that makes local networked cloud servers with net access EASY for average users. Forcing me to use proprietary servers is a big turnoff.
 
@xaade there was some eff box that promised that
 
4:15 PM
@awoodland hippie programmers. You probably opened a whole new level of enlightenment.
@awoodland I would want some security though. Maybe a dead-end server on the same network somehow.
Well, not on the same network.... but same hardware... I mean, maybe make it to where you can't connect from it to a local device and the internet with the same connection. Either you access it locally, or through the internet.
 
I basically have a "cloud" setup arrangement with myself, my parents and a friend which does all the useful bits (long term reliable storage, davfs interface)
 
Separate ports?
 
@awoodland What about your ISP though? If Comcast ever finds out I'm running a server they'll threaten to cut me off
 
you'd be lucky to be threatened
 
They do threaten at least once, got a phone call a long time ago for running an FTP server
But I was naive and was running it on port 21, after the call I just changed it to some random port and they never found out
 
4:23 PM
@Praetorian - seriously? My ISP positively encourage it
 
Not good old Comcast
I'd probably have to pay for a "business account" to be able to host
 
my ISP have a "we provide IP traffic and nothing else" policy
 
I love your ISP!
 
(they do also provide native IPv6 connectivity and routed IPv4 subnets as standard though)
(and PGP sign emails and don't go "have you tried rebooting it" when you phone and say "so I have a fault, I was trying to diagnose it with tcpdump and I saw that my router was sending PADI packets but getting nothing back")
 
Do they implement "Shibboleet"?
 
4:27 PM
they do indeed
 
@Praetorian What.
 
RARGH
BANKS ANNOYING
 
@CatPlusPlus What what?
 
The linked what.
 
4:33 PM
For how long has this chat existed?
 
this chat or the chat functionality?
 
Between one to two years.
 
After big bang.
 
@awoodland OMG, I want to give them my money.
 
sbi
Do we have a FAQ for this?
If not we should.
 
4:34 PM
i don't think it was around when i started...which was a year and a half ago
or maybe it was just hidden away or something
 
@awoodland this chat room , the C++ Lounge
 
> first message 2010-10-15
 
Not that it's said on the info page or something.
 
Oh my gosh, we missed the first anniversary.
 
It's okay, we've got a time machine.
 
4:36 PM
@sbi There's one for typename. I'm not sure if it covers template.
It does.
36
Q: Where and why do I have to put "template" and "typename" on dependent names?

MSaltersIn templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway? I have the following code: template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail { // ... template<typen...

Has a pretty good answer by @Johannes.
 
@CatPlusPlus I don't know that for sure, but Comcast does offer business special accounts that allow them to host servers. Of course, you pay a boatload more for those than you do for residential accounts
 
It's silly.
 
Sure is, but a great way for them to make more money
 
rargh banks so annoying
 
@DeadMG What's up?
 
4:39 PM
why do you want to waste my time with this shitty card reader thing when I transfer money to this other account all the fucking time?
they make you have these portable card readers to use the online facilities
but you don't need a card reader to send money to Amazon
but I need it to send money to another account I own.
 
sbi
@RMartinhoFernandes Thanks! Then let's close that question as a dupe.
 
haha, he called it a constellation
 
@DeadMG So you need to plug in some sort of reader to use their online banking?
 
WTF was he trying to say?
 
yeah
they're very small, very irritating, and very irrelevant for absolutely everything, except if you want to transfer money online manually from your account
 
4:42 PM
@DeadMG Around here all I need to use my bank's online service is a small card with a table of codes.
 
@DeadMG So you're fucked if you're running an OS that this reader doesn't have drivers for?
 
no, it's mobile, not plug-in
 
that's why they're so annoying
 
@RMartinhoFernandes - they have other neat features too like using unallocated phone numbers as tarpits for robo callers which has the net effect of getting their entire allocation blacklisted in those annoying brute force robo callers
 
4:44 PM
Mobile card reader? What does it do?
 
if they were plug-in, I'd just leave them with my machine
 
Also, SMS codes.
 
well, it reads your card, you put in your PIN and the amount you want to transfer, and it spits out a code
presumably some kind of simple hash
you put the code into the site and then it lets you make the transfer
 
sbi
@RMartinhoFernandes I used to have that, too (indexed transaction numbers, I think they were called), but they are now considered too insecure and are therefore no longer supported by my bank. I now have them SMS me a number each time I need to do something via online banking.
 
except they're very small and useless for absolutely everything else
 
sbi
4:45 PM
Two more close votes needed here.
 
so there's no reason to keep track of them, in the majority situation
and it's really easy to lose them
 
@sbi My aunt works at a bank and she says that most security problems clients suffer are due to phishing.
Not surprising.
 
@DeadMG Put it on your keychain
 
Most security problems clients suffer are due to stupidity.
 
it's too big
 
4:46 PM
Apparently some people recite all of the codes over the phone.
 
(Pre-Wednesday grumpiness.)
 
they send-them-the-codez?
 
sbi
@RMartinhoFernandes Yeah. Just make those dumb heads enter ten transaction numbers somewhere, and then try to remove money from their account. With a bit of luck, you hit one of those ten.
 
People enter their credit card info on sites that say "was your credit card stolen?".
 
4:47 PM
@sbi Sorry, what's a TAN?
 
sbi
@CatPlusPlus Of course. But apparently most clients are too stupid. So we will have to deal with them anyway.
 
Transaction authentication number.
 
sbi
@RMartinhoFernandes Might be German slang for transaction number.
 
I read about a woman in Florida who mortgaged her house behind her husband's back to send money to some 419 scammer
 
4:48 PM
lol
 
Facepaw.
 
and I'm actually running out of liquid money
 
sbi
@DeadMG You still have coins and notes, though?
 
my old landlord owes me money, I paid a whopping twelve weeks rent in advance, my student loan is late, and the university is screwing me out of six hundred quid on trains and hotels, not to mention food
 
4:49 PM
Lol.
 
@sbi Yeah- not six hundred quid's worth
 
These days it'd be oil, or something.
Or molten gold.
 
My old landlord owes me £250. My new landlord wants £250 security deposit and £720 rent in advance. Lost ~£600 on the costs because of the university. And I'm down £1200 from late student finance.
 
sbi
This question is also a dupe of the typename FAQ.
 
Shit, I broke it again.
 
sbi
4:52 PM
@RMartinhoFernandes Your back?
 
No, shit.
 
@sbi No. Where did you get that idea?
 
sbi
@RMartinhoFernandes Since you didn't say, that was the first thing coming to my mind.
 
@DeadMG - out of curiosity which uni are you at?
 
No, I broke my code.
Much less serious.
 
4:54 PM
Loughborough.
 
0
Q: Calling main function more than once is a good practice in C?

Ant'sI saw a C code like this: #include<stdio.h> void main(){ static int ivar = 5; printf("%d",ivar--); if(ivar) main(); } which outputs : 54321 I'm a novice in C and I guess until the condition fails the main method is called again and again. Since I'm a novice in C, is it good practic...

 
if you wish to read a really, really long littany of how much I hate them, you can view my current letter of complaint
 
@Praetorian Gosh, "good practice"?
 
@DeadMG - on blog?
 
@RMartinhoFernandes Yeah, that's a good one
 
4:56 PM
no, I'll chuck it up on pastebin
blog is currently filled with how much I hate my bank
 
void main is not valid C either right?
 
main can have arbitrary implementation-defined additional signatures
it's not actually illegal
 
Fuck that. Tell me what I want to hear.
 
@RMartinhoFernandes I'm so incredibly sexy.
 
@RMartinhoFernandes In general no, but I know implementations that allow it, embedded systems for instance
 

« first day (367 days earlier)      last day (4564 days later) »