« first day (870 days earlier)      last day (4086 days later) » 

user142019
12:00 PM
@R.MartinhoFernandes you get {\n<indentation>}\n<indentation>}.
 
@Xeo So is ValueType<Optional> really that misleading then?
 
Xeo
@LucDanton But just Tuple doesn't have any ref qualification if you pass an rvalue to first... Meh, I think I just don't particularly like the idea of first automatically moving things for me.
 
@Zoidberg Great, right?
 
user142019
No.
 
user142019
Just don't do that problem solved.
 
12:01 PM
@Xeo So uh what do you use overloads that take rvalues for then?
 
user142019
And if you don't like it then turn it off in preferences.
 
user142019
It ain't rocket science.
 
Puppy, you picked the worst person to write an editor.
 
lol
 
12:01 PM
Because you could just write TupleElement<0, Tuple&> first(Tuple& tuple); then.
 
user142019
I could use a timer and check for the user hitting }.
 
@Zoidberg Please ignore subsequent }
 
user142019
Whokay.
 
@Zoidberg no. Just put it there. If the user presses }, ignore it (but move the cursor, i.e. insert it in place of what editor placed), If he doesn't, let the editor fill it.
 
@Xeo If I have struct foo { int i; }; then what about foo {}.i? Is that moving things on your behalf, as well?
 
12:03 PM
@LucDanton Last I checked, that was not an implicit move away, only an implicit rvalueness.
@BartekBanachewicz Recommending map instead of unordered_map? bads.
 
@DeadMG Yes. My point :)
I wouldn't say that first 'moves' things, for an rvalue argument.
 
user142019
@BartekBanachewicz hmmyeah.
 
@Zoidberg "if the user types well-formed code, the resulting code is well-formed" is the invariant you must hold.
 
@LucDanton If you only return an rvalue ref, then the user has the choice to not move away if they want.
if you return by value then they don't.
 
@DeadMG To clarify though I'm using 'move' in an expression-oriented fashion. I.e. std::move(i) is a move.
 
12:04 PM
not to mention what if T is std::mutex, say.
 
Yes, it sounds obvious. Now imagine what that means if by adding "smarts" to your editor you break that invariant: it's more broken than a dumb editor.
 
Xeo
@LucDanton Eh, if first(tuple<int>&&) returns an int... or would WithRefQualificationOf<tuple<int>, ...> yield int&&?
 
@Xeo Returns int.
But that's kinda by accident :/ I do rely on it though.
 
Xeo
Then how is that not implicitly moving stuff for me?
 
3 mins ago, by Luc Danton
@Xeo If I have struct foo { int i; }; then what about foo {}.i? Is that moving things on your behalf, as well?
 
12:06 PM
@LucDanton This, I think, is the problem.
 
I keep track of lvalue-to-rvalue since that's destructive. I don't even notice rvalue-to-rvalue.
 
when everybody else says "Move", they think "The original value has been destroyed, and a move of it's contents are being returned".
 
Not everybody else, no.
 
if you have first(tuple&&), then it should be T&&, for tuple<T, ...>.
 
@DeadMG Careful. The discussion is about traits and metacomputation, not about writing first. You're on a crazy tangent.
 
Xeo
12:09 PM
@LucDanton I'm not too sure how to answer that, tbh. decltype((foo{}.i)) is int&&, so I'd say no, it doesn't. So I don't see why it shouldn't be WithRefQualificationOf<Tuple&&, ...>.
 
@Xeo That decltype reports it that way is an artefact, and is by design. When do you care about xvalues vs prvalues though?
Uh, that should be a wrong question. You can't tell xvalue from prvalue across a call. So better point: it may be useful that decltype can tell the difference for expressions, but we can only inspect the result of overload resolution. So should we care to preserve the distinction?
@DeadMG wat
 
erm
ignore me
 
user142019
 
Xeo
@LucDanton In generic code, I guess? operator<<(stream&&) also doesn't move the stream anywhere (although it's faulty in the way that it returns an lvalue ref).
 
12:13 PM
@CatPlusPlus hi
 
ohai Cat
 
