« first day (1866 days earlier)      last day (3075 days later) » 

4:00 AM
constexpr void incr(some_non_literal_iterator& i) { ++i; } is not correct
the writer of a constexpr function makes a strong claim that the compiler checks immediately
a function template marked constexpr must have at least one constexpr specialization—which I suspect is a handwaved requirement that’s not supposed to be checked
for non-trivial, non-pathological function templates, how do you prove a negative given all the ways there are to construct a type?
it’s probably an escape clause so that the compiler can blow up in pathological cases
sheesh I wrote my examples with C++14 rules in mind, I hope that’s not outdated or anything
 
user406009
But isn't it the same constexpr requirements for both?
 
user406009
It's just that one is checked at a different time?
 
nope
incr<some_non_literal_iterator&> is a valid specialization
it’s just not constexpr
 
user406009
Oh, so you have an escape hatch sorta like SFINAE that invalid const expr specializations will still work, they just won't be const expr.
 
yeah—provided that at least one specialization is constexpr
I don’t know if that specialization is required to exist in-potentia or something, it’s weird
 
user406009
4:06 AM
Which in retrospect, is also similar to how && is handled in templates as well.
 
user406009
Seems to be a common trend with C++ template features.
 
hey guys, i have a question ?
 
user406009
@Lamour Sure, you can ask. No guarantee of an answer though.
 
ok... Is BST is good approch to implement a parse Tree ?
 
@Lalaland I think the literalness of template<typename X> struct thing { X x; }; is a better example
 
4:08 AM
there are many different types of BST
 
or the trivial properties etc.
 
user406009
@Lamour What do you mean by a "parse tree"? What functionality are you trying to achieve?
 
you see how when you have a grammar rules and you want to derived a tree for any inputs
 
user406009
Ah, you want to do parsing.
 
user406009
I don't think a BST would help you there that much.
 
user406009
4:10 AM
I would look into the LL(1) algorithm and LALR(1) algorithm.
 
@Lalaland hey I'm totally in agreement with you
 
damn you ruined all the fun :p I was going to suggest the red-black tree
 
user406009
@Lamour There are also existing tools like BISON which can write parsers for you.
 
I think it's a homework question, they need to implement the algorithm themselves ...
 
user406009
You can also try to do a recursive descent parser if you aren't too concerned about performance.
 
user406009
4:12 AM
Recursive descent is awesome.
 
ew
 
user406009
If it's a homework question, then they probably want the stupid dynamic programming parser thing.
 
i mean i was trying the BST analogy, the parent node and left and right children
 
user406009
It sucks, but it can "parse all languages" or whatever.
 
BST stands for binary search tree, it's ideal for searching
do you need to search anything?
 
user406009
4:14 AM
@Lamour A binary tree is a possible format for describing a grammar.
 
user406009
It's not really a binary search tree though.
 
yeah i know what BST is
 
user406009
Once you get your grammar into Chomsky normal form, then the parse tree is exactly a binary tree.
 
i was trying to use the BST analogy. where i could put the Start Symbol into the root from there i could create a path for each previous nodes
 
user406009
4:17 AM
@Lamour What exactly are you trying to do? What's your input and output?
 
user406009
Are you trying to parse a string?
 
user406009
Are you trying to generate strings from a grammar?
 
@jaggedSpire yo
 
@jaggedSpire Hi.
I still have school tomorrow.
Depressing huh.
 
i am parsing any strings that the grammar rules can create
 
4:18 AM
lame
 
user406009
@Lamour Ok, so your output can be a tree like structure as you described.
 
@Nooble have ~fun~
@nick yo
 
@Lalaland yeah
 
user406009
So what's your question?
 
I wonder what the feelings of the SC is on constexpr operator= for library types is
if they feel it’s a defect that it’s missing, it means constexpr would have been a very meandering route to where D is, no?
 
user406009
4:21 AM
@LucDanton The question is which types?
 
the literal types, duh
 
I wanted to know if the Tree is an efficient way to go about that and i didnt want to use stack lol
 
