« first day (573 days earlier)      last day (4373 days later) » 

9:00 PM
Part of the Arch PHP update announcement: Last but not least: especially if you are running old scripts, make sure they do not rely on features like "Safe Mode" or "Magic Quotes". As these features were removed, an update to PHP 5.4 will result in serious security holes.
 
@rubenvb no I'm not.
 
@rubenvb Extra points for rhyme
 
Though I am here frequently.
 
"magic quotes"... quoted
Damn Qt is a bitch to build
 
@rubenvb forbidden mushrooms
 
9:00 PM
weird I never do anything with it.
 
That's what I like about VS: is has a menu option to do 'Bitch Builds'.
At least, that's what I announce when I use it
 
Mushrooms are my favorite food. If they'd be forbidden I'd die.
 
Qt is one of the easiest large C++ projects to build.
 
You're starting to get dangerously incoherent. Let's get back to `Oh god wtf.`
That sounded promising
It even lead to my spontaneous birthing of my first ever semi-haiku
6 mins ago, by class daknok_t
Oh god wtf.
 
@CatPlusPlus kind of. I'd say LLVM/Clang is pretty easy too.
 
9:03 PM
I found compiling gcc to be really straightforward.
 
Qt is fine if you don't need anything ... out of the ordinary.
@JamesCuster on Linux for Linux maybe
Everywhere else it's a bitch to build.
 
Mac OS X
and linux
 
MinGW makes stuff hard
 
@rubenvb ordinati, a sinister bond of secret agents that conspire to arrange the universe in numeric order
 
well, actually Cygwin made the old MinGW hard to use, and now MinGW-w64 is stuck with the bitch build process.
 
9:04 PM
@rubenvb Windows is the bitch
 
@sehe I deny everything!
 
@rubenvb Nice for out of context quoting
 
@sehe I've never had the chance to build Windows, so I couldn't say.
 
Maybe I have an enormous imagination, but to me the word "MinGW" sounds like something from hell.
 
@classdaknok_t About as bad as WideC
 
9:05 PM
@classdaknok_t I agree MinGW-w64 should change its name, but into what... that is the question...
 
@rubenvb Gnw: GNW is Not Windows
 
Just CFCC. Crappy fucked-up cunt compiler.
 
oh come on.
@classdaknok_t you're just too stupid to learn how to use it... or not what MinGW is apparently
 
Or GCC for Windows. :P
@rubenvb you know I was joking, right? Like I always do.
 
Who says he doesn't like it?
I'm sure compiling cunts would sound appealing to many a young lad
 
9:08 PM
@classdaknok_t yeah, that's what it says
@classdaknok_t yeah yeah, I hear you ;-)
My sarcasm is so powerful it gets to be serious
That's dangerous
because then it's not funny anymore
and I get the feeling I need sleep now
Cyall
 
@sehe maybe, but not fucked-up cunts.
Später!
 
@classdaknok_t sounds boring then
@classdaknok_t Actually I think using the ligature there is incorrect. Ah you fixed it
 
It was a typo. I meant an Umlaut.
 
@classdaknok_t What kbd layout / IME is that?
 
iPod touch British keyboard.
 
9:11 PM
@classdaknok_t No problem. I think I meant ligature instead of digraph ;)
 
Ell
does anyone happen to have an ati radeon hd 5450?
 
Æ is next to Ä here.
 
@classdaknok_t iPod keyboard? Link?
 
@Ell you.
@sehe Link?
 
Ell
@classdaknokt swing and a miss ;)
 
9:12 PM
@classdaknok_t You mean, virtual keyboard?
 
I use the keyboard on my touch screen.
I can type fast as hell on this thing, but sometimes I make a weird typo.
 
What browser? It sounds amazing that you could use chat for extended periods of time on an iPod. Isn't that like... I dunno, 4.3" screen?
 
@classdaknok_t it's a program, you know?
 
