« first day (861 days earlier)      last day (4093 days later) » 

Xeo
1:00 AM
@ThePhD Unqualified<T0> const&.
 
@R.MartinhoFernandes neat.
 
std::Unqualified? Or should I go looking in The Flaming Dangerzone ?
 
@Rapptz this Okey, I'm watching right now.
 
Xeo
You'll find it in neither as Unqualified.
 
what's Unqualified?
 
Xeo
1:01 AM
The robot has it as Bare on one blog post, though.
 
Is it MSVC-nice? >_>
 
Xeo
@Rapptz RemoveCv<RemoveReference<T>>, basically.
 
@thecoshman I asked for a numerical value, you told me I needed a prefix for that value. I'm good with any fix you give me; bits bytes, nanobytes, barns, Megabytes, Petabytes, its all good.
 
Xeo
@R.MartinhoFernandes Soon™! // FTFY
@ThePhD Using alias.
So no. :P
 
1:02 AM
@CaptainGiraffe pst, what ever
 
;~;
 
ooh... I think it is getting so cold down here that my breath is misting in the air
 
@ThePhD -pats-
 
@Rapptz uh, I'd make hover/clicked distinct colors, to aid debugging. Flashy green/red/white for example
 
Xeo
template<class T>
struct unqualified : std::remove_cv<typename std::remove_reference<T>::type>{};
 
1:02 AM
just fucking brilliant
 
Xeo
@ThePhD ^
 
@ThePhD Not difficult to make it as a regular trait. Just not as nice to use as the alias.
 
@BartekBanachewicz they are different colours but I guess, I mean I can see the difference because it's a deeper blue.
 
Xeo
MSVC friendly.
Now you need typename unqualified<T0>::type const&, though.
 
I should probably take that as a sign to go to bed
 
Xeo
1:03 AM
In any case, why not template<class U0> ... Invoke(U0&&) and perfect-forward?
 
@Rapptz I could see blue :) Image compression doesn't help, I guess
 
yeah I guess, it was just a quick video
 
May the Kraken spare you!
 
Oh I fixed it. What an odd way of fixing it.
 
1:05 AM
@CaptainGiraffe The September 2011 data dump was 4.3 GB. Since then they put up the data explorer data.stackexchange.com and I think no more data dumps were put out.
 
Xeo
@R.MartinhoFernandes Make a "match everything" query and extrapolate from there!
 
@Xeo Well, mostly because I'm trying to figure out how to make this work out: stacked-crooked.com/view?id=b91a8a54dc2864ac9ffcb6a267ba525e
 
@BartekBanachewicz it was originally if(clicked) { if(callback) { callback(); } }
 
user142019
fapfapfap
 
1:06 AM
@R.MartinhoFernandes Interesting. The entire SO site would fit on a single simple USB stick.
 
but changing it to if(clicked) { if(callback && clicked) { callback(); } } fixed it
which.. I have no idea why...
but okay.
 
Xeo
@Rapptz That sounds like serious UB.
 
@Xeo ?_? where
 
@refp Oh gosh. I'm sorry. I only realised now that I looked at the starboard. I did not mean to say "go away and ask & answer"! I meant "go ahead and ask & answer"!
 
Xeo
Also, if(clicked && callback){ callback(); }?
 
1:07 AM
@Xeo it's pseudocode
 
@CaptainGiraffe It's all text.
 
@Rapptz you probably did something wrong
 
I don't know which semantics I should pick up.
 
Xeo
@Rapptz I meant that as a simplification of your code.
 
@R.MartinhoFernandes Goes a long way.
 
1:07 AM
@Xeo Well it's currently..
 
@Xeo Results are limited. But I guess summing the contents of all posts would be good enough for an estimate.
 
Xeo
@ThePhD Your "Forward semantics" just moves, btw. std::forward<value_type>(v) is equivalent to std::move(v).
 
Btw, whenever you find yourself looking at Unqualified, wonder if std::decay is what you really want.
 
