« first day (646 days earlier)      last day (4310 days later) » 

9:00 PM
or just use boost::swap :)
 
But A::swap is private, so I guess it will not find it ?
 
Why on earth would you make swap private?
 
@ManofOneWay it's a global function, so there's no such thing as private
 
Also, you should have a global swap(x, y) that calls the member function x.swap(y)
 
I didn't consider the fact that it could be used by other classes :P
 
9:00 PM
@ManofOneWay It's not private, it's not A::swap, and accessibility never affects lookup.
 
@ManofOneWay friend functions are put in the scope just outside the class
 
swap was the way to emulate move semantics before move semantics made it into C++11.
 
@FredOverflow he only has the global :D
 
@n2liquid Oh boy. Yes /cc @R.MartinhoFernandes
 
He has a private global??
 
9:01 PM
Should I have it as a member function ?
 
@FredOverflow it's a friend function of a class in it's private section. Its easy to see the confusion there.
 
@FredOverflow At this point you could take a look at the code. There's nothing special going on lol.
 
@ManofOneWay no, the function is perfectly fine the way it is. Just remember that it's a global function, not a member of A, and that everyone can use it. Though I'd probably move it to the public side, to avoid confusion
 
Then maybe I should define it outside A just for clearness?
 
@ManofOneWay you could do that too, but it makes things slightly more complicated. You have to friend the function in the class first.
 
9:03 PM
Ah yes
I'll make it public inside then instead
 
class B {
    friend void swap(B&, B&);
};
 void swap(B& lhs, B& rhs) {stuff;}
@ManofOneWay that's what I do
 
You can indeed define outside and not need to friend it, as it would instead call the member.
 
@LucDanton he'd have to add a member for that
 
@n2liquid I appreciate you let me be. I'm still recovering. And that is from just a pilot. We'll be using Serena fulltime from September onwards. I think I might call my head hunter
 
@MooingDuck Probably the least surprising interface when it comes to providing swap.
 
9:05 PM
I have the feeling that on my (non-retina) Mac the the Menlo font looks less sharp in TextMate than in Xcode.
Can anybody confirm that?
 
@sehe dealing with it on a daily basis; codebase is 2.5MLOC of pure PHP sadness
 
Oh gawd. You're still alive?
 
@n2liquid Hah! I beat you! We're doing C# :)
 
I'm almost quitting >_>
 
MLOC
 
9:06 PM
How can I check if there are characters still in a stream?
 
dear god
@Drise: read from it :D
 
@LucDanton I agree, public member swap and global swap calling member is cleanest.
 
@n2liquid How does serena pan out for you? Practically, what are the top 2 most annoying limitations?
 
the thing takes 5 minutes to copy 2 files from one environment to the other for no apparent reason
 
Say NO to php!
I don't think that I have a problem with any other language.
 
9:07 PM
@sehe limitations? I guess the first problem would be the speed
 
@MooingDuck Thanks for the help!
 
it can literally take hours to move code from one environment to the other
 
@LucDanton Thanks!
 
I can't choose a second biggest limitation, there are just so many
 
@n2liquid Ah, that was my top 1 peeve already. I only did a one month 'pilot' using it (and I went back to SourceSafe + git locally...) and I was appalled at (??) speed (??)
 
9:08 PM
If this is using C++11 consider not providing a specialized swap operation at all. Maybe I should write about that, too.
 
@sehe they claim it's faster than SVN.. I wonder what kind of benchmark they did
oh yeah, second biggest issue would be limited number of licenses
quite frequently, I have to ask our internal mailing list to spare a license for it so I can use it
from there, it only goes downhill
 
@n2liquid Well, a random round of annoyances then? I'd say (a) flakey UI (b) horrendous wizard design (c) confusing checkmarks (d) restrictive workflow (e) hard to view diffs (f) extremely hard to cater for ignores (got to repeat the 'ignore' at every synch?)
@n2liquid Oh joy. They do know how to extort the money
 
@sehe what 'ignore' at every sync?
 
Quite literally I've had the synch wizard die on me more than once, I've had spurious errors at checkin make me go back to step one of that dreaded wizard and redo all my selections.
 