user406009
Like pair and tuple? Or are you also asking for vector and set?
 
that’s soon-to-be obsolete terminology though
 
the problem is that at this point long hair just irritates me. Also, my hair varies in texture depending on the humidity, from wavy to curly, so the first two would require a lot of work. :-\
The last one actually seems like a lot of fun, but I'm afraid I don't have a good British accent to go with it. :P
 
user406009
4:22 AM
@Lamour The more important consideration is your parsing strategy.
 
@Lalaland a prerequisite for marking a member function constexpr, for using that type as a non-reference parameter, or for using that type as a constexpr variable is that it be a so-called literal type
 
@Borgleader :D
@Borgleader such majesty
 
user406009
There are many approaches, LL, LR, LARL, recursive descent, etc, etc.
 
for class types we’ll simplify it to 'a class type with at least one constexpr constructor (that’s not a copy/move constructor, duh)'
 
@Lamour just show us the actual homework question
 
4:23 AM
i.e. if you’ve done the footwork for making a class type literal, then presumably you should have marked the assignment constexpr as well
 
@jaggedSpire better work on your accent then
 
@Lalaland also keep in mind the difference between a non-member and a member function
 
which is?
 
@nick nah I'll just tell the hair person to cut it to around 1-2 inches in a way that will look good regardless of whether my hair dried curly or wavy. I'm boring like that. :P
 
template<typename X> struct generic { X x; constexpr void foo() { ++x; } };
it never ends
 
4:26 AM
@chmod666telkitty its about creating parsing tree lol
 
user406009
I think C++ has gotten too complicated.
 
user406009
No mortal could possibly understand the ins and outs of the standard.
 
I’ve been complaining about constexpr functions since day 1.
 
@jaggedSpire haha yeah short hair is ridiculously easy to manage
 
@Lalaland really? but it's only 1300 pages long... :P
 
4:27 AM
@Lalaland I don't try to understand it
I'm here to lead, not to read
 
they do get rid of some redundancy but the baggage that comes with is enormous
the tl;dr is that it’s design-by-keyword
 
user406009
@Lamour Also, many times you don't actually have to create an explicit parse tree while parsing.
 
user406009
Sometimes you can just do you work while you parse.
 
lol, was trying to figure out why I had a merge conflict and I just realized I was merging the wrong branch
 
@Lalaland maybe i should try using a singly linkedlist
 
4:31 AM
a tightly coupled list would be better
 
user406009
@Lamour It seems like an ambiguous assignment. Do whatever you think is best to get the grade you want.
 
user406009
Just remember that in the real world, the data structure of the parse tree doesn't really matter.
 
I don't think the assignment is ambiguous, I think some newblet is confused
 
user406009
Parse strategy, grammar complexity, etc, etc are all much more important.
 
@jaggedSpire The last one will be impossible to maintain I tell you.
 
4:34 AM
@LucDanton are you having fun
 
The last time I had hair anywhere near that long was in 4th grade I think. I looked like a girl 0_0
 
user406009
@GregorMcGregor Well, we have to earn our pedantry degrees somehow ...
 
user406009
And a GCC ICE is actually quite impressive.
 
@Nooble I remember my 8th grade experiments with hair gel. :)
 
user406009
Makes me want to check if MSVC handles this case correctly ...
 
4:35 AM
I searched for 'potato farmer' in google image & I found this:
 
@jaggedSpire I hate hair gel.
I like my hair nice and smooth.
 
user406009
@GregorMcGregor You clearly need to move to Latvia. And bring your potato goodness there.
 
@Lalaland lol
 
@Lalaland constexpr bool does_msvc_correctly_handle(case case_) { return false; }
 
@GregorMcGregor no
 
