« first day (574 days earlier)      last day (4600 days later) » 

00:01
well to each his own... :-) i prefer minimum verbosity (like, I don't like Powershell). but not to the point of obfuscation. readibility most important. just as long as there is a model whereby the code translates easily into normal English.
e.g. i think assembly instruction hlt is silly. why not name it halt?
nevermind
or, for that matter, Unix creat... ;-)
@CheersandhthAlf jmp and jump, also
And cd, it has not to do with compact disks.
00:06
just a note: do is a keyword
@StackedCrooked when cd was introduced, disks were not compact
@CheersandhthAlf Since while? :p
@CheersandhthAlf yep...
well, anyway, order "src, func, other, args" looks weird
even with "with" word there
I like to use With for mixin bases.
@StackedCrooked cd was written long before compact discs existed ;_0
00:11
@CheersandhthAlf with( v )( sort ); Cool.
@CheersandhthAlf I went with the function pointer route, seemed simpler. I never got it to compile though
@CheersandhthAlf Vowels are expensive.
the variadic args may not necessarily work, i didn't test that
00:16
@StackedCrooked At first I thought it was Thick as a brick. Then I clicked on the link.
I've never even heard of Thick as a brick.
But I like them Decemberists.
@StackedCrooked Common saying in English. Or, often, "thick as a plank".
I guess it means unintelligent.
00:20
Your momma's SI prototype for thickness unit.
Thick as a Brick is the fifth studio album by the English progressive rock band Jethro Tull. Released in 1972, the album includes only one song: the 44-minute-long title track. Thick as a Brick was deliberately crafted in the style (and as a "bombastic" and "over the top" parody) of a concept album. The original packaging, designed like a newspaper, claims the album to be a musical adaptation of an epic poem by a (fictional) 8-year-old boy, though the lyrics were actually written by the band's frontman, Ian Anderson. Album information Thick as a Brick was Jethro Tull's first deep progr...
Meh, weak. My skills have faded.
Evening gentle cats
@johnathon There's only one cat in here. And he's not gentle.
00:22
@EtiennedeMartel that all depends on how you look at the situation
@EtiennedeMartel it was more of a play on the whole "programmers are cats" concept, not Cat plus plus
@Pubby That's a violent jab if I ever saw one.
@johnathon Not really. Only Perl programmers are cats.
LMFAO
@EtiennedeMartel Capitalism at its finest ;)
@Pubby It's a parody of this: ycombinator.com
@EtiennedeMartel linux programmers use cat frequently
00:25
room caption should read no naked owning pointers
but pfft
@johnathon I've thought about this, and, can't you use std::ref for that?
Actually, @Cat, can std::reference_wrapper fully replace non owning raw pointers?
Dunno. Maybe.
Hmm. Perhaps we could completely replace raw pointers.
Yes, do that.
Tor is roxxor
00:29
@EtiennedeMartel i wonder how std::ref would behave as a pointer to a parent class when the child needed to invoke the parents member functions
@johnathon What?
@EtiennedeMartel more to the point , do you think the template instansiation could work off of an undefined type, as in forward declared classes
@johnathon reference_wrapper is probably a pointer underneath.
You can derive references from incomplete types, just like pointers. And they work with polymorphism, too.
00:32
> Instances of std::reference_wrapper are objects (can be copied or stored in containers), but have reference semantics: calling a member function on a reference_wrapper invokes the member function of the underlying object.
@CatPlusPlus the issue i have is would it call delete on the object it owns?
^ That can't be right..
@johnathon Of course not. References are non-owning.
@EtiennedeMartel it's borken in Visual C++ 10.0, but reportedly fixed in 11
00:36
@johnathon It doesn't own.
@DeadMG i'll have to read the info on it , but so long as when the std::ref object goes out of scope, it's dtor called, that it does not try to get rid of what it referred to, then i might consider using it in code. I know that references are non owning , but my whole wrappings up in this questions has to do with a very specific corner case of using non owning pointers to parent class objects. @CatPlusPlus ty. thats what i was wondering
@StackedCrooked I think constructors are nice for constructing things.
They say that inlining too much will make your code slower due to executable size. But at the same time there's stuff like link-time optimization that inlines everything. What's the deal here?
@CheersandhthAlf Well, I'm using the constructor of std::vector :p
Hi all. Do variables in C++ have own scope in for loop blocks? ;)
@StackedCrooked the idea is cache locality. too much inline == bad cache locality
00:40
@Innuendo That wink looks suspicious.
Oh, hey, I got another Populist.
@StackedCrooked I'm just glad that found an annoying bug ;)) After javascript using I could assumed that variables in C++ have own scope in for loops ;)
@Innuendo They do.
@StackedCrooked Inlining, like everything else, is a trade-off. Inline more = more redundant copies of the same instructions to be cached, decreasing your cache performance because the cache is effectively smaller. Inline less = too many function calls.
Hi every1
LTO doesn't inline everything.
It expands inlining to work across TU boundaries.
00:48
I'm nopping very hard.
std::vector<float> v( 2 );

