« first day (645 days earlier)      last day (4305 days later) » 

2:00 AM
So, you let your children waste their time?
Bad, bad father. :P
 
Ohhh I was forgetting Blender too ...
 
Well, moar tragedy in my near vicinity. Mother of my good friend threw herself under an oncoming train and one schmuck of a 19 year old managed to drive a motorcycle to death - taking the advantage of an oncoming vehicle on the main road.
Well, fuck, that's two funerals.
 
So @Radek, if you prefer python, why are you in the C++ lounge?
 
Well , Lua is widely used too , specially for World of Worcraft Scripting.
 
@vedosity because the C++ lounge is, among other languages, a Python room.
 
2:03 AM
@vedosity Well, we're all here to mock C++... And other languages, as well.
 
But I think it's mainly because of historical reasons. I used to do a lot of C++ before.
 
I dont preffer Python , I was describing the relationship between Python and 3D Assets Creation Software.
 
A space simulator camp thing I work at uses lua for scripting stuff
What do you guys think, lua or javascript?
 
If there is one field in IT that I really, really hate, it's 3D graphics.
 
@LeandroArielPezzente Blender is actually the only thing I ever scripted python for
@RadekSlupik Second that.
 
2:04 AM
@RadekSlupik what about 2D graphics?
 
@vedosity JavaScript.
 
In fact , trying to learn Python with a Python 2 book on a Python 3 Enviroment kinda actually got my nerves.
 
I 'had to' because I adapted some 3d chess game.
 
@vedosity 2D graphics are great.
 
3D graphics are fun to play around with if you've never done them before
 
2:05 AM
2D at least maps to displays. 3D graphics wouldn't be so horrific if we had holographic monitors, but we don't, so it sucks.
 
@DomagojPandža Darn. That shit is not on
 
@RadekSlupik What about 2D programming in a 3D programming API? ;)
 
@sehe @RadekSlupik No. No. Noooooooo. You were my brothers, I loved you!
 
@vedocity provided the APIs are decent, that's OK.
So not OpenGL. It's unusable.
 
OpenGL?
Haha, ok
 
2:06 AM
You can love me again after you teach me that shit :)
I don't actually hate it, I just don't need it/use it.
 
Just an API where I can say:
Image img("foo.png");
img.draw(x, y, w, h);
 
I think OpenGL just works closer to the metal
 
@LeandroArielPezzente I had learned python 2 with a python 3 book xD
 
@DomagojPandža My experience with blender and the python export script/trigraph stripping taught me that the stuff is probably easier than it looks. But I still don't have serious uses for it. Yet
 
@RadekSlupik, My thoughts exactly. That's the style I'm aiming for.
 
2:07 AM
Not binding to buffers, filling them, binding to other buffers, swapping buffers, all that crap.
 
but you have to send it to the GPU first! :P I think I actually tried picking up an OpenGL book before I learned C++
 
I want to draw graphics. I don't want to program the GPU.
 
Well it lets you do fine tuning. I'm writing a 2d graphics library that uses opengl
 
OpenGL is a raw C API, it offers a lot, but kind of dangerous to use for a big project with a newb onboard. But it also demands a lot, knowledge.
 
well, it can use anything
in fact, I'm gonna make the openVG backend first
 
2:09 AM
I use QuartzCore and it just works.
 
ok guys, I'm off to bed.
 
and then the QuartzCore backend :P
 
Sleep tight!
 
So the name "Peter Shirley" is like an insult ?
 
Surely
 
2:09 AM
@RadekSlupik Any thoughts on CoreAnimation?
 
@ITNinja Backward Compatibility is kinda Ackward sometimes.
 
@vedosity Use with UIKit for UI animations, not actual games.
Basically, if you're writing anything worth downloading, it's OpenGL ES 2.x territory.
 
Oh yeah, I tried using CA for my game's graphics and it failed
It uses OpenGL now, but I'm writing a library to make it easier to switch around and experiment
abstraction ftw
but for now I haven't been doing much iOS stuff because I'm working on Android stuff for my job
other job, not space simulator stuff
space simulator stuff is mostly volunteer work
 