4:38 AM
@chmod666telkitty lol i am not confused, the strategy that i had was i know once the user input any strings such a * a , the code will look for the location of "*" in my conditional statement, then once i have the rule i know that the starting root of the tree will always be the starting expression (that's why i was think more about a BST) so i will check if the right and left child are empty then add the "return rule from the condition function" then finally i will keep using recursion until
the tree is complited
 
user406009
@Lamour I don't think that will work correctly or easily.
 
user406009
The issue is if * appears in any of your other grammar rules.
 
user406009
Are you trying to parse all grammars or just a specific grammar or some subset of grammars?
 
i mean in the grammar rule i only have one rule containing *
 
user406009
Oh, you are trying to parse one specific grammar.
 
4:45 AM
yes @Lalaland
:)
 
user406009
Oh, then you can probably write an adhoc parser.
 
user406009
We were under the assumption that you wanted to write a parser for grammars you do not exactly know.
 
user406009
There is actually a really cool special purpose algorithm for parsing arithmetic expressions called en.wikipedia.org/wiki/Shunting-yard_algorithm.
 
user406009
It even gets associativity and order of operations right.
 
yeah but i did not want to use a stack
I was thinking to use Abstract syntax tree
 
4:51 AM
if a BST won’t cut it for your AST, you could try a CST
 
I like you persistence on using a tree
@GregorMcGregor
 
@LucDanton I never use that data structure but i am looking right know on how to use it .Thank
 
it’s as easy as BAC
 
@chmod666telkitty lol it is because when you do it by hand you eventually create a tree lol so why not
@Luc
@LucDanton what is BAC?
 
user406009
Blood Alcohol Content.
 
user406009
5:00 AM
Everything's easier when you are drunk.
 
lol :)
 
except thinking
 
user406009
@nick Psst. Not important.
 
driving lol
 
@Lalaland true
 
i guess that pic is for me lol
 
is it pokemon or big data?
 
from the Boost website: well isn’t that clever
> Due to time constraints, the release of Hana will be postponed to a later release of Boost. This will also allow some known issues to be addressed properly before releasing the library officially as a part of Boost. More information can be found on the mailing list.
dang, I was genuinely tempted to ditch all my metaprogramming and use that
 
5:27 AM
Hana is p insane
 
I’ve peeked yes
 
@LucDanton really?
 
otoh it’s seriously boring metaprogramming, I would enjoy outsourcing the bits to someone else
@Rapptz you want to write string parsing metaprograms from nearly scratch?
 
what string parsing metaprograms
 
@Rapptz it’s exactly like bog-standard string parsing, except without libraries
 
5:29 AM
where is this string parsing metaprogram part of hana
 
No, Hana plays the part of the libraries
the string parsing is what you write
 
I don't really see anything new here :v
 
you’d rather use Boost.MPL?
@Rapptz does it matter?
 
No and no.
 
gotta have libraries somehow
 
5:44 AM
Finished homework!
Gonna eat dinner now.
@jaggedSpire What a nice time to go get some groceries.
 
user image
3
 
I’m thinking and thinking about it and this is going to be horrific no matter what
 
Do they know their name is a tautology? T & T is always true
 
@Nooble ah, but I'm at my parent's house, so they're already purchased
 
@jaggedSpire I'm also at my parent's house!
 
5:55 AM
@Nooble What an astonishing turn of events!
 
yeah I have to stick to full metaprogramming
annoying
 
6:13 AM
> In instantiation of 'constexpr<typeprefixerror>
that’s new
 
Ah, man, a rough morning
 
I've spent the last 15 minutes reading LGBT slang.
There are a lot of wikipedia articles on the subject.
 
6:31 AM
@R.MartinhoFernandes lovely
 
Is size_t... Rest supposed to be deduced to an empty pack here?
 
Time to test the bandwidth of USB 3.
Lol 50 minutes remaining.
 
6:49 AM
@R.MartinhoFernandes seems about right
@Rapptz did you get to the bottom of the topic
 
lol
 
7:18 AM
lol I have a weird bug with VS
if I transform for (int i = 0; i < collection.size(); ++i) { ... } into for (auto&& thing : collection), the second aborts with iterator not dereferencable thing
collection being an empty std::vector
wat
i'm gonna go on a limb and guess that's it's somehow modified by several threads and that invalidates iterators but uhhh
 