@sehe excellent...
 
1:08 AM
If you don't know the difference, I can almost bet you want std::decay.
 
@R.MartinhoFernandes Also nice Sherlocking getting the numbers.
 
Where's the UB there?
 
Xeo
@Rapptz Yeah, if simply adding && clicked changed something, that sounds like UB somewhere.
@Rapptz UB origin is most likely far away from where it manifests.
 
Any idea why the reverse_iterator::base() doesn't give the same element as the iterator itself? but rather the element before?
 
@Captain @Xeo So, currently, it's somewhere beyond 10GB data.stackexchange.com/stackoverflow/query/99453/…
 
1:12 AM
@Xeo ideone.com/kT7vsH ? I don't see it.
 
@CaptainGiraffe reading is always in one direction
 
Xeo
@CaptainGiraffe That's how they work. It's off-by-one, basically. If you construct a reverse_iterator(end()), you get one pointing at end()-1, because dereferencing end() would be bad. And when you request the base, it's back to normal semantics.
 
@CaptainGiraffe That's inherent to the iterator design: consider that there is no "before-the-beginning" iterator.
 
@Xeo Um... well, okay. So if I were to instantiate a template like that with CallbackEvent1<const MyType&> and CallbackEvent1<MyType>, would I have to remove or worry about how the types boil down to the final invoke calls? I mean, what I'm basically trying to do is make the wrapper have no overhead by either forwarding or referencing all arguments until they reach their destination.
 
Xeo
9 mins ago, by Xeo
In any case, why not template<class U0> ... Invoke(U0&&) and perfect-forward?
 
1:13 AM
@Xeo Good point.
 
Xeo
You're kinda killing yourself with the three overloads, all of which could be packed to one.
 
@Xeo Btw, one more case where ranges beat the shit out of iterators. Retrograde ranges need no hackish stuff like that.
 
Oh.
Okay.
That really simplifies this and helps my understanding.
Thanks!
I'd upvote you if I could.
 
Xeo
@R.MartinhoFernandes Eh, you sure they wouldn't need that internally?
@Rapptz I have no clue where your (potential) UB might come from. It doesn't even have to be from the button class, it could come from anywhere.
 
if I have U0, though, would I need a std::move() or a std::forward() call? My understanding so far tells me std::move() would be the best, because std::forward is mainly for when you know both the function you're calling and the argument you're giving it are r-values, right?
 
1:15 AM
@Xeo Am. I actually wrote that one: bitbucket.org/martinhofernandes/rtl/src/…
Just have front() return back(), back() return front(), etc.
 
The thing is of everything I know about UB -- I have done none of them, so it has to be something else.. :|
 
@ThePhD The exact opposite.
 
@DeadMG @____@
 
std::forward is for when you don't know the value category.
 
y dis so complicated. :c
 
Xeo
1:16 AM
@ThePhD Err... Tell me, which sounds better for perfect forwarding: move or forward? :)
 
it's not complicated, you just don't know what it is
 
@R.MartinhoFernandes This is an area I thought Python would win at, but I was very dissapointed.
 
@Xeo I'm willing to bet it's just because of the way the draw() function has to be called, it has to be called within window.isOpen() which is out of my control.
 
Xeo
@R.MartinhoFernandes Oh, that kind of range.
 
@Xeo Yeah, sorry. I didn't mean Boost.Range ranges.
Yuck-
 
Xeo
1:19 AM
Btw, why do you require has_length for operator[]? ... nvm, I see why, because you need to compute the reverse index.
 
It has been my birthday for an odd hour and twenty minutes, can I please get a Happy Bday Giraffe?
 
Happy Birthday Captain Giraffe.
 
Now I have a urge to implement more of those ranges.
 
Xeo
@R.MartinhoFernandes And they'll never see the light of usage~
@CaptainGiraffe What, do you have nobody at home to tell you that? :P
Habby BDay, anyways.
 
1:22 AM
@CaptainGiraffe Happy B-day :)
 
