« first day (968 days earlier)      last day (3980 days later) » 

Xeo
8:00 AM
Wow, that white plays really bad with the chat theme
 
how about this one?
 
Xeo
woah
Maybe it's also my monitor angle
 
my eyes ;_;
 
Xeo
But man
 
> internal compiler error: Segmentation fault
 
8:03 AM
Well, now I have a problem with no sensible solution.
 
Usually concepts are expressed in terms of valid expressions and types involving 'opaque' values and types.
 
@DeadMG enjoy the finger up the bum
 
If the concept involves 'it has an associated type for its value type' then the requirement is just that. No need to mention class templates.
 
I tried this which is why I gave up.
template<typename... Args>
struct size_of {
    static constexpr auto value = sizeof...(Args);
};

int main() {
    auto i = size_of<std::array<int, 5>>::value;
    std::cout << i; // 1
}
:S
er
 
Ye should def. be 1.
 
8:07 AM
Yeah I messed up that one. It's 4 AM ._.
Headaches & templates all day isn't a good match.
 
Ew. I can't do anything with a headache, much less code.
 
I've had one for like 3 hours.
 
I have a drinking problem. I'm putting tea all over myself.
 
Oh that's right
I haven't drank water in hours.
 
Okay so the compiler complains that the declaration at line 39 is a redeclaration of the declaration at line 39. Then it segfaults. I think it might be a compiler bug.
 
Xeo
8:11 AM
That's usually a source of headaches
 
@Xeo Yep.
 
Xeo
A segfault is always a compiler bug, no? :P
 
Fuck detail::has_foo, time for overload ordering.
 
Xeo
haha
 
8:13 AM
I wish I had time to learn C++
 
I have received the hydration source
 
I'm thinking the compiler gets confused when trying to compute has_foo<range::some_of_my_range> because it can lookup via ADL both overloads of foo which are constrained on has_foo to begin with. And things like Boost.Range specifically have range::begin either call member begin or perform adl on adl_begin, not begin itself, precisely to avoid those situations I think.
 
Xeo
@LucDanton I name my adl(-testing) stuff also adl_stuff to avoid unwanted recursion.
 
namespace adl is not inside namespace annex on purpose though. It's a bit different.
 
@BartekBanachewicz o_0 just use it
 
8:17 AM
@Xeo But yeah the implementation of adl::blarg is to call adl::detail::adl_blarg yes.
 
@thecoshman you can freely substitute learn to use in this sentence
 
FWIW template<template<typename...> class Map, typename... Args, EnableIf<Bool<(sizeof...(Args) > 2)>>...> works.
 
At work I have to fix someone's mess, at uni I am having java exam today
 
So now I only have one overload of e.g. start, which calls detail::start(r, select_overload {}). And normally in the process of instantiating the two overloads of detail::start (where one performs ADL and one is the fallback) the original range::start won't be found since it shouldn't be in scope. Or something. Magic. It worked before.
Oh um it is in scope in the bodies though. So I guess magic.
Eh, time to double-check with Clang.
 
@thecoshman Why would he do that.
 
8:26 AM
@BartekBanachewicz no. do not attempt to just learn it, you will not. Use it, this will make your mind remember the solutions to the problems you face thus you will learn it.
 
where can i got ubuntu help?
 
a billion miles from here
 
@user2412816 ¬_¬ not here obviously
@DeadMG prostate
 
@user2412816 xeo already answered you
 
I doubt that prostates influence gallstones
 
8:27 AM
@thecoshman blergh, solutions to problems you face and meta-operations asfdfasdgdsgsdg. It's more difficult that any other shit I do, maybe except OpenGL.
But I will totally get back to Lundi after the exams
 
@DeadMG best check anyway
 
what is it with you and prostates?
 
@DeadMG what? just looking out for you
 
0
Q: C++ example implementation of Timer

GgSalentI'd need to have a TIMER that calls a function every n seconds? As in C #, Java, etc. .. There is something ready? I can not use boost. Some examples?

