« first day (725 days earlier)      last day (4447 days later) » 

04:00
Anyway, I don't buy that the behaviour is quadratic.
Xeo
Xeo
I specifically checked again with Google and the second link was this.
(I don't know stats, but then, the OP didn't provide any)
@Xeo Well, that's wrong. Big-Oh is useful when describing worst-cases because it describes an upper bound. But that's it.
Xeo
Xeo
What are "stats" for you? He did provide some timings atleast.
@R.MartinhoFernandes Meh, seems I need to study up on that thing again. :(
@Xeo I'd expect some regression analysis or something.
Xeo
Xeo
In any case, the slowdown is cause by the copies and map lookup, do we atleast agree on that?
04:02
Yeah, probably.
I thought map lookups were O(1)?
Xeo
Xeo
unordered_map lookups are.
But in any case, it'd be O(N^2 log N).
Xeo
Xeo
Ordered map is a tree.
A RB tree in libstdc++, IIRC.
Xeo
Xeo
04:03
@R.MartinhoFernandes Is that better or worse than O(N²)?
Xeo
Xeo
@EtiennedeMartel In almost all implementations, I think
@Xeo Mwhahaha, no! unordered_map lookups are O(N), but Ω(1).
Xeo
Xeo
@Borgleader Well, that would atleast support my claim that it's not quadratic, but even worse (1-4-18 seconds for 1000-2000-8000 inputs).
@R.MartinhoFernandes Aw c'mon
@EtiennedeMartel That's what actually compelled me to write my own HashTable and Dictionary classes.
04:05
They're amortized O(1) or something.
@ThePhD What's wrong with unordered_map?
@ThePhD Because unordered_map didn't cut it?
...
It's in C++11, in TR1, and Boost has one.
@R.MartinhoFernandes @EtiennedeMartel Not unordered_map, I was using the regular map and I was like "this is slow!" once I found out it was an RB tree.
@Xeo Oh, and Ω(1) is a bit worthless if taken strictly :( To be strictly correct, means "it takes some time".
04:07
Then i built my own and then the regular C++11 standard came out.
@ThePhD Sigh. So why didn't you change to an unordered_map?
And I was like ".... Sigh."
@ThePhD So, what's wrong with boost::unordered_map?
I am like ".... Sigh."
Xeo
Xeo
@R.MartinhoFernandes Geh....
04:07
@EtiennedeMartel I've never had/used/come into contact with Boost.
@ThePhD Or std::tr1::unordered_map or std::unordered_map or even the hash_map extension that every fucking compiler has implemented (which is why the standard one is not called hash_map).
Oh, don't tell me you did not look up first if someone already had one before you set upon reinventing the wheel?
@EtiennedeMartel Why would he?
I actually looked at a million Hash Table implementations.
Did you look at the ones that were already on your machine?
Xeo
Xeo
04:08
@R.MartinhoFernandes this
And a million hashing algorithms, from CityHash to MurmurHash to Jenkins and FowlerNoVoll
Still doing it wrong.
@R.MartinhoFernandes I don't know. Maybe it's because it's almost a reflex for me.
@R.MartinhoFernandes You forget I'm in Academia. 90% of the time I'm banned from using the standard library because 'that's cheating'.
You could use map, somehow.
04:09
How is that cheating?
@ThePhD Time for you to switch universities.
@EtiennedeMartel Writing up new bugs implementations of things that are already implemented is a reflex for him.
It's cheating by the arbitrary rules of the Professor.
Well its BS
'You're not allowed to use any standard library anything.'
04:10
Come on. You just said you were using std::map.
Reinventing the wheel is a waste of time.
@R.MartinhoFernandes Yeah, chances are he's playing with data sets that are too small for unordered_map to really matter.
Who do you think you are trying to bullshit.
Us, duh.
Kinda slow today, eh?
@EtiennedeMartel I'm a bit sick.
04:11
@R.MartinhoFernandes The limitation came from the Data Structures class I was in. Different professors ban different parts of the library or require you to roll certain parts on your own.
Xeo
Xeo
@EtiennedeMartel He meant that @ThePhD used map and changed to his own hash table implementations, so he was allowed to somehow use the stdlib
@ThePhD Well, for a data structure class, I'd assume you would have to roll your own, considering thats what the class is about.
But aside from that, it's bullshit.
@Xeo See, how do you know that's worse? All those values are smaller than 2s*(N/1000)^2.
If you all say so.
Xeo
Xeo
04:14
@R.MartinhoFernandes Ah fuckit, I'm not gonna deal with complexities until I read up on them again. >_>
@EtiennedeMartel I'm sure that the fact he was required to roll his own hashtable is related to him having been using std::map before he realized it wasn't an hashtable.
Any of you know of interesting videos on C++11 ? (from Bjarne, Sutter, Meyers or others)
@Borgleader Check the wiki, there's a page with video listings.
Xeo
Xeo
@Borgleader GoingNative 2012, C++Now! 2012, C++ and Beyond 2012
@R.MartinhoFernandes Standard beginner behavior.
Xeo
Xeo
GN and C++ and Beyond on Channel9, C++Now! on Youtube (boostcon)
Oh wow, thanks :)
Xeo
Xeo
@R.MartinhoFernandes I think that list needs some maintenance.
Yeah, probably. Whoever put it up should be held responsible for it.
@R.MartinhoFernandes They're not all the same instance; I had used std::map before. Needed to roll my own, so I rolled it. Found out std::map wasn't a hashtable on the inside, replaced it. I don't see what's so hard to understand about that?
Xeo
Xeo
04:16
@R.MartinhoFernandes You're missing the /cc @FredOverflow
What's hard to understand if why you didn't replace it with unordered_map/hash_map.
Because I didn't know they even existed and it looked like it wasn't apart of the standard, so I went looking for ones and ended up just using my own Dictionary
Most answers to questions recommended boost, which I didn't (and still don't, but I guess I should use it) have.
The other was also a Google hashtable implementation, sparse_hash and something else.
Xeo
Xeo
And then there's hash_map coming with virtually every implementation
Forgive me my ignorance, but I didn't see it. This is the first time I've ever even heard of hash_map
FTR, I do reinvent wheels from time to time (heck I say I like doing that in my profile). I reinvented `std::tuple` because no stdlib implementation has optimal layout. I am reinventing strings because Unicode in C++ sucks (not listing here, but I have a long list of documented reasons for that). I implemented a new smart pointer because I wanted polymorphic copies. The common theme is that I have something very specific in the existing implementations that I want to fix or improve upon.
As you may have surmised I get really annoyed when people reinvent stuff but don't even know why the exi
04:26
Understandable. I'm sorry I annoy you.
Woa, just felt an earthquake. 4.5 on the Richter scale.
That's tame, right?
Yeah. Lasted for a few seconds.
You felt it too?
My facebook newsfeed is filled with messages about it
04:36
@Borgleader Heard it came from Longueuil.
o.O Well well
Will Andrei ever write a second edition of Modern C++?
@FredOverflow If it was an updated edition of Modern C++...
@FredOverflow It would have to be a completely different book, I guess.
@FredOverflow If he needs to add a new pool of money to his golden manor, sure.
04:38
@Xeo I'll update the list this weekend if you remind me again on Friday ;)
room topic changed to Lounge<C++>: Don't forget to remind Fred to update the video list on Friday [c++] [c++11] [c++-faq] [job-interviews]
@FredOverflow I think it would be better if organized by content, not by author.
@R.MartinhoFernandes Feel free to reorganize.
room topic changed to Lounge<C++>: Don't forget to remind Fred to update the video list on Friday [....till-friday] [...would-last] [..this-topic] [.as-if] [c++] [c++11] [c++-faq]
Fuck , I got it wrong.
room topic changed to Lounge<C++>: Don't forget to remind Fred to update the video list on Friday [....as-if] [...this-topic] [..would-last] [.till-friday] [c++] [c++11] [c++-faq]
Fred the Overflowing.
So, I can pay 159€ for a >20h flight, or 166€ for a <5h flight. I think these will be some well-spent seven euros.
04:44
7 euros to save 15hours? hell yeah
@R.MartinhoFernandes Where are you going?
Germany? Seems like everyone's going there for some reason.
Fleeing the financial collapse?
man
Erm. Not purposedly, but let's say it's a nice side-effect.
04:45
I get up at -infinity in the morning and someone is already spammingme
spamming you? on SO?
@DeadMG I told you to sniff coke.
Poor puppy woke up at five.
no, on gmail
I thought it was a recruiter
but instead twas some whore
04:46
Ehmagerd, how could he wake up at single-digit hours.
hey
you take the piss, but it's the same as breaking any sleep cycle
@R.MartinhoFernandes: I think you meant Erhmagerd Erlehberd
@DeadMG Hey, I'm joking. As the New World loungers can attest, my sleep cycle is not the bestest.
Sep 12 at 4:38, by Etienne de Martel
Alright, I'm gonna get some sleep. @Mysticial, you hold the fort. (And @R.MartinhoFernandes too, I guess, what the hell man, do you ever sleep?)
well
I seem to recall that whenever I was very sick and staying up through the night, you were often up through the night too :P
Because I can't do real stuff when I'm asleep!
04:50
lol
Like sleeping.
I could really use some more sleep right now
a lot more sleep
I'm still here. Just playing TF2. But I have the chat open on a separate monitor
@DeadMG How long is the flight?
it's not "How long is the flight"
it's "Five hours on the train beforehand to get to the airport two and a half hours in advance"
04:52
I mean, you could sleep during it.
@DeadMG Ha, last week I had to take five hours on the train beforehand to get to the airport five hours in advance.
^ picture of the Earthquake damage.
(It's fake, it's night now)
Yeah, that's a recurring picture on that theme.
plus I have no idea how to use an airport
@DeadMG Oh, it's easy. Just go in and follow the signs.
You know how to use the Ancient technique of improv, right?
what happens when they're in not-really-German?
04:54
@DeadMG Get there and find the flight information screens. Find your flight and the counter where you check in your baggage. Then wait until you get called and proceed to the gate. Just follow the signs.
@DeadMG All airports have crap written in English everywhere.
and oh tits so much money
anyway gotta go
@DeadMG If it's an international airport, I bet my left ball that there's going to be English as well.
GL HF, and don't accept candies from strangers!
I never bet any of my balls on anything, but that's a really safe bet.
(Hey, it's one of those non-comitting kinds of bets)
04:56
Oh right, you're all pussies.
(If someone is angry, he can always knock at my door and I'll comply by shoving a chair in that person's face)
No one ever wants to actually bet anything against me, ever :(
Not even five fucking cents.
That's because you're not a smooth operator.
No, that's because even though they think they are right, they know I am right.
@R.MartinhoFernandes Then you have to play dumb and make them think they have a chance.
Same as in poker.
Man, I bet my other ball that you have a crappy poker face.
04:59
@EtiennedeMartel I'm too smart to be able to play dumb.
Smartness just radiates from me, you know.
Anyone use the Aforge library?
@EtiennedeMartel Actually, it seems I'm pretty successful at (meatspace) poker.
@Borgleader The what?
@Borgleader Ooh, .NET.
05:03
What I'm hoping to do is analyze frames from a video game
tbh i wanna make a fishing bot for WoW for the challenge, and because fishing is boring
@EtiennedeMartel Someone with OCPD just died.
What's fishing?
0
Q: C equivalent to C++ get_temporary_buffer?

FredOverflow20.6.11 Temporary buffers [temporary.buffer] defines two function templates: template<class T> pair<T*, ptrdiff_t> get_temporary_buffer(ptrdiff_t n) noexcept; template<class T> void return_temporary_buffer(T* p); Is there something similar in the C standard? Something like: ...

@R.MartinhoFernandes It's not like real fishing.
@FredOverflow I never understood what those two are for.
Also, , no?
05:09
@R.MartinhoFernandes: Take real life fishing, transform that into a minigame
Oh, it would help if you summarized what they do in the question, so C programmers that don't know C++ can answer.
@R.MartinhoFernandes Of course, I thought I had added the C tag myself. Strange. Thanks!
Oh wow.
-11
Q: How to detect private part of body in image in C# or any other language?

dcalliancesI'm just wondering is there any solution to detect private part of body in image for porn detection thingy on image. Thanks

"porn detection thingy", lol
05:12
I'm tempted to upvote, just for the lulz...
user406009
Just did.
user406009
In all seriousness this is probably a really complex problem. Just imagine all the varieties of porn out there!
You'd probably need a separate 70s vintage algorithm.
That's also a reason to close. You can write books as an answer to that question.
@R.MartinhoFernandes Aren't most C++ topics off-topic by that definition? ;)
05:15
Not really. Most questions have really short answers like "it's undefined behaviour". Good luck getting a publisher to publish that as a book.
user406009
Now we just need to post this to reddit.
Don't bother. It will be deleted soon.
Xeo
Xeo
@FredOverflow No, since the book in question was already written. :)
Why was this down voted and closed? This falls under “practical, answerable questions based on actual problems that you face” as per the FAQ. — DrTwox 14 secs ago
@Xeo There is a book about detecting private parts?
Xeo
Xeo
05:21
@FredOverflow I thought we were talking about C++ questions? :P
Right, I was confused.
By the way, I just updated the tags of the question :)
Xeo
Xeo
Anyways. sleepy time.
user406009
I wouldn't be surprised if there was a book about detecting private parts in art.
user406009
More stupid books have been written.
Probably to have more clearly defined encapsulation of functionality inside the object instead of spread about in different friend functions. — PherricOxide 2 mins ago
Why is it that most people don't have a fucking clue about what encapsulation means?
Xeo
Xeo
05:23
lol @FredO, your tag edits..
And that means... I'm going ballistic on comments on that page now :(
Xeo
Xeo
hf
I'm going ballistic in my dreams now.
05:40
Hmm, @R. in comments pings me now.
05:51
Shouldn't they make the limit 3 characters in comments also?
06:14
0
A: Whether to go for a member function or friend function when the function is supposed to change state of object?