How does Bullet Physics works for Physics Simulation ?
 
magic
what do you mean?
For collision detection? Constraints?
Something else?
 
2:18 AM
Rigid and Soft Body Kinematics
 
Hmm, I dunno, sounds a bit broad to me, I don't know bullet too well.
I've worked with Box2D quite a bit though
 
For collision detection ?
 
I use box2d for constraints and stuff as well, yeah
Are you just looking for a physics simulation framework type of deal? Or how to use one? Or how to make one?
in other words, are you asking how bullet physics works on the inside, or how to use it?
 
How come 10% of the questions with a main function use void main
 
in either case I probably couldn't help you immediately, but I could read into it
@chris bleh!
Does anybody notice that I always forget to reply to someone so I add the reply to thing a bit after I send the message? Does that bother anyone?
 
2:24 AM
I actually bookmarked this so I could post the link to people: www2.research.att.com/~bs/bs_faq2.html#void-main
I guess I should change the bookmark to his new site though
 
he has a new site? I noticed his c++11 faq wasn't working the other day
 
I a, mostly in the pde solving method implementations of game engines , like bullet physics , panda3d , and such .
 
oh you mean like semi-implicit euler and verlet and all that?
Edit: Dangit, I forgot the reply thing again!
Hmm box2d uses semi-implicit euler I think
I can dig up some stuff on different solvers
 
But in any case , I am just starting to understand why Hamiltonians is such a bad word in this chat room.
 
2:34 AM
oh yeah I don't think I know anything about pde's...
just a tad bit on numerical methods on ode's
in other words, I don't know shit about physics
 
2:49 AM
@rubenvb ping me if you're still trying to build ICU
 
@SethCarnegie Intensive Care Unit?
 
3:02 AM
good morning
 
How's the new operator proposal going?
 
Decide for yourself whether he's game.
 
Who's actually leading the proposal though?
What's the operator do anyways?
Also; can you overload the operator?
 
@IDWMaster, Did you see this? stackoverflow.com/questions/11583028/…
 
@Mysticial :Đ
 
3:19 AM
@chris Don't get why they closed it
By the way; does anyone know a good lexing system (without compiler)?
I have a project where it would be useful to compile code within an application
Some restrictions are that it can only be ran within its own VM and cannot access any files on the underlying file system
So it would have to be something I could link into my application
I've been writing my own lexer so far and it's quickly turning into very ugly code.
 
@IDWMaster Check the first revision.
 
And while you're at it, look at the full history leading up to now.
How many times was it reopened? 3?
 
Wow
 
I think the SO community turned on each other for that one.
 
4:29 AM
Does VS2010 do C++11? If so, how do you go about enabling it? I don't use it.
 
42
Q: Should curly braces appear on their own line?

Tom WijsmanShould curly braces be on their own line or not? What do you think about it? if (you.hasAnswer()) { you.postAnswer(); } else { you.doSomething(); } or should it be if (you.hasAnswer()) { you.postAnswer(); } else { you.doSomething(); } or even if (you.hasAnswer()) you.po...

lol 2nd and 3rd answers...
 
@Mysticial, Lookit:
1
A: Does for loop in c only can have one statement?

chrisUse braces for the body of the loop: for (a = 0; a < 10; a++) { doSomething(); doSomethingElse(); } This concept extends to other things, like if, as well. This should be mentioned right alongside the if and for themselves in any book, etc.

Nice timing there.
 
@chris I obviously found that p.SE question in response to that one.
 
I had a suspicion. I do tend to see a lot of coincidences like that, though.
 
I've always put them on the same line though. Mostly because I started out that way.
And habits tend to stick.
 
4:43 AM
I started out on different lines, but I think starting to go through Java changed my mind.
 
While I was interning at MS, they had a policy of putting them on separate lines.
It wasn't too hard to break my habit just for that summer. But I still preferred putting them on the same line.
 
