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

10:00 AM
Well, it’s big.
 
where's the effing bacon
 
But you can also call it préparé or steak tartare.
 
@BartekBanachewicz Hit the nail on the head.
 
@BartekBanachewicz It's worse than template<typename T> void F(T);. It still accepts anything, but with more cryptic errors. And you pay the cost of std::function.
 
To be american, it must be super-fattening with bacon, chilli, and possibly with a milkshake too thick to be sucked through a straw
 
10:01 AM
@LucDanton Well, fuck. It was supposed to be a simple example.
 
@Neil nope... diet coke
 
If you try with a recent libstdc++ or libc++, you might notice that it will not accept anything. Those would be conforming extensions. So you might end up writing code that appears to work with those SL implementations, but aren't required to work.
 
@Neil In Europe an "american sandwich" can refer to pretty much anything with meat
 
@kbok I thought it was those with fries in them.
 
I don't know why. I mean, it's not like you invented sandwiches
@LucDanton Not necessarily
 
10:02 AM
@LucDanton So my simple example will be 10x longer than void (*f)(void)... if I code in is_callable, of course
 
@BartekBanachewicz template<typename Functor> void F(Functor); is sort of short.
 
@LucDanton that's wrong - templateFor(Functor) void F(Functor);
 
@kbok You do realize that's a bit like calling anything with sausage "German"?
 
@kbok I may be misremembering. I remember idly browsing Wikipedia on such matters (pitas, doners, etc.), but it may have been about something other than sandwiches.
And now I'm hungry.
 
10:07 AM
@Neil I know. It's not my fault you know. In the same manner, sandwiches with ham and butter are commonly called "Parisian", and, in the general sense, any type of food that is much more expensive that it's worth.
 
Like mushrooms? Hah!
 
Oh, @Luc, just one more - isn't is_callable implemented by Boost by chance?
 
@BartekBanachewicz Not that I know of. But Boost is big.
 
@LucDanton boost.org/doc/libs/1_50_0/libs/function_types/doc/html/… can you take a peek? (If not don't bother, but you'll probably know at once if it's k)
 
@LucDanton those aren't that expensive
 
10:09 AM
@kbok Hence the 'Hah!'!
@BartekBanachewicz Library isn't relevant for our purposes.
 
@LucDanton Oh yeah, I think the canonical american sandwich has fries in it, but you know, people abuse the term.
 
@kbok I kid you. I'm actually well familiar with this because in italy, they do the exact same thing.
 
I think everybody does that :)
 
template<typename F, typename R, typename... Args> struct is_callable<F, R(Args...), Void<decltype(std::declval<F>()(std::declval<Args>()...))>>: std::is_convertible<decltype(std::declval<F>()(std::declval<Args>()...)), R>::type {} is a possible implementation of is_callable I think.
Given a primary template template<typename F, typename Signature, typename Sfinae = void> struct is_callable: std::false_type {};
This is assuming an IsCallable concept that is strictly in terms of call operator syntax though.
 
@LucDanton which will work for std::function and std::bind->, right?
 
10:16 AM
template<typename F, typename R, typename... Args>
	struct is_callable<F, R(Args...),
		Void<decltype(std::declval<F>()(std::declval<Args>()...))>
     > : std::is_convertible<
		decltype(std::declval<F>()(std::declval<Args>()...)),
        R>::type
{
}
^ making it slightly readable
What is Void<>? A noop template just for SFINAE triggerin'
 
okey, now how to use it?
 
@sehe SFINAE.
 
@BartekBanachewicz Yes.
 
template<functor, is_callable<functor>> ?
 
10:17 AM
Aha. You already answered that. Thx
 
@sehe Void<whatever, goes, in, here> is an alias for typename void_</* same */>::type, which is void.
@BartekBanachewicz The simplest usage is in tandem with static_assert. It works like any other trait in that respect.
 
@thecoshman I have to admit that in the debugger, it's less of my own experience and more what I've heard from reliable sources (e.g. sbi) I should give a brief overview and then gtfo.
 
The suggested implementation happily reports that is_callable<F, int>::value is false instead of reporting that it should accept a signature as second parameter by the way. Left as an exercise.
 
