« first day (821 days earlier)      last day (4352 days later) » 

14:00
@Xeo I know the right size for the small buffer better than std::string.
(IIRC MSVC uses 16 bytes, right? I want 4 elements instead).
@thecoshman Hmmmm
@BartekBanachewicz Sorry, was busy and missed it. Lemme check.
@BartekBanachewicz Yes, that is it.
@NolwennLeGuen ... not stalking... just wondered if this was the same account... then noticed the other so site... wondered what it was... then noticed your cryptic answer... read the question...
yeah yeah
i'm calling the police
if it helps, I didn't wank...this time
14:03
Hmm, the LLVM one may have the characteristics I want.
@R.MartinhoFernandes I should now say famous "lolololo ask/look on SO"
though why is it not using the other 'all the things' image
because grumpy cat meme
obviously with the cat over the top like this ¬_¬
14:04
that's the whole joke
I don't know any other image for ALL THE THINGS macro
I wonder how much of LLVM that would require me to bring.
@R.MartinhoFernandes btw, do you think my question on SO is just a limitation in the current spec or is there something inherently wrong in what I was trying to do?
I love LLVM. Since this container is highly specialized, it is rarely used.
@BartekBanachewicz I hadn't seriously looked for this yet, other than mentioning it here.
All the things was originally a pair of images, the enthusiastic and the tired drawn out (and very much nigelcted) counterpart
14:06
jk anyway.
It is not something I need right now, it's just an optimization.
@R.MartinhoFernandes it's never to early to prematurely optimise
#include "llvm/Support/AlignOf.h"
00018 #include "llvm/Support/Compiler.h"
00019 #include "llvm/Support/type_traits.h"
@thecoshman It's not premature optimization. It's more a question of not designing for slow.
14:08
fucking thing sucks.
(This is something to be put on an iterator; iterators are often passed by value; 99% of the time there are only one or two elements to store; do the math)
@BartekBanachewicz Plus the dependencies of those three.
@R.MartinhoFernandes AlignOf depends only on Compiler.h
Compiler.h is standalone, type_traits depend on a few type-ish thingies
hmmm... if I wanted to take a string the would represent a folder path and then convert it to use the appropriate slash for the platform I am running on... what should I have to designate the the folder separators in string. I figure, either % or have something like backslash is default, unless some meta data (which I already have gonig on) is used to say use forward slash instead
@kfmfe04 The latter. You want a new type; using will never give you that.
@thecoshman Use /. That is the appropriate slash for the platform you are running on.
@R.MartinhoFernandes ic - ty - I guess by subclassing, I will need to copy-paste some constructors to propagate back up... ...hmm... ...maybe I should use variadic argument passing
14:12
@R.MartinhoFernandes not always though
@kfmfe04 you don't mean va_*, do you?
@kfmfe04 Well, inherited ctors are supposed to help, but you need a compiler that supports them...
@thecoshman What do you mean, "not always"?
@R.MartinhoFernandes need to be able to take this string and use it on windows and linux computers
@BartekBanachewicz no - I meant the new variadic-template kind
thus, the problem, which slash do I use
14:13
@thecoshman Right. /.
@thecoshman /
googling on g++ and inherited ctors
T_T
@thecoshman Only broken programs/APIs don't work with / on Windows.
@R.MartinhoFernandes ah, so it seems
Unless you are parsing the paths from user input (in which case you need to handle both mixed in), it's fine.
well... it's from a config file, but it is sufficient to have it not work if they give the wrong type of slash, and I can easily document user guide to say 'forward slash or GTFO'
14:18
(I love this meme, don't ask me why)
I.e., if you are taking paths as user input, C:/Windows\system32 is a valid path for that famous system folder.
c++ : y u make me copy-paste T_T
yeah, but this is for a ... dare I say it... the mockery would be senseless... build system...
Also... Boost.Filesystem.
yeah... AFAIK Boost has not been ported to perl yet XD
14:20
Are you saying perl has nothing to handle this?
Should I introduce you to CPAN?
it has a class that can build a file path my $dir = dir('foo', 'bar');
but if I was to let a config setting use either, I would have to some how work out if 'foo/bar' was a folder called foo with a sub folder bar, or just one folder called 'foo/bar'
it's not as bad as I thought (with variadic templates for ctors), but it sure is UGLY compared to using
maybe I should use a (god forbid) MACRO
@BartekBanachewicz it’s a derp?
@kfmfe04 Are you sure your solution is fine?
still, as forward slash works on windows, I will just go with that
14:24
I know of a few pitfalls of this naive approach.
@R.MartinhoFernandes not sure yet - have to change a lot of code before I can compile
@KonradRudolph it's something !
if that later turns out to actually be a problem, I can easily convert to and fro
@R.MartinhoFernandes - nope - tyvm for the read - checking it out now
14:26
The issue with copy constructors is very insidious.
@R.MartinhoFernandes you'r blog is pleasingly clean
ouch - SFINAE
@R.MartinhoFernandes ooh, it actually reads very in lynx
OH GOD. SOAD is playing in Poland. *.* mom please
are they now...
user142019
14:29
@R.MartinhoFernandes I think you have a very small mistake in More type traits under the Identity alias section.
where when how much?
user142019
void f(alias<int[10]>& a);
// instead of void f(int(&a)[10]>);
user142019
The > in that comment is unmatched.
@thecoshman Lodz (Łódź) 13.08.13
175-275 PLN (43 - 67 Euro)
user142019
Wait. I could just fork and pull-request. :P
14:31
@Zoidberg Oh, thanks.
@Zoidberg Well, sure...
@Zoidberg I like my make_array<int,10> more.
@BartekBanachewicz is this a concert of festival?
@thecoshman a concert, at least it seems so
@BartekBanachewicz so tempted...
14:33
@BartekBanachewicz Unless you are misunderstanding what alias<int[10]> is, it's not terribly useful.
@R.MartinhoFernandes it's there because you can't write int[10]&, right?
> This is truly mostly useless. I only know two use cases for it, and they’re both shady.
@BartekBanachewicz Yeah.
@R.MartinhoFernandes make_array is especially for that kind of uses
@BartekBanachewicz yeah... I want go so bad
@BartekBanachewicz It's poorly named, then. make_X is usually used for factory functions.
I would expect make_array to be a function that returns an array.
14:37
@R.MartinhoFernandes hmm.
alias_array looks cryptic
maybe array_alias
@BartekBanachewicz See the slew of make_array functions here: stackoverflow.com/q/6114067/46642
@R.MartinhoFernandes Okay, I agree it's poorly named.
user142019
uv_listen y u no documented.
Dammit. I feel dizzy, and I don't know if it's too much or too little caffeine
Don't return references to local temporaries. Instead of "enforcing RVO", what that does is invokes undefined behaviour. Rvalue references are not any different in this regard: they are still references to local variables/temporaries. Return rvalue references is silly 99.9% of the time. — R. Martinho Fernandes 1 min ago
14:47
@sehe "I'm on a boat" would have been funnier.
It's funny that the picture doesn't load on my end. Anyways, Nick Craver twote that
user142019
Hurray my libuv wrapper workz.
@sehe 'twote'?
user142019
Past tense of "to tweet".
user142019
Also, snow in The Dutchlands.
Oh wait. Turns out I had already implemented this SBO vector last year... bitbucket.org/martinhofernandes/ogonek/src/bb0a94730c04/include/…. @thecosh all I need is tests, and possibly (hopefully not) bug fixes ;)
Don't tell me anything bout snow. Since I work pretty much on the airport far from city, it's a few degrees colder there. Last time I was greeted by 40cm of that fuck for entire 500m walk from a bus. And I was wearing normal shoes and stuff.
@R.MartinhoFernandes :P break ALL the things
twote - LOL
14:54
@R.MartinhoFernandes I'll try to have a look at some stage at breaking it for you
I think I found a bug already... small_vector() : is_small(false) { make_small(); }. Should be pretty obvious.
user142019
lol
@R.MartinhoFernandes if you read through the code maybe
@thecoshman Well, it sets the "small" flag to false, and yet constructs small storage. I think you need not look further.
@R.MartinhoFernandes So what's the 0.01%?
14:58
@NolwennLeGuen Stuff like std::move and std::forward.
@DeadMG I accidentally read your blog, and while I do agree that exceptions should be used for non-exceptional behavior, you should consider that Int32.TryParse is there for performance reasons. If you intend to call a function an important number of times and you expect it to fail most of the time, the error code version will be much faster.
user142019
I know it's better to make a template function if your function takes another function as its argument, as opposed to a std::function parameter, but what if I'm going to store the function in a member variable anyway?
@NolwennLeGuen lol, accidentally.
@Zoidberg The issues with the interface do not change.
Do you understand the reasoning for why that is better?
user142019
I thought it was better because you don't have the overhead of std::function anymore.
user142019
Or was it because of the conversion?
15:05
@Zoidberg No, that is far from the point.
The problem is that with template functions, it's implicit conversions or type deduction; never both.
template <typename T>
void f(std::function<T()> f); // fail