Ell
why is ram marketed as "sandy-bridge compatable"? Isn't all ram "sandy bridge compatible"?
 
@Sehe Mobile Safari.
 
9:13 PM
@Ell people will wonder, and they'll go for compatibility to be safe.
 
@Ell depends on the speed you want to achieve
 
Ell
Meh, kk
 
As long as I don't look at the keyboard I can type fairly fast on it if autocorrection is enabled and if I don't make any extreme typos.
 
Ell
I use android browser for anything using javascript or java or flash plugins, otherwise I use opera mobile - I find it much easier to use
 
I canwrite faastt oo
 
9:14 PM
@classdaknok_t Extreeeeeme typos.
 
Ah. WOOT. I'm on the frequently in this room list these days. I didn't even bother to look that up earlier
 
I don't like tyops; they require me to hit backspace.
 
@classdaknok_t obviously not
 
@classdaknok_t No they don't. You require it because you fear your inner pedant
 
@sehe actually, autocorrect does that for me, and it wanted to correct "tyops" for me but I wanted the bad pun.
 
9:16 PM
How is that a pun?
 
"tyop" is itself a typo.
 
1 hour ago, by sehe
Who is on the frequent list, anyways. I still don't know how to manage that. I guess, anyone who started using chat after 2009 will never be in the top N
Next thing, I find out I'm on that list. Go figure
 
I'm interested in Norse mythology.
 
@classdaknok_t start with frøy and frøya
 
Does anybody know a good book about it? The DC++BGAL doesn't contain any.
 
Ell
9:19 PM
Jeg er elliot
^my attempt at norwegian
 
Je m'appele Radek. :P
 
it's correct
 
Ell
I've been attempting to learn it :) but I have exams so not much time, but I really would like to
 
This is the part where people speak in cool languages with neat symbols and I feel dumb. :(
 
9:20 PM
@classdaknok_t it's French, right?
 
I don't speak any language but Dutch and English, unfortunately.
@Abyx yup.
 
Ell
@Abyx yes
 
@classdaknok_t That acronym isn't on the list is it?
 
Ell
Oui ;)
 
i think i stated someting wrong yesterday
 
9:21 PM
@sehe Definitive C++ Book Guide and List
 
@CheersandhthAlf sbi thinks you're not online nowdays :D
 
Ell
Me llamo elliot, puedo hablar un poco espanol
 
@CheersandhthAlf Oh my. The end is nigh
 
that creating a centralized general wrapper for calls to functions that take an iterator pair (so you can just pass the container), is possible in C++11
i find i can easily do with( c, sort )
 
@classdaknok_t I figured. But it's not on the list, is it?
 
9:21 PM
but not easily do with( c, copy, ostream_iterator( cout, " " ) )
 
@CheersandhthAlf sure, that's easy, I thought we were avoiding passing the function itself as a parameter. Passing it as a pointer makes this much easier
 
the return type deduction fails always?
 
You asked that already, @sehe, and as you can see, no, it is not on the list.
 
@CheersandhthAlf Sort is a template, though, you can't pass it to functions. : (
 
@CheersandhthAlf ostream_iterator needs to have a template type
 
9:22 PM
@classdaknok_t I can see but I won't. It's your abbrev and you can add it to the damn list :)
 
@GManNickG sort is easy, the same way as e.g. endl. but copy is more difficult, cause of more args
 
@GManNickG yes you can
 
@sehe I am too lazy and nobody will ever use that acronym ever again.
 
template< class C >
void with(
    C& v,
    void (*f)( decltype( v.begin() ), decltype( v.begin() ) )
    )
{ return f( v.begin(), v.end() ); }
 
@CheersandhthAlf just have them pass additional args, and have a form that takes two ranges.
 
9:23 PM
@MooingDuck I'll qualify my statement: you can't pass it into anything but a concrete function type. (And what do you know, Alf presents it with a concrete data type. :P)
 
^ This thing deals OK with sort
 