@TonyTheLion I removed one instance of "semantics" where it wasn't intended, and I altered my UDTs page to say that semantics are behaviours, which is accurate enough for now.
 
@LucDanton well, it's correct: int is not, in fact, callable
 
10:19 AM
What do you think would be a "good enough" rule of thumb for a maximum file size/line count for a source file ?
For instance, I think 15k LOC is too much.
 
@kbok That generally depends on what class the source file corresponds to, and what function that class has.
exceptional classes might have fairly large source files, but the general case shouldn't be more than a few kLOC at most.
 
@LucDanton t should accept a signature as second parameter by the way ... Whaat?
 
@DeadMG I know. That's why I generally hate rules of thumb.
 
assuming that you practice 1 source file to 1 class implementation, which a lot of people do
 
@sehe is_callable<F, int(double, double)> queries "Is F callable with parameters (double, double) with a return type convertible to int?"
 
10:21 AM
@kbok Rune of thumb? PILE OF POO.
2
 
But sometimes you just have to, you know.
 
@kbok Well, ultimately, what you're talking about is "Does this code violate SRP?"
 
I have a file with 17k+ lines.
 
@R.MartinhoFernandes Gosh, it's typo day
 
When your editor gets slow or refuses to load the file.
When your source control encounters hash collisions with much smaller files.
When the file can no longer be backed up on a FAT32 USB stick because of filesize limitations.
When your compiler has trouble mapping the source into locked memory pages because the size exceeds addressable memory.
 
10:22 AM
@DeadMG What's SRP ?
 
@kbok Single Responsibility Principle.
 
@DeadMG Hum, does this really apply to files ? We tend to classify them by, like, "topics".
 
@R.MartinhoFernandes vertical ones, diagonal ones and horizontal ones. The exact amount depends a little on the font used to render it's contents
 
@kbok It applies to everything to do with a program.
 
Also our code already violate SRP in a numerous amount of places
 
10:24 AM
usually I have one file to implement one class, so it's fairly simple- the file grows as the class grows and if it grows too much, I look at breaking up the class
 
Good. That is one thing less to worry about.
Another SUNny day at the oracle
 
@sehe :)
 
it's fucking hot here
 
Those two tend to amplify
Ironically, escalation can often be stopped by **putting on more clothes**, contrary to intuition
 
@DeadMG I'd be careful with trying to bullshit your way through it
 
10:26 AM
@DeadMG I think the problem with you advice is that you assume that the code is in an acceptable state
 
@DeadMG ok cool
 
@thecoshman Hmm. It's not so much that I don't think it's true- or even defendable
 
Which it is not, since it's 100k+ lines of shit
 
but you're right in that I can hardly quote sbi on it :P
@kbok Then I'd worry about that first and worry about the file sizes second.
 
_worklist = new (_arena) Block_List();
What is happening here?
 
10:27 AM
@thecoshman Oh, while we're reviewing:
 
@LucDanton um, it doesn't compile for me
 
2 days ago, by sehe
> Exercise: Some text sequences cause the compiler to fail. What are they? -- hello puppy
/cc @DeadMG ^
 
Ah actually it's 330K
 
@ManofOneWay Placement new?
 
@DeadMG Yeah, so I though it would be nice so split the files a bit to make cleaning easier
 
10:28 AM
@R.MartinhoFernandes superfluous question mark. You can assume it's C++
 
@kbok If the file structure reflects the code's logic, then you should be able to achieve cleaning the file structure by cleaning the code's logic (and then updating the file structure)
 
@R.MartinhoFernandes What's that?
 
@sehe But I can't assume that Block_List() (or any of the other "identifiers") isn't some evil macro that does lots of things :P
 
and if it doesn't, then that's no problem because you're going to have to change the code's logic to clean it up anyway :P
 
@ManofOneWay Put simply, it's a direct constructor call.
 
10:30 AM
@DeadMG Yeah, that makes sense
 
@R.MartinhoFernandes regardless of that, it will still be placement new. Either that, or invalid C++
 