R. Martinho FernandesTo be honest, I think the only reasons to make such a decision are syntactic convenience and tradition. I'll explain why but showing what are (not) the differences between the two and how these differences matter when making a decision. What differences are there between non-member friend functi...

I got a bit long-winded in there.
But I don't like to replace thinking with false encapsulation gods.
06:51
morning :)
Cat is such a weirdo. I wrote a 5 line C++ program and eliminated any weirdness in moving the mouse between my differently sized screens
What's cat got to do with that?
he was all like "same size screens or none at all"
or was that you? nah I think you just called me weird :p
> Nothing screws up your friday more than realizing its wednesday...
07:27
morning all
@Fred update the video list on Friday
@sbi did you solve your buffer problem?
07:48
@R.MartinhoFernandes yes. It's totally ruined my day.
08:05
I figured the grumpy ape (@sbi) doesn't really like streams. I'm taking that hint reading your tweets about streams. :P
@TonyTheLion what's your twitter username?
@LuchianGrigore I don't do twitter
coulda fooled me w/ that previous message :)
yea, the art of deception
@TonyTheLion mine or Luchian's?
08:11
Yay! Rent prices started to go down!
@thecoshman wut?
@TonyTheLion who's twitter feed you on about?
@thecoshman @sbi
@LuchianGrigore ah

