« first day (695 days earlier)      last day (4261 days later) » 

1:14 AM
Good Evenings Everyone
 
1:31 AM
0
Q: Well-known solution for avoiding the slowness of dynamic_cast?

MehrdadI needed run-time polymorphism, so I used dynamic_cast. But now I had two problems -- dynamic_cast was extremely slow! (Scroll down for benchmark.) Long story short, I ended up solving the problem this way, using static_cast: struct Base { virtual ~Base() { } virtual int type_id() const...

@StackedCrooked ... are unique.
 
I instantly recognized that gravatar as Mehrdad... this can't be good.
 
Why would anyone trade safety for performance ?
 
I've been on the site long enough to recognize even default gravatars...
@LeandroPezzente You obviously haven't met me. :)
2
 
@Mysticial No Miss , I havent. Its a pleasure for me to finally meet you.
 
1:42 AM
@Mysticial Oh, "this can't be good" meant you are worried that you recognized an user by its identicon? I thought you were worried about the quality of the question or something. IME Mehrdad is a decent asker.
 
@R.MartinhoFernandes Oh no... Mehrdad's questions are all very good. But he's one of the only high-rep users in C++ who uses the default gravatar. And he's had that green one for as long as I can remember.
 
Oh god, @scalzi is on another bout of tweeting like crazy.
He's "live" tweeting the re-webcast of the Hugo awards ceremony :S
 
@Mysticial I recognize a lot of default gravatars too.. Like Mohamed's and Luc's.
 
good evening everyone :)
 
evening
 
1:53 AM
Hello.
 
how is everyone tonight? :)
 
Bored.
 
ahh :) Im attempting to learn NASM lol
so far its pretty brutal >.>
does anyone here happen to be fluent, or semi-fluent in NASM?
 
Maybe some very very fond to electronics ?
Nighty Nigthts to Everyone
 
2:09 AM
im just trying to learn the basic's at the moment lol, Im trying to find the difference between ebx,eac, and ebp xD im confused on that xD im following: leto.net/writing/nasm.php
@LeandroPezzente night :)
 
eac?
 
Miss Mysticial , again , I am very pleased to meet you.
 
eax*
 
His name is Alexander.
 
@LeandroPezzente I'm a guy btw. My gravatar is misleading to anyone who doesn't know Anime. Sorry if I disappointed you. :)
 
2:10 AM
LOL
 
I only know this cause it's in his profile.
 
I know that because it mentions him on the Pi wikipedia page xD
 
Oh hey, it does.
 
@ITNinja With the exception with esp all the registers are identical in almost every aspect.
That's not specific to NASM. That's just x86 assembly.
 
@Mysticial What's special about esp?
 
2:12 AM
@R.MartinhoFernandes Automatically used by push, pop, call, ret, ...
 
@JerryCoffin Ah, but isn't ebp also automatically used by enter and leave?
 
@R.MartinhoFernandes no optimizing compiler uses that
And ebp is freed up as a normal register with frame-pointer optimization.
 
A few others are semi-special as well. loop and the rep prefix automatically use ecx, lodsb uses [ds:esi], stosb uses [es:edi], movsb copies from [ds:esi] to [es:edi], etc.
 
eax and edx get special treatment for the mul and div instructions.
 
@Mysticial Well, not enter anyway. Some use leave, especially if optimizing for size instead of speed. Also, I wouldn't be surprised if a Pascal compiler used enter when/if you used nested functions (and gcc might if you used nested functions in C as well).
 
2:16 AM
What's special about nested functions?
 