@R.MartinhoFernandes "Placement new allows you to construct an object on memory that's already allocated. "
 
@DeadMG it's not really a question of thinking what you are saying is true
 
@R.MartinhoFernandes Would you say that's accurate?
 
@thecoshman It's a question of demonstrating it
 
10:30 AM
@ManofOneWay Yes.
 
working against tiny deadlines – love it
 
@ManofOneWay Not exactly.
 
@KonradRudolph You're chatting.
 
@ManofOneWay It is effectively the pendant of calling a p->~Destructor() manually
 
if _arena is an object, it could call an arbitrary placement new function, andthat might do whatever the feck it wants to
 
10:31 AM
@BartekBanachewicz Demo.
3
 
placement new constructs an object on memory that's already allocated- if _arena is a pointer to said memory.
 
@LucDanton LWS should allow tagging/descriptions. And we should keep tiny urls to them :)
 
@LucDanton Could you please strip it just to test for <void(void)> I'm using VS2012 right now and variadic templates are no-no -.-
 
I'd like sensible indenting first.
@BartekBanachewicz Sorry, I can only deal with C++11.
 
@LucDanton k
 
10:34 AM
Remove the ellipses I guess?
 
@BartekBanachewicz Just strip out all the ...s and it should do fine.
 
0
Q: jQuery DIV Flip

NimbuzThis is the HTML <article class="post"> <div class="post-inner"> <div class="post-content"> // stuff here <button class="order">Order</button> </div> <div class="post-content-back"> // st...

 
oh, and the using will have to be replaced.
 
"I downloaded this library and it doesn't work like it should. Help me?"
 
@LucDanton what witch craft is this!
 
10:36 AM
@LucDanton Hehe.
 
@thecoshman What of it?
 