I just know I'm going to look forward to constantly mistyping other people's requirements.
 
It just made code look a little too long - but that's probably because I'm too used to seeing them on the same line.
There might be a bit of bias though. I do mostly HPC numerical stuff - which is notorious for having extremely large function bodies.
 
Wow, I forgot about this until AndreyT asked: dodgycoder.net/2011/11/yoda-conditions-pokemon-exception.html
Good memories coming back.
 
i love bottle.py <3 such a nice simple framework
 
4:52 AM
hmm... what other sources of religious contention are there in programming
tabs vs. spaces
On the hardware side of things (especially in my department), there's a holy war over big-endian vs. little-endian.
 
I actually like how you can count on Java's platform being the same one.
 
big-endian vs. little-endian is one of those things that boils down to, (human-friendly or computer-friendly)
 
5:11 AM
@Mysticial I dunno. I've designed both, and at least when you're designing at the Verilog/VHDL level, they strike me as about equally difficult/simple. Maybe when you get to more complex designs it starts to make a bigger difference though -- all the CPUs I've designed were pretty small and simple.
@chris I could like it -- if I couldn't count on its being consistently bad.
 
@JerryCoffin I suppose it only starts to matter when you have multiple data and word-sizes to deal with.
From the performance side, I've found that it surprisingly matters for the bignum stuff that I do.
On big-endian, carry-propagation goes in the direction of decreasing addresses.
 
@Mysticial Yeah, probably -- having to figure in the offset to get the LSB of a multi-byte word.
 
And nearly all processors now have prefetchers that are able to handle more forward streams than backward streams.
 
@Mysticial That makes sense. Most FPGAs have special carry-chain logic, so you rarely have to deal with it very directly, and since you can design as wide of words as you want, at the hardware level, it's pretty easy to get by without doing bignums at all (though you can waste quite a bit of chip space if you decide to build, say, a 1024-bit ALU). Probably won't get very high clock speed either...
 
Oh and btw, my y-cruncher pi-program uses little-endian exclusively.
Integers are represented as simple 32-bit or 64-bit integer arrays.
Index 0 is always the 1's digit.
So carry-propagation goes forward with addresses.
Furthermore, I can also type-pun these arrays between 32-bit word and 64-bit word routines.
 
5:18 AM
@Mysticial That strikes me as about as surprising as the sun rising in the morning...
 
@JerryCoffin I believe Java's BigInteger uses Bigendian. So their carry-propagation goes backwards.
 
Can you imagine writing it big-endian, so every time you needed to add a digit, you needed to shift everything to make space?
 
GMP uses little endian I think.
@JerryCoffin Which is exactly why I wrote it little-endian.
 
what is GMP?
 
@prjndhi Gnu Multi-Precision (or something like that - Gnu's big-integer library anyway).
 
5:20 AM
@prjndhi It's the standard bignum library.
 
@Mysticial ...in much the same way that ed is the standard Unix editor. :-)
 
Oh and... big-endian carry-propagation on a hard drive is a disaster waiting to happen - unless it's buffered properly.
It was one of those things where I couldn't thank myself enough to choosing little-endian.
 
@Mysticial Backwards carry propagation, shifting every time you add a digit, and no overloaded operators, so you get to deal with such wonders as A.multiply(B.add(c), D.add(e)) Did they miss any mistakes they could have made?
 
@JerryCoffin BigInteger is immutable in Java. So it doesn't matter.
And I don't think Java BigInteger (or even C#'s) were ever meant for performance.
 
@Mysticial Yeesh -- I suppose if you worked hard enough at it, you could make buffering work, but the typical OS assumes you read files randomly, or from beginning to end (not from end to beginning), so you'd basically be fighting it every inch of the way.
@Mysticial Poor performance and thoroughly unreadable. Great combination!
@Mysticial oh yeah, I guess I'd probably have remembered that if I hadn't worked so hard at forgetting them as thoroughly as possible.
 