I haven't bumped into that; but it's got plenty of funny issue, such as inability to order search results by a given column because "the result set is too long", lol
@sehe haha, I haven't had that kind of problem yet; oh yeah, and branching is also a bliss ;)
 
9:12 PM
I've had some silly confirmation dialog loop that popped up a message box with only an 'Ok' button... IN THE BACKGROUND ... so I had to use the mouse to click it to the foreground, then dismiss it. And the loop repeated for about 96 times. Then, it rejected my commit for lack of rights to delete 1 item. I had to start over.
@n2liquid Though they don't call it that, do they? They call it... streams?
 
@sehe in this version I'm using, it's called branch
I wonder if this is up-to-date, btw
 
@n2liquid When you compare local to base revision, you want to ignore things like temporarys, compiled files etc. I have yet to find a way to make the 'ignores' stick
 
version is 10.something
 
I wish all new people would separate the error line and point it out, along with the actual error, as well as an sscce: stackoverflow.com/questions/11620437/…
 
@sehe oh, I haven't done directory compares yet, I always do it per-file
 
9:15 PM
@n2liquid Shit, I don't know the version number. I'm so bookmarking this conversation, though. I'll send it to my colleagues (I won't be in the office until 3 weeks from now myself - motivational mail is all I can manage) :)
 
So, I'd like some feedback on these ideas before I start writing teh codez. gist.io/3166256 // cc @DeadMG and anyone else interested in the Unicodez.
 
@n2liquid Foot in mouth
 
Also gist.io <3
 
@sehe bahaha :D
 
@R.MartinhoFernandes: what is ogonek?
 
9:15 PM
@R.MartinhoFernandes +1 on calling the type text btw.
 
@nightcracker funny character IIRC
 
@nightcracker My yet to be born Unicode handling library.
@sehe U+02DB OGONEK
 
@R.MartinhoFernandes See, funny :)
 
of all the funny unicode characters
you choose this?
 
The name sounds cool.
 
9:18 PM
true
 
I'm not naming a library PILE OF POO.
 

Serena Dimensions

26 mins ago, 23 minutes total – 103 messages, 12 users, 0 stars

Bookmarked 11 secs ago by sehe

 
You could have named it BANANA.
 
PILEOPOO
 
9:18 PM
@R.MartinhoFernandes Call it BRAKCET
 
g++ foo.c++ -lpoo
 
@EtiennedeMartel FYFE
 
.c++?
 
@nightcracker Yeah, he's funky like that.
 
@nightcracker You mean, you'd call it .c⚔ ?
 
9:20 PM
I've always used .cpp
 
.c⧺ perhaps
 
@nightcracker .c++ was customary in the early days, IIRC
 
@R.MartinhoFernandes "text provides controlled access to the underlying code units." I don't think I understand that well. I get that text is a sequence of codepoints, and that it has an underlying container of code units -- is it really feasible and interesting to provide safe access to the code units?
 
.seaplusplus
 
9:22 PM
@LucDanton Dunno. It's cheap and harmless though: move container out, mess with it if you want, move container in, check validity.
 
Cheap has gotten a real Unicode-consortium-worthy redefinition there
I reckon you meant to say, it could have been a lot worse with C++03?
 
@R.MartinhoFernandes I see. So that "Attempting to construct an instance from an invalid sequence of code units is an error" statement is not as scary as I thought: those two operations (constructing from container, moving container in) both do the same checks and always end up with defined behaviour then?
 
Sane enough.
 
@sehe I don't understand. Why do you think it's not cheap?
 
9:24 PM
The rechecking thing might not scale too well for large texts
 
@sehe If you really need that much direct manipulation, you're probably better off with just the container itself.
 
Hmm. That's what I thought. Fair enough, really
 
Tbh is it really worth its own paragraph as a feature? If you can construct from the container, then t = text { c }; will likely be available.
I suppose the important point is that the container is available in the first place. Not that you can reconstruct.
 
@R.MartinhoFernandes Good stuff. You might want to consider, though, something which I completely forgot whilst reading the rest of the chat.
 
