« first day (918 days earlier)      last day (4039 days later) » 

7:01 PM
@LucDanton "TMP is not verbose enough" - cracked me up
 
To be honest, I find the source download from there (modelimport.zip) some of the worst "C"-with classes I've encountered in a long time. — sehe 20 mins ago
 
fuck bool is arithmetic
 
These days I add extra layers to ensure all my traits conform to template<typename...> class :(
 
so you tortured yourself and went and fixed it anyways?
 
why is that a problem?
 
7:02 PM
@TonyTheLion Yup
 
woah, dat courage :)
 
@LucDanton What does that mean?
 
@TonyTheLion It builds character
 
@R.MartinhoFernandes No extra hidden non-type or template template parameters. It's for Eval.
 
7:04 PM
Ah, that. I started getting concerned about that recently, too.
 
user142019
 
"C++ is 20% cooler than Java" - who would even compare C++ with that stuff? bad title
 
@R.MartinhoFernandes that is not working out for me :/
but it is for you
So hmmmm
 
Poast coade.
 
7:08 PM
@R.MartinhoFernandes no kidding
 
inb4 you forgot ::type / used the non-alias conditional.
 
one too many set of parentheses
phew
 
0
Q: Warnung: Typkonvertierung in Zeiger von Ganzzahl anderer Breite [-Wint-to-pointer-cast]

user2305074I wrote the following code: struct DVDARRAY { int length; pDVD* dvds; }; typedef struct DVDARRAY DVDARRAY_t; //... int main() { int i; char c; DVDARRAY_t* dvds; poDAOproperties props; props = get_dao_properties(); dvds = (DVDARRAY_t*) DVDDAO_read_raw_filter(pr...

all the German!
 
I used conditional<is_arithmetic<T>::value, implementation::is_signed<T>(), false_type>.
That is one sucky typo.
my type traits are so more advanced than most out there.
Once they work.
Which will take a helluva lot of time.
 
nowai >:(
 
Xeo
7:13 PM
@TonyTheLion Oh gawd, dat German
 
hahaha
 
@rubenvb What's so advanced about them?
 
@LucDanton The longest traits I have are is_integral (due to specializations) and Xeo's trick with the comma operator. CC @R.MartinhoFernandes
 
@TonyTheLion Most useful part of the title: [-Wint-to-pointer-cast]
 
FFS GCC localises error messages as well?
 
7:14 PM
@R.MartinhoFernandes The cryptic errors are a feature.
 
export LANG=C
 
I don't really get why its giving that warning
 
@rubenvb That doesn't sound advanced at all.
 
Xeo
@Borgleader Best thing: He got the English error in the question
 
I don't see a pointer cast that creates that error
 
7:14 PM
@Xeo LOL i hadnt noticed... wow...
 
@R.MartinhoFernandes oh bullocks. Simplicity is advanced.
Have you looked at some of libc++'s or libstdc++'s definitions?
 
No. It makes no difference.
@TonyTheLion inb4 DVDARRAY_t not declared, C assumes function returns int, x64.
 
I beg to differ.
 
@R.MartinhoFernandes oh, interesting
 
Or maybe not. Without SSCCE you never know, but I suspect the code posted is not the code used.
@rubenvb Why?
 
7:18 PM
@R.MartinhoFernandes Simplicity has its perks all by itself.
 
What simplicity? What perks?
 
ugh
 
Xeo
The most simplistic traits use compiler intrinsics. :P
 
std::is_signed<int> is as simple as ruben::is_signed<int>.
Aesthetics of the implementation are irrelevant unless you are the maintainer.
 
Xeo
Btw robot, I found out that clang doesn't like is_trivially_constructible<T> with a not-trivially-constructible T
 
7:20 PM
what about rapptz::is_signed<int>. It doesn't actually do anything.
 
Or a user trying to patch a broken implementation.
 
@Xeo That sounds like a useful trait!
 
because maintainers aren't quick at fixing stuff unless there's a ready-made patch for it.
 
@R.MartinhoFernandes VS type traits are almost all intrinsics now.
 
There are broken implementations of is_signed?
 
7:21 PM
~generality of what I said~
there should be a constexpr typeid
for use in static_assert
 
Xeo
huh
What do you want?
 
print the real types of template parameters in the static_assert string literal
 
The static_assert string literal has to be a string literal.
It cannot be computed without the preprocessor.
 
yes, that would require compiler magic
 
Xeo
15
Q: Integrate type name in static_assert output?

XeoI like to give helpful errors / messages, and I also want to do so for my static_asserts. The problem is, that they depend on template parameters. Normally, those parameters will get displayed on way or an other due to the error raised, but they are either obscure or not grouped so they make sens...

:<
 
7:26 PM
@R.MartinhoFernandes If you did T(0) > T(-1), you might get some nasty results in edge cases.
 
Xeo
More compilers need to do this
 
I'm just remembering that unfortunate std::optional business
 
user142019
What about it?
 
Who would specialize std::is_arithmetic for optional?
 
@Xeo exactly what I was thinking :)
 