5:31 AM
@JerryCoffin lol
Having an immutable big-integer class is actually a fairly large performance handicap.
You can't even add 1, without copying the entire number.
For big-float objects, it gets a lot uglier. In place operations are almost impossible to implement cleanly. (and not always possible depending on how the exponents line up)
 
@Mysticial Yeah -- as much as Java advocates like to talk about how fast you can allocate memory with a GC (and they're right, you can) it doesn't help much if you have to immediately turn around and copy a few gigabytes.
@Mysticial I don't even want to think about that -- normalizing immutable objects sounds like an oxymoron.
 
@JerryCoffin Actually, the mutability doesn't matter. Nearly all the functions take two operands and write to a 3rd one.
Normalizing can't really be done without modifying the operands. (which are const)
 
what is the advantage of using big-endian instead of little-endian ?
 
So I don't normalize. I use one of two methods:
1. I have handle all the different possible overlapping cases individually.
2. I use a copy-buffer that does automatic zero-padding.
 
@Mysticial That's my point -- if (for example) you're adding two numbers, you (normally) normalize to equal exponents before the addition. If they're immutable, you're stuck with creating copies, normalizing them to equal exponents, then adding the copies to produce the result (which, you of course, normalize again).
 
5:38 AM
The second case is obviously slower, but much easier to implement.
0
Q: What am I doing wrong with this C program?

Dustin L.I have the following code, and the only thing I can physically see it evaluating is line 18 which is the call to printf(). It doesn't go any further. #include <stdio.h> #include <stdlib.h> int main (void) { int cylNum; double disp, pi, stroke, radius; pi = 3.1415...

facepalm...
 
@Mysticial Easier, and I'd imagine, a lot less code.
 
@JerryCoffin yep :)
 
@Mysticial Wanna bet it's somebody used to BASIC and things like INPUT "Enter a number", number?
 
lol
@JerryCoffin And for much the same reason, I can't support in-place addition/subtraction for big-floats.
But the funny thing is: I can support in-place multiplications... lol
 
@prjndhi The main advantage is that when/if you read a memory dump of something in big-endian, it's easy to read. If you have, say, 0x1234 stored in memory, a hex dump will come out as 34 12, but in big-endian, it'll look like 12 34.
@Mysticial that doesn't really surprise me. On FP, multiplication is almost simpler than addition, at least conceptually.
 
5:47 AM
@JerryCoffin It's more like, multiplication requires a massive scratch buffer anyway. The final operation is just an optimized write back to the destination. So both operands are read before the destination is written to.
Which is not the case with addition/subtraction unless the copy-buffer is as big as both operands.
 
@Mysticial I just mean, conceptually, multiplication is just add the exponents and multiply the mantissas (and normalize). Normal addition starts with adjusting the operands to have the same exponents. At least to me that seems (conceptually) almost as complex as the whole of multiplication.
 
@JerryCoffin That's kinda true actually. And with addition/subtraction, you also have to compare signs and decide whether to actually add or subtract...
 
@Mysticial That too, now that you mention it.
 
And it gets messier on disk. Because you can't determine for sure which operand is bigger without (in the worst case) traversing the entire operand.
So I have to use a form of prediction. Where I speculatively subtract. And if turns out the result is negative, then I have to repeat it in the other direction.
And I rely heavily on caller-hints to specify which direction to guess first.
So that swap-operand addition/subtraction code is one of the nastiest parts of the program.
 
@Mysticial Hmm...if the output wasn't quite so massive as you're working with, I'd be tempted to calculate both, and when I got to the end decide which result to keep and which to throw away. Probably not practical when you're in the ten-billion digit range though. If you had enough disks to write both results in parallel, it might not work out all that badly though (i.e., gain some speed at the expense of extra space).
 