@LucDanton Yeah, that's the important bit. I might have worded it poorly.
@DeadMG Oh. Cool. I will consider that.
 
9:28 PM
two things
 
@R.MartinhoFernandes What's the take on compatibility with ICU?
 
@R.MartinhoFernandes LOL
 
first, Unicode I/O
and secondly, you may want a PLATFORM_ENCODING() macro, like T_ on Windows.
unless you can construct from all kinds of string lits
also, you might want to consider offering a UTF8 container allowing a UTF32 c string
 
@LucDanton I'll have to look at it better. I may get compatibility by simply using a icu::UnicodeString as an underlying container :P
@DeadMG Hmm. I'm confused.
 
@R.MartinhoFernandes I think that's a question that potential users are likely to ask.
 
9:30 PM
many people prefer UTF8 all plats, but JIT conversion to another encoding when dealing with OS APIs
 
Sorry, are we commenting about the document or the project?
 
having the utf8text have a c_str<UTF16>() would be super convenient for that strategy on Windows
 
@LucDanton Right now, I'm interested in the document, as that's what I'll implement next.
@DeadMG Oh, sure, I'll provide encoding conversions, yeah.
The machinery for that is already in place, actually.
 
also, I'd much appreciate a kind of unicode I/O
 
Like what? Operation with istream_iterators/ostream_iterators?
 
9:32 PM
eh
something custom would be fine
 
I'm staying away from locales for as long as possible.
 
Since when are we discussing relevant stuff like Unicode instead of arcane template rules?
 
the only functionality I'd be looking for is "Get text from file into given UTF-XX, possibly given that the file is in UTF-YY"
 
@R.MartinhoFernandes Right, then I suggest that you mention that you do have sight of libicu but no concrete plans yet.
 
@DeadMG Oh, that should be feasible when I make the encoders/decoders work with input iterators.
(Right now I'm sticking with forward iterators, as that's much simpler)
 
Xeo
9:34 PM
@n2liquid: I'll think about it some more, gonna go get some sleep now.
 
@LucDanton Ok, thanks.
 
Except for that I like that the document outlines a clear picture.
 
@Xeo sure buddy, I'll keep contact from time to time
 
@Xeo Already? Don't you usually stay up all night watching chkdsk? :P
 
Xeo
9:40 PM
@Mysticial Have some appointments tomorrow morning. :(
 
@Xeo aww... :(
 
Dems fighting words.
 
Xeo
And only got 2h of sleep today
thanks to some more sudden appointments in the morning
anyways, g'night
 
@R.MartinhoFernandes I think the way locales work with streams is fundamentally at least half broken. The way I'd personally like to see things work would be to have two separate layers of encoding/decoding. One layer should translate between the format of the data in the file, and a neutral format (probably UCS-4/UTF-32) to go in the stream buffer. A second would translate between that neutral format and the format you're going to use internally (e.g., in a string).
 
night
 
9:42 PM
@Xeo G'night.
 
@Xeo Have fun.
 
@Mysticial Hey, don't bash it. The last episode was quite riveting and left a sweat-inducing cliff hanger!
 
Xeo
@R.MartinhoFernandes Short-circuit, please.
 
@JerryCoffin I'll keep that in mind. And if/when I get to locales I may come to pick your brain for ideas :P
 
My coworker's threatening me with void pointers and unsafe casts.
What should I do?
 
9:44 PM
Shoot him.
 
Xeo
Yeah, shoot those asterisks back at him and nail him with 'em
 
@sehe If bash were involved, that would be fsck instead of chkdsk.
 
Xeo
@JerryCoffin It was quite a fsck in the end
 
@JerryCoffin Disagree. Bash is just a shell, and I might launch chkdsk from it
 
@EtiennedeMartel Enforce a $1000 donation to charity for every instance of void * in C++.
@sehe In theory, yes. Does anybody really use bash on Windows enough to notice though?
 
9:47 PM
@JerryCoffin I live by it
 
@JerryCoffin void* is the return type of operator new.
 
Using your own is costly.
 
@FredOverflow Good point. Make that $2000. :-)
 
I'm ordering some C++ books from Amazon now, going to get Accelerated C++ and C++ Primer which are both on the recommended list. However, the 5th edition of C++ Primer has not been released. Should I wait for it or just go ahead and order the 4th edition of it?
 
@R.MartinhoFernandes Bjarne recommends overriding operator new for node classes.
 
9:49 PM
Node classes are costly!
 
 
@JimNorton Wait. It should be out very soon, and should have much better coverage of C++11.
 
@JimNorton I don't think you need to buy both at the same time, so just go with Accelerated C++ first. It's unlikely to get a new edition anytime soon :)
 