@Rapptz Thanks =) Thanks Xeo too.
 
Xeo
Although I don't get what's so great about BDays anyways. I practically don't celebrate mine, unless forced.
 
@CaptainGiraffe Herzlichen Glückwunsch zum Geburtstag!
 
I forget about mine...
@CaptainGiraffe Haaaaaaaappy Birthdaaaaaaay.
 
Xeo
@R.MartinhoFernandes /clap
 
1:23 AM
@Xeo I have now realised why I stopped at that point.
 
@Xeo No, I live alone. I invite friends over for the evening, I give them food and drinks, and it is fun.
 
Though, this one, they aren't letting me forget about it.
 
I was implementing stuff on the order given in the D docs.
 
Because I will be of legal drinking age.
 
=) Thank you all.
 
1:24 AM
@CaptainGiraffe No.
 
And stopped at chain because after that comes round-robin.
 
And they want to get me completely hammered.
 
@R.MartinhoFernandes Ewwwww D.
 
And that requires runtime get<N>.
 
I do not want to get hammered. =[
 
Xeo
1:24 AM
@R.MartinhoFernandes cycle from Haskell?
 
And that's fucking annoying to implement.
 
Xeo
@R.MartinhoFernandes Why?
 
@Xeo No. It takes a variadic series of ranges A, B, C, ..., Ω and then produces the range A0, B0, C0, ..., Ω0, A1, B1, C1, ..., Ω1, ..., An, Bn, Cn, ..., Ωn
 
What the fucking fuck
My eyes are bleeding
 
I would not expect anything else. Still I'm surprised you actually wrote "No".
"
 
Xeo
1:26 AM
@R.MartinhoFernandes Oh. Ooh, that is ... bad.
 
@DeadMG It's the place where Andrei has actually documented the stuff.
 
Xeo
Although, I think you can get around runtime get<N> with some type-erasure.
 
@Borgleader what are you even doing there? o.O
 
@Xeo Will that matter?
 
Xeo
@R.MartinhoFernandes It's much less of a hassle, I believe.
 
1:28 AM
Runtime get<N> is type-erasure :P
 
Xeo
Since runtime get<N> isn't really possible unless the range types are the same, or get<N>(ranges...) returns reference.
 
@Xeo reference is CommonType<R::reference...>.
 
Xeo
@R.MartinhoFernandes So it would return reference?
If yes, then the difference isn't that big, I guess.
 
@BartekBanachewicz It's a forum I often visit. Lots of skiddies and noobs lately. Makes me sad.
 
My idea was to have something like reference nth_front(tuple<R...>& r); and so on.
I need to look if Boost.Fusion can help.
 
1:30 AM
@Borgleader I guess you could just stop visiting it :P
and start REVIEWWHORING like me
 
There are a few good programmers over there.
 
aren't they on SO?
 
Xeo
@R.MartinhoFernandes Eh, just store a std::vector<any_range<value_type>>! :D
 
Yeah, seems Boost.Fusion won't help.
@Xeo I don't have any_range!
 
Xeo
Son, did that ever stop you?
With any_range, it seems really easy.
 
1:34 AM
@R.MartinhoFernandes no worries! I actually interpreted your message as "you ahead and ..", thought it said so until you pointed out it didn't
 
Xeo
Just concat(_map?) the whole shebang.
 
@Xeo That was chain, i.e., A0, A1, ... An, B0, B1, ... Bn, ....
 
Xeo
@R.MartinhoFernandes chain = concat_map id?
 
Hm...
 
Xeo
1:35 AM
k
 
I think I need to make an index-perfect list.
 
@refp Cool :)
 
lazy_list ?
Probably lazy_list.
 