@LucDanton your TMP confusles me :(
 
It's just some simple SFINAE.
 
@R.MartinhoFernandes oh of course, just some simple SFINAE, how silly of me
@DeadMG YES IT IS!
 
10:39 AM
@DeadMG It's like your braindead
 
@Neil GEE GEE
 
@thecoshman I'm serious. There's not much going on there.
 
I do find it annoying with this kind of SFINAE that it requires a defaulted template parameter for implementation purposes, so usually that is hidden.
 
you know
 
I suspect that grepping for typename Sfinae = enabled or typename Sfinae = void on my code does return a fair number of matches.
 
10:41 AM
that woman from the government didn't even ask what I'd been doing to look for jobs :P
 
`error C2893: Failed to specialize function template 'add_rvalue_reference<_Ty>::type std::declval(int) throw()'`
On the line
`struct is_callable<Functor, R(A), void_<decltype(std::declval<Functor>()(std::declval<A>()))>::type>`
 
Wut.
You may need the good ole trait style for VS.
 
Moar typename.
 
Oh, right.
 
For fuck's sake.
 
10:43 AM
I'm not sure why I use typename Sfinae = enabled. typename Sfinae = std::true_type goes straight to the point, doesn't it?
 
It's meaningless anyway.
 
I guess I wanted to make implementation details look better in declarations, but I don't care anymore about that.
 
@R.MartinhoFernandes what do you mean by good ole trait style?
 
@BartekBanachewicz The thing with char and char[2].
 
<headdesk>
 
10:47 AM
damn
 
" #ifdef MY_COMPILER_SUPPORTS_REASONABLE_CPP11
static_assert(is_callable<TFunctor, void(void)>::value, "TFunctor must be a callable object");
#endif" I should add KTHXBAI
 
I was having a good day, and then my father had to remind me how disappointed he was in me
 
@DeadMG And so a good day turned into a fantastic day.
 
and my mother, just in case I'd forgotten
 
10:49 AM
You're already living with your folks again?
 
no, moving back on Sunday
but they can message me on Google Talk any time
 
How nice of them, texting you for that.
How is the job search going btw ?
 
"Hey kid, remember how much you suck? Well, now you do :P"
 
if it was going well, there wouldn't be a problem
 
"Hello, I'm a person." is a terrible introduction. I wonder why I thought otherwise.
 
10:57 AM
@R.MartinhoFernandes ORly? Thought you was robot.
 
Robots are people too :P
 
for f in `ls`; do echo $f `cat $f | grep "#define" | wc -l`; done | tee inc_sc.txt
^ Why is it so slow ?
 
@kbok bash
 
Look! Useless use of cat!
 
Is it me or bash who sucks ? Or a combination of the two ?
 
11:00 AM
I'm going to say you
 
Oh yeah, the catless version is a bit faster
 
bash definitely sucks, but that doesn't preclude you from sucking
 
Cats are bad.
 
It's still exceptionnaly slow
 
11:01 AM
I think the wc is also useless. IIRC grep has an option to display just the count instead of the results.
 
@thecoshman How do they know that isn't, say, the earth's core?
 
@Neil because they are not idiots
 
@Neil Because it matches the photos taken during the day.
 
@R.MartinhoFernandes Oh yeah it's way faster now
The remainder of the performance issues relate to bash suckage.
 
11:05 AM
Ah, apparently I'm a nincompoop for ever doubting the word of god, my apologies
 
@Neil I never said anything about that picture.
 
The picture is pixelated, as if it is taken in low light.
 
@Neil Isn't that largely transparent to neutrinos and not as huge a source of neutrinos as the Sun?
 
@LucDanton The Earth's core is just a spinning lump of high-temperature rock.
in comparison to the vastly more massive ball of nuclear fusion?
 
11:10 AM
Just like Sol is just a spinning lump of high-temperature plasma.
 
@R.MartinhoFernandes The earth's core doesn't produce neutrinos through fusion, and is a hell of a lot smaller.
 
High-temperature plasma sounds redundant.
 
you're redundant
 
so's yo momma
 
@DeadMG she knows
 
11:11 AM
Yo momma is definitely not redundant. She's so big you can't get rid of her.
 
fat redundancy
 
when I sit around the house I really sit around the house.
 
@TonyTheLion She's big enough to have different kinds of fat, like planets have different climates.
 
Sounds tiring. Why not lay down?
 
@R.MartinhoFernandes haha
@DeadMG meaning exactly?
 
11:13 AM
Yo momma is the last stretch goal of Planetary Annihilation.
 
is there something else I'm supposed to read in that statement, that I'm not seeing
@R.MartinhoFernandes EPIC!
 
@DeadMG wait, why are you telling us that your father reminded you that he's also disappointed in your mom?
 
@TonyTheLion It means that, instead of sitting around the house as in, sitting around doing nothing in the house, I sit around the house as in, I sit down and I'm so fat, it goes all around the house.
@sehe No. He also reminded me that my mother was disappointed in me.
 
That moment you realize that the code you've just found a bug in, could never have possibly worked, yet it somehow did.
@DeadMG oh.
@DeadMG dissapointments can happen. But as far as I know, people get over them at some point in time. You can't be disappointed in someone forever.
 
@R.MartinhoFernandes Nah. Making your momma would be impossible, since her mass is greater than that of the earth.
 
11:16 AM
make yomamma.mk
 
@DeadMG It's not like they'll reach that goal anyway :S
 
Error: could not make yomomma.mk, too large
 
@kbok grep '^#define' * | wc -l or grep -c '^#define' *come to mind
 
@R.MartinhoFernandes Eh, I dunno. Apparently, Kickstarter projects always get a large upsurge towards the end.
 
A recruiter looking for certain special skills.
 
11:17 AM
lol
WTF skillz?
 
nice
I personally hope they make it to GW.
 
@DeadMG Yeah, that'd be really cool.
 
Galactic War.
 
@R.MartinhoFernandes Try nearing a black hole. It'll work
 
11:19 AM
you want war?
what's wrong with you?
 
@sehe The two black holes with probably just coalesce then.
 
@TonyTheLion make -f yomamma.mk, FTFY
 
@TonyTheLion It's a game.
 
oh lol
 
11:20 AM
@R.MartinhoFernandes And you have to carry them with you
 
aargh
those miserable fat belgian bastards
 
@sehe mitbringen is carry?
 
The Belgians aren't very agreeable with each other :P
 
11:22 AM
and
vot ze fuck browser is that he is using?
looks like IE -9
 
"bring along" - but it has a slightly more 'concrete' sense to it than in English
IOW: the recruiter is trying to be a bit informal there
 
@DeadMG shitty IE! Noob detected
how I feel right now ^
 
@TonyTheLion You are confusing emotion with observation :p
 
what?
 
@DeadMG You know, after GW, I'm really curious about what the heck the last stretch goal can possibly be. It has to be even awesomer than that.
 
11:24 AM
I'm not confusing anything, stfu :P
 
@TonyTheLion Seeing bugs is an observation, no an emotion. However, I just realized that you were referring to the facial expression. Silly me :)
 
