« first day (304 days earlier)      last day (4658 days later) » 

9:07 PM
So sad...
#define TRUE FALSE //Happy debugging suckers
 
Blah, I use true.
> Flagging basterds! – Won't ಠ_ಠ♦ 26 secs ago
 
9:27 PM
Why is it template<typename> friend class Friend; instead of template<typename X> friend class Friend<X>;?
 
Hmm, don't they both work?
 
The second one doesn't compile.
 
Hmmm, compiler?
Lemme double-check, but I think I compiled something like that recently.
 
latest g++
template<typename T>
class Friend
{
    template<typename X> friend class Friend<X>;
}
error: specialization of 'template<class T> class Friend' must appear at namespace scope
 
perhaps a syntactic or ambiguity reason?
 
9:33 PM
How can template<typename X> friend ... mean anything else than a friend declaration?
 
template <typename T> class Foo {}
template<typename T>
class Friend
{
    template<typename X> friend class Foo<X>;
}
Does this work?
 
Oh wait, I think I get it... the correct line is actually granting friend access to the template itself (as opposed to its instantiations). Does that make sense?
Although in that case friend template<typename> class Friend; would make a lot more sense.
 
> A friend template can declare only primary templates (...).
That's what C++ Templates says.
And the syntax template<typename X> friend class Foo<X>; is the syntax of a specialization.
 
Anyway, I could get away without the friendship and just use memcpy... :)
 
A primary template declaration never uses the angle-brackets.
Makes sense.
 
9:36 PM
I should consult the template book more often...
 
I'm glad I bought it.
 
10:08 PM
Hi all
 
hi
 
Hey guys
I just hacked together a little under-desk light to light up my keyboard in the dark and stuff out of a scanner and a few other bits and pieces :D
 
my two screens put out so much light that turning my room light on doesn't increase the brightness around my keyboard
 
@DeadMG So turn down their brightness already!
 
why?
more convenient not to have to have the room light on
 
10:22 PM
Because you normally want them around 100 cd/m2
 
Your eyes are gonna die
 
yeah, but a pair of 24" screens have plenty of m2
 
Hello C++ people
I need to ask a favour
 
bloody hell
the tech specs put it at 300cd/m2
 
I'm giving a talk tomorrow and I'm struggling to come up with a good, convincing (and simple) example of why you should keep template concept requirements to a minimum
 
10:25 PM
simple
the less requirements you have, the more code you can accept
the point of a template is to be generic
the more code you can accept, the more generic you are
therefore, the less requirements a template has, the more it serves it's purpose
 
Yeah, I have something like that already, but it's too hand-wavy
I'm looking for something more concrete, less abstract
Like "X simply would work if not for this"
 
a template is an abstract thing
 
*wouldn't
 
Is your screen 46cm by 32.5cm?
 
Yes, but you can easily give concrete examples of why templates are useful
 
10:27 PM
ok
look at the decreased container requirements in C++0x
because they made it so you only need movability & swappability instead of copyability, now you can have unique_ptr
instead of the massive cockup that was auto_ptr
 
True, that's the kind of thing I'm looking for
 
@DeadMG That's the maximum -- but you really want something like 100 for best viewing (and if you usually leave the room dim, it's probably better to drop them to around 90).
 
Know of anything in C++03 that's similar? Many people may not know C++0x
 
dim? the screens are the only light source
and I can clearly read a book, whose back is to the screens, with the light given off
actually, that may not be true, I only tried with a thin letter
@Peter: Not terrifically familiar with any libraries whose concept requirements have changed extensively, except the Standard lib
 
@DeadMG Okay -- of course, part of that depends on how big of a room it is, and how reflective the walls are. Still sounds way too bright.
 
10:31 PM
the room is very thin and the screens are across the narrow part
after all, minimising the required concepts is usually done before general release
it's rare to be able to eliminate whole concept requirements later
oh
stateful allocators would be another excellent example- from C++0x, again
previously allocators could only be static, but now they can be object-orientated, which allows for much finer-grained tracking and less shitty singletons to allocate memory
 
I don't really mean minimising concepts as in changing it for a new library
 
there are easy examples of thread-local memory arenas which can only be implemented with stateful allocators
 
I just mean, things like containers only having certain requirements, even in C++03, though a naive implementation might require more than is necessary
 
the problem is that you never see the naive implementation
so it's difficult to reason about what it might or might not entail requiring
 
@PeterAlexander I suppose the classic example would be modifying a merge sort to support linked lists by changing it to only require forward iterators (e.g., get rid of any indexing, and just use ++ to move through things).
 
10:34 PM
True, but if I could give an example of what someone might do, and why that would be worse (in some meaningful way) then that would be helpful
@JerryCoffin yeah, that's a good example
 