Here we go. Premature optimization strikes again. — LihO 1 min ago
 
user1357851
the fish in the plonk pic == fishy?
 
Does anyone here have any experience in converting Google Docs to Markdown?
 
user142019
@BartekBanachewicz No, but I did the reverse. :)
 
12:17 PM
@Xeo Should you care that it doesn't?
 
@Zoidberg Damn. I need web-based cloud markdown editor with autosave. Suggestions?
 
user142019
@BartekBanachewicz Write one yourself.
 
I.e. is code that does some sort of foo(std::move(bar)); baz(bar); worth having?
 
ughwhgh effort
 
user142019
Also Stack Overflow's Ask Question page. :)
 
12:18 PM
Why have moves and moved-from states at all :(
 
@Zoidberg lol yea
 
user1357851
 
There should be "don't publish this question yet" checkbox
 
17 mins ago, by Luc Danton
@Xeo So uh what do you use overloads that take rvalues for then?
 
how do you digitally sign a document anyway
 
12:19 PM
Much like the aforementioned insertion operator, do yours forward to an lvalue-only operation? Why bother writing them then?
@DeadMG Asymmetric crypto and chain of authority.
 
user142019
In Preview you can sign a PDF by writing down your sign and holding it for the camera. :L
 
@Zoidberg Google drive PC app and Texts.IO it is then :P
 
apparently, you need special software
the guy could have mentioned it sooner
 
(This is the answer to anything crypto-related in use btw.)
 
user142019
How is that software special? Isn't it just ordinary software?
 
user142019
12:21 PM
:v
 
htmmm TIL Texts.io has SCM integration
 
You can hash the contents of the document and encrypt that with your private key
 
Noobs, Y U NO UPVOTE CORRECT ANSWERS?
 
@CatPlusPlus Exactly what I said!
 
user142019
@TonyTheLion Noobs, Y U NO DOWNVOTE INCORRECT ANSWERS?
 
12:22 PM
because noobs, they suck
 
You don't need chain of authority if you have web of trust!
 
@TonyTheLion I made such a decent one just awhile ago :(
 
:cryptobuzzwords:
 
user142019
Teacher y u Bing.
 
user142019
12:23 PM
And IE.
 
user142019
On a Mac. :v
 
what?
that's hilarious
 
Still better than Safari
 
user142019
Nah.
 
user142019
Safari is bestest.
 
12:25 PM
what's wrong with Safari?
I've never had an issue with it, when I used it. :P
 
user142019
@TonyTheLion It's from Apple.
 
It's primitive as hell
 
user142019
At least it doesn't crash. \o/
 
It's equivalent of slapping WebBrowser control on a form and calling that a browser in the days of C++Builder
 
user142019
12:26 PM
lol
 
user142019
I should make a website on which people can share pictures of sandwiches.
 
(And coincidentally the only notable thing about Safari is the web control :v:)
 
user142019
WebView FTW.
 
12:27 PM
Anyway. I guess my prime motivating example to defend std::common_type remains CommonType<T, U...> max(T&&, U&&...);. Does that seem nice?
This recent question being the trigger.
 
Guys, what is the real difference between size_t and size_type. Because from the answers here, they both sound the same : stackoverflow.com/questions/8507851/…
 
@GamesBrainiac well they usually are the same.
 
ack
it's been a really long time since I used this scanner
I should have considered this earlier
 
Mike got it right
> If you're writing generic code, where you don't know what the class is, then it's better to use size_type in case it's not compatible with size_t.
 
size_type doesn't have to be size_t, otherwise it wouldn't exist
 
12:32 PM
@GamesBrainiac Why did you link to that particular answer?
 
@LucDanton I just wanted to show you what I had read, and what people had to say from their own experiences.
I just don't want to ask a question without any research.
 
It's a bit confusing though because that particular answer doesn't mention size_type at all. So when you ask about the 'real' difference, what would the 'fake' difference be anyway?
 
Xeo
@LucDanton Well, why did the standard bother to include rvalue stream operators? Because rvalues streams weren't behaving like lvalue streams WRT which operator overloads were found. Meh.
 
@LucDanton I can see that there is, 'virtually' no difference. But there has to be in order for two things to stay in the STL
 
@Xeo It's a backwards-compatible change with a language that didn't have perfect-forwarding, too.
 
12:35 PM
You know, we're not psychic and therefore cannot remotely debug your program. You need to post more code, so that we can see what actually is going on. This question is otherwise meaningless. — Tony The Lion 10 secs ago
 
@Xeo The free functions, like std::operator<<(basic_ostream&, const char*) only worked on lvalue streams
 
Xeo
@DeadMG Yes, I know.
 
@GamesBrainiac Okay, nevermind. I failed to make my point apparently.
 
@GamesBrainiac You seem to be not reading the words in the page you linked to. Because they don't say that there is virtually no difference.
 
12:36 PM
I need help.
 
I wish your answers addressed what I said and now what you think I'm asking or wondering about though.
 
@BartekBanachewicz that's been apparent for a while. :P
 
@TonyTheLion Oh, I need help in various aspects of my life, yes. Right now I need help in formatting my spec :P
HOW DO I SPEC?
I mean, Markdown <3. But I'd like numbered hierarchy of paragraphs. Will I need LaTeX?
 
That's a renderer issue.
(Hint: CSS can do it)
 
Umm, not quite
what?
 
12:39 PM
@BartekBanachewicz Yes, totally quite.
 
I'm confused even more.
 
@BartekBanachewicz quite
 
From a purely theoretical point of view, paragraph numbers can but doesn't have to be the part of the content then?
What if I'd like to refer to particular point?
 
0
A: CSS-styled paragraphs with paragraph numbering and sidenotes

asdfOne approach: .chapter { counter-reset: paragraph; padding-left: 20px; } .page p { width: 400px; } .page p:before { position: absolute; margin-left: -20px; color: #CCC; content: counter(paragraph); counter-increment: paragraph; } .sidenote { position: absolute...

 
@BartekBanachewicz that's how it works in LaTeX, yes. The numbering isn't part of the content, you just say which paragraphs should be numbered, and as part of the presentation/rendering, appropriate numbers are generated
 
12:41 PM
53 secs ago, by Bartek Banachewicz
What if I'd like to refer to particular point?
 
@BartekBanachewicz No clue in CSS :)
 
@R.MartinhoFernandes Is there something in MD that can do that?
 
> let min3 = (min .) . min :: Ord a => a -> a -> a -> a
> :t min3
min3 :: () -> () -> () -> ()
 
@R.MartinhoFernandes I assume he wants the reference to actually show the name/number of the paragraph it points to
 
Xeo
12:42 PM
@LucDanton True enough. I don't really know what to make of T vs T&& return value for rvalue arguments, to be honest though. It's kinda complicated.
On one hand, I can certainly see and understand why a simple T would do the job, since you can't distinguish between prvalue and xvalue, but on the other hand, the unnecessary moves in the T case are a bit of a let-down. If you chain stuff(baz(bar(foo(rval)))), you get 4 moves with a T case, vs maybe 1 move in a T&& case. (Yes, I know, as-if rule, copy elision, etc etc.)
 
That's ghci being crappy right, not monomorphic restriction? What with the signature :|
 
@jalf well it makes it easier for readers, I think
 
@BartekBanachewicz agreed
 
Fielding a question here, but...
 
@Xeo '(Potential) move constructions' instead of some of those 'move', but yeah I understand what you're saying.
 
12:44 PM
I don't know if CSS can do that, but it is a pretty obvious use case :)
 
@LucDanton lol
@BartekBanachewicz Hmm, maybe. DISCLAIMER: I suck at CSS.
 
As it stands, I think I want to defer all my rendering to a Renderer. The thing is, should I make it so every entity registers itself once and only once with the Renderer and then removes itself when it's dead? Or, should I make it so every entity that wants to be rendered adds itself to a list that clears at the end of the frame?
 
Okay, you know what, I'll focus on the content first
 
@Xeo Way off-topic though. This is about the meaning of e.g. TupleElement<0, Tuple>. If you do want TupleElement<0, Tuple&&>, it's there for the taking.
 
I'm pretty sure there's nothing in markdown for doing that though
 
Xeo
12:45 PM
@LucDanton Aight, we should be clearer if we mean "passing along the value category" or "actually move constructing stuff".
 
@ThePhD redundant operations in the latter. a lot.
 
@Xeo I'd mainly say, what if T is std::mutex?
providing T means no non-movable types; providing T&& means you can support it.
 
if it were me, I'd probably just crack out LaTeX sooner rather than later
 
@jalf Texts.io has Latex exporter :)
 
@Xeo This was really about co-opting metacomputations as generic queries :|
 
12:46 PM
@BartekBanachewicz sounds ghastly. ;)
I don't trust generated code to be readable :)
 