oh lol
 
Quiz: Why initialize your arena with this size:
Arena::Arena( size_t init_size ) {
init_size = (init_size+3) & ~3;
...
}
 
@TonyTheLion you mean, you're smiling and seeing how beautiful the Gamma Quadrant of Sector 4 is from this vantage point?
@ManofOneWay padding & alignment
 
Why 3?
 
11:32 AM
@ManofOneWay It's the max remainder mod 4, i.e. the lowest two bits. This is rounding to the next multiple of 4
 
screw you, kerberos
 
@ManofOneWay Run-of-the-mill bit twiddling. Of course, it could have been (init_size + 3) / 4
 
@ManofOneWay shouldn't it be ~3u?
 
@jalf You know he has 3 heads to royally screw you up with :)
 
1
A: Function calls with constants optimization in C/C++

ronalchnNot in C++. They will not be executed at compile time just like that - unless the compiler magically does it. However, this cannot be forced. However, with C++11, you can use constexpr to ensure it is evaluated at compile time, eg: constexpr int get_five() {return 5;} Thus, you can rewrite yo...

can you do that?
 
11:34 AM
@BartekBanachewicz No difference
@LuchianGrigore What? Link to an answer: yes
 
@sehe the second snippet?
 
Call constexpr functions with runtime values?
Of course.
It's the same as x / 4 * 4
> So i have implement the encryption inside the uploading of the codes.
 
@sehe Thanks
 
@R.MartinhoFernandes Brillant!
 
I am mainly a Java coder. Also know some PHP. <-- talk about bad choices...
 
11:45 AM
A compile-time FFT in C++11 http://paulkeir.wordpress.com/2012/09/02/a-compile-time-fft-in-c11/ #cpp #cplusplus
Ew. Not sure whether KEWL or ARRG ^ (/cc @Mysticial)
Useless use of compiletime evaluation?
 
Still, cool that it can be done.
 
it's cold
 
@DeadMG You said it was fucking hot a couple of hours ago!
 
and now it's cold
 
11:54 AM
@sehe if it's turing complete, anything can be done
 
@R.MartinhoFernandes link to the message?
 
@R.MartinhoFernandes he's got out of bed
 
mostly, before when I was outside, it was fucking hot because of that "sun" thin
but my room is relatively well insulated and now it's kinda cold
 
@BartekBanachewicz Except Gödelian stuff and equivalent problems.
 
11:55 AM
@thecoshman That reminds me
domagoj y u disappear :(
 
Can you cut words as well as italicise them. Let's check ---it out---
^it worked for a microsecond
 
check it out
 
I ---see---
 
@DeadMG he's back?
 
@thecoshman No. That being the problem.
 
11:57 AM
@DeadMG indeed
 
@R.MartinhoFernandes WHY IT NO WORK WHEN I DO IT?
 
Because I'm awesome.
 
@ApprenticeHacker Because Markdown hates you
hm
 
Do you send cover letters as attachments, or as the body of the e-mail?
@DeadMG Haha.
 
@R.MartinhoFernandes proberly as the body of the email it self
 
11:58 AM
@DeadMG Way to look like an ass :P
 
@R.MartinhoFernandes Obviously not as simple as I had originally belived.
 
@DeadMG lol
Damn it robot! HOW???
 
check it out
 
teehee
 
11:59 AM
@R.MartinhoFernandes ingenious.
check it out
 
@R.MartinhoFernandes that can't even been done in Haskell
 

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