sbi's gripes with IOstreams

Nov 20 '11 at 22:25, 34 seconds total – 9 messages, 2 users, 0 stars

Bookmarked Nov 20 '11 at 22:27 by R. Martinho Fernandes

08:17
@thecoshman the apes of course
@R.MartinhoFernandes lol
@R.MartinhoFernandes yes I have seen that
0
Q: Performance Issue in Merge Statement

user1734083MERGE INTO XXXCG.CCO620_N2K_PURCHASE cst USING ( select DISTINCT gl_period_name, --10.0.0.39 org_id, project_code, task_code, exp_type, exp_category, rev_category, gl_unit_revenu, pa_date, line_detail, vendor_nam...

^^ Best wall of I have no idea what in a while.
Looks like SQL.
I couldn't even tell at first glance that it was unformatted code.
08:25
Great! Someone approved a fucking edit that removed "Thanks in advance" and the tag. Fuck them edit reviewers, I hate you all.
@R.MartinhoFernandes how did your trip to Germany go in the end... I think I recall you say it went well...
@thecoshman Let's just say I'm planning a one-way trip now.
@R.MartinhoFernandes Job?
@R.MartinhoFernandes oh man, it can't of gone that badly :O
Yeah.
Thanks a lot to whoever approved that edit that removed the [sql] tag. — R. Martinho Fernandes 1 min ago
08:27
Yeah to which? Job or shit happened?
@Mysticial Job.
oh nice!
It's kinda nice you guys can just hop around Europe like it's one big country.
Getting in and out of the US is a pain in the ass.
> ./sublime_text
./sublime_text: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by ./sublime_text)
(╯°□°)╯︵ ┻━┻
@Mysticial Except for the puppy ;)
But yeah, it's awesome.
Well puppies can't swim.
08:32
@Mysticial but the US is roughly the same size as Europe, so it's basically the same.
+ you guys can easily go to canada
Hi guys
@LuchianGrigore No, it's not basically the same. It's not just about geography.
Yeah, no offense meant but I think there's a lot more places to see in Europe
@R.MartinhoFernandes well, when you say "It's kinda nice you guys can just hop around Europe like it's one big country.", you kinda make it about geography.
@kbok I agree. Europe is also a lot older. So it has a shit-ton of more history to see.
08:34
That's an advantage if you're into that kind of stuff.
culture and shit
:)
@LuchianGrigore Or rather politics and border control.
Moving into the US is difficult.
Working outside the US as a US citizen means you get double taxed.
@Mysticial not if you're already there, that is.
It's difficult enough for me to not even want to bother.
@LuchianGrigore Note that my last statement is why one of the Facebook founders relinquished his US citizenship.
08:37
@Mysticial yup, that does suck.
I have a lot of family who immigrated to the US. They all stopped at green card/permanent residence - and didn't go for citizenship.
Of course the kids are US citizens.
@Mysticial The fuck.
The US is a pain to immigrate to. Visas are very hard to obtain and take forever to go through
and tax. another epic pain.
the US is also not very welcoming.
@R.MartinhoFernandes Yep. The US is only one of a few countries in the world, where you get taxed for making money outside of the country.
Immigration is rude and horrendous
08:40
So you have to pay the local tax + the US tax.
You guys are whackos.
Well, I guess everyone knew that already.
well, in the EU you have to pay income tax on your worldwide income
@TonyTheLion Not when you go away.
@TonyTheLion But you don't get taxed if you get a job in the US.
or anywhere outside the EU
Yeah, it's really fucked up.
You can just GTFO and screw those taxes.
08:42
@Mysticial depends on the situation.
@R.MartinhoFernandes it's not always that easy.
@R.MartinhoFernandes One of my family friends did just that.
He was born in the US and moved to Hong Kong after college.
if you have ties to the country you lived in (you own a house for example) you may still need to pay tax.
He got rid of his citizenship.
@TonyTheLion But that makes sense. You don't have to pay for what you earn outside though.
true, but tax is complex
so I've got a friend coming over in the weekend. A bit of social interaction outside of work. Woo :)
08:52
@TonyTheLion rare treat? fresh meat?
0
A: Reading hard disk sector raw data - Why hex?

NirMHmight be related to data compression - Hex is more compacted than Alpha Numeric (bytes)

lolwut.

« first day (725 days earlier)      last day (4447 days later) »