@JerryCoffin ^ this is my work destkop as we speak
(courtesy of teamviewer)
 
@R.MartinhoFernandes How do you make an AST without nodes?
 
9:50 PM
ASTs are costly.
 
@FredOverflow Ok. Thanks
 
@R.MartinhoFernandes So just don't use compilers? :)
 
@sehe My condolences.
 
@JerryCoffin Alright thanks
 
@FredOverflow They're expensive!
 
9:51 PM
@R.MartinhoFernandes Nodes are costly in C++, but not in Garbage collected languages.
 
@JimNorton Hah. I ordered my goodies yesterday:
20 hours ago, by sehe
"Learn You a Haskell for Great Good!: A Beginner's Guide" (Lipovaca, Miran; Paperback; $25.57)
"Linux Kernel Development (3rd Edition)" (Love, Robert; Paperback; $32.25)
"Accelerated C++: Practical Programming by Example" (Koenig, Andrew; Paperback; $32.53)
"JavaScript: The Good Parts" (Douglas Crockford; Paperback; $17.09)
"JavaScript & jQuery: The Missing Manual" (McFarland, David Sawyer; Paperback; $23.27)
"C++ Concurrency in Action: Practical Multithreading" (Williams, Anthony; Paperback; $58.60)
 
Oh. I was saying that those things are costly because you have to pay the $1000 per void* thing.
 
@JerryCoffin :) appreciated
@R.MartinhoFernandes I do my ASTs without pointers. I use recursive variants. Pretty slick
 
@sehe No problem.
 
@sehe ASTs without pointers? You have my undivided attention.
 
9:53 PM
@sehe Oh, me too. I do my ASTs in Haskell. :P
@FredOverflow He hides them in the variants.
 
boost::variant?
 
Does boost::variant internally store a pointer? Never used it.
 
Type Erasure. It is a bit of a cheat, but hey
 
@JimNorton If you haven't read it yet, Andrew Koenig's latest column discusses exactly this.
 
9:54 PM
Oh oh, severe thunderstorm warning for Montreal.
 
@FredOverflow If you use the recursive ones, there's little choice.
 
@JerryCoffin sweet.. will check it out.
 
Well, seeing how you'd have tree of nodes, one type of node should contain a list of subnodes. If any node can have unlimited children, you're bound to have heap allocations (if only by storing a std::vector... )
 
Flat variants can be implemented without pointers.
 
@R.MartinhoFernandes At the cost of exception-safety guarantees though.
 
9:56 PM
Exception-safe assignment is tricky, but the pointers can be avoided if you really must.
 
@JerryCoffin Sounds very interesting. I strongly believe that for (int x : numbers) should be the first "foreach loop" a student should see, because it is the most easiest to understand.
 
Is there a safe way to convert a vector iterator to a pointer?
 
oh well I'm gone
one game of LoL and I'll be sleeping
good night people
 
@EtiennedeMartel &*it
@nightcracker LoL = WoW?
 
9:59 PM
nope, league of legends
not a mmorpg
pretty fun
 
Dammit, too late..
 
I'm going to sleep too.
 
@StackedCrooked Fortunately, being 2 seconds later doesn't lose any up-votes here (and I can't quite imagine anybody starring &*it).
 
And just like that the room goes dead. :)
 
@R.MartinhoFernandes G'night.
 