What's this texts.io
 
@CatPlusPlus visual markdown editor
It focuses on generating readable output
 
@BartekBanachewicz looks pretty neat
 
@jalf TBH I haven't used that exporter yet
 
WYSIWYM
It has a chance of generating non-terrible LaTeX
 
12:48 PM
and I guess markdown is a simple enough format that it should be easy to convert
 
exactly.
I'll give it a shot after lunch. BB.
 
what are you writing a spec for?
 
I should've slept..
 
If it can export Markdown then you can use pandoc to convert to other stuff
I wouldn't bother with commercial WYSIWYMs tbh
Writing Markdown is easy enough without that
 
Xeo
@LucDanton Maybe TupleElement combines two concerns... type of the element, and its value category.
 
12:49 PM
@Xeo The same concern, essentially.
 
@Xeo What do you want tuple_element (not the alias) to be? What is it useful for?
And how do you want to express the query 'given an lvalue of some type that is a model of a tuple, what is the type of adl::get<0>(tup)?'
Now we're doing business!
 
Xeo
@LucDanton decltype(adl::get<0>(std::declval<T&>()))? :D
 
Oh yeah, you're an abuser of decltype.
 
Xeo
@DeadMG I don't think so.
@LucDanton :3
 
@LucDanton Yep, he totally is.
 