@GregorMcGregor are you accessing data without locks by several threads?
 
I don't think so
But then again it's not my code so maybe
That's the only explanation I see
 
he he he, but
 
0
Q: strange behavior with two similar cycles

DeanI'm using C++11, why is the first case working while the second needs auto&& ? #include <vector> #include <iostream> struct Obj { }; int main() { std::vector<Obj> vobj(10); for (auto& e : vobj) // Works std::cout << "Yes"; std::vector<bool> v(10, false); for (auto&...

 
> software engeneer at government
 
7:29 AM
someone might be interested
 
vector<bool> strikes again
 
right now I have no idea why that happens, but I hate the lvalue-rvalue concept. I find it so poorly explained and so confusing
 
See the question I linked
Is it clearer now?
 
Good work
 
@GregorMcGregor yes, thanks Gregor
much appreciated :D
sorry for the dupe
 
7:41 AM
@R.MartinhoFernandes he forgot to bring his case bomb alarm clock
 
@thecoshman you're in the steering committee now
 
@thecoshman uhoh. I'll keep escorting my children to school then. Maybe signal me when you drive?
 
Wellp, the new MacBook sure looks kinda hot. Can't get over the portless design, though.
 
@ElimGarak I'll buy it soon for my girlfriend
:(
 
@sehe don't worry, if anything went wrong, it'd most likely be stalling :P
 
7:53 AM
a lot of money will fly away :'(
that makes me cry
goddamnit
 
why would you buy that to your gf omg
 
Hi lounge
 
is she pennyless
 
Buy her a hamburger and pet her hair.
 
@ElimGarak are you single by any chance?
 
7:55 AM
she better offer you a new PC in return too
 
Next to a MacBook Pro at the same price point, it's difficult to justify. And that gold one is basically a "please rob me" sign in public.
 
@GregorMcGregor she needs a pc and those things are the best. Plus she already got an ipad
 
Yeah but dude it's just a gf you know
 
Wait until she's your wife.
 
or if she has a kid with you
 
7:59 AM
my gf wanted a macbook
 
but it's your money, feel free to spend it
 
she bought it herself
 
that's the spirit
 
omg wtf guys
 
Did she boost it? zing
 
7:59 AM
yo it's Christmas soon
I need gift ideas
 
the fall is skiing
 
Dude this is 2015, the century of ~~gender equality~~
Expensive presents have to go both ways
no double standards thanks
 
@Rapptz an iPad pro to go with that macbook of hers
 
I think we've both spent ~$700 in gifts for each other actually.
 
@Rapptz my dad has really taken into gardening and last year’s funky vegetables were a success, so I’m buying different funky vegetables this year
 
8:01 AM
if I kill a female or a protected-category person in CoD, do I have to be banned for racism/patriarchy/xenophobia?
 
@Rerito I already gave her an iPad last year.
 
Anal beads this year
 
@Rapptz Not an iPad pro
 
lewd
@LucDanton lol
"I bought you veggies"
 
@Rapptz seeds
 
8:03 AM
too logical for the joke to work
 
no shit
 
pls
 
I have friends who expect guys to pay for everything ... I don't understand
 
You know there's a sexual joke in there somewhere.
 
lol, 150 GBP postage.
 
8:04 AM
Way too many actually.
 
hey dad this year I got you this huge cucumber
mom loved it
and so did I
 
lol
 
Merry XXX-mas
 
With that said, from my personal experience, I don't like guys to be too stingy as well. I dated this guy, I paid half on pretty much everything we shared. Then one day he yelled at me for always having to come to my place. But he lived with his parents in the middle of no where. Broke up with him fairly soon.
 
it’s in your histories now
 
8:06 AM
> Forbidden Fruit Kit
> Psychedelic salad
I love it
 
lol these titles
 
@chmod666telkitty Maybe he wanted a foursome with you and his parents heh?
 
is this porn for gardens?
 
maybe
 
8:07 AM
omg I kinda wanna buy those actually
forbidden fruit kit arouses me
 
@Rerito Sad thing, he was Christian & didn't want pre-martial sex
 
well I was serious you know
 
they are trying pretty hard with the names
 
@chmod666telkitty Ugh!
 
Superb gift etc
 
8:08 AM
it’s just one brand, could shop around too
 
> #1 Best Sellerin Indoor Bonsai
p hardcore
 
somehow I don't think buying seeds is a good idea for a winter gift
 
eh gives you time to plan around for the spring
 
morning, @TonyTheLion <3
 
@GregorMcGregor you zooming in on ads in Karate Kid I?
 
8:18 AM
I usually prefer go half half when going out on a date, but when you dated guys who insisted on buying your dinner or bought your flowers (who you are/were interested), dating a really stingy guy doesn't seem to make the relationship last ... unless you are really desperate.
 
@ElimGarak morning <3
 
It's a lot like friendship ... even the kindest people sometimes don't like to be continuously taken advantage of.
 
@LucDanton it was planted
@GregorMcGregor Do they carry Nipple Salad too
@GregorMcGregor This explains I got socks and underwear :)
 