@MooingDuck You need a 'polymorphic calleable object' to pass it
 
@CheersandhthAlf variadic templates
 
@MooingDuck i can't make it work. well not right now anyway. perhaps too stupid bogged down in flu with other things
 
@CheersandhthAlf also template the return type of the function
 
9:24 PM
@MooingDuck can't make that (template deduction) work either :(
 
Ell
Ah non, c'est vraimont nul :(
 
I don't work either.
 
@GManNickG sure you can, with template templates
 
Ell
ca ne jamais rien travailler!
 
@Ell spreek Engels of zwijg. Deze chatroom is internationaal, maar dat betekent niet dat iedereen jouw taal begrijpt.
 
9:25 PM
@MooingDuck Then you're passing it as a template argument, not a 'value' argument.
 
@CheersandhthAlf I'm pretty sure it's possible, but I might not have enough SFINAE and variadic experience to pull it off.
 
Ell
@classdaknokt Speak english... this chatroom is international, but that is not the idea or jews tall bsadjoafokadf. I can't speak dutch :P
 
@MooingDuck @GManNickG I've done something very simple like that here: ideone.com/E5ICn
 
@CheersandhthAlf #define foo(f, c, ...) ([&](decltype(c)& c_) { return f(begin(c_), end(c_), __VA_ARGS__); })(c)
 
@Ell Google Translate can.
:P
 
9:27 PM
@Abyx uhm, the point was to avoid macro...
 
Ell
@classdaknokt ahh kk, understood :L I was just having a bit of fun though :P
 
That was a lame sample, and it shows you have to 'polymorphic-functorize' the algorithms. You'd need further generalization (variadics!?) to get n-ary support.
Decltyp should be able to handle the return types
 
@CheersandhthAlf it's good macro, because it behaves as a function
 
@GManNickG eh, maybe
 
@sehe I've always had the opinion that C++ should have solved overloading in this fashion. Typing the name std::sort should give you a functor that, upon calling, dispatches the a specific overload of std::sort (or a further reduced set).
 
9:28 PM
@Abyx sorry, that sounds stupid to me. what have you against syntactical macros? there's a lot of them everywhere, including in Boost
 
@sehe his goal was to not have tons of wrappers, and to have a few generic functions
 
it doesn't copy the c argument
 
Ell
Night all :)
 
@GManNickG can be done, but that's an interesting train of thought.
 
Evening.
 
9:30 PM
@CheersandhthAlf my point is, that ALL_OFF(c) copies text of "c", and that macro doesn't
 
@Abyx you mean duplicate it. that's never been a problem. it's a non-issue, except for SO downvoter kids
 
@CheersandhthAlf oh.. sure, it's not a problem for you
 
reality is, that if you managed to do that, you'd notice right away, and fix it, and then never do it any more
and if not, then lacking required quality for programming work
so
 
it's not about me. It's about all of my fellow colleagues who will repeat such error as well
 
they won't
 
9:32 PM
it's just error-prone code
 
you want it to be, but it is not. i have never heard of anyone doing what you think is so easy to make an error. i have not done it myself either. it is just FUD. Fear, Uncertainty, Doubt.
but anyway, the goal now was to do the thing without macros, at all
if a macro has to be involved, then the original simple is preferable, by the KISS principle
 
yes, it is FUD. because I know that I do mistakes.
but I also try to do things which protect me from mistakes, like using references instead of pointers, using asserts, and not writing such macros.
 
the two first are good, the third is IMHO dumb
 
"In 2010, an Australian team announced that they fabricated a single functional transistor out of 7 atoms that measure 4 nm in length." Er, wow. I didn't realize we were that close to counting atoms in our transistors quite yet.
 
@CheersandhthAlf it's same thing, I avoid any code which can lead to error
 
9:37 PM
cout << L"bah";
 
*trying to avoid, actually
 