Prostate exams are important!
Ah shit it's 4:30 AM :(
 
> error| template instantiation depth exceeds maximum of 900
So I guess it used to work because it happened in the adl namespace :s
 
Xeo
8:31 AM
Two compilers disagreeing?
 
No that's GCC.
 
Xeo
ah
 
> fatal error: recursive template instantiation exceeded maximum depth of 256
^ Clong
 
Clong sounds like a cool compiler.
 
8:33 AM
@LucDanton That seems wrong to me.
 
Fine, I'll empty the bodies just for you.
Same.
 
Hey it is
C++ Standard Annex B says it should be 1024.
 
Xeo
Recommended
 
Ah yeah it says "recommended minimum"
 
ADL really fucks up anything and everything it touches.
 
Xeo
8:35 AM
I wonder if "overloading" through type-classes and calling those functions also counts as some kind of ADL
 
@Xeo I know what you mean. It's used as if it were a compile-time (sort of) late dispatch system, which is a similar purpose of ADL.
However unlike ADL it respects lexical scoping. That's where ADL is fucked up.
 
Xeo
Much more controlled, though.
 
I might have to have adl::start and other range operations actually perform adl on adl_start then :(
I could try an ADL barrier but I've never been fond of that stuff...
 
Xeo
lol
 
Anyone knows how that goes?
 
Xeo
8:38 AM
No clue
Just fully qualify the stuff you don't want to select via ADL?
 
Oh. Put the datatype inside namespace adl_barrier, bring it in the intended namespace via using-decl.
Let's try making it a class template and instantiate it with a (not so) innocuous template argument that happens to be in just the wrong namespace.
Kaboom.
ADL barriers have to be the most stupid idea of all times.
Okay, let's try putting the 'perform adl first, else use a fallback' in a different namespace and bring that into our intended namespace via using-decl.
Doesn't work, which makes sense.
Meh, I'll do as Boost does. No point in fighting the language.
 
:(
 
@Rapptz It's not the end of the world. As a writer of range datatypes, either you provide a freestanding adl_empty in the same namespace to be found via ADL, or you provide a static member function empty. As a user of ranges, you use range::empty and let it do the right thing.
The only thing I've ever disliked is that adl_foo is a poor name. Maybe I should make it range_empty?
empty_implementation?
 
It's reminiscent of C times.
 
Exactly! :)
Actually I'm starting to dig empty_implementation. It's a big hint that's something no one should call directly. I could even require the static members to use that name. In fact that should probably be nicer for refactoring, if the freestanding function is turned into the static member or vice versa.
 
8:49 AM
I'm impartial to do_not_touch_this
 
@Rapptz Prostates again?
 
lol
 
Another argument for requiring both to be named foo_implementation: if a writer (or even one of their users!) ever makes the mistake of writing foo(r) unqualified, it might compile without complaining. If you call foo_implementation(r) then the mistake is obvious, and if you call foo(r) instead of range::foo(r) then the compiler should catch that.
 
Xeo
@LucDanton Hai, can haz concept maps?
 
Haha. That's putting the burden of figuring what to dispatch how to the proposal writers, and the implementation writers (and I mean compiler implementers, not range writers :p). Also see: ConceptGCC.
 
Xeo
8:56 AM
I just wanna abuse them for type-classes :(
 
I'd rather the language does something novel. This is really unexplored territory and in the larger scheme of things I think it would be better in the long (really long?) term that e.g. Haskell, Rust and C++ go their separate ways.
I'm guessing Scala also does its thing, but I don't really know.
 
Scala is a mashup
I don't think it's really innovative, but that wasn't its goal
 
I see quite a big potential in Scala, but welp, no time to really explore it
 
@Rapptz The official website uses another player/website for their videos, so I'm assuming Youtube isn't where they prefer their viewers to go. I really don't know though. In any case thanks for the heads up.
 
9:03 AM
They host it on another player to avoid YouTube Content ID bullshit probably
 
I keep using select_overload {} even though I made select_overload a constexpr objects and not a type :(
 
@Rapptz What's YouTube Content ID?
 
gcc: Internal error: Aborted (program collect2)
Please submit a full bug report.
See <URL:http://www.mingw.org/bugs.shtml> for instructions.

WTF?
 
It's when they view videos for copyright claims using their algorithms.
 
yiz
back from the wildness - not completely yet ... & alive ^_^
 
9:08 AM
Like if you play a song and it recognises it you would get a warning on your account and your video muted.
 
Or if you play a video then they take it down.
 
ew
 
I have to merge a branch
so I should switch to main, pull, then what
 
I had a bunch of changes, and then I accidentally reverted them
turns out that Hg can't rollback or undo a revert
 
9:09 AM
well I have them on remote branch too
so I don't think I could lose them
 
yiz
First day - 12 hours fast hike + rock climbing. Didn't think I could handle that, but I did. Fell down in the dark coz we were lost for a bit. Luckily, it was 1 metre high and wad cushioned by the bush.
 
TFS Abridged is so funny
 
lol I am already 80 commits back
working with a lots of people on the same repo is fun
 
Now I have to wait 2+ weeks for the next episode :(
 
fuck fuck fuck
Bartek & Git somehow feels like Wallace & Grommit; at least the amount of mess is similar
 
9:17 AM
@Rapptz I hate episodic viewing. It's just so fucking slow. I'd rather watch all in one go.
 
Me too but TFS Abridged updates soooooooooo slow.
Episode 1 is from 2008 I think and they're on Episode 35.
 
pretty much the speed of Doctor Who then
 
@Rapptz No stinger/blooper reel at the end? Aw.
Whoops, I didn't even watch ep 34.
 
Just a song in the end lol
 
Xeo
9:34 AM
@DeadMG: Seriously, ^ is getting so full of workarounds, unintuitiveness and special-cases, can we please just stop it?
 
what, re-using strict aliasing is a special case?
 
Xeo
Tell me how many people you think really know about strict aliasing
 
who cares?
the question is, are they going to get surprisingly buttfucked if we move without telling them?
as long as the answer is "No", then meh.
frankly, I would expect that the vast, vast majority of cases don't involve any aliasing at all anyway
 
@BartekBanachewicz o_0 why not each person with their own repo issuing pull request to a main repo?
 
@thecoshman because we kinda can work with git and the history is linear
everyone prepares their changesets as local commits, as I am doing right now, and just pushes to master
we have strong CI and pretty much all regressions are caught
so about 10-20 minutes after commit you get results, with a lot of red if you screw up
 
9:42 AM
well, that can work, but does assume that anything pushed to the main repo is perfectly safe
 
meh, if it isn't it's no biggie really
 
which it may not be, people can pull that broken code
 
I mean that annoys people sometimes
@thecoshman you can always go back a commit and build if you need that.
and people tend to fix their fuckups quite fast
 
better to not have to in the first place
 
not really
 
9:43 AM
I think the way Cat set up the kyrostat builds was rather good
 
pull requests would take shitload of time
we don't have time for that
 
meant before anything goes into the main repo it had at least passed basic checks
 
our setup is good in the way that you can have changes fully tested extremely fast
 
you could even set it up so that you push those repos, they are built and if all is good, they are auto pushed to the main for everyone to pull from
 
each commit generates review req too
 
9:44 AM
buffer it effectively
 
@thecoshman which delays the integration
no free lunch rule.
I mean if it's a small project, cool
but our builds take well over 15 minutes
 
@BartekBanachewicz no, the buffer repos will auto pull from master, so the only changes will be those you wish to add, to main
 
Again, I think it's a good idea, but for smaller team
 
main repo - no manual pushing too, people pull changes from here before wishing to commit
build repos - a repo that can be cloned at will, kept in sync with main repo. No one should pull from here. Each push is automatically built and all that jazz, if all is good, auto pushes to main
work repos - where people can do there own stuff
you have everything you currently have, but is even more robust
the main repo is always good
ofc, you can still get faults introduced if they do not break build or basic testing. But then, nothing will save you from that besides more thorough testing
if anything this something that as your team gets larger becomes more important, as you are more likely to have people pull broken code before the OP gets a chance to fix shit
 
9:52 AM
any way, my new PC order is being held up thanks to PSU being out of stock... not sure if I should pay a bit more to get a more expensive but in stock one
 
git just moved my changes to remote by itself
 
@BartekBanachewicz what commands you use?
 
git checkout my_brunch
git rebase master
git rebase -i HEAD~2     // to squash commits
git checkout master
git merge my_brunch
 
o_0 that shouldn't let changes leave your computer...
you don't have anything aliased do yo?
 
Oh, I know why!
I tried to push, but it was rejected
however, it only rejected the my_brunch
after I -d the branch, push showed no pending changes
so push does as much as it can, and if it fails it doesn't rollback other branches
 
9:56 AM
did you just git push?
 
AFAIK it should only push one branch
 
I deleted the other one anyway
 
so you have previously used git push -u <dest> <source>
 
yes, that branch was on remote too
 
9:56 AM
such as git push -u origin master
 
I don't trust that Kelvin guy.
Oh hai everyone
 
fuck, wanted to look something up, but now all I know is it was some c++ thing...
 
uh
> remote: error: hook declined to update refs/heads/blend_fixes
 
10:16 AM
found this in an A: char arr[100];
int s = sizeof(0, arr); is there a some name for sizeof when it takes 2 args ?
so i can google it :D
 
why are you using it
 
sizeof is an operator, not a function... though it can used as one sure
 
it is just in an answer.. and i know it is an operator
 
also, , is an operator, not a function argument separator, in this context.
 
@NoSenseEtAl sizeof is similar to decltype so it'd do sizeof(arr) really
 
10:18 AM
@DeadMG hey, funky
 
50
A: Can code that is valid in both C and C++ produce different behavior when compiled in each language?

Kirill KobelevPer C++11 standard: a. Difference in the l-value to r-value conversion: char arr[100]; int s = sizeof(0, arr); // The comma operator is used. In C++ the value of this expreresion will be 100 and in C this will be sizeof(char*). b. In C++ the type of enumerator is its enum. In C t...

 
@DeadMG ah true
 
yes
in C the array decays into a T* for comma operator, for C++ it does not.
 
@NoSenseEtAl expression (0, arr) returns arr in this context
 
yeah that's what I said
 
10:19 AM
so you didn't understand it on many levels
@Rapptz alright alright
 
@BartekBanachewicz im confused, should not stuff inside brackets be some expression
 
@NoSenseEtAl it is an expression
similar to 0 + arr
 
@BartekBanachewicz some arcane stuff i guess :D
 
@NoSenseEtAl not really arcane, obscure more like
 
@NoSenseEtAl no, just a comma operator.
like, I dunno
a(), b(), c();
 
10:21 AM
@NoSenseEtAl It's usually used more for expression SFINAE. i.e. auto myfunc(U os, T t) -> decltype(os << t, void())
(auto in this case evaluates to void)
 
ah i still dont get that answer... still tnx for your time :)
 
Just know it'd evaluate the last thing
sizeof(int,int,int,int,float) is sizeof(float).
 
you can overload the comma operator o_0 I find it hard to fathom a good use for that
 
i got that, but how is that diff in C++ and C
 
@Rapptz Needs parens/braces.
 
10:23 AM
In C arr would decay to char* giving you sizeof(char*) but in C++ you'd get sizeof(char stuff[100])
 
@NoSenseEtAl you do realise they are different languages right... as much as JavaScript is not Java
 
5 mins ago, by DeadMG
in C the array decays into a T* for comma operator, for C++ it does not.
 
@LucDanton Examples examples.
:( admittedly rushed.
 
So e.g. sizeof(int {}, int {}).
 
@DeadMG OK, but I dont understand that, is that something like when you call functon with array and array decays to ptr ?
i mean what is so special about comma operator that C++ changed its meaning
 
10:25 AM
@NoSenseEtAl C++
 
@NoSenseEtAl you are focusing on the wrong part
the behaviour differs in how the pointer decays in C, but not C++
 
ah ill just remember it by pattern matching, not by logic... btw since you bothered to answer me take this as a small token of my gratitude : drdobbs.com/architecture-and-design/cs-biggest-mistake/… :)
 
@NoSenseEtAl remember sizeof is an operator, thus the brackets are just grouping the 0 and the arr together, the comma operator says, do this on the left, discard the result, then do this. so the 0 is discarded, leaving the array. C decays this to a pointer, C++ does not.
 
@NoSenseEtAl I love "seems like forever" loading pages!
Admittedly my 2nd click loaded instantly.
 
@Rapptz it's like the page was cached or something
 
10:31 AM
I closed the page before it loaded
 
and?
 
I saw a white screen then closed it.
didn't feel like waiting.
Just saying :S
 
you still triggered some cahceing
even if it is just dns
 
void foo(char a[..]) ..?
This is valid syntax?
 
Literally two dots?
 
10:34 AM
I wouldn't think so
unless that is some new C++ magic
 
Yeah literally two dots.
It's in the article he linked.
He did it twice so I don't know if it's a mistake
 
I'd assume it would be meant as a placeholder.
 
Xeo
It's the proposed syntax
 
Oh.
 
10:35 AM
> But all isn't lost. C can still be fixed. All it needs is a little new syntax:
 
Righto.
 
try reading dude ¬_¬
 
yeah... that's all C needs? bwahaha
 
C can't be fixed by adding two dots.
 
10:35 AM
@thecoshman To be fair I read it.
 
Yes, C needs more syntax for array declarators in function parameter lists. That sounds like a good idea!
 
C can be fixed by removing everything.
 
.
..
.:
::
^ we can use all kinds of dots
 
Okay well, I should go to bed. It's 6:40 AM.
 
::.;.::;...::.:;:; should be a valid C program then
 
10:36 AM
@Rapptz ¬_¬ clearly
@BartekBanachewicz main
 
..::main::..
 
lol.
sparkle sparkle
 
Xeo
> ~*~*~*~*~*~ sparkle sparkle ~*~*~*~*~*~
Was a commit message of mine not too long ago
 
@BartekBanachewicz needed to fix C: .. ...
 
10:39 AM
@Xeo needs more ponies
@thecoshman 250k annual salary... that's over 20k/mo :S
 
@BartekBanachewicz yeah... he must have been rather good at getting pay rises
 
he had a high position
 
p r.mapped_range.current.get()
$5 = empty std::tuple
It's not :(
 
@BartekBanachewicz yes, good at getting pay rises
 
If I do p *&$5 it does display the tuple >.>
 
10:43 AM
> The good news is that that Jones likes the revamped site since we uplifted that gnarled mess of ASP to PHP
TDWTF is starting to seriously scare me
 
@BartekBanachewicz from shit to shit
 
ASP is shit?
 
Once again a copy-and-paste error means I miss a return in what should be a return statement and once again GCC doesn't warn :(
 
@BartekBanachewicz aye
 
@thecoshman alternative?
 
10:49 AM
@LucDanton what level warnings you got? I get a warning for it
 
@thecoshman Usually it does. I'm not sure what conditions make that happen.
 
@BartekBanachewicz not sure, all I know is I don't like either :P
 
@thecoshman ...
 
@BartekBanachewicz php sucks, asp sucks
 
@thecoshman so show me nothing that doesn't suck for reference
without reference this statements is meaningless
 
10:57 AM
o_0
sucks => I did not like using at all
happy now?
 
well, not happy.
 
meh
 
I mean I'd like something for web that's good
Django is decent, but after a while I get bored and just don't want to write it anymore
I want to try Kepler (in Lua, obviously) one day
 
Hurray! Build is unbroken.
 
Xeo
IRTA "Hurray! Build is broken."
 
11:06 AM
Yay, changeset with 20 changes because fuck good practices!
 
Xeo
Ask the Puppy about that
 
Haha plus I forgot about some temporary workarounds in the vein of /* let's comment that until I figure out why it's borken */.
Shit, now I have range/primitives.hpp and e.g. range/primitives/ana.hpp. That's misleading.
 
@Xeo IRTA Do the puppy thing with that.
 
Eh, going to be range/detail/primitives.hpp. Client code should use concepts/range.hpp.
And now I'm starving. Time for a ouiche.
Okay, I'm introducing length for ranges. What do I call that as a property though? 'r is model of a lengthy range' doesn't quite roll off the tongue, does it?
Requires<concepts::LengthableRange<R>>...
 
Xeo
11:22 AM
Is it only for constant-time length?
 
No. Ranges are not tuples.
 
Xeo
Huh. vector is also not a tuple and has constant-time length.
 
Oh, I read that as compile-time. Makes more sense yeah.
@Xeo No requirement for now (following D in that respect I think). I asked @R.MartinhoFernandes about it and he didn't get back to me.
 
Xeo
Hm. But you don't require length, right?
 
11:24 AM
Yes.
 
Xeo
LengthInspectableRange!
 
I'll see how far I can go with things like 'zip_range is length-y iff all the zipped ranges are and its complexity guarantee is the lesser guarantee of the zipped ranges guarantees'.
 
Xeo
A single-pass range without constant-time length (if it does have length) doesn't make much sense... or does it?
 
I'm wary about that sort of predictions when it comes to generic programming :)
 
Who the hell is Jon Skeet? — thenduks Apr 21 '09 at 20:37
 
Xeo
11:30 AM
@LucDanton Heh, rightfully so, I guess
Hm... I just deleted 11 characters to fix a bug.
 
•Jon Skeet coded his last project entirely in Microsoft Paint, just for the challenge.
 
Oh. The debug iterator template of libstdc++ is not SFINAE friendly.
Can't SFINAE on std::iterator_traits either. This sucks.
Fine, I'll SFINAE on *it.
Are there types that are incrementable, but not decrementable, that are not iterators?
 
Xeo
@LucDanton ?
 
user784668
@LucDanton only the ones the user specifically define to make that statement not true
 
11:46 AM
@Xeo The iterator of e.g. std::forward_list is wrapped in a __gnu_debug::_Safe_iterator when in debug mode. Instantiating operations the underlying iterator does not support yields a hard error, std::move_iterator-style.
@Fanael Ya, I should have qualified with 'common' or 'usual'.
 
Xeo
@LucDanton Oh. I see.
 
user784668
Fucking autohell.
 
Maybe I should ditch interval support for iterators and focus on slicing.
@Fanael Haha
 
Xeo
@Fanael what
 
Did you lose a bet or something?
 
user784668
11:50 AM
 
Xeo
Ahahaha
 
user784668
I wonder why nobody forked Clang to turn it into a template debugger yet.
 
@Fanael Those guys that do the R# thingy are doing it.
 
user784668
@LucDanton R#?
 
Mmmh, they may have changed the copy. They didn't say 'TMP debugger' explicitly, but that's how I read it. (Martinho as well, so not just me being delusional.) Anyway it's a "here's the feature list of our upcoming product" thing, I don't want to give anyone false hope.
 
Xeo
11:59 AM
@LucDanton Oooh, interesting.
 
user784668
lol, OS X only
 
Xeo
What?
 

« first day (968 days earlier)      last day (3980 days later) »