« first day (1399 days earlier)      last day (3544 days later) » 

7:00 AM
switch case with calls to some other function.
 
tuple<T...>variant<T...>
 
Xeo
@Rapptz Example?
 
whatcha mean?
@LucDanton not applicable here I think
 
variant<T...> is the type of ‘some element of tuple<T...>, depending on a runtime index’.
 
I'm using the tuple as a way of storing variadic arguments
I guess I could parse the string at compile time..
well.. no
I can't do that
 
7:04 AM
std::getline(std::cin, fmt); my_printf(fmt, 42);
 
any other alternative ways of storing variadic arguments?
 
Dependent typing.
 
Xeo
@LucDanton I think I have a newer version of this somewhere on Coliru aswell, but I couldn't find it just now: coliru.stacked-crooked.com/a/f10a122e1d81531c
oops, I should get going
 
@Xeo Euargh I shall hope so.
 
meh
 
7:07 AM
You have to be dynamic :v
 
what a pain
 
Xeo
@LucDanton ?
 
Re: a newer version.
 
Xeo
Yeah, but what do you mean with "dynamic"?
 
template< typename T >
struct asymmetric_coroutine
{
    typedef push_coroutine< T > push_type;
    typedef pull_coroutine< T > pull_type;
};
Non-deducible ._.
@Xeo Runtime type checks.
 
7:19 AM
._.
this is simple if I don't need to actually keep the value
 
boost::coroutines::(push|pull)_coroutine are undocumented but oh well.
 