void g(std::function<int()> f); // fine
user142019
Hmm. I just have template<class F>:
user142019
template<class F>
void listen(int backlog, F callback) {
    connectionCallback = std::move(callback);
    // more code that doesn't use callback directly;
    // only connectionCallback
}
user142019
Where connectionCallback is an std::function.
user142019
I might want to use a static_assert or std::enable_if to check the signature of F first?
@Zoidberg I also checked your skullfuckdb and I thought the concept was interesting
15:08
// To make it even clearer
f([] { return 0; }); // no compilies: needs type deduction *and* implicit conversion
f<int>([] { return 0; }); // ok, but annoying; uses implicit conversion
f(std::function<int()>([] { return 0; })); // ok, but annoying; uses type deduction
g([] { return 0; }); // perfectly fine; uses implicit conversion (no templates, no type deduction needed)
user142019
@NolwennLeGuen Me too.
However...
void h(std::function<int()> f);
void h(std::function<double()> f); // you should not have done that

h([]{ return 0; }); // nope, cannot pick overload
h(std::function<double()>([]{ return 0; }));  // ok, but annoying as usual
Does all this make things clearer or muddier?
Is it just that the type deduction system sucks?
user142019
@R.MartinhoFernandes Ah yeah.
user142019
In my case the template parameter is the entire function type (void()).
15:13
@NolwennLeGuen Nah, I'd say implicit conversions are the culprit.
@R.MartinhoFernandes wasn't obvious to me. make_small, to me, implies that it makes something that isn't small yet into something that is small. So it made perfect sense :)
user142019
So say, if I have void listen(int backlog, std::function<void()> callback) that would just work with listen(128, [] {}), right? It'll do implicit conversion.
If there are no other overloads, yes.
user142019
That's cool. Thanks!
@Zoidberg Lot's of it, too
user142019
15:17
@sehe That falls well also.
user142019
In Schijf, at least.
user142019
Try to pronounce that, 'Merkins!
Tis snowing in Berlin as well. Also, yay for some daylight left at 16:00.
@Zoidberg Pwetty scene. Shame the christmas tree is gone already
The real duplicate is actually this one. But it's been deleted. I don't believe it should be deleted so I've voted to undelete. — Mysticial 17 secs ago
user142019
15:19
We had an exchange student in high school from Venezuela. In the winter, it was snowing but he had never seen any snow before. He thought the stuff was cold.
Dunno why people vote to delete high quality dupes.
user142019
Because the rules say so!
user142019
Stack Exchange is the centre of bureaucracy bureaucrazy.
Anyway, I think this short exchange about std::function in interfaces may have spontaneously produced enough material to write a full post around it. Certainly won't happen before Friday though.
user142019
Oh the joy of C APIs that take callbacks and "data parameters".
15:23
Those are usable. You should not be complaining.
user142019
But wrapping them in C++ requires so much hassle. :P
(hint: capture-less lambdas have implicit conversions to function pointers)
user142019
Problem is: I need capturing lambdas.
user142019
So I need to store the lambda in the data parameter and call that from a captureless lambda.
@Zoidberg Capturing lambdas work fine with exactly the same treatment as any other type.
15:26
0
Q: switch cases inside another control structure