it is another matter with a functional macro that duplicates text. you don't expect that. like <windows.h> max
functional macros are evil
 
@CheersandhthAlf not a good example
 
better use functions instead
 
@CheersandhthAlf they are not evil, because they allow to use #,` __LINE__` and stuff
 
9:40 PM
@Abyx i think it is a very good example, because (lowercase) max is, or was, more or less forced on you if you used Microsoft's <gdiplus.h>
 
gah, ideone needs newer gcc
 
@CheersandhthAlf I just don't use it. I prefer to write template<T> inline T& my_max(..)
@CheersandhthAlf, btw, do you know BOOST_FOREACH(i, c) ?
it doesn't duplicate c
 
@Abyx It's used with good reason. You don't want to see what it expands to :P
 
@Abyx did you try out the cout << L"bah\n" that I posted? would you avoid cout just because it can "easily" be used in wrong ways?
I mean, how often do you hear about anyone using it incorrectly in that way?
If anyone does, I'm sure that person learns from it and never does it again.
 
@CheersandhthAlf it's a presentation issue, it's revealed in first look at output
 
9:46 PM
bad macro invocations can be a lot harder to find
 
hmm, I'm trying to decltype(std::begin(C)) where C is a type that isn't default constructable, but it doesn't work. I vaguely recall there being a simple workaround, does anyone recall what that was?
 
@MooingDuck C should be variable, not type
 
@JohannesSchaublitb Lady.
 
@Abyx in my case, it's a type. Do you know the workaround?
 
9:55 PM
@CheersandhthAlf oh noo, i posted my silly Identity<> tricks again xD
 
@MooingDuck ah.. try *(C*)0
 
@Abyx ah right, thanks
 
@JohannesSchaublitb actually i posted my article long before i saw yours. it was amusing that you was the only other one to answer.
 
xD
@CheersandhthAlf see my answer to the "overload resolution and function pointer" question xD
 
@MooingDuck declval<C>().
 
9:57 PM
@GManNickG C is not default constructable
 
Doesn't have to be.
decltype(std::begin(declval<C>())).
 
@GManNickG that sure looks like it requires default constructing a C
 
@MooingDuck It's not. It's unevaluated.
 
note that putting "std::begin(declval<C>())` in a decltype does not ensure that the call works
in the toplevel function call within a decltype expression, no temporary is created for the return value of the function call
so there will be no dtor call at the caller side
 
@JohannesSchaublitb Nice observation.
 
10:00 PM
@JohannesSchaublitb I understand that, but that still requires the default constructor to be publicly available doesn't it?
 
the default ctor is not required even for an evaluated function call
only the dtor is required in that case
regarding the return value thatis
 
@MooingDuck: All declval<C>() does is "return" an instance of C. Of course, it's not actually defined and only suppose to be used in an unevaluated context.
 
@GManNickG ohmygosh, I just now realized you guys weren't using decltype, but were using declval. Forgot about that entirely
sorry
 
@MooingDuck Ha, it's okay. It's pretty much the "clean" way of doing what @Abyx suggested.
 
also afaik declval returns an "U&&"
 
"prog.cpp:25:13: sorry, unimplemented: cannot expand 'FPs ...' into a fixed-length argument list" Well that's a new one to me
 
@JohannesSchaublitb Yup.
 