Xeo
@LucDanton Yeah sorry, still not getting it :(
 
I’m assuming this is implementing positional arguments, hence the mention of an index into a tuple.
 
positional arguments is simple
 
Xeo
@LucDanton Oh, no.
 
7:21 AM
this is variable width/precision
 
Xeo
I just had this relation elementAt :: tuple<T...> -> Int -> variant<T...> in my head and wanted to implement it
for no reason at all, really
 
I did positional arguments like this: github.com/Rapptz/Gears/blob/master/gears/io/detail/…
 
@Xeo This was regarding @Rapptz stuff.
 
Xeo
oh, ok
 
anyway I guess I give up
 
7:27 AM
@Xeo k I’ll write a tuple->variant thingy now.
 
Xeo
heh, hf
@LucDanton I guess I have to ask why "euargh", then :P
If you meant the "dynamic" thing as a reply to Rapptz
 
It’s kinda wall of text full of boring stuff.
I’m not sure what to call the function :(
 
What a horrible edit.
> Made it easy to reaaaad!
 
Paragraphs are nice :(
 
The title and the tags. :v
Besides, I don't think this should be logically subdivided into paragraphs.
 
7:34 AM
-1.
 
0
A: Why is "while (i++ < n) {}" significantly slower than "while (++i < n) {}" in Java?

BathshebaI suggest you should (whenever possible) always use ++c rather than c++ as the former will never be slower since, conceptually, a deep copy of c has to be taken in the latter case in order to return the previous value. Indeed many optimisers will optimise away an unnecessary deep copy but they c...

^^ wut
 
Really, why c?
 
He says C++ sucks and ++C is all the rage.
 
I don't see why you left a comment saying he's wrong.
 
Conflicting inherited constructors yield an instantiation error and I don’t think there’s an easy way around that :( So atm variant<X, X> is ill-formed.
So… more linear scans I guess >.>
 
7:46 AM
I don't want to implement a variant just for variable width/precision
way too much effort
 
I thought you gave up.
 
I did
that's me giving up
 
@Xeo Looks like this.
I suppose I could just call it get and put it wherever. Won’t necessarily be picked up by adl::get though.
 
Xeo
> { std::abort(); }
oh come on, that's just lazy
 
Well, no commit yet. It’s a rough sketch.
 
Xeo
7:53 AM
And that look basically like what I've done, 'cept you have your BindOver thingy while I have some boilerplate
 
Yes, much nicer for the eyes :D
 
Xeo
yeah
Oh, you use indices
I just count down
 
I don’t think aborting is that far-fetched, given that get(a, i) == a[i] for an array anyway.
 
Xeo
guess we have a reversed scanning order
@LucDanton Meh, I like optional. Guess you could provide two versions or something
 
Hey everyone, if you've got some time then I'd like to discuss something and if not no big deal. Let's say I'm working on a program that has a plugin system (loaded at runtime). Now let's say that with a major version bump, I changed the interface of the plugins (added only, nothing deleted). Is there a good system for querying the loaded plugin for its interface version, and dealing with it based on that?

Perhaps this question is a bit too open ended or broad for chat though.
 
7:55 AM
@Xeo I’d name it at.
 
Xeo
Yeah
 
I sometimes see interface inheritance in the DirectX library and such but I hesitate to use that as a good example...
 
Xeo
Although the stdlib at stuff throws
and doesn't return an optional
 
I don’t mind.
 
Xeo
I guess I would make the get thing return an optional, and have at throw an exception
 
7:56 AM
Only so many 2-3 letter words for ‘right here guv’.
Honestly I don’t think get is a good match for mirroring [].
 
Xeo
if only one could overload [] as a non-member :o
 
@Xeo I was also thinking the same, and for operator() and operator= too.
 
Xeo
Though I guess if you have your own tuples you could provide that as a member - but that seems like too strong a coupling for tuple and variant
@Puppy I wouldn't allow assignment, I think
 
Having a tuple-like concept is nice-ish. I don’t think one library tuple fits all.
 
Xeo
since that's more of a fundamental operation
 
7:58 AM
@Xeo operator=(Container, Range).
 
Xeo
@LucDanton Yeah
But no operator[] in that case (in C++ anyways)
 
this just made me wish variadic templates were better
 
I don’t think there are many variadic template improvements that could be beneficial here. Language tuples (and variants) however… it’s things like slicing, reordering and so-on that are very crazy to implement library-side.
 
va_list has things like va_arg to access the next element in the list
would be nice I guess
sans recursion
also there should be a way to specify a single type for the entire variadic argument
i.e. int&&... or what have you
 
I saw in #llvm that the concepts people are looking at something like void f(Constraint... args).
 
8:03 AM
Isn’t that supposed to work?
 
it should do but there are a couple of problems.
 
void i_dont_concept_very_well(IsSame<int&&>...); expanding to the ‘right’ (barring the daft non-concept) thing.
Eh I’m not too keen on digging up the papers. So I won’t.
 
apparently, void f(Constraint args) is defined as template<typename T> requires Constraint<T> void f(T args);.
the problem with void F(Constraint... args) is the requires Constraint<T> part.
 
Ooo I see where this is going.
 
apparently, they really need a valid expression for some reason.
they also banned static member concepts.
 
8:07 AM
Tbh worst case and you unroll the constrained template yourself.
 
personally I think it's pretty dumb for requires Constraint<T>() part to not be able to support packs natively.
 
It’s a bit unusual to expand into a conjunction, unless we’re going to allow requires a, b, c to mean the same.
@Xeo Wanna bikeshed the ugly RuntimeTupleElement?
 
groupon kept on give me $ in order to get me using their deals more ...
they put another $10 bait in my mail box
 
@LucDanton Seems fine to me.
 
As in not unusual?
 
8:17 AM
I think it's the obvious semantic in this case.
 
Xeo
@LucDanton uuh, sure :D
 
Dual!
 
Xeo
Yeah, I was thinking of something in the direction of the product/sum duality
But calling it just Dual would be a very generic term for a very specific kind of duality here
 
Also I picked index as the counterpart to []. That was a ‘well, duh’ moment.
@Xeo Yup.
 
Xeo
@LucDanton ix!
 
8:24 AM
hah, that stuff gives me hives
Sum?
 
Xeo
I'd probably just go TupleDual or so
Hm... Cotuple? :D
 
oooo so tempting
Yeah that’s ahead of the other choices so far.
 
Xeo
Possibly CamelCased, as CoTuple. Hm.
 
In Haskell-land it’s class Comonad though.
 
Xeo
yeah, that's why I went with Cotuple first
It just seems weird to see tuple in lowercase in the middle of a word, but I guess that's just because you usually just don't see that.
 
8:30 AM
I don’t remember what at throws.
 
Does tuple_out_of_range make sense then?
 
Xeo
Dunno if I'd go with a special exception there
 
I can derive from std::out_of_range no problem.
 
Xeo
I guess
 
8:33 AM
do you guys know the paper that ended up being std::tuple?
 
Nope.
 
I've found some old ones
like N1403
 
@Xeo Turns out I can derive problem, as the root annex::exception already derives from std::exception.
 
Xeo
hah
can annex::exception embed other exceptions?
though I guess that won't help if you specifically want to catch out_of_range
 
I don’t have an error info dedicated to that, but yes. There’s boost::errinfo_nested_exception but that seems inappropriate. And yeah I don’t think it’s helpful.
Methinks I need to make that one abstract and not derive from std::exception.
Speaking of there’s no virtual destructor. I’ll pretend this was intended.
 
8:39 AM
heh
the old papers used to do static_cast<Arg&&>(...)... instead of std::forward
 
That has went on for a long time. It may not have stopped, either.
 
the variadic template proposal kind of hinted towards doing something like
template<typename... Values>
vector(const Values&... values) {
reserve(sizeof(values...));
push back all(values...);
}
would have been weird
 
Oh, right. boost::exception is itself abstract. Convenient. And screw the destructor.
@Rapptz That’s weird.
 
@LucDanton Seems like that's effectively what we have now.
 
How do you understand when someone is asking your honest opinion or just a "support" opinion?
 
8:45 AM
Ruby-style words?
 
@CatPlusPlus I kind of liked MoinMoin... (Slow reaction, I forgot to hit ENTER, yesterday.)
 
Xeo
@LucDanton that's prolly just a style error swallowing the _
 
Oh okay
 
You’ve been specially chosen to get $10 off your next purchase on Groupon.
Omg omg omg ... thanks for treating me like an idiot ...
 
Oh boy, unspecified instantiation of overloads that don’t even match the number of arguments.
 
8:54 AM
also read as
You’ve been specially chosen to be treated as an idiot, now please open your purse and give us your cash
sad thing is that I probably will ...
 
Fuck this, s/get/cotuple/. Also I’ll rename the header while I’m at it.
 
Xeo
heh
 
Oh wait it’s std::out_of_range lol.
> If T has any virtual base types, those types must have an accessible default constructor.
?!
Mmmh, deriving from perhaps? Yup that’s exactly it.
tl;dr std::out_of_range sucks.
I thought doing a little C++ would brighten my day ._.
But you pull one thread…
I suppose I can non-virtually inherit from std::out_of_range and then virtually inherit from that.
 
9:16 AM
I found this while googling for something. yosefk.com/blog/c11-fqa-anyone.html
 
> Imagine someone mocking C++ for two char pointers comparing "wrong" with ==. Immediately they'd be told that casting to std::string (more verbose than ===) would work just fine, and that "you just don't get it".
lolwot?
I think that most people in C++ quite happily admit that the string literals thing is fucked up.
fortunately it simply doesn't come up very often.
 
@Puppy I'll never admit that.
Unless you pay me money.
 
dang that link is bad
I feel bad for linking it
 
You suck at linking stuff.
 
Linux's package management system is p neat.
 
Xeo
9:21 AM
@LucDanton ...
hackathon?
> the
 
Ell
@Jefffrey linux doesn't come with a package management system :3
 
@Puppy That’s half the point though. The other being that newcomers are ridiculed for falling into such traps.
 
Ell
What distro are you on?
 
that really depends on who's doing the ridiculing.
 
@Ell ubuntu
 
9:23 AM
if you post a question here, and it's not a dupe, you'd probably get an answer from someone like me who helpfully tells you the facts.
it's only if you post "HELP MY CODE DOESN'T WORK, HERE'S 10K LINES OF IT" that you get ridiculed.
 
@Rapptz It’s great.
 
How so?
 
besides, I feel that they're fundamentally uncomparable because the one behaviour occurs at compile-time and somewhat rarely, whereas the other behaviour occurs unpredictably at runtime.
 
The comments are pretty terrible and the blog is just a rant
 
@Ell what do you call apt?
 
9:25 AM
@Rapptz I think it describes very aptly part of the C++ community.
 
Xeo
@Jefffrey The default Debian package manager
 
Which part is that?
 
@Jefffrey apt is part of debian
 
wtf again
 
> The thing that really sets C++ apart is its development culture and value system – a perverse amalgamation of down-to-earth shrewdness and idealistic perfectionism. The whole idea of making the best, richest, most efficient and most generic/versatile programming language of the planet – you can sense that Bjarne Stroustrup aims at nothing less – ON TOP OF C is the perfect illustration of this culture, and perhaps its origin.
 
Ell
9:26 AM
@Jefffrey It doesn't come with linux. I know I'm being facetious pedantic, but lots of linux distros have lots of different package managers
 
It's not being facetious.
 
Xeo
there's a ton of package managers for different Linux distros. apt, yum, pacman, emerge
and prolly loads I just forgot
 
Ell
Oh yeah. It turns out I didn't know what facetious meant
 
^ transcript
 
9:27 AM
@Ell epic fail
 
You might have him ignored by accident.
7
Q: Rename the [stackoverflow] tag to [stack-overflow-exception]

metacubedCan we rename stackoverflow to stack-overflow-exception? It would clarify the intent of the tag and prevent confusion. The tag summary also indicates that such confusion is common: A stack overflow occurs when too much memory is used on the call stack. NOTE: Do not use this tag to refer to t...

 
@Rapptz Nope.
 
@Ell You were right either way.
 
Never ignored him and the profile pic on the left is as big as any other.
 
Yay it's raining. The drilling will stop for a while.
 
9:29 AM
@Ell Oh I see.
 
so
I should really record that intro video for Google Helpouts now or something.
since I've managed to chase all the other family members out the house
 
@LucDanton So it has one positive part, that's nice. Then he spends the rest of it ranting about Stroustrup and how he might be stupid.
 
No, it’s an example not meant to be exhaustive.
 
ah shit
 
I read the whole thing (comments included) and the majority of the tone was negative and ranting.
 
9:31 AM
am I really gonna put pictures of my ugly mug on the Internets?
this seems like a stupendously bad idea.
 
Just how I felt about it anyway.
 
Xeo
Just make an animated intro
 
hmm
that might be ok but I don't know shit about animating
 
it's made by displaying of series of images fast
 
> C, C++, etc and other languages don't have exceptions at all.
C++ has exceptions. :v
 
Ell
9:34 AM
@Puppy yeah
 
you misread
I'll fix it
 
You miswrote!
 
@PolymorphicPotato Not for stack overflow.
 
I don't think your comment is really relevant
 
9:37 AM
Unless I misunderstood OP
 
yesterday was sick
 
it's totally relevant, because stack overflow exceptions on Windows are totally language-agnostic.
 
I assumed OP meant stack overflow exceptions at the language level, see: Java.
Whatever the OS does is OS specific
 
he makes no such statement.
 
Hence, assumed.
 
9:38 AM
the tag summary doesn't even specify it as a literal exception.
 
Ell
@BartekBanachewicz that sucks
 
I see no reason why a Linux signal wouldn't qualify.
 
@Ell That wasn't the meaning of "sick" I meant
we were out for a sorta bar crawl
 
Ell
@BartekBanachewicz Oops. My brain inserted an "I"
 
frankly, the real purpose of naming it "exception" is just to make it clear that you're talking about the error instead of a website.
whether or not it's actually a feature called "exceptions" or not or who implemented it is more or less irrelevant.
 
9:39 AM
and somehow stumbled on literally underground jazz concert
 
post another answer then
since it's orthogonal to mine
 
going to.
 
my job here is done
 
hey now
 
9:42 AM
@StackedCrooked Rained here yesterday.
 
also I borrowed an ARM board from a friend
 
@StackedCrooked Fascinating.
(nice balcony)
 
Ell
@StackedCrooked this video is very theraputic
 
@LightnessRacesinOrbit I was trying to work out how high up it must be. Ten stories?
 
Ell
I might leave it on loop in the background
 
9:43 AM
I rent that place for only 430 EUR/month. Pretty good deal IMO.
 
THERAPUTIC
 
@Ell Upvote it so it becomes #1 video on Youtube :P
 
@Puppy try twenty
 
@Puppy 14
 
9:45 AM
if by "See" you mean "You were closer than I was"
then yes, I do indeed see.
 
hah, got you
I wasn't closer, so you're wrong
 
bored
 
:<
 
it's the top floor obviously
 
9:46 AM
^ how to win by losing
 
lower floors don't have big balconies like this
 
@StackedCrooked are there any indoor parts?
 
@LightnessRacesinOrbit my bed :P
indoor part is rather small tbh
and it's very messy
my balcony is clean because I never use it
@BartekBanachewicz lol
 
@StackedCrooked and because it's raining
 
probably
 
9:50 AM
ordered some new headphones
 
keep us informed
i'd hate to miss out
 
@Puppy that's always a good idea
 
@StackedCrooked Well, these crappy ipod headphones really just ain't the same as even the cheap desktop headphones.
 
@CatPlusPlus you recommended sphinx for C++, do you have any projects I can look at for some ideas?
 
lld uses it
 
9:53 AM
hmpfhm
 
Sphinx is a search engine, right?
 
can I easily get ARM cross-compiler on windows?
 
Ell
@StackedCrooked code documentation (iirc)
 
or is it not worth it and I should just use a vm
 
@BartekBanachewicz VS and Clang can both cross-compile to ARM from Windows.
not sure about GCC
 
Ell
9:54 AM
You can get webring.org/l/…
 
even Wide could probably do it.
 
Ell
wait
wrong thing :3
 
@Puppy I am not sure if that's the kind of ARM I need
I want OSless embedded targets.
 
@Puppy I was looking more for something with an API reference
@Puppy but thx anyway
 
Clang has -ffreestanding or something like that.
@nightcracker The joke is that LLD's documentation is shit.
 
9:56 AM
@nightcracker You won't find any good ones.
Using Sphinx won't make your documentation automatically good
 
of course
but just looking for ideas
 
@Puppy not to all ARMs out-of-the-box, but there's CodeSourcery
 
I think OpenCV uses it.
Yeah it does
but it looks like it's manually written
 
No idea what you're talking about. No description of the problem, no evidence, no example, no demonstration... can barely even understand what few words you do tell us. And very poor formatting. Try again... — Lightness Races in Orbit 22 secs ago
> its cannot work well
 

« first day (1399 days earlier)      last day (3544 days later) »