csstdwhy the code inside the if block executed any way? switch(v) { case a: break; ... if(condition) { case f: ... break; case g: ... break; } ... case z: ... break; default: }

@TonyTheLion Wait what? You can do that?
I doubt it
user142019
Sure.
Looks ok.
user142019
15:27
@Mysticial Also see Duff's device.
@Zoidberg I know what Duff's device is. I was wondering about putting the cases inside blocks.
user142019
@Mysticial Duff's device does that too.
@Mysticial That is what Duff's device does.
user142019
Except in do-while instead of if.
15:28
@Zoidberg Oh shit, you're right...
user142019
I'm always right.
I probably overlooked it first time.
Sep 21 '12 at 9:31, by sehe
Jul 26 at 15:47, by R. Martinho Fernandes
@sehe Anyway, while Luc writes that rebuttal, I recently wrote an answer where I had to explain this.
@Zoidberg why u change avatar
15:29
May 23 '12 at 15:26, by sehe
Perhaps co-authored with @LucDanton?
user142019
@AndreiTita Because lobster.
@R.MartinhoFernandes can't really find the more relevant quote. Dammit
@Zoidberg Mhm fair enough. I prefer moose, though.
user142019
@LuchianGrigore HAVE SEXUAL INTERCOURSE WITH
15:29
@LuchianGrigore Good try but we are not starring that.
> A.C.R.O.N.Y.M.S.
Use acronyms to keep the code terse. Real men never define acronyms; they understand them genetically.
ahahaha
So actually what's the convention. Use acronyms or use 200+ character names?
user142019
I would kill somebody who wrote a style guide that prohibited use of acronyms.
@Mysticial Reading How to Write Unmaintainable Code?
@Mysticial both, you don't want to be consistent, do you?
user142019
makeInternetProtocolVersionFourAddress
15:31
@R.MartinhoFernandes yes
@Zoidberg Meh. You'd probably kill anyone who gets close to your crisps
@Zoidberg amagad
@Mysticial You are still not in the right mindset: forget conventions.
TIL Zoidberg is a killer lobster
Ideally, use 200+ character acronyms.
user142019
15:32
@sehe my father just came close to my crisps. 3:
@R.MartinhoFernandes lol
ITT Zoidberg is an orphan.
user142019
Well, I made an orphan branch yesterday.
I suppose in Java you'd use 200+ character names over acronyms.
user142019
15:33
lol Objective-C
Oh gosh, those guys are just insane with the naming.
user142019
NSUbiquitousKeyValueStoreDidChangeExternallyNotification
I can believe you are not joking.
@R.MartinhoFernandes yes, but you would need to read through the code to see that
@Zoidberg oh gawd. :(
user142019
15:34
[myString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]
seen that one, it's depressingly long
user142019
This is where PHP shines over Objective-C. urlencode($myString)
it doesn't say what it conveys moreover
content is not meaning
user142019
That method is so fucking annoying and used so often when working with HTTP.
@thecoshman Anyway, you up for writing those tests? AFAICS the code is only missing a constructor from an initializer list and a push_back (I don't need any more interface than that, I think).
15:36
ymi_FFTv2_v1_CVOi_b2nm_forward_u1_SSE2

vs.

ycruncherModulesIntrinsics_FastFourierTransformVersion2_VectorizeBy2ToThePower1_ConvolutionOptimizedIntegerTransform_ButterflyRadix2NegativeToMixed_ForwardTransform_UnrollBy2ToThePower1_StreamingSIMDExtensionsVersion2
First version is for C++. Second version is for Java.
Since you should always be more explicit in Java.
:)
@Mysticial SIMD? You fail.
@R.MartinhoFernandes Fuck you're right.
user142019
While you're at it, write the numbers full-out.
15:37
ycruncherModulesIntrinsics_FastFourierTransformVersion2_VectorizeBy2ToThePower1_‌​ConvolutionOptimizedIntegerTransform_ButterflyRadix2NegativeToMixed_ForwardTransf‌​orm_UnrollBy2ToThePower1_StreamingSingleInstructionMultipleDataExtensionsVersion2
user142019
Method name too long. JVM buffer overflow.
Anyway, most people would not find any of those to be particularly readable anyway.
@R.MartinhoFernandes I wouldn't expect it to anyways.
Never found a better alternative.
Abusing namespaces would need to the same mess.
@R.MartinhoFernandes if you want me to commit to a definite yes or no, then I will to decline. if you can accept a very casual, I might look into it at some stage, then sure
@thecoshman Ok. Latter.
I won't touch the code any time soon either.
15:40
¬_¬ I am sure I am typing those words...
I feel the mum next door is MIM attacking me
oh great, and now grove shark has gone laggy as all hell
Flamewar going on in C# room. lol
user142019
Cool let's join!
@Mysticial we call that, the C# room
Sigh.
@Mysticial That room is so messed up...
You don't say?!
15:44
Did you guys really go there? Are you flies or something?
@R.MartinhoFernandes join uzzz
@R.MartinhoFernandes EVERYONE JOINED
@KyleTrauberman Pleeease, stop it.
Quotes of quotes of quotes were no longer funny last year.
yessir!
sorry sir!
@Zoidberg ooooooooooh. A criminal record isn't a good thing when looking for jobs
15:46
Did all the C# people come here as well?
@chris Kinda yeah...
user142019
@sehe I'll replace the recruiter with my mighty little shellscript!
user142019
Time to get out of bed.
user142019
It's getting late.
15:47
Quick! use your RAII against them!
@chris just me
user142019
@chris using (RAII) oh wait.
@KyleTrauberman Apparently Jamie as well (or were you subtly telling us that Jamie isn't a real person?)
didn't notice
@JerryCoffin He was just banned a few minutes ago.
15:48
@chris all one
@chris well... we did just RAIID them...
He's banned
user142019
s/ban/bin/ and the world is a nicer place.
@KyleTrauberman Who's banned?
:7175195 In v1? Pretty much.
15:50
temp ban from the flag
Let's see if cross-room plinking works. Nope.
user142019
lol
A wild C# appeared.
C++ used RAII. It's super effective!
C# used LINQ.
C++ used winapi. It doesn't affect C#.
C# used immutable strings. Critical hit!
C++ used DLL exports. C# fainted.
3
WHAT THE HELL WHO ARE ALL THIS PEOPLE
15:52
@BartekBanachewicz C#ians
@BartekBanachewicz, Zoidberg is Zoidberg.
@chris oh dear...
anyway, i just jumped into their room, wrote "C# sucks" and run away
user142019
@chris C++ has immutable strings to.
user142019
They're called std::string const.
15:52
hey can someone point me to some nice-looking text editing icons?)
@Zoidberg c# is a shit language, let them have this one
@ddacot tag 4/5
user142019
@thecoshman C# is awesome.
@Zoidberg, Meh. Fine, have it use the form designer for all I care.
in C#, 27 secs ago, by Shotgun Ninja
We know how to hold a mature, civilized flamewar.
user142019
Why is Boost.Asio so complicated?
user142019
15:54
It feels like Java with templates.
@Mysticial what where you even doing in that filthy place in the first place?
@Zoidberg, And yes, I do enjoy C#. It makes my Windows adventures 100x easier.
@thecoshman chill out
@ddacot tag 4
user142019
@chris lol Windows
user142019
15:54
Real programmers use Linux.
@chris ah, see, there's your problem
@Zoidberg I thought you where a mac person?
@Zoidberg, But then I can't prank people at school.
user142019
I use a Mac.
user142019
Running Linux.
user142019
@chris Oh I can.
15:55
weren't you working on the mac port of Kyrostat?
user142019
I can steal their passwords through social engineering and phishing using Linux no problem.
Sometime soon, we might cause every computer in our classroom to have the logon window avoid the cursor so you can't click on it to log in.
user142019
@thecoshman That was long before I used Linux.
@thecoshman what about a big cup of shut the [censored] up?
user142019
And I still run OS X. I run both at the same time.
user142019
15:56
But I almost only use Linux.
@thecoshman He just sucks.
@Zoidberg ... that was like three months ago?
user142019
And thanks robot!
@ddacot how about fuck no
user142019
@thecoshman I started using Linux on the 14th of December.
15:57
@thecoshman then fk off
@Zoidberg are you still willing to help port kyrostat to mac?
@Zoidberg, Don't worry, I'll put on a Linux when I get an SSD.
@ddacot s/fk/fuck/ perhaps
user142019
I thought Kyrostat was abandoned?
@chris huh...?
user142019
15:58
Otherwise sure.
@Zoidberg no, just reduced to three devs, two after you gave up
it's a very slow pace
user142019
Better call it Snailstat then.
I am trying to work through the window abstraction stuff, but am having to learn it as I go :P
@Zoidberg ¬_¬ don't fuel the troll-bot
user142019
Time to work on non-blocking socket reading for Skullfuck.
Skullfuck?

« first day (821 days earlier)      last day (4352 days later) »