@PeterAlexander The obvious alternative would be something that used indexing into the collection instead of just advancing through using ++.
 
you could look at iterators like ostream_iterator- if copy wasn't so flexible, you wouldn't be able to copy things to streams
accepting an iterator instead of a pointer like memcpy means that it can be much more flexible
@Jerry: Ever since you mentioned the brightness, I keep thinking about how bright it is and how I could use it being dimmer
 
@DeadMG The ostream_iterator is a good example, but it's not something we use... ever, so I feel that talking about it would just come across as esoterical
 
if the people you're presenting to don't get ostream_iterator, then give up
 
I'm not sure we even use merge_sort anywhere, but at least it's something a bit more relatable
@DeadMG: It's not a matter of whether or not they 'get' it, it's just not used, so they're less likely to care
 
10:39 PM
@DeadMG Oh geeze, now I'm in trouble -- I'm going to be responsible if you go blind trying to read by the light of a monitor you've turned off. :-)
 
lol
I will not attempt to read by it
at least, unless it's an E-book
@PeterAlexander That's their own dumb fault
 
really
 
@PeterAlexander Feel free to substitute a quick sort if you want (just need bidirectional instead of forward iterators).
 
there's a point at which you say, well, if you can't get it that it's an abstraction benefit when we're fundamentally dealing with something that's abstract, and you can't get a simple example unless you already had it drilled into your brain a hundred times, then you'll need more than my presentation to get it
 
10:41 PM
If you want, Quicksort also gives you an opportunity to demonstrate a specialization to support forward iterators (or actually, I guess the general one does forward iterators, and the specialization is for bidirectional).
 
Wait, isn't quick sort random access iterators only?
 
@PeterAlexander No -- though the usual (median) method of picking the pivot does.
 
@DeadMG Did you watch Torchwood? :D
 
@KianMayne I did indeed watch Torchwood
 
What's this Torchwood thing you guys keep talking about?
 
10:51 PM
it's a UK television show
it's kind of like Doctor Who, but it's not for children
the new series isn't so good though
the music sucks balls
 
Is it on a more serious tone than Doctor Who?
 
the title theme to the previous Torchwood is very epic, and the new Torchwood theme is soft
oh yes
"not for children" means that there are sex monsters and stuff
and plenty of murder, and disfigurement, shown on camera
 
Yeah
Like - they're burning people ALIVE
D: :O
 
Maybe I should find the pilot laying around the internets and watch it.
 
I so totally saw that coming
@RMartinhoFernandes The primary character can't die, because of a plot point in Doctor Who
so they keep killing him in various inventive ways
 
10:56 PM
Like when they blew and chopped him up and stuffed him in a cement block
 
indeed
 
Ok, is there a plot around this?
 
yeah
 
it's a Doctor Who spin-off plot-wise, so the basic summary is kind of similar
there's a rift in spacetime in Cardiff and the Torchwood team are basically cleaning up the aliens and stuff that fall through
 
10:57 PM
One of the doctor's assistants looked into the heart of the TARDIS
and then became this weird time god thing for like 2 minutes
 
but you can rest assured that the Doctor himself never makes an appearance
 
and destroyed some daleks and brought Captain Jack back to life
 
so they have to deal with a variety of aliens and alien technology that falls through the rift
also, I actually find the show funny, which is very rare for me
most of the episodes aren't linked that strongly together
 
I hate the watchseries.eu site
Because i end up watching like hours and hours of crap and going to sleep at some ridiculous time
 
lol
it's like TVTropes then
 
11:00 PM
:L I refuse to go on that site
 
lol
 
TVTropes is similar but worse, and without the risk of learning stuff.
 
@RMartinhoFernandes :L Risk
D: Biscuit has disintegrated in my tea :'(
 
Any survivors?
 
ownt
 
11:05 PM
You made a typo there. It's written with a p.
To typeset the draft document:

#. run ``pdflatex std`` until there are no more changed labels or changed tables
#. run ``makeindex generalindex``
#. run ``makeindex libraryindex``
#. run ``makeindex grammarindex``
#. run ``makeindex impldefindex``
#. run ``pdflatex std`` twice more.
This is the single most annoying thing about LaTeX.
To get a PDF out of it, you just keep running the "compiler" until it does everything it should.
 
latex sucks
 
I disagree, but I don't want to go there.
 
lol
 
> I think that any program that claims to be able to automatically discover the proper build sequence for a (La)TeX document must also be able to solve the halting problem. – ESultanik Sep 3 '10 at 2:04
 
lol
 
11:25 PM
for template methods
if I call another template method in their body, that second method must have it's definition known at the time of definition of the first, right?
or just call of the first
 

« first day (304 days earlier)      last day (4658 days later) »