12:51 PM
@Xeo The value category dictates what operations you can perform on that object. That's the same thing as it's type.
 
Let me see my return types.
 
the only unfortunate thing here is that in C++, value category is not properly integrated into the type system.
 
Xeo
@R.MartinhoFernandes That makes it sound like it's the worst thing ever to do.
 
Yeah, the result of apply(f, v, vs...) for variants is MakeVariantOver<R...> where R is the result of uncurry(f) applied to an n-tuple of the cartesian product of the variant slots. I think. Want to express that with decltype?
lol
 
decltype(apply(f, v, vs...)).
 
12:56 PM
lol
 
Doesn't work. apply is not in scope at that point (well, not the right one).
If I could write auto f(/* */) { /* */ } I would, of course.
 
Xeo
@LucDanton Since I have no clue what exactly you're computing there, I don't know how to answer. I see your point, though.
 
Visiting variants. Variadically. Perfect-forwardingly. I fuckingly like to adverb!
 
s/b!/bly!/
 
But I also like to grammar :(
 
Xeo
1:03 PM
@LucDanton To get back to this with proper meta-computation: TupleElement<0, T>&, I think. Where TupleElement should yield the exact type at position 0 in the tuple.
But meh, I should actually get back to beating Perforce. >_>
Windows being case-insensitive sucks.
 
hi guys.. anyone here knows hash table implementation using boost libs ??
 
Xeo
boost::unordered_map.
 
oh yeah!
 
@Xeo im a noob with boost.. so is there a simple example for it?
 
Xeo
1:09 PM
It's like a normal map for the usage.
 
@JishnuUNair The Boost documentation has plenty of such.
 
ok.. thnx mate.. :)
 