7:26 PM
@Zoidberg You don't remember me talking about it?
@LucDanton Tis true, I suppose
 
user142019
Probably was asleep. Oh well.
 
Oh yeah, and that's a fundamental category, too.
 
@rubenvb That isn't a constexpr typeid.
 
basically
 
user142019
Or I was watching MLP.
 
7:28 PM
NaN > 0 is false, but make_tuple(NaN) > make_tuple(0) is true.
 
user142019
Or writing code.
 
so the Committee spent literally hours arguing whether to be consistent with tuple, pair, and such, or consistent with T.
 
user142019
Ah lol.
 
Were concepts brought up a all? The optional proposal made a note of it.
 
@LucDanton Concepts are an EWG/SG topic, and I spent almost all my time in LEWG and a smidge in LWG.
 
7:29 PM
@R.MartinhoFernandes well, it was exactly what I was thinking about.
 
Because what to do for e.g. operator> depends on whether you have one LessThanComparable<T> vs a PartiallyOrdered<T> or some such.
 
eventually, the Committee decided to simply junk all relational operators that weren't < and ==.
 
Xeo
@DeadMG Wait, why is the second true? Because tuple(0) < tuple(NaN) is false?
 
@Xeo Yes.
frankly, I could see the logic for types that did not have their own >.
but for other types, IMO it's a problem that tuple behaves that way.
 
user142019
FUuuuuuuuuuck.
 
7:32 PM
2 mins ago, by Luc Danton
Because what to do for e.g. operator> depends on whether you have one LessThanComparable<T> vs a PartiallyOrdered<T> or some such.
 
The problem is lack of concepts.
 
C++ is 20% cooler than Java.
 
user142019
I have code that does two different twitter searches but in some very weird way it turns it into one single twitter search with both queries merged into one.
 
how can you be so exact?
 
How do languages without stacks work?
 
7:33 PM
@Pawnguy7 they don't. Not well.
 
@Pawnguy7 Badly, if at all.
 
Oh. Hey Jab.
 
@Pawnguy7 hey Pawn :D
 
Back me up but: if you have PartiallyOrdered<T> then just implement against <, and even with 'extra' values like an empty optional you can, with proper care, end up with a partial order still.
 
user142019
Haskell has no callstack.
 
user142019
7:34 PM
Though it has other stacks. :P
 
user142019
> There is no call stack in Haskell. Instead we find a pattern matching stack whose entries are essentially case expressions waiting for their scrutinee to be evaluated enough that they can match a constructor (WHNF). — Stack overflow
 
@Zoidberg ^
 
Xeo
[21:34:16] <gribozavr_> DeadMG_: don't forget to flush
Ripping stuff out of context~
 
Is Sandbox the SO equivalent of /dev/null?
 
7:37 PM
@LucDanton I don't actually know if that's reliable. Empty optional is no problem, it's NaN and how to deal with that that's a problem. And I don't believe this mechanism changes the problem with NaN.
 
Irrelevant. That very NaN makes sure that's not a partial order. You suck.
 
the point is that there's no reason to make > do something other than call T's >, if it has one- you can't fix a non-partial-ordering.
@LucDanton I was just saying that. ^^
 
NaN is not a problem at all...
 