for (int i=0; i<2; i++) {
v.push_back(12.5);
}

std::cout << v[0] << v[1] << std::endl;
After the loop you've got 4-element vector, and things you've pushed are v[2] and v[3].
std::vector<float> v(2); v[0] = v[1] = 12.5; std::cout << v[0] << " " << v[1] << "\n";
but why 4 elements? :)
Because you create vector with 2 and insert 2 in the loop.
@Innuendo yes, but it was not always so. and some older compilers must be told to apply the new (standard) rules. in particular, for visual c++ there is the /Zc:forScope option to force conformance.
Xeo
Xeo
1
Q: Is it possible to "copy" an object whose templated class derives from a non-templated base?

inspector-gI've built a small, limited-scope, cross-platform UI library in C++. It uses the following classes to handle UI callbacks: // Base class for templated __Callback class to allow for passing __Callback // objects as parameters, storing in containers, etc. (as Callback*) class Callback { public...

00:50
what about that?
@CatPlusPlus aaah. v(2) create empty vector with 2 zeros? And then I add third and forth element?
@CheersandhthAlf That's been on all the time since VS 7.0, I think, so you'd have to be using a pretty damn old compiler to have non-scoped.
Xeo
Xeo
Anotherone who thinks implementation reserved identifiers look cool..
@Innuendo Well, it creates a vector with 2 elements, so it's not empty.
But yes.
@DeadMG oh, i've not followed the issue. but 7.0 is too far back. maybe 8.0?
Xeo
Xeo
00:51
Oh, hey @Cat, all sober again?
All /Zc options are enabled by default.
All two, IIRC.
@CheersandhthAlf A long time ago.
@CatPlusPlus I understand now. I just need to create std::vector<float> v; without (2) and then push_back will work as I thought
thank you
@Xeo Since at least 3PM.
hello @CatPlusPlus did the catnip wear off?
00:53
'Twas brandy.
hey, wait, i think read something about a cleanup for visual c++10.0? if so, then the correct behavior is very recent.
It was default in 9.0.
wait, correct behavior in VC10? what?
ah
Dunno about older compilers, but those are pre-free so who cares.
Or maybe 8.0 was the first free. Who cares either way.
@stdOrgnlDave look on your yahoo
00:55
aargh
hurry up pirates, I want to watch Fringe
I got a call today. "Hi! This is Susan with Political Research Inc.! We understand that like many Americans during this controversial election season, you may be feeling frustration at the state of affairs. We're giving a 30 second survey and for completing it (you'll get) a 1-week cruise in the Bahamas for 2, courtesy of one of our contributors"
no joke
@CatPlusPlus visual c++ 7.1 was free, but the IDE was not.
@DeadMG do you say that every friday?
@DeadMG First part wasn't all that good.
Felt weird.
@stdOrgnlDave Only on those Fridays where I happen to be staying up wanting to watch Fringe.
@CatPlusPlus The gruesome murder of the week wasn't very gruesome and didn't take the heroes very long.
00:56
@CheersandhthAlf Oh right, 2003 was 7.
plus, magic satellite? not really a Fringe kind of plot
DRJ's death was silly and anticlimactic.
agree
maybe the second part will introduce a better reason why he had to die
"I know, I'll take control of that guy and punch the other guy and whoops he fell on cables and his face melted".
@johnathon someone hacked your account and now he's doing it to me
00:59
@stdOrgnlDave no , thats me
but also, Olivia's use of her powers was kinda uninspiring
I was expecting explosions and lightning
Also DRJ going one-on-one with a crowbar.
oh no he's got your SO account also
yeah
why not just shoot Peter?
quick go warn yourself!
00:59
@stdOrgnlDave no he did not, its me :|
Or perchance put nanites that make you explode on the control knobs.
haha
yeah, that could also have worked
I mean, I can see that the whole point of the magic satellite was to make them come to the control panels, but the next bit didn't seem very well thought out
So that first 25 minutes of the episode aren't just a silly setup for Walter saying "oh gawd he's working from Bell" and then nobody believing him, because obviously his theories are never right.
Also the two going without any backup.
I can get that part
It just felt weird and illogical.
01:01
it was kinda an emergency, maybe there was nobody else who was close enough
Also "oh, weird noises coming from the direction the armed guy went, let's check it out".
WHAT COULD POSSIBLY GO WRONG.
lol
yeah, that should really have been a "Let's call SWAT" moment
Because obviously one FBI agent and an unarmed old man is a perfect team for this kind of job.
also, am I the only one who thinks that the best use of the bridge would have been to simply trade?
you could have made a bajillion dollars selling coffee to the parallel universe and bringing their technology over to the prime one
plus, WTF's up with that strange 19th episode?
19th is always strange.
It's a possible plot thread for 5th season or something.
01:06
what, is it like, a Fringe tradition? :P
Yeah.
LSD episode was 19th.
yeah, I don't mind them leading in to the fifth season, I just wish it would be, well, in the fifth season
Also musical, though it was shifted due to that weird random 1st season episode inserted in the middle of the 2nd.
now I have this random plot thread, which I'mma have to wait like, 12 months or whatever to continue
@CatPlusPlus I think I skipped that episode.
It was Walter being high and telling a story. Pretty fun.
Nothing can beat Broyles on LSD, but still.
01:09
hahaha
I remember that
"It just never ends."
Broyles is pretty good, but it seems to me like they don't bring him in often anymore
Probably budget cuts.
I mean, that "sun blowing up the building" effect had to made by a student working on 1$/hour.
i have a weird vector behaviour ..... can someone please help point out why its happening .... ideone.com/0Lsag
@CatPlusPlus Gotta admit, it was not teh cools.
01:11
i now what is wrong .. but do not know why it is happening and how to correct it
Too much badly indented code.
Also, I have no idea what should happen there.
So, just work on the question and then you can post it straight on Stack Overflow.
@CatPlusPlus yeah i will post on stackflow .. but i thought of asking here ...
I use both tabs and spaces.
We can't answer, not enough details, not clean code.
So it's better to just work on the question.
@Maxpm Well, don't.
01:15
Tabs for major indentation level; spaces for detail alignment.
Why not?
Dammit I'm being invaded by moths.
spaces are clearly superior, but you need to at least be consistent.
@Maxpm Because it gets ugly.
Change tab size and your perfect alignment is suddenly crap.
I mean for general indentation, not "Use f(x\t+\ty);"
Tabs are not worth it. Just use spaces everywhere.
01:16
@CatPlusPlus agree
seen way too much code suddenly useless because it's tabbed out and the tabs are now way too big or smth
@CatPlusPlus My vimrc is setup to highlight any tabs and extraneous spaces. I'm really OCD about it...
Mine too. Well, not highlight, but I generally use visible whitespace.
feel sorry for those suckers seeding/downloading the fake torrents
Also nnoremap <Leader>W :%s/\s\+$//<cr>:let @/=''<CR>
Cuts trailing whitespace from the entire file.
Useful.
if (foo)
{
// One tab.
    bar = {1, 2, 3, 4,
           5, 6, 7, 8};
// One tab, 7 spaces.
}
01:20
And this is what will stop working when you change tabsize.
See for yourself if you don't believe me.
nah
I don't see how changing tab size will break that. The area to the left will get bigger or smaller.
I think that example is actually fine for a variable tab size
although variable tab sizes are the fundamental reason that tabs suck donkeys
Maybe.
Yeah, maybe this one won't break.
Also, mixing tabs and spaces is an error in layout-sensitive languages.
01:24
gotta love ASCII art
__FAKEFAKEFAKE_______FAKE___________FAKE______FAKE__FAKEASFUCK_
__FAKE_______________FAKER__________FAKE_____FAKE___FAKE________
__FAKE_____________FUCKYOU_________FAKE__FAKE______FAKE________
__FAKEFAKE________FAKE___FAG________FAKEFAKE________FUCKYOU___
__FAKE____________FAKE____FAG_______FAKEASFUK_______FAKE________
__FAKE___________FAKEFUCKYOU_______FAKE__FAKE______FAKE________
__FAKE__________FAKE_______FAKE_____FAKE____FAKE____FAKE________
__FAKE_________FAKES________FAKE____FAKE______FAKE__FAKEASFUCK
still waitin' for genuine Fringe torrent
Hammer F5 on EZTV page.
in some recent experience, they've actually been quite some way behind
right now, I'm on EZTV, piratebay (thanks Tor), isohunt, and demonoid
I only trust EZTV/VTV anyway.
I'm not a great fan of isohunt/piratebay torrents
but EZTV is private upload and demonoid is fully private
plus, in my experience, demonoid torrents have sick seeders, way better than public torrents
01:30
nice syntax highlighting/colour scheme
isn't that the paid one?
He's crazy.
Paid editor, tabs.
No other explanation.
agreed
I haven't paid for it.
01:31
pirated?
It's in beta.
The evaluation period is only enforced by an occasional reminder dialogue.
I'll be impressed if they offer decent C++ syntax highlighting
although now that libclang apparently offers pretty good syntax highlighting/autoformatting options, it might not be such a stretch
you know
I've been struggling to find a text API that offers decent rendering for syntax highlighting
for ID3DXFont or DirectWrite, they seem to offer only one colour for the whole lot
There's GtkSourceView.
Which is supposedly what Gedit uses.
And Scribes, which is another editor I want to look into.
01:34
Which is most likely regex based.
It is. :\
ah
DirectWrite does indeed support it
Aw, there's a bug in that code I posted.
I meant to use fibonacci(number - 1) in one of them.
Oops.
so if I went Vista-plus-only, I could use DWrite to render text
Are you writing an editor?
01:38
Also, you know that function sucks, right?
Yeah.
Never write exponentially recursive functions.
@Maxpm Considering it.
At the very least it should be tail-recursive.
nobody is gonna use Wide if it doesn't come in a sexeh editor
01:39
@CatPlusPlus QuickSort is exponentially recursive.
@Maxpm Logarithmically recursive. It's n log n.
My mistake.
Time to disassemble some more Java.
02:01
Hi everybody again :)
Build systems. Annoying.
Annoying.
I'm this close to writing Makefiles by hand.
How to fill double vectors?