More subtly, there are index registers (esi and edi) and base registers (in 32 or 64-bit mode, almost everything else). When you do something like `mov eax, [ebx+esi], it has to be one base and one index register, not two of either.
 
Which is why x86 is a mess...
 
@R.MartinhoFernandes Nested function has direct access to parent's locals/parameters.
 
Can g access x?
Ah, ok.
That explains the special treatment.
 
@Mysticial Just a few of the many reasons.
@R.MartinhoFernandes Yeah -- enter creates a link back to the parent's stack frame to get the nested function access.
 
2:20 AM
It's sort of a closure that can't escape.
 
@R.MartinhoFernandes Yeah, pretty much (which means that even though it can be handy, as closures go, it's pretty...weak).
 
Yeah. I guess you can't take its address to pass it around, for example.
(Or if you can, it's a quick road to UB.)
 
@R.MartinhoFernandes In Pascal (at least as originally designed) you can't take the address of a function at all (though you can pass a function as a parameter, which implicitly passes the address of course). I don't think you can return a function though, so at least offhand I can't think of anyway to use it that would give UB.
 
@JerryCoffin Can you store such a parameter?
 
@R.MartinhoFernandes Not that I can recall, no.
 
2:32 AM
Ah, ok.
I never delved that far into Pascal.
@DeadMG seriously, your "Resources" tutorial has a diatribe about DAGs? WTF:
 
@R.MartinhoFernandes I did most of my programming in Pascal for a few years (from 1982 until I first got a C compiler, which was around 1987 if memory serves).
 
I played with TP7 for one or two years in high school. All I had to learn it was the built-in docs. I was super excited when I found out how to write my own functions.
 
@R.MartinhoFernandes TP7 was long after I quit using Pascal. I started using Pascal 6000 on a Control Data mainframe (a direct descendant of Wirth's first Pascal compiler). I did use TP for a while too, but the last time I updated was (if memory serves) TP4 -- and I didn't really use that much; I only got the upgrade because it was really cheap. The last version I used much was 3.0.
 
Yeah, I figured. TP7 was already old by the time I used it.
 
 
2 hours later…
4:45 AM
how does sizeof() work?
It can take an array name, type, variable?? how?
 
user406009
sizeof is not a function.
 
@MohamedAhmedNabil It's an operator, not a function. When you pass it a variable name, it just uses the type of that variable, not anything specific to the variable itself.
 
user406009
It is an operator.
 
user406009
And be careful about using sizeof on an array. If that array happens to be a parameter of a function you will get burned.
 
user406009
ideone.com/lkPCK is ridiculous.
 
5:24 AM
Who takes an array argument?
 
What is add_wc?
 
user1182183
kinda wondering if ideone could be hacked by some maliscious C code...
 
Argh. I hope that will be my siliest joke of the day.
 
user406009
I guess someone could constantly submit code + input to ideone. "Steal" 5 seconds of computing time each submission.
 
user1182183
5:38 AM
Mwah with hacking I mean like gaining access to the files on the server etc... :p
 
Did they lift the word-filter?
0
Q: Please help!: basic console print program

Justin Chianginclude using namespace std; int Main () { cout << "---------------------------------------------------------------------------------/n"; cout << "NAME: Justin Chiang/n"; cout << "COMPUTER LANGUAGES: Python, Lua, C++/n"; cout << "FAVORITE VIDEO GAME: Starcraft, Diabl...

That's the second time I've seen "please" and "help" in a title today.
 
I can't believe I answered that
It's in the error..
 
user406009
is int Main() even standard?
 
Don't believe so
 
@EthanSteinberg It's a windows app.
 
5:46 AM
That would be WinMain
 
user406009
@Mysticial What's the difference?
 
@EthanSteinberg Winapps have their own main/headers/all sorts of shit
 
Why would you turn off precompiled headers?
 
@Rapptz I don't use them.
 
Well I don't either but I don't see why that justifies turning it off.
Was really just curious, can't say I care much.
 
5:51 AM
damn, this week's SOA is another good one...
gotta try to get back to work... at midnight... lol
 
Why is there an argument over precompiled headers..
 
6:13 AM
there's an argument?
 
Yeah.
3
A: Basic console print program

RapptzYou're missing #include "stdafx.h" Also, int Main() isn't standard C++, you should replace your main function with int main() or int main(int argc, char** argv)

in my comment thread
 
Mornin'
 
evening
 
Hello.
 
&bye, off to work
:D
 
6:15 AM
Bye.
 
lol
 
Oh I got 1k rep now.
 
oh congrats
 
Thanks. Someone upvoted a lot of my answers one day but don't know who.
 
and they didn't get reverted too
That serial voting algorithm is kinda weird...
I've seen it kick in with as few as 5 votes. But not for as many as 10.
probably more than that
 
6:18 AM
I've been wondering who it was because it felt really random. I thought it was Luchian but he said he didn't.
 
wasn't me
The most votes I've ever cast on the same person in one day is probably 3 or 4.
 
I might just delete my answer, the bickering is really annoying.
 
sbi
@Mysticial I think I know why it didn't kick in in @Rapptz's case.
 
@sbi eh?
 
Is it because I'm new
 
sbi
6:21 AM
@Mysticial I said I think I know. (What's with your hearing?)
 
Wait.. that'd make it even worse
 
I've had a couple of days where I've gotten serial upvotes of 8 or more. Not reverted.
@sbi just short for what is it?
 
sbi
@Mysticial I am not sure I should reveal my suspicion.
 
I'm interested though since it involves me
 
@sbi They aren't that close together. That's for sure.
I recall being serially upvoted probably about 4 times. Only one got reversed.
@sbi I remember it kicking in for your operator overloading question.
 
sbi
6:26 AM
@Rapptz From the pattern it looks like someone got impressed with one of your answers, dug deeper, and found more he agreed with.
@Mysticial It more or less regularly does. :(
 
I don't think a single answer I have is impressive lol
 
No need to be impressive. Being correct and helpful is good enough.
 
I never had any "impressive" answers until after I was well above 10k... lol
 
I probably won't try until I get enough rep to not care
 
sbi
People can be impressed by a correct and helpful answer.
 
6:31 AM
My very first answer on SO was somewhat "impressive".
 
@Mysticial Why the scare quotes?
 
It was what brought me here. I'd been lurking SO for a while before, but that one question felt intriguing enough for me to make an account to answer it.
 
5
A: Measuring NUMA (Non-Uniform Memory Access). No observable asymmetry. Why?

MysticialThe first thing I want to point out is that you might want to double-check which cores are on each node. I don't recall cores and nodes being interleaved like that. Also, you should have 16 threads due to HT. (unless you disabled it) Another thing: The socket 1366 Xeon machines are only slightl...

 
@Insilico I don't consider it impressive. But at least a couple people did.
 
That one? This is the first answer according to "Newest" sort
 
6:33 AM
@Mysticial The Dunning-Kruger strikes quite often around these parts, it seems.
 
@Rapptz Yeah, that's my first answer.
@Insilico Need to google that term...
 
My first answer was in Python..
2
A: Python - how to create a random string 8 bytes long?

Rapptzimport os rand_string = os.urandom(8) Would create a random string that is 8 characters long.

 
@sehe I deleted the first tweet.
 
@Mysticial You haven't heard of the Dunning–Kruger effect? It explains politicians quite well. :-P
 
@Insilico Yeah it does actually... haha
 
6:36 AM
2
Q: Is there any way to make sure the output of the float-point the same in defferent OS?

hdbeanHere is my code: int a = 0x451998a0; float b = *((float *)&a); printf("coverto float: %f, %.10lf\n", b, b); In windows the output is: coverto float: 2457.539063, 2457.5390625000 In linux the output is: coverto float: 2457.539062, 2457.5390625000 Is there any way to make sure the outp...

"Windows' printf() shows 2457.539062. Linux's printf() shows 2457.539063. Can I make them show the same number?"
 
@Insilico I already +1'ed that a while back :)
Apparently analogies work...
 
@Mysticial It's funny to see people obsess over that 0.0000000004% difference. :-P
 
@Mysticial People still comment on your train analogy on reddit lol
 
Branch prediction <-> railroad junctions
pointers/scope <-> book in a hotel room
stream/flush <-> toilet bowls
 
I never saw the book in a hotel room one.
 
6:39 AM
@Mysticial Analogies work quite well because computers are like magical black boxes to everyone but us.
 
Maybe processors should support higher-level numbers. Like sqrt(2) as symbolic number. And use lazy evaluation. Not more floating point arithmetic to worry about then. Maybe..
 
@Insilico I love how that's aimed at me - ehm... clearly I care about the 0.000 <10 trillion digits> 001% difference. :P
@Rapptz I'm pretty sure you've seen it... hang on
2327
A: Can a local variable's memory be accessed outside its scope?

Eric Lippert How can it be? Isn't the memory of a local variable inaccessible outside its function? You rent a hotel room. You put a book in the top drawer of the bedside table and go to sleep. You check out the next morning, but "forget" to give back your key. You steal the key! A week later, you retu...

 
@Mysticial You're the exception because you work with transcendental numbers. Your average human being usually don't. :-P
 
Too bad I couldn't come up with an analogy for the matrix question...
 
@Rapptz It was basically to explain why accessing free()'ed memory may still have valid data in it.
 
6:41 AM
It's too black of a black box to explain caches with an analogy....
 
I'm sure something could have worked..
 
@Mysticial You can try using a retail store analogy. Retail stores are caches for manufacturers.
 
@Rapptz I sure as hell tried in the hour after I posted the answer.
failed...
@Insilico But to explain the super-alignment with powers-of-two...
that's be hard...
 
@Mysticial You're a smart person. You can figure it out. :-)
 
I didn't even attempt to do it - I just kinda pushed the explaining to @Luchian's and my old answers.
And I apparently got him a lot of upvotes for that too.
Initially I thought it might've been a mistake to rely so heavily on the 3 questions that linked to. Because my answer really has no "content" other than the fixes. I do no explaiining at all.
 
6:45 AM
@Mysticial the dumber the question, the more points?
 
But in retrospect, had I actually put a full explanation of both cache effects, it would've triggered the tl;dr for most readers.
 
@Mysticial can you give me a multiplication to test speed of BigInt
 
@Rapptz You can't just generate a random number?
I'm not gonna try to put a 10,000 digit number in chat.
 
sec
 
You can verify it through wolfram alpha.
 
sbi
6:48 AM
So it seems Someoneâ„¢ again threw flags around here because of pix of girls?
 
@sbi I didn't see any flags?
Okay, people need to grow some skin, seriously.
 
I have another method which I use to test-run very large products (> millions of digits) without actually matching them against a different implementation.
 
sbi
yesterday, by Johannes Schaub - litb
@sehe yesterday i flagged a pic of halfnude chicks. i'm so disappointed that you didn't join
 
So Johannes doesn't like halfnude chicks?
 
import my_ass as I;
I knew Python "comes with batteries included", but that's taking it quite far.
 
6:53 AM
TIL multi-argument C++11 std::max
 
Okay it's actually not bad
 
@Mysticial apparently he flags all skin photos
regardless of amount of skin >20%
 
Morning
 
@sbi hmmm I think on the day they were posted, he claimed he wasn't the flagger. (If this is the pic I'm thinking it is)
 
sbi
@Mysticial Quite a few of us access the chat from work, so some graphical content here is too graphical for them. However, we have had this discussion a million times (especially me and him), and the outcome is that the overwhelming majority here prefer to point this out and ask for the messages to be deleted, or move the to the bin, rather than throwing flags, and thus bringing in all of the chat.
 
6:58 AM
@sbi Usually when that happens, it just gets binned. I rarely see the flags?
 
sbi
@TonyTheLion Fits him, really.
 
Johannes and I are also almost never online at the same time.
 
With the Korean girls from SNSD?
 
meh I missed the Eve of Great Minds.
 
Moaning
 
sbi
7:04 AM
@Rapptz I think it starts here.
 
Yeah, the SNSD girls. I remember this.
 
Even that got flagged?
 
Hey great. So I haven't missed it after all
 
I'd consider that picture safe everywhere I've worked.
 
Same here.
 
7:05 AM
Just not, where you currently work, then?
yesterday, by sehe
@JohannesSchaub-litb it was quite obvious you did. Sadly, I wasn't actually there, and now I can't see what it is you flagged. Grrrr
 
@sbi well, before playboy started wasting a lot of money on lawyers, i had a web page with mostly playboy models, grabbed from the "scanmaster" binaries Usenet group (which I convinced Norwegian Telenor to propagate). it was never a problem with my employers, now Bodø University and Accenture Norway. so it's a bit difficult for me to understand how a picture of a pop group can be NSFW: what kind of draconion insane-religious (or whatever) employer is that?
 
@sehe I've worked at MS. And now I'm in a graduate cubicle.
 
I wouldn't consider that picture NSFW
there's nothing showing really
it's just some girls
 
sbi
2 days ago, by Chimera
What is truly flag worthy?
@Chimera Around here, we usually employ flags when someone behaves outrageously bad, and we want him banned for a while.
 
@TonyTheLion Exactly. Looks like it could be an album cover.
 
7:07 AM
@sbi I think Jerry had the end-all response to this
yesterday, by Jerry Coffin
@sehe I have to wonder about this. I mean, yes, halfnude chicks are a bit objectionable, but still...it seems a bit overboard to flag just because the chicks aren't entirely nude.
@Mysticial Some album covers could easily be considered NSFW though
 
@sehe That's true. I've seen one of those.
 
on this channel? I'd bin it because a lot of us rely on the chat being work-friendly. But certainly not flag it
 
Flagging really is quite unproductive.
 
hi penguin
 
sbi
7:08 AM
@Cheersandhth.-Alf I dunno. Merkian, maybe? Anyway, I can understand that it might take some effort to explain to your cow-workers why you have that browser tab where hot chicks come flying by.
 
@sehe yup
it even looks lame. Big blue rectangle next to the message? Come on SO team, you can do better than that
 
So how many times have we had this discussion?
 
This may be off topic but can someone recommend a small easy free web server program?
 
@jalf You want billowing clouds of smoke?
 
@user1220811 for what?
 
7:10 AM
@user1220811 Apache :P
 
sbi
@sehe You can always hope on @Jerry to come up with a funny message when fighting is about to happen here. I like him for that capability.
 
@user1220811 Sioux.
not to mention Comanche.
 
I am testing applets on localhost
 
@sehe I want sweet graphix!!!
 
sbi
@jalf It's a circle here (FF).
 
7:11 AM
@sbi isn't it a rectangle with rounded corners or something?
 
sbi
@jalf You are all suckers for eye candy.
@jalf Not on FF.
 
I am on FF
 
@user1220811 lighttpd, jetty, xsp, mongrel/yarn et
 
@sehe thanks
 
Since you say applets, Jetty looks close. Or is that actually Getty - I forget
 
sbi
@jalf Well, both the reply and the flag counters have been rounded here forever. It's rectangles on IE, though, IIRC.
 
Jetty is a pure Java-based HTTP server and Java Servlet container. Jetty is developed as a free and open source project as part of the Eclipse Foundation. The web server is used in products such as ActiveMQ, Alfresco, Apache Geronimo, Apache Maven, Google App Engine, Eclipse, FUSE, Twitter's Streaming API and Zimbra. Jetty is also the server in open source projects such as Lift, Eucalyptus and Hadoop. Jetty supports the latest Java Servlet API (with JSP support) as well as protocols SPDY and WebSocket. Overview Developed as an independent open source project, in 2009 Jetty moved to...
 
@Cheersandhth.-Alf Anonymous in the presidential race: you're all fucked now
 
@Cheersandhth.-Alf Security measure: so a prospective gunman can't tell where his head is :)
 
7:13 AM
@sehe Prospective gunman with his head in a brace
 
Small security measure, but one nonetheless
 
@Cheersandhth.-Alf Repost. I think
 
@sbi the reply counter is round, and I'm sure the overall flag counter is too, now you mention it. I mean the actual flag indicator next to a flagged message
 
7:15 AM
This may or may not be related to C++, but: movies.msn.com/movies/article.aspx?news=756324&gt1=28101 Whoo hoo!
 
sbi
@jalf Ah, that one. Yeah, that's a square with rounded corners, I think.
@Cheersandhth.-Alf I think that might be a Berlin tram.
 
@sbi This has been said before. By you, even, IIRC. Or Xeo.
 
sbi
let's take this further:
 
And someone else mentioned that public transport in France (?) look the same. I felt it was redundant, at the time, to add that the same goes for dutch PT
 
sbi
Someone said I said that before, IIRC.
Also, someone might have said that someone said that I said that before.
 
7:19 AM
I meant, about this exact picture in chat. Not so random IYAM
 
sbi
5 mins ago, by sehe
@Cheersandhth.-Alf Repost. I think
So the picture is a report, and my answer is, why not your comments that they are?
@sehe I doubt French or Dutch PT is using the same ticket stamping machines as the Berlin PT. FWIW, I haven't seen them in any other German city.
 
What does FWIW mean in this context? I always assumed it meant "For what it's worth"
 
@Rapptz In mosts contexts it's "For what it's worth", but in rare cases, FWIW can mean "Frosted wheaties in winter"
 
lol
 
@sbi Looks familiar to me. If anything, it looks like it's hanging 20 cm high. But that may be the angle of the photograph. Also, have been replaced by them newfangled chip-devices since then.
 
sbi
7:26 AM
@Rapptz I assume it to mean the same. I could, however, be mistaken about where to use it.
 
Anyways, the whole point was that it was a repost, including most of the conversation about it. Just find that amusing.
 
sbi
@sehe And Dutch PT uses BVG's shade yellow on them, too?
 
@sbi Rereading it now it does make sense.
 
sbi
@Rapptz Thanks. I'm a non-native and do make silly mistakes once in a while.
 
@sbi You mean for the handle bars? Yeah. Totally. That's not BVG shade. It's probably just factory default :) BVG use it on the outside too, then?
 
sbi
7:27 AM
@sehe No. On the stamper.
 
I think you all do a great job in speaking English.
 
That too is default. The chip-devices are more neutral though, only having the chip-card manufacturer's logo
 
@sbi That wouldn't look familiar. Obviously. Again, this is not my point. I'm not saying the picture had been taken in Switzerland. I'm saying it has been posted before, and claimed to look like it might be in Berlin. And someone else (? don't remember) added that public transport in his viciinity looked about the same.
 
sbi
@sehe I doubt that this is the default color. I very seriously doubt that. I am actually quite sure that, whoever produces such machines, will have them painted according to their customer's wishes, and that customers will totally want them in their company colors.
 
7:30 AM
12 mins ago, by sehe
And someone else mentioned that public transport in France (?) look the same. I felt it was redundant, at the time, to add that the same goes for dutch PT
 
sbi
@sehe Whoever said that, I doubt he's right.
 
exact same colors in our buses
 
@sbi You know, I really don't care much. Yellow is the dominant colour for all such in-vehicle constructs. Don't know why that is. If it is by freak accident, is ok by me
 
wouldn't have mentioned it, but since it's apparently the topic for this morning, I guess we should just get it over with
 
@sbi I'm not saying anyone is right. I'm saying it has been said. Is all. I'm pretty sure this picture will have been taken in a Berlin tram.
> I felt it was redundant, at the time, to add that the same goes for dutch PT
Still redundant. ^ Just amusing to point out a deja-chat
 
sbi
7:33 AM
:)
 
@jalf Exactly mah point
 
It's because yellow and black tend to have the most abstraction to our eyes so it's easy to spot.
At least this is why road signs are black and yellow.
 
@sbi I actually don't know whether that is a repost :):):)
 
sbi
@sehe I think I linked to a video before where he's actually singing the song.
 
@sbi Yeah, I've seen it before. Just didn't know where
 
sbi
7:35 AM
@sehe He'll be in Berlin next Wednesday, and I plan to see him. I hear he's a minor star among you Dutch. Had a #1 hit, sold out shows, etc.
 
Never heard of the guy. Really. I might perhaps recog. a song
 
@Rapptz they're not black and yellow here :)
 
sbi
> Holden wrote "The Lost Boy" in 2011. It was inspired by the book What is the What by American writer Dave Eggers about a Sudanese refugee. Holden recorded it and released as a charity single in December 2011, and it became a hit for him in the Netherlands, topping the Dutch iTunes singles chart on Christmas Day and reaching #2 on the Dutch Top 40. — Wikipedia
@sehe ^
 
@sbi I just realized that I completely misread that comment. Skimmed it too fast. So my response would've seen awkward.
 
Yet it was relevant :P
 
7:40 AM
@sbi "Dutch iTunes singles chart" - I bet all 30 users of iTunes in the Netherlands will remember :)
 
sbi
@Mysticial You're awkward anyway. :)
 
:)
 
sbi
@sehe "...reaching #2 on the Dutch Top 40." So it wasn't a #1 hit, but #2 is impressive, too, IYAM.
 
I just hit "I" in opera and all images disappear
@sbi Okay :)
 
sbi
@sehe It must be awkward talking about yourself here, what with it turning off our avatars all the time.
 
7:42 AM
I noticed that :)
And good morning
Apr 13 at 15:11, by sehe
@RMartinhoFernandes Oh. Like that. I tend to fully disregard avatars :(
 
sbi
33 mins ago, by sbi
@jalf You are all suckers for eye candy.
 
@sbi Not in a textbox. And I don't see the avatars, really. What's annoying is that you can't see the reply to link (and Userscript doesn't work at work).
@sbi I distantiate myself from your sweeping generalizations. All of them :)
 
sbi
Once we're quoting each other's old messages instead of a real conversation, why don't we just throw message IDs at each other? Much faster typing that way.
 
I run Windows with Aero in multiple colors. I have colored text boxes and I use the Windows sidebar as decoration rather than function. Yes I love my eye-candy.
 
@sbi Disagree. Copying the link is supported by my browser.
 
7:46 AM
if it doesn't have any shader effects, I'm not interested
 
sbi
I can now forever invoke that argument by simply throwing 5290517 into the discussion.
@sehe What is supported?
 
@sbi Copying. Copying the link. You know - to the clipboard. I don't like the mouse, but the clipboard is rather essential to me
 
Man, the HDD in this machine is so noisy. Didn't know they still made disks that noisy. :P
 
sbi
@sehe Which link are you copying to where and why?
 
They don't. They become noisy. Also: hdparm to tune for acoustics
 
7:49 AM
If someone sees the puppy later on, please ping me
 
@sehe become noisy? How so?
@ManofOneWay Yep
 
sbi
@ManofOneWay Why don't you just ping him yourself and wait whether he replies?
 
@DeadMG ^ see five up
(damn scrolling chat)
 
sbi
@sehe I have no idea what 's you're trying to tell me.
 
7:51 AM
@sbi I sometimes get the idea that you're doing it on purpose. I mean: really simple:
4 mins ago, by sehe
@sbi Disagree. Copying the link is supported by my browser.
I disagreed. This is because copying the link is quicker because of browser support for it (context menu 'C' done)
 
sbi
@sehe Actually, I'm not. I think I just got lost in the discussion. Embarrassed.
 
So no, copying message IDs is not quicker typing for me. In fact, it is more typing, because it involves typing. Also, it involves even more typing trying to reconstruct useful urls from the the message IDs :)
 
sbi
@sehe Actually, if we all learned the most important few thousand messages' IDs by heart, we'd just have to type 7 digits to make a point. That's very hard to beat. (And if you believe nobody could remember all those, someone once told me about the religious zealots her parents had as friends, and how the men would sit together in the evening and just throw numbers of bible verses at each other instead of a discussion.)
 
@sbi I trust you don't. It is usually pretty obvious when you're out to have fun (e.g. with the pirate), and that usually doesn't happen monday mornings :)
I'm heading off to work
 
Can someone tell me why you would overload operator() inside a struct? Might be a dumb question, sorry.
 
7:55 AM
@sbi Or just the unique subset. We should propose to use sha1 sums instead, so we can use the last 3/4 digits to be unique for some time to come :)
@Rapptz Callable object.
 
sbi
@Rapptz Read up on function objects (sometimes called "functors").
 
@sbi Oh tell me about bible verses. It is still mildly saddening I forget most that I learned
 
sbi
@sehe I never learned anything to begin with. :)
 
@sbi Something like this?
struct Add
{
int operator()(int a, int b)
{
return a + b;
}
};
 
@sbi Versus dictionary, obviously
@Rapptz Yup, that could work for binary std::transform e.g.
 
sbi
7:58 AM
@Rapptz Yep. I would templatize this, though. Much more useful.
 
struct Add {
    int operator()(int a, int b) { return a + b; }
};
 
Ah I see now.
 
@Rapptz And read the newbie hints on formatting
 
Missed it by 5 seconds.
 
124
A: C++ Functors - and their uses

jalfA functor is pretty much just a class which defines the operator(). That lets you create objects which "look like" a function: // this is a functor struct add_x { add_x(int x) : x(x) {} int operator()(int y) { return x + y; } private: int x; }; // Now you can use it like this: add_x add4...

 

« first day (695 days earlier)      last day (4261 days later) »