Xeo
But seriously, Robot, fuck you. I like Haskell because of you bunch now, and already think the syntax is way cleaner. :(
 
Xeo
1:37 AM
No, in all seriousness, I'm happy. Haskell's syntax is a clean and concise way to express some things.
Fuuuuuck, I just noticed I forgot to load Kotoura-san at work today. :( /cc @Mysticial @StackedCrooked
 
@BartekBanachewicz The good programmers from Rohitab? I don,t think so.
 
You're missing out on a good episode.
 
Xeo
Anyways, @R.MartinhoFernandes, chain the vector<any_range_type> and you're good to go I think.
 
Psst. Guis. What would you call a list that, when you erase an item, it doesn't remove it from the list/array, just calls the destructor on it and marks that spot as 'Open' ?
 
1:39 AM
http://www.rohitab.com/discuss/user/3860-napalm/
This guy is a beast.
 
Xeo
@StackedCrooked I'll download that first thing on monday when my internet is working!
@ThePhD Stupid?
 
=[
 
Xeo
I mean, congrats, you now have a memory manager that needs to keep a free list around, basically.
 
@Xeo No, this cannot be built on chain.
 
@Borgleader ummm...
 
1:39 AM
It interleaves the ranges.
 
Xeo
@R.MartinhoFernandes Why?
 
@Borgleader #define IDC_TXTENTRY 100
// Globals
HINSTANCE g_hInst;
HFONT g_hfText;
 
Xeo
@R.MartinhoFernandes Oh, chain does A0, A1, ...? Right....
 
@Xeo Last summer I had a period or ~ 1 month where I could not access Internet at home. So I too downloaded my minimal required dose of anime at work.
 
1:41 AM
@Xeo Well, if I needed to keep a valid Token to an item in a list for fast deletion... how would I do that?
I can't use std::vector because erase and insert blow any previous iterators up.
Maybe... std::list ?
 
Xeo
@R.MartinhoFernandes Right, I know that one from playing MMORPGs. :P I just forgot how chain works.
 
Do its iterators survive beyond the scope of erasure and deletion?
 
Xeo
Yeah, list basically.
All nodes are independent.
 
But deletion would essentially be a search through the linked list to find the node to explode, right?
 
Xeo
And your Token would be list::(const_)iterator.
 
1:43 AM
@ThePhD You mean vector<optional<T>>?
 
I've heard optional mentioned a lot... is that a std thing?
 
@Borgleader just dump that shit alltogether and switch to SO
 
Oh.
 
1:44 AM
@ThePhD it's boost. And quite easy. Google it
 
Xeo
@ThePhD You could keep a (unordered_)map<Item, list::(const_)iterator> for fast access, I guess.
@StackedCrooked Ah, I'm only watching Kotoura-san right now, because the internet at work isn't that great. I don't even keep up with my manga. :(
 
Eh. I think I'll just take the hit for std::list and do a search.
 
@Xeo I'm currently watching ~7 currently airing anime.. (That's a lot more than usual.)
 
Xeo
Depends on how big the list will be.
 
I don't forsee anything beyond 100 things registering for a callback.
Searching through 100 list items and comparing on iterator should be fast enough for that.
 
Xeo
1:47 AM
The most likely performance hit from that would be the actual iteration, I think.
 
Really?
 
Xeo
Since non-contiguous.
 
I thought sequentially iterating over a std::list was fast- Oooh, right.
Memory cache. Non-contiguous data.
Damnit. ._.
 
@BartekBanachewicz I did, for the most part.
 
Well, there's always just making a no-down-resizing std::vector and a std::vector<std::size_t> of free spots.
 
Xeo
1:49 AM
@ThePhD Wait, if you have iterator as your token, you don't need to search. Just list.erase(it) it out, in some form.
 
Fast to add, fast to remove, fast to iterate, but costs more memory.
@Xeo .. Eh?
 
Xeo
Not splice, erase, my bad.
Since every iterator has information what comes before and after, it's O(1).
 
Really? o_O
 
Xeo
It's just a matter of (internally) splicing the element out, and destroying it.
 
Ooooh
So connect the prev node with the next node, and then destroy the current item.
Derp, yeah that makes sense.
 
Xeo
1:51 AM
(and next with prev)
 
@Xeo ( Haha, right. Or, all the bugs! )
Does list::erase() perform that automatically?
 
yeah
 
Xeo
Err, obviously.
As I said, it needs to internally just splice.
 
... Oh yeah
 
Xeo
en.cppreference.com/w/cpp/container/list/erase
 
1:52 AM
Derpderp.
My brain is failing.
 
Xeo
> Complexity 1) Constant.
 
I'll always be adding to the end, so insertion will be constant too.
 
Xeo
Insertion is constant anyways too.
 
Let's just hope iterating over the list of events won't be as bad as I think it might be.
 
user1182183
hm anyone knows how to make a definition in Visual Studio 2012 which defines a number which is in yymmdd format?
 
Xeo
1:53 AM
Same reason, just (internally) create the node and (internally) splice it in wherever
 
@Xeo Unless it was sorted! :D
 
user1182183
maybe boost?
 
user1182183
can't seem to find it >_>
 
Xeo
@ThePhD Eh, sorted list... I'd say you want std::(multi_)set, then.
Same guarantees about iterators.
Since it is a linked list internally, basically.
 
1:54 AM
@Rapptz Great. Now make that button triangular. :3c
 
no
 
user1182183
something like #define Today __YEAR_NOW__ __MONTH_NOW__ __DAY_NOW__ would generate 130223 ?
 
:(
 
@Rapptz What about right button?
 
<33
 
1:55 AM
@BartekBanachewicz That does nothing yet.
At least it's easy to use. I guess.
 
@ThePhD OpenGLUI has support for clinking on arbitrary shapes //cc @Rapptz
 
@BartekBanachewicz Sounds terrible.
 
Xeo
Gah, Y U NO ---strike--- in comments. :|
 
don't care much
 
@Xeo Apparently it's <strike></strike>
 
1:56 AM
@Rapptz That was a joke about "mouse has left button"
 
Xeo
@ThePhD Not in comments.
 
Oh.
Well then. =[
 
@BartekBanachewicz Oh I thought you meant right click
 
@ThePhD Clicking. Uh. Thats my library anyway
 
@GamErix __DATE__ can be used for that.
 
1:57 AM
@ThePhD It ended up looking very close to my idealised case :|
 
Xeo
There is ---an app--- a page for that. ;) — Xeo 2 mins ago
 
user1182183
@R.MartinhoFernandes can you supply... parameters to a definition?
 
Xeo
Damn murkdown.
 
@Rapptz <3
 
user1182183
to format the date :$
 
1:58 AM
dui::Button button;
button.setSize(150,50);
button.setPosition(30,60);
button.onClick([&](){ button.setText("Mouse has clicked button.");});
button.onHover([&](){ button.setText("Mouse has entered button.");});
button.onMouseExit([&](){ button.setText("Mouse has left button.");});
 
    void pop_front() {
        round_robin_detail::apply_nth(2, sources, fun::pop_front{});
    }
@Xeo woot!
        template <typename Result = void, std::size_t N = 0, typename... Ranges, typename Fun>
        Result apply_nth(std::size_t n, std::tuple<Ranges...>& ranges, Fun fun) {
            if(n >= sizeof...(Ranges)) WHEELS_UNREACHABLE;

            if(N == n) {
                return fun(std::get<N>(ranges));
            } else {
                return apply_nth<Result, N+1>(n, ranges, fun);
            }
        }
 
Lol, fun::popfront{}
 
Not too complicated, actually.
 
So this is what the temps look like when I build all boost versions 1_42-1_49 with build-type=complete and -j12 on my new fanless i7 CPU:
 
Good bye, Cruel World!
 
1:59 AM
@ThePhD It's a polymorphic function object that calls pop_front. I would use a lambda, but no polymorphic lambdas :/
 
at least for tonight...
 
I have a bunch of similar things in namespace fun
 

« first day (861 days earlier)      last day (4093 days later) »