10:01 PM
@Mysticial :(
 
Is it just me being tired, or do @EtiennedeMartel and @StackedCrooked look very similar avatar-wise if you don't look very closely?
 
@FredOverflow Always have been, IYAM
 
@Mysticial No, with both of us here, it just somehow get's into some abstruse technicality of implementing bignums, or something equally exciting to more normal people.
 
@Mysticial We can always discuss Haskell or SSE intrinsics to keep the Lounge breathing.
 
Music.
 
10:03 PM
Anime.
 
We can discuss discussion topics
 
Wait @Xeo's is out too. :(
 
@FredOverflow Ooh, that's gonna lead to some heavy breathing for sure...
 
> Yes, Barbara and I do plan to revise Accelerated C++. Before we do so, however, we have to get permission from AT&T, who is a joint holder of the copyright. So far the publisher has not been able to find out who in AT&T is empowered to give such permission, as the company has gone through a variety of restructurings since that contract was signed. We hope that this matter will be resolved before too long. If not, we'll write something else from scratch.
^ Interesting, I never thought I'd see the day. Accelerated C++ is what, 12 years old by now?
 
...and looking at the starboard, I see I'm pretty short on imagination.
@FredOverflow Yup -- copyright 2000.
 
10:06 PM
@JerryCoffin What?
 
@FredOverflow Just a few minutes ago, I said I couldn't imagine anybody starring &*it, but looking, it looked like 4 people had -- but now it's disappeared again.
@FredOverflow Assuming they update it, maybe I'll have to finish the "Fast Answers" book I started once -- similar to "The C Answer Book", it would be a book of the answers to the exercises, with explanations of how each answer fit with what was explained in that section of the book. Doing a quick look, I seem to have lost interest around chapter 4 though.
 
Wow this is cool:

std::vector<int> v;
for (auto x: v)
      foo(x)
 
@FredOverflow You're tired. Otherwise we don't really have the same color schemes.
 
@JimNorton Call me old fashioned, but I think I'd prefer std::for_each(begin(v), end(v), foo); (but there's usually a better algorithm than for_each).
 
@JimNorton It gets better, how about for (auto x : {2, 3, 5, 7, 11, 13, 17, 19}) foo(x);? :)
@JerryCoffin s/x/v/
 
10:13 PM
@FredOverflow nice....
@FredOverflow Where did you get that quote?
I'm so excited now to really learn C++!
 
19 mins ago, by Jerry Coffin
@JimNorton If you haven't read it yet, Andrew Koenig's latest column discusses exactly this.
 
I read it, but I doesn't see that part... I'll go back.
Oh in the comments
 
What compiler are you using?
 
fail++
 
You just made that up, didn't you?
 
10:17 PM
@Mysticial That doesn't narrow it down much.
 
man, I just watched a rather violent movie
with Jean Claude Van Damme
 
@TonyTheLion You did that yourself. You sound surprised
 
fail++ main.cpp /-O3
 
@TonyTheLion "violent [...] with Jean Claude Van Damme" is redundant.
 
for negative 3 optimization level
 
10:19 PM
@JerryCoffin the violent or the other bit is redundant?
well, was more violent than expected
 
@TonyTheLion "violent" is redundant -- i.e., all movies with Jean Claude Van Damme are violent.
 
oh lol
on to the next move than
 
@Mysticial That's why it's failing. That should be /O-3 (but that generally doesn't work except on a Thursday when the moon is full).
 
good point
But why a Thursday?
 
So, I've been considering writing a debugger that worked through a compatibility layer written as DLL/.so, so it'd be able to debug code from a variety of compilers. Perhaps also a profiler done the same way (probably using the same compatibility layer). Does this strike anybody as particularly worthwhile?
 
10:26 PM
I will be receiving Accelerated C++ tomorrow! Yay!
 
@JerryCoffin I can already debug through .dlls in Windows.
 
@Mysticial Somebody got confused about optimization vs. day numbering, and Thursday is day number -3 (starting from Sunday).
 
Ell
hi guys
 
@Mysticial The idea here is a single debugger that can debug code from, say, VC++, g++, or Intel.
 
WinDbg. It's not pretty, but it'll do the job
 
10:28 PM
@JerryCoffin ah. Mine are all compiled with VC++. Although I do have VC++ compiled code linking to ICC compiled .dlls I've never tried debugging through those.
 
@JimNorton Where did you order? My books aren't due till August 4th (and experience tells me it will delay)
 
@sehe Wasn't aware of that. Probably renders it pretty pointless to do it again.
 
@JerryCoffin I doubt whether WinDbg enables source level debugging on all compilers, but hey, who wants that :)
 