Why do you say irrelevant things then?
 
user142019
@Code-Guru You asked that in the C# room already.
 
7:39 PM
the point is, implementing > in terms of !< is not going to fix a partial order problem. There's no advantage to doing it that way if T already has a >.
 
wow
concepts!
 
hey peopl
 
Xeo
> as !< is wrong anyways
 
i have a set of n vertices and a set of k vertices ... how to the display all the k combinations from n vertices... i mean nCk ...
if there are 4 elements to be divided into 3 elements then it wud display the combinantions 123 124 234 134
 
2 days ago, by kbok
Welcome to your new favourite place! Please read the newbie hints so that you can feel at home.
 
7:40 PM
@Zoidberg yah, I meant to ask it here...and despite what you might think, not everyone is in C# =p
 
@DeadMG What problem?
 
Xeo
@R.MartinhoFernandes No, it's NaN, not NaP
Btw, I wonder if I can somehow get currying / concise partial application into C++.
 
it is not should it be — Mac 1 min ago
^ that's completely opaque to me
 
@blackbee work out more examples by hand and look for a pattern
 
@LucDanton You know, I don't even know anymore. I sat through two hours on Thursday of this and the only argument in favour of !< was consistency with tuple, no reason why tuple should be done that way.
 
7:41 PM
@sehe that makes 2 of us
 
@Xeo Oh boy.
 
Xeo
What :<
 
12 mins ago, by Luc Danton
Because what to do for e.g. operator> depends on whether you have one LessThanComparable<T> vs a PartiallyOrdered<T> or some such.
 
Xeo
I really like Haskell's partial application
 
That is why: because we don't have concepts.
 
7:42 PM
Exactly.
Because no one knows what overloading op< means.
 
@LucDanton In what situation do you gain an advantage in implementing > in terms of < if T already has a <?
 
Xeo
Btw, can concepts be seen as something like Haskell's type classes?
 
@Xeo Yes, but not concepts lite. (which is why I don't like it)
 
9 mins ago, by Luc Danton
Back me up but: if you have PartiallyOrdered<T> then just implement against <, and even with 'extra' values like an empty optional you can, with proper care, end up with a partial order still.
 
Xeo
@R.MartinhoFernandes Because of Axioms (C++) / Laws (Haskell)?
 
7:43 PM
right, if you only have <.
 
i have a bigger problem to solve... to find a given graph is a sub graph of another graph or not. if yes then calculte the number of occurances.... it wud be really helpful if a got some help..... its been 3 days and now i feel lyk dying
 
Xeo
Or why?
 
@DeadMG No, if you have a partial order.
Partial orders have >, too. Srsly.
 
@LucDanton Then you only need < and what do you care about >?
 
Xeo
You're thinking strictly-weak-ordered, it seems
 
7:44 PM
@DeadMG If you don't have a PO forward to whichever relop, with no other semantics.
 
@Xeo Because, AFAIK, concepts lite are not something you can tag explicitly: they still go for mere interface tests, no care for semantics. Explicitly tagging is the sanest way to do it when there are laws to be obeyed, yes.
 
so i thought of dividing the supergraph into the number of vertices of the subgraph and then test for isomorphism
 
That works for tuple. For optional I need to think about it.
 
Xeo
@R.MartinhoFernandes Well, Haskell also doesn't enforce laws, no?
 
@Xeo No, but types don't become instances of type classes out of the blue. You have to mark them explicitly as such.
 
Xeo
7:45 PM
Ah, true
 
@Xeo Yup. Class instances are concept maps + explicit concepts (forget the name right now -- corresponds to explicit specs right now).
 
Xeo
Concept maps, was it?
 
user142019
I believe there was a tool that could analyse laws you could put in comments.
 
user142019
And now I'm sure.
 
@Zoidberg I wrote one in class :)
 
7:46 PM
Concept map is for making e.g. T* an iterator.
 
YAY
 
Only thing that I didn't really do was parsing the laws out of comments... you had to input them manually.
 
FUCK YOU CLANG, I AM THE VICTORY, IN AT LEAST THIS SMALL CASE.
 
lolwat?
 