5:58 AM
@JerryCoffin Yeah... the in-memory code does an actual compare. So it still traverses the dataset.
The thing was, I never thought it would be a problem. Because destructive cancellation is supposedly "exponentially" rare.
But...
In the case of Newton's Method iterations, it always exhibits massive destructive cancellation when it converges properly...
 
@Mysticial Everybody who says that should be forced to read Real Computing made Real, by Foreman Acton a few dozen times or so.
@Mysticial ..and not just Newton's method. It's common in a lot of places you do iterative convergence on the answer.
 
@JerryCoffin Yeah, like alternating series for any of the trig functions.
 
@Mysticial Exactly -- of course, you could make a fair argument that computing Pi is sort of equivalent to computing trig functions (obviously closely related at any rate) so it's hardly surprising to see similarity between them.
 
The Taylor series for the majority of the trig functions are nasty numerically.
You have an exponent in the numerator and a factorial in the denominator.
 
Oh, look -- it's after midnight here. It's now officially my birthday. Too bad I'm not young and single so I could start grabbing free drinks...
 
6:06 AM
So the series diverges first, then converges again.
@JerryCoffin oh! Happy B-day!
 
^^^^^^
 
@Mysticial Yeah -- slow convergence. If memory serves, a McClaurin series is generally preferred.
@Mysticial Thanks, both of you!
 
At least you don't have midterms on your birthday... like I did in the past few years...
 
You guys kinda lost me going through all the technicalities, stretched my memory on computational methods, and I fully came back at the mention of birthday.
 
@Mysticial No, virtually never had any tests on (or even very close to) my birthday.
 
6:09 AM
because it's in the summer :)
 
@Mysticial Yup, mostly anyway. Fortunately, I did well enough in school that I didn't spend most of my vacations in summer school... :-)
 
I did one bout of next year's English there. I hated English before, but I found that pretty enjoyable.
 
@chris I did well in English for much the same reason I do reasonably well at C++: I have an easy time remembering an inordinate amount of trivia.
 
Apparently I sucked at English last year and I'm pro at it this year.
 
@JerryCoffin ooh you're lucky... I have a hard time remembering anything that I don't want to remember.
Which is why I failed my Ph.D quals...
and always had shitty grades...
 
6:13 AM
I can relate to that, I can only remember specific things, and they're not what I'm trying to remember.
 
@Mysticial Oh, ouch.
 
and almost kept me from getting in to college.
@JerryCoffin Yep... that's the way it works. I get one more shot in September. And that's it.
The nature of the test is very much against me as it hits every single one of my academic weaknesses that you can possibly imagine. But I have a summer of nothing to study for it...
 
Good luck, you really get stuff piled on for those.
Reminds me I have to go study for/take a Cisco certification exam sometime. Finished the batch of four courses for it.
 
The Ph.D qual system is very harsh actually. They don't care if you're a Nobel Prize winner. If you can't remember 100 papers word-for-word, you're out.
 
@Mysticial My grades were fairly decent overall, but I always thought of them as really being a grade on the subject matter and teacher. If it was interesting, my grades were great. If it wasn't, well, you can guess...
 
6:17 AM
@JerryCoffin, That's me.
 
@Mysticial I doubt my memory would be up to that either -- especially any more.
 
So yeah, even though I say that "I'm still in school and have a long way to go", I might be looking for a job as early as next year.
 
@Mysticial It's less a matter of harsh than simply outdated. 100 yeas ago, a PhD had to be good at memorizing, because in a lot of cases when he left the university, he pretty much had to carry a large part of his library in his head. Hasn't been even close to reality for decades now though. Now, halfway decent skills on Google will beat any amount of memorization every time.
@Mysticial So do you have a Masters?
 
@JerryCoffin Not yet, I'll be picking my classes very carefully to make sure I get one before they kick me out in case I fail.
The funny thing is: 80% of the students pass the qual on their first try. I was the only who failed in the March quals for my department.
I don't know how these guys manage to do it...
 
@Mysticial Hackers vs. Packers. Some people are good at reasoning. Others at memorizing. Very few at both. Unfortunately, even in areas that should be oriented heavily toward reasoning, memorization ends up being emphasized in most colleges/universities.
 