@Xeo That also works by accident :(
 
Xeo
@LucDanton lol, "by accident"
I think any implementation of TupleElement would support that, thanks to reference collapsing rules.
 
It does :/ You couldn't make IteratorValue<It>& work for move-iterators I think?
 
Xeo
1:17 PM
@LucDanton Ugh.
 
@Xeo Does that help us in general?
 
Xeo
Not really, no
 
I'm going to think about this some more and go back to it at a later point. I'm afraid there won't be an easy fix though.
 
hmm
what is -ldwarf?
 
Link to libdwarf (most of the time).
 
Xeo
1:19 PM
@LucDanton So much for seperating types from their value categories... sigh IteratorValueWithCategory<It>, which does WithValueCategoryOf<ValueCategoy<It>, IteratorValue<It>>, where ValueCategory<It> is placeholder& or placeholder&&... waaah....
 
k
 
@Xeo I'm not desperate yet :p Best leave it to stew for a while before lamenting.
 
Finding more using namespaces in my code nad purging them.
And slowly making sure everything is using std::vector and friends.
 
Xeo
@LucDanton Heh. The "waaah" was just because it seems kinda convoluted - I do think the seperation would be nice, still.
1
Q: Default function that just returns the passed value?

VincentAs a lazy developer, I like to use this trick to specify a default function : template <class Type, unsigned int Size, class Function = std::less<Type> > void arrange(std::array<Type, Size> &x, Function&& f = Function()) { std::sort(std::begin(x), std::end(x), f...

You gotta wonder why the standard committee removed std::identity...
 
man gcc -> /\<l\> -> n (next) some -> "-l library Search the library named library when linking."
That it looks for libdwarf is platform specific.
 
1:23 PM
@Xeo That was a metafunction anyway.
 
Xeo
@DeadMG It also had an identity operator()
It was a hybrid. :3
 
oic
 
Well my identity is separate from operators::identity.
@Xeo Btw another way to look at it is to make clear the separation in meaning between TupleElement<I, T> from Invoke<tuple_element<I, T>>. Since my TupleElement already does the WithQualificationsOf dance.
 
Xeo
@LucDanton Oh, I see.
 
And/or find a way to express the same as Invoke<tuple_element<I, T>> that is as convenient as the alias.
 
Xeo
1:27 PM
I always meant using TupleElement = Invoke<tuple_element<...>>.
 
(Making tuple_element itself an alias throws easy composition of traits out. Possibly.)
Mmmh, does swapping a minimum with a maximum even have a credible use-case?
 
@CatPlusPlus it's free
 
Couldn't think of a use case in the last two seconds
 
No it's not
 
@jalf my engine. I stopped coding and I am now planning changes I am going to make
 
1:34 PM
'jalf my engine' - sounds like 'Pimp my ride'
8
 
ew, planning
 
in Java and Android era, 6 mins ago, by RMiranda
need some OOP feedback: http://stackoverflow.com/questions/15202554/checkboxs-object-aggregation
I see a pattern here
 
@CatPlusPlus pandoc or texts?
 
Hi guys... any help with adding a class instance into a hash table...
 
Take a guess
 
1:34 PM
@jalf what's wrong with (a bit of) planning?
@CatPlusPlus sigh.
 
@JishnuUNair have you thought about maybe asking on stackoverflow?
or read the documentation
@BartekBanachewicz nothing, just messing around :)
 
sorry I did both...
 
@JishnuUNair so you failed terribly
 
@TonyTheLion Aw shit - I commented that. Didn't know it had broadcast enabled, else I would have downvoted.
 
@BartekBanachewicz sadly yes
 
1:35 PM
No spamming with stupid questions
@MartinJames you can delete your comment and downvote
 
@JishnuUNair I see two answers to your SO question. What do you expect us to say, that those answers didn't?
 
@TonyTheLion Done, thanks.
 
can you send me the link @jalf
 
@JishnuUNair the link to the question you posted on stackoverflow?
 
@JishnuUNair did you just ask him to send you the link to your question?
 
1:38 PM
I see it coming... wait for it...
 
No wonder he can't use map
 
Should I brush your teeth for you too?
 
no...
i messed up..
 
@jalf lol
@JishnuUNair you did, please fix.
moving on...
 
We should totally set up these Lazor cannons for newbs @Xeo talked about
 
Xeo
1:39 PM
hrhr
 
we could laser air strikes
 
Xeo
Well, I think it had 15+ stars in the end? There seems to be some concsent there, at least.
 
on noobs
 
I'm sorry that this comes as a surprise to you, but programming actually requires effort. You can't be a programmer by barging into random chat rooms and asking random people to please write your code for you. You have to actually write code yourself, and research how to write code yourself, and read the documentation for libraries you use yourself
 
@jalf sad how little this is known
 
1:40 PM
Sometimes you may even have to try things yourself to discover whether or not something works
 
..and once the code is written, please, please make some little effort to debug it yourself if it does not work.
 
Xeo
@TonyTheLion Nuke 'em from orbit, you mean?
 
> mutex lock is not unlocking
 
@BartekBanachewicz ?? did you lock it?
 
@MartinJames no, that's just a brilliant question title I just noticed
 
1:42 PM
@BartekBanachewicz well, of course, it's a lock, not an unlock!
 
I sense desperation in this guy.
 
@BartekBanachewicz Oh, I should'a guessed..
 
@Xeo oh noes, TVTropes
 
@BartekBanachewicz plus macros :((
 
> This works well half the time
@MartinJames macros explain a lot
 
1:49 PM
 
Oh gawd
I just realized that while I was eating someone actually fixed my cables
<3 IT.
 
@TonyTheLion In bad German accent "In..three..hundred..metres....catch..fire"
 
try { drive(); } catch(fire& f) {}
 
@BartekBanachewicz That line badly needs a comma :)
 
ooooh, and also
you just reminded me @Martin
 
1:52 PM
Ah. Next time, just give us the minimal reproducing teset case. And take your bug reports to the GCC bug tracker, will you? This is an ICE. — sehe 13 secs ago
and bye :)
 
Remember last time I've entered the wrong room by mistake?
I was fairly sure I saw this girl before
And I was thinking and thinking but nothing came up...
 
Heh!
 
And then, realization, last time I saw her she was shooting 1cm shotgun shells like a boss, topping the score of our group.
 
Xeo
wat
 
We went shooting for the last quaterly
 
Xeo
1:54 PM
ah
 
I had a purple bruise on my arm because of that shotgun :/
 
NEED MOAR VIRTUAL MACHINES
got 4 running on my pc so far
 
LATIN SMALL LETTER R WITH UNDERDOT THAT DISAPPEARS ON CLEANING MONITOR
 
@BartekBanachewicz You're doing it wrong :)
 
Haṛ haṛ haṛ.
 
1:55 PM
@MartinJames It was just damn powerful.
 
so dirty ;_;
 
@R.MartinhoFernandes ~unicodes~
 
what is it with Unix libraries and not coming with all their dependencies.
 
Xeo
@R.MartinhoFernandes haha
 
get source code, whoops sorry, forgot to mention you need library X, which forgot to mention you need library Y, ad infinitum.
 
1:56 PM
OK, now I have to go get cleaning wipes. My screen is disgusting.
 
@R.MartinhoFernandes They didn't disappear when I cleaned my monitor :(
 
@DeadMG because more fun for programmer :P
 
Ok, so it appears that after I complete the feature I am working on, I will be working on what my boss described as "a useless feature, but customers insist on having it"
 
Xeo
@DeadMG Don't get shit from source, problem solved? :) apt-get install shit comes with ALL the dependencies.
@R.MartinhoFernandes Oooh, sounds like fun.
 
@Xeo It's actually a bit offensive.
 
1:58 PM
Guys, I wonder... If g++ is now written in C++, how come it throws segfaults? :/
 
Xeo
@R.MartinhoFernandes Welp, can't argue against the money.
 
C segfaults too
 
@Xeo Only for shit which actually has apt-get enabled, and you figure out the magic string which corresponds to what you want.
 
@TonyTheLion C++ shouldn't, right?
 
1:58 PM
It's a feature to add metadata to abbreviations on PDF so that screen readers can read them out in their full form.
 
@BartekBanachewicz where did you get that from?
null pointer dereference = segfault
 
IOW blind people are not smart enough to know that USA stands for United States of America.
 
C or C++
 
source.cpp:19:30: internal compiler error: Segmentation fault
 
you broke it
 
1:59 PM
I didn't. But I was just curious
 
also
 

« first day (870 days earlier)      last day (4086 days later) »