Xeo
7:48 PM
But I remember the paper about Concepts Lite saying that it implements the Constraints part, leaving the Axioms for the future - and that Concepts = Constraints + Axioms. Doesn't that imply that the same interface checks will happen with full Concepts too?
 
@Zoidberg We were going to write one to prove laws for imperative programs as well, but then the teacher changed their mind.
 
@Code-Guru ??
 
@blackbee Is that a question?
 
@Xeo Maybe. But I fear that if there's an interval between it we will just fuck up the ecosystem again.
 
@blackbee If you just want combinations, that's too easy to solve. If you really wanted, just copy the algo off WP. meanwhile:
0
A: graph: find subgraphs using list of nodes including wildcards

bliakoWhat I did at the end was: The problem is to find all paths of length N between 2 nodes. Cycles are excluded. read the data in as an edgelist, e.g. pairs of from->to nodes (names of nodes are assumed to be unique) create a hashtable (or unordered_map in boost and stl, c++) of node names as keys...

I bid you farewell!
 
7:50 PM
why do you bid me farewell ... in this tym of crysis
 
Xeo
@R.MartinhoFernandes No, I mean, you dislike that there's the interface checks to confirm constraints - and the full concepts will rely on them too. Or what was your complaint exactly?
 
What does tuple do when relating pointers btw?
 
@Xeo I dislike that interface checks are all that matters.
 
Xeo
Ah
 
7:51 PM
In few words: std::string::operator+ ugh.
 
@Borgleader I finally built a system that can convert from Clang types to LLVM types with no negative side effects.
 
Xeo
@R.MartinhoFernandes heh
 
it's surprisingly difficult
 
@sehe new @sehe sockpuppet? =p
 
@Code-Guru Wut, what's happening?
 
7:52 PM
@R.MartinhoFernandes I'm actually fairly hopeful. I find the quality of the proposal higher than what I've been used to.
 
In Taussig, "true sequences" (i.e. the ones with ops directly as members) have be tagged, so as not have seq::is_sequence<std::vector<int>>(), for example.
(I actually would like to probe for opinion on how to do that tagging; right now I am requiring a nested type is_true_sequence that is derived from std::true_type or std::false_type)
 
@sehe Follow the reply =p
 
@LucDanton I should read it then.
 
it's got to be traits.
 
@R.MartinhoFernandes (It strikes me that robots can be rather deafeningly pessimistic at times. Perhaps that's just realism, but... it's not overly useful I feel)
 
7:54 PM
nested typedef means that nobody can tag a third-party type.
 
I doubt there are many suitable third-party types.
 
@Code-Guru You know. Here's the shocker: I did that. Perhaps you'd be so kind as to tell me what you meant instead?
 
true, I guess.
 
@DeadMG Explicit specialization as an escape hatch. This is about the convenience thing, like having a member value_type when writing iterators.
 
Xeo
@R.MartinhoFernandes Btw, how do you intend to handle ownership of a range? I.e., when somebody really wants you to just take ownership of the range, and not just a proxy range wrapper.
 
7:56 PM
@LucDanton That's about proxies and nothing to do with convenience. Convenience would be auto.
 
So, you've never written an iterator then.
The query for iterators is via std::iterator_traits, because pointers. So yes, the member type is a convenience. It's not a requirement, nothing to do with proxies. You suck so much.
 
@Xeo Describe a scenario. Just pass the actual source? What's a owning sequence? Should it own all elements, or stop owning the popped ones?
 
admittedly, I do try to avoid writing iterators.
 
It's like allocator_traits. The actual requirements are very few because as a convenience it does a lot of thing for you. If you want to override that, you can put it in your class
 
@sehe I think some really cool stuff can come out of it, and it's something I really look forward to it, so I don't want to see it ruined or half-assed or with stuff bolted-on later. I call it perfectionism instead :P
 
7:59 PM
(An important difference is that std::allocator_traits was freshened up and is more modern than std::iterator_traits.)
 
I learned at Bristol that it can even implement rebind for you in most cases
 
Yeah. A basic allocator can be written with three (or four?) members, IIRC.
 

« first day (918 days earlier)      last day (4039 days later) »