6:25 AM
I'm aware of that concept - just not in the phrase "Hackers vs. Packers". haha
It actually sucks double for me too. Since I'm in more of a corner than other students who fail. First, I don't have a masters, second I just got the NSF fellowship which lasts 3 years.
So I stand to lose everything if I fail and can't immediately get into the Ph.D program of another institution.
 
@Mysticial The big problem is that most schools are run largely to make life easy for the people running the school -- and it's a lot easier to test whether people can recite facts correctly than to figure out whether they can reason about them.
@Mysticial Damn -- that does suck. I wonder if we could put together an "SO foundation" (or something like that) to help out somebody who obviously deserves it, if it should come to that...
 
Programming is nice in that you're required to do your own research, not just memorize what you're supposed to know about doing it. I wish more things were like that.
 
AMH
hi all
 
@JerryCoffin lol... I don't see that happening... haha
 
AMH
I need your advice please
 
6:32 AM
@Mysticial I dunno. I'd chip in a bit anyway.
 
AMH
I want to study c++ for image processing and machine learning, which platform Ishould start with
 
@JerryCoffin lol, thx
 
AMH
@JerryCoffin @Mysticial @chris any advice
 
@AMH If you mean "what OS", it's mostly irrelevant. OpenCV (for example) runs on Windows, Linux, and Mac.
 
What do you mean by machine learning?
 
AMH
6:34 AM
expert systems
 
I was thinking of opencv for images, though. It looks pretty widely used.
 
AMH
@JerryCoffin I mean which tool I use for programming QT, .NET visual studio,.....
 
bleh, I have no experience with programmic image processing.
 
Same here, but I haven't seen too many people using anything other than that.
 
@AMH That's probably going to be based primarily on other factors like how much you care about portability of the result (and if so, what systems you want to target).
 
AMH
6:36 AM
hmmm, am asking about hte popular toolkit be used
am sorry am new to that
 
@AMH My point is, image processing and machine learning are mostly orthogonal to the UI toolkit you choose, so the latter becomes mostly a question of whether you can live with code that runs primarily on Windows (.NET) or more widely (Qt). I don't like .NET personally, but quite a few people obviously think more highly of it than I do.
 
AMH
so I think QT is much better
 
As far as IDEs go, I rather like VS in general. You can use it to write code for either Qt or .NET.
 
AMH
what VS stands for
 
@AMH Sorry. Visual Studio.
Anyway, I probably need to get to bed. G'night all.
 
AMH
6:40 AM
ok thanks for the help
 
cya
 
int & foo is by ref int * foo is pointer to but p = &a is address of and x = *i is dereference
 
I had a pretty long talk with a friend over console-based editors vs. GUI editors for programming.
 
so does that mean * and & are overloaded operators?
 
From my angle, I never could understand how you could possibly not use the mouse.
And on his end, he couldn't understand how I could possibly use the mouse.
 
6:45 AM
@sabgenton, They aren't operators in declarations.
 
The conclusion was: He hates (and sucks at) the mouse, and loves the keyboard.
 
oh
 
And I play enough FPS and RTS to be extremely fast and comfortable with a mouse.
 
And the dereferencing one is overloadable for that, address-of not so much
 
@chris ok but not in the conext of the two delcarations I made
so the declarations are just contextual in the way they make the tokens mean something
not overloading
 
6:47 AM
Yeah, C++ does that.
Apparently the address-of is overloadable. I never knew that (or thought about it): stackoverflow.com/questions/6495977/…
Dereferencing comes up in smart pointers.
 
heh
ok ok but I was up the wrong alley as declartions make tokens behave as such
rather than as operators
thanks :)
 
7:00 AM
is using std::swap the best way to take advantage of ADL without running into problems when you have types such as int?
like, I have a function that accepts two arguments with some type T
but I don't know what that type is
but I probably want to take advantage of ADL so I don't want to use std::swap(a, b), right?
 