Can I have a function that takes a template function, and some other parameters, and deduce the template arguments for the function based on said parameters?
 template<template<typename> class F, class... FPs, class...Ps>
 auto passthrough(F<FPs...> f, Ps... Vs) -> decltype(f(Ps...))
 {return f(Ps...);
I don't think it can be done :/
hmm, can I use decltype to get the function type based on the parameters?
 
@MooingDuck What do you mean?
 
1
A: rebuild the signature of a function knowing only its name and argument list

Johannes Schaub - litbWhat about template<typename T> struct identity { typedef T type; }; template<typename T> using NoDeduce = typename identity<T>::type; template<typename T> using Identity = T; template<typename ...P, typename R> Identity<R(P...)> *get_f(R f(NoDeduce<P>...

 
10:14 PM
@MooingDuck: There's std::result_of.
 
@GManNickG given a template function, and the parameters to pass to it, deduce the type of the function to call.
 
i just posted that to usenet
 
No, wait, this makes no sense, I can't pass a template to a function. What am I doing here?
 
you can
as long as its arguments can be deduced
but then again, it's not really passing the template :)
 
@JohannesSchaublitb That's lovely.
 
10:16 PM
i think maybe this is about passing std::sort and std::copy and so forth
std::sort case easy, std::copy less so
 
@JohannesSchaublitb sorry, lag. Your messages just appeared on my screen just now. Thanks!
@CheersandhthAlf that's what it's turned into
 
I think the question can be phrased as this: is it possible to write a utility that would allow deferred<std::sort>() act as a function object that, when invoked, forwarded its arguments to std::sort, effectively deferring overload resolution?
 
@MooingDuck well, i'm just too plain stoopid now to do the std::copy thing
@GManNickG but i did that above. it's solved. that's the easy one.
 
@GManNickG yes
 
well OK not deferred
you can't use the function template itself as a template parameter
 
10:19 PM
@GManNickG i think that one is not possible
 
@JohannesSchaublitb Okay, that's what I was thinking too, I'm just not sure if there's some corner-case magic I don't know. So then the question is, how close can we get?
@MooingDuck How?
 
pitty we can't do deferred([](T...t) { return sort(t...); });
 
@GManNickG I dunno, I've been working on it
 
@GManNickG the reasoning is we wanted to transform the first parameter before calling the function.
 
10:21 PM
your president seems to have red hat.
 
@JohannesSchaublitb that's remarkably close to what I want though :/ well done.
 
@MooingDuck Hi! Our president is back! :) Viva Putin! In Russia, we are drinking vodka all this week after his inauguration. Sorry for advisory words, but f*ck two bitches both Margaret Thatcher and Condoleezza Rice for their words about Siberia!
 
@JohannesSchaublitb sadly, it's not close enough. I think this isn't possible O.o
wait... maybe...
 
@user1131997 Go away.
 
10:26 PM
you can also do the following to giveit a list of signatures and call it
but it won't return a function pointer. just a function type
     template<typename T>
     struct identity { typedef T type; };

     template<typename T>
     using Identity = typename identity<T>::type;

     template<typename ...P>
     struct F { };

     template<typename R, typename ...P1, typename ...P>
     struct F<R(P1...), P...> : F<P...> {
       operator Identity<identity<R(P1...)>(P1...)>*() const {
         throw "You shall not call me";
       }
     };

     F<void(int&), void(int&&)> f;
     static_assert(
       is_same<decltype(f(10))::type, void(int&&)>::value,
 
@GManNickG where? back to England may be? :)
 
The flags only reinforce my feeling that the other rooms are incredibly boring.
 
@JohannesSchaublitb does GCC 4.5.1 have that using thing? Probably not.
 
@JohannesSchaublitb darn. Ideone needs to update more
and my machine only has 4.5.4. Time to update.
 
10:30 PM
@MooingDuck 4.6.3 here I feel the same.
 
Woo! Ruben posted 4.7.0 11 days ago
...and I already had a 4.7 downloaded. Why was I running 4.5? Maybe I don't know what I'm doing.
ah, I have nothing that unzips 7z files
oh neat. Chrome starts downloading files before I select an install directory
 
sudo apt-get install p7zip-full
 
@CaptainGiraffe windows
 
then I guess theres a website where you can install even more cool stuff like toolbars and other great gadgets.
 
@MooingDuck: 7-zip.org
 
10:40 PM
bam, gcc 4.7
@GManNickG already downloaded that, installed it, and unzipped gcc
 
@MooingDuck Now you need to show source that compiles on yours, but not my lowly 4.6
 
why do I read "downloaded" as "downvoted"?
 
@Abyx Stay off reddit for a few months, Abyx
 
@CaptainGiraffe it's not reddit, but probably it's right solution anyway...
 
Does this look like a decent way to create a 64-bit hash from a 48-bit MAC address? (Must use std::size_t for std::unordered_map.)
 
10:46 PM
I know, internets will be fine, even without me
 
@JohannesSchaublitb I'm still interpreting that, I don't think that's what I want, but I'm not sure.
 
@Abyx In all seriousness I try to avoid groupthink, and Its hard to avoid when your in a group, especially on the Internet when everybody agrees with you
 
@StackedCrooked Nah, you want to distribute the bits more uniformly.
 
@CaptainGiraffe not everybody, there are some morons and dumbs who doesn't
 
@DeadMG I'm spreading 6 bytes over a 8 byte field. It's a full spread except for two unassigned bytes. How much more uniform can it get?
 
10:48 PM
@StackedCrooked just multiply it by 60000?
 
@StackedCrooked By spreading the unassigned bits between bytes.
pack 6 bits into each 8bit byte of the std::size_t.
 
@Abyx '=) You want to practice to be that (well maybe not moron) critical thinker. It takes time to reflect!
 
not to mention that since you packed from the LSB up, your distribution will be almost all very small numbers- if you're gonna pack all the bits contiguously, you should distribute from MSB down
 
oh, wait, other way. It'd be division. NM then
 
ideally, you would spread it into 8 groups of 6bits, and then pack each 6bit into a separate byte of the hash
 
10:50 PM
@DeadMG With the current solution it's not possible to create two equal hashes from two different MAC addresses. Isn't that already a perfect solution then?
 
no
containers can take advantage of it but only if explicitly programmed to with the perfect range, AFAIK
a container expecting the full 64bit range of std::size_t will suffer from extreme bucket imbalance
 
You know, Donald Knuth already bought springs for his eventual demise so that he could turn in his grave.
 
@CaptainGiraffe I know you're only trying to be helpful, but do keep in mind when you take the role of telling others to be critical thinkers you assume 1) they aren't 2) you have authority over this aspect of them. So be wary.
 
a good hash function needs to be not only collision-resistant, but also of uniform distribution
 
@GManNickG keep in mind you're on the internets
 
10:51 PM
your hash function is not very uniform at all, because the 12 most significant bits can never be set
 
@MooingDuck Yes yes.
 
Hm...
 
so ideally, you would pack from the other end, the MSB first
that would make the biggest use of the range of std::size_t and maximize the spread over the buckets, which is ideal
 
@StackedCrooked I still like my idea of just multiplying by 60000 actually
 
10:55 PM
@StackedCrooked I think you overdid it a little.
 
@GManNickG thanks
 
@MooingDuck How does it work?
 
@StackedCrooked no, you can't shift 64 bits :P
 
@DeadMG Right, my bad.
 
10:56 PM
WTF is up with that flag in the queue?
lol
How is it even remotely "offensive"?
 
assuming that the mac argument is uniformly distributed, now your hash function has much more uniform distribution
 
@StackedCrooked basically the same as shifting, but slower, but leaves lots of the lower bits set instead of them all being zero.
@StackedCrooked basically, your number is always at least 65536 times smaller than the maximum size_t. So multiplying by 60000 spreads out your numbers, but not quite all the way, leaving lower bits set.
 
@DeadMG MAC argument is simply a 6-byte MAC field in Ethernet frame.
 
@StackedCrooked The hash function I posted should be absolutely fine.
 
@Mysticial I didn't see it, was I flagged, or were you guys that fast?
 
10:59 PM
@MooingDuck No, it's in PHP.
 
what header is decltype in? cppreference seems to have lied to me
 
@DeadMG So just spread by 8 bytes but MSB first?
 

« first day (573 days earlier)      last day (4373 days later) »