@chmod666telkitty The one you described was even stingy about sex. Hardcore
 
sup bby's?
 
8:24 AM
@TonyTheLion Had no internet at work for two days!
 
@Rerito how did you even work?
lol https://t.co/TO9kGX94xT
 
@TonyTheLion I slacked a lot and did some learning on a subproduct of our project
Oh and did I mention I slacked a lot? Also trying to debug a vicious segfault
 
ohhh slacking
 
It's been a week I've been trying to understand this segfault
 
8:29 AM
segfaults be hard
 
debugger didn't help?
try log file ... but I think you already know this
 
@chmod666telkitty Not quite, hierarchy of copy constructors taking valid references... Except for the last one which gets a null this
Valgrind showed up some stuff, got them corrected. Segfault still there
 
does it happen all the times or just sometimes?
 
That's the weird part
It depends on the build (weee thanks the shitty build system we got)
 
depends on the build, what do you mean ... debug/release?
 
8:34 AM
But if you got a "bad build", it happens all the time. And the problem occurs on memory on the stack. So it couldn't be thread related
 
I hate shit that forces you to highlight more than you actually want to highlight :(
 
I always build in debug for the matter
 
@TonyTheLion lol
 
Sometimes I'll rebuild, the segfault won't occur. Suppose I clean and rebuild. Bam segfault there
It's a fucking nightmare
 
@Rerito Sounds like UB. :)
 
8:36 AM
@Rerito you are doing something wrong
 
@thecoshman Believe me, there are many wrong things going on under the hood there
 
@Rerito: What about core dumps?
 
@wilx I tried to study the core dump with gdb, found out it's some shit with copy ctors
(Which work well usually)
 
@Rerito: What about the various sanitizers that can be compiled into the code?
 
I am making a Manager class
sorry lounge I have failed u
 
8:38 AM
@Prismatic do you feel shame?
 
@wilx Never used this, could you elaborate? :)
 
it permeates every inch of my body
 
@Rerito Like memory sanitizer. There are more of these.
@Prismatic Nah. This is similar bullshit like the religious dislike of goto.
 
@wilx Did I mention our project doesn't even build with clang? You should see the wtfness level of some shit
 
8:43 AM
@Rerito Well, some of these are implemented in GCC as well. Does it build with GCC? :)
 
Yes, I'm looking into it :)
 
I kinda feel bad for the FreeType maintainer
Asks for support to help maintain the library ($20k) and he gets 6k
I feel like with the number of people that use FreeType even if he got $1 for every time someone used it in a project it'd be way more
 
@Rerito Search for -fsanitize.
 
@wilx Thanks, I think that will help! :)
 
I will become a perl master
sooner or later
 
8:50 AM
@Dean Probably the latter.
 

« first day (1866 days earlier)      last day (3075 days later) »