@sehe Amazon claims they have AC++ in stock, and they usually ship pretty dependably.
 
AC++ sounds like a compiler
 
10:31 PM
@sehe Oh, well without source level debugging, yeah, pretty much any debugger will work on anything.
 
My professor just said an algorithm is "kinky".
 
@Mysticial It is that too, though (if memory serves) it was usually written as aC++.
 
@JerryCoffin Ah. So it is the ocean + size of the order. I had the option of separating/and or express shipping. This would raise the shipping costs to only $202 in worst case :)
@JerryCoffin I never tried, to be honest. You might be surprised
@Drise Uhoh. I sense a midlife crisis
 
@sehe Yeah, that might be just the least bit impractical.
 
@sehe, he's way past midlife.
 
10:33 PM
So... he stayed youthful at heart?
:)
 
@sehe I'm pretty sure it's at least theoretically possible -- as I recall, Windbg does use a dll with a documented interface to access symbols and such. AFAIK, it's only ever been used to connect to symbol servers and such, not support other compilers though.
 
@sehe Possibly. You should see his webpage.
 
expecting link
 
Ell
kinky is awesum
 
Comic Sans and white~yellow bg?
 
10:35 PM
@sehe I'm mobile, one sec
 
@RadekSlupik Nah. Freehand arrows :)
 
The front page of my website is entirely freehand. :)
“Greetings Fellow Web Surfer” is that website from 1991?
 
@sehe "Circles and arrows and a paragraph on the back of each one explaining what each one was to be used as evidence against us."
 
@RadekSlupik What do you think I was referring to ?
 
10:38 PM
@sehe Amazon
 
@JimNorton Oh, you snatched the last copy in front of my nose then (hint: no, everything was in stock. One book gave a warning: only 11 in stock :))
 
Festival is getting boring..
 
@sehe oh i read stars instead of arrows.
 
> Python (similar to Java in that it is cross-platform, and a really fun language) <-- lolwut?!
@RadekSlupik Yeah I corrected that. Freehand stars is just a SO-FUP
 
Haskell (similar to Java in that it is cross-platform)
 
10:40 PM
lulz
 
And C++ is C!
 
@sehe Amazon seems to have 35 AC++ in stock
Are you using amazon.co.uk?
Only 5 left from amazon.co.uk
 
@JimNorton US
 
@JimNorton Wow, what an accelerated delivery :)
 
@FredOverflow hehe. Yep.
I'm going to force myself to read/write code from that book everyday until I'm done with it.. Perhaps at least one hour a day.. Probably more if I get really excited about a particular topic or chapter.
I'm looking forward to C++ not being a scary mystery!
 
10:51 PM
If you can get excited about C++, I'll give you a personally signed milkshake and a thousand dollars.
 
@RadekSlupik I'm already excited actually. I've been putting off learning C++ for over 10 years... while I kept working in C.
Now I have a job where I can benefit from knowing C++... well it's finally time.
 
Fuck…
 
Can I get that in $100's? :-)
 
Scratch that bet. :)
 
Really? Game development in C#?
http://www.amazon.com/Game-Coding-Complete-Fourth-Edition/dp/1133776574/ref=pd_sim_b_18
Wouldn't native C++ be better?
 
10:55 PM
@JimNorton wtf?
 
Yeah that's what I said to myself.
 
That's like commuting in a tank.
 
@Mysticial Sounds cool
You know. Plenty of games written in Java/Flash these days. It doesn't all have to be realtime photorealism
 
I think there's a place in Virginia that lets you drive a tank and shoot at old cars.
Playground for adults
 
That sounds kinky
 
10:58 PM
I knew someone would say that...
 
27 mins ago, by Drise
My professor just said an algorithm is "kinky".
happened-before
 
Kinkhoest.
 
It rules
 

« first day (646 days earlier)      last day (4310 days later) »