yes, using std::swap is normally the way to go.
 
but what if the swap function for a particular type is defined in another namespace?
Does ADL override the namespace.. er.. qualification? not sure if right term...
I guess there's a way to find that out..
 
7:31 AM
surely using std::swap(a, b) isn't actually the way to go
@bamboon you might want to see this: http://ideone.com/SFUus
You see, if I have some super fast and efficient swap in my `test` namespace for my huge `test::A` class, I want to use that. Not std::swap. And I want every other library that uses my type to use my `test::swap` function too, so if they put the `std` qualification on it, thats bad.
And you don't want to put it in the std namespace, because if you do that you might just deserve deserve an std for putting your junk in someone else's namespace. You cheater!
Anyways, I answered my own question, thanks though.
 
7:58 AM
@vedosity oh, by "using std::swap" I actually meant using "using std::swap". well, of course if you are coming from the users perspective, you are dependant on lib. implementations. concerning the expanding std:: stuff, you should read e.g.: Effective C++ (tip 25, that's about swap) or here on SO about it.
 
I'm having a brain fart right now. Would not checking for self-assignment in a non-copy-and-swap operator= be an issue from putting it into a std::vector?
 
I'm just getting into ADL stuff, I can't believe I didn't ever have to know about it before
I should've
so do I want to do using std::swap; in my namespace or in every function I define?
@bamboon Ah I see, thanks. And search where on SO? I don't have Effective C++, I certainly need to get it.
Well, here's one thing I've learned by looking around: dupa means ass in polish.
 
 
1 hour later…
9:19 AM
Wow you can really feel 1 hour of silence.
 
Morning.
 
Good morning, still 5:20 here.
Now I'm bound by not sleeping because I just posted a question.
Good news, though. While posting that question, a related link explained to me how to get stoi and to_string (at least the char variants) working =D
I've been longing those functions for a long time now. I hope it's fixed properly soon.
 
9:37 AM
Morning
 
9:59 AM
@vedosity I'd just write it in every function, before you call swap iff you want the std one to be considered. Doing it at a "wider" scope forces everyone to make the same decision you did.
 
Hello?
 
10:21 AM
folk
 
hmmm
 
Ell
morning'skg all
sugar.
morning all*
 
10:41 AM
You too
@RadekSlupik Ohai?
@Flexo There is a pitfall in that explanation: using std::swap; does not cause std::swap to be used. Rather, I think it enables ADL when you do unqualified swap(a,b);. I think there is a more elaborate faq answer on Stack Overflow (search stackoverflow.com/search?tab=votes&q=%5bc%2b%2b%5d%20adl): /cc @vedosity
23
Q: What are the pitfalls of ADL?

FredOverflowSome time ago I read an article that explained several pitfalls of argument dependent lookup, but I cannot find it anymore. It was about gaining access to things that you should not have access to or something like that. So I thought I'd ask here: what are the pitfalls of ADL?

 
@sehe I know, but I don't think it's unreasonable to expect that if someone else has written a 'better' swap for their specific types that it's a) better and b) does the same thing
 
@Flexo Oh I just fell into the chat :) Missed that context
 
Hello? How are you.
 
@Flexo Oh you mean in general? I think it is fair to expect people's swap(T&,T&) implementation to be preferrable. This is the basis for ADL and multi-paradigm OO in C++.
@RadekSlupik I'm fine. And I'm going. Sooo have a nice day
 
for swap you'd have to be braindead to write your own version that didn't match std::swap
 
11:08 AM
Meh.
 
11:39 AM
@sehe really ugly
 
Hello all
 
hey @nightcracker :)
 
<!-- language: lang-py -->
hey
 
11:49 AM
@nightcracker If you don't do that, it will pick the language from the tags and if that fails, it will guess from the source code.
 
ah
I knew about the last two "guessing" methods
but I never knew you could specify the language
 

« first day (645 days earlier)      last day (4305 days later) »