std::vector<std::vector<bool> > v;

for (i=0; i<2; i++) {
for (j=0; j<10; j++) {
v[i][j] = (bool)(i>j);
}
}

and.. Segmentation Fault
Use Boost.MultiArray.
you never resized the vectors
you're assigning to non-existent elements in v[i][j].
02:10
typedef boost::multi_array<bool, 2> matrix;
typedef matrix::index index;
matrix v(boost::extents[2][10]);

I'll try this
thanks
jesus pirates, you're slow tonight
yaaargh finally
and demonoid is faster than eztv
02:36
@Maxpm impressive number of bugs, plus the attempt to improve the looks
can someone please take a look at this question ... stackoverflow.com/questions/10560628/…
reduce the problem example to something tiny
Is there some function is STL, that finds the length of the max serie in a vector. For example bool vector: [1 0 1 1 1 0 0 0 0 1 ]. The length of max serie of value=1 : 3
or I should write my own function
02:51
@Innuendo I don't think such a function exists. The closest is search_n, but your n is unknown.
yes ;) I see. it would be nice to search_max ;)
@Innuendo Just finding the maximum length of repeated values?
took unnecessary code out
@Innuendo Ah, that should be really easy to just write your own.
02:55
yes, I know. it's not difficult. But before to write, I've decided to find out if such a function exists already in STL
03:09
@Innuendo factorials are big!
also, hello all
03:28
ideone.com/ggwPm I'm calling the code there "ridiculously obtuse compile-time code generation" or ROCieT for short
pronounced "rocket"
it's the next SFINAE
(that was to demonstrate principles to a friend, not the way I'd ever do that)
I'm novice in C++, could you review this tiny function (finding max serie in vector)?

template<class T>
T max_serie( std::vector<T>& v, T x )
{
  typename std::vector<T>::iterator it;

  /// Current max value
  int max= 1;
  /// Cached max value
  int _max = 1;

  for(it = v.begin()+1; it != v.end(); ++it) {
    max = ( *it == *(it-1) ) && ( *it = x ) ? max+1 : 1;
    if ( max > _max) _max = max;
  }

  return _max;
}

?
Is this required to be true? sizeof(int[10]) == sizeof(std::array<int, 10>).
@GManNickG Yes. std::array is an aggregate and must conform to all kinds of rules.
@DeadMG Yeah, I actually don't know all the requirements an aggregate has to fulfill. :X But the size is important to my current case, so thanks.
one of them basically enforces that
03:35
@Innuendo If you're trying to write a generic function, you can't use int like that. What if my T is totally incompatible with int?
03:45
don't C++11 containers like vector have a ::type member?
@stdOrgnlDave value_type. (And reference, const_reference, pointer, const_pointer, iterator, const_iterator, reverse_iterator, reverse_const_iterator, size_type, difference_type, allocator_type.)
@GManNickG are those new to C++11?
Nope.
oh.
@Innuendo are you trying to return an iterator to the series, or a counter of the longest run?
@GManNickG No.
03:51
@LucDanton :o. You and @DeadMG shall now fight!
@Innuendo I am reviewing thecode but I must know your intention
...why do I even try to help...
hey maybe one of these days someone will come in here asking C++ questions...well, I can dream...
@GManNickG anything interesting coding-wise going on?
@stdOrgnlDave sorry, I was AFK a few minutes. I need only the length of the longest serie
@Innuendo OK what compiler are you using?
g++ under ubuntu
@Innuendo Series, by the way.
03:57
OK, well, there's a number of problems with the function, I can point them out to you to fix yourself or I'm happy to just fix em for you
point them to me please
@stdOrgnlDave Is sizeof(T[N]) == sizeof(std::array<T, N>) required to be true?
@All Hell
@GManNickG that's what you said earlier isnt it?
@stdOrgnlDave Yes, I thought you were asking what my current dilemma was.
03:59
earlier was with exact type ;)
@Innuendo firstly, there's no need for that long typedef. your for loop can be for(auto it = v.begin()+1; it != v.end(); ++it) {
secondly, max needs to be of type T
@Innuendo Fair enough. :)

« first day (574 days earlier)      last day (4600 days later) »