« first day (878 days earlier)      last day (4062 days later) » 

4:00 PM
@Telkitty Maybe you should let them come, just saying. :P
 
Is this an australian accent?
 
@EtiennedeMartel Can you explain this one to me? :D
 
@Jueecy hers is supposed to be, his is Egnlish
I assumed who 'she' was based on title btw, didn't watch it
 
@DomagojPandža The French text reads "For assimilation in French, please press '2'"
 
@R.MartinhoFernandes the French do like them some ass imilation
 
4:04 PM
You will be ass humiliated.
 
if you have placeholder in boost::bind where you would normally take byref arg, would you need boost::ref ?
 
@R.MartinhoFernandes Found it
 
@TonyTheLion Yes.
 
so boost::ref(_1)
 
No, when calling it
 
4:05 PM
Oh, no, not that.
You use boost::ref for the ones you are actually binding and want to bind by reference.
The rest is just normal.
What, no.
 
Or maybe not
 
When calling you just call it.
 
so g(boost::ref(x)); is correct?
 
void f(int&, int&);
int x = 42;
int x = 17;
auto g = boost::bind(f, boost::ref(x), _1);
g(y);
// fine
 
Disregard me
 
4:08 PM
@R.MartinhoFernandes if you have std::ref, you have std::bind as well or not?
 
@CatPlusPlus that goes with out saying (it had to be said)
 
Oh, hmm, yeah, my mistake.
 
@ArneMertz They are interchangable- there is nothing wrong with std::ref being used with boost::bind.
 
@DomagojPandža Canada is an officially bilingual country.
 
The USA are a nolingual country!
4
 
4:09 PM
@EtiennedeMartel I know, but the polite part. I wasn't aware Canadians are known as overly polite. :D
 
@DeadMG except lack of consistency and me asking myself "why the fuck is he doing that?" ;)
 
@DomagojPandža They're not. Everyone looks polite when placed next to the US.
7
 
@DomagojPandža It is a running joke
 
Xeo
@DeadMG Not really
In fact, not at all I think
Standard only demands std::reference_wrapper<T> to be unwrapped
There's no "is_reference_wrapper" trait like for placeholders
 
@Xeo Does that really matter?
 
Xeo
4:12 PM
@R.MartinhoFernandes It's done through partial specialization
 
Won't bind just store a boost::reference_wrapper and then pass it to the function and work just fine?
 
Xeo
@R.MartinhoFernandes No
 
@Xeo But reference_wrapper has an implicit conversion to T&.
 
@R.MartinhoFernandes That's actually true. They have no official language.
 
Xeo
4:13 PM
@R.MartinhoFernandes Imagine a type that is convertible from T& as the parameter.
It has to be explicitly unwrapped to work seamlessly
 
Xeo
Same goes for make_tuple btw, except the requirement is clearer there
 
I think I'm the only guy here who makes minimal use of boost here. :D
 
Xeo
@DomagojPandža Nah, @ThePhD doesn't use it at all.
 
I don't use it at all.
 
4:17 PM
@DomagojPandža I rarely use it
 
@Xeo Yeah, but he's silly.
 
Xeo
You suck
 
Then again, I never make anything useful, so I am biased.
2
 
@Xeo well... he sort of does, he just wrote his own version
 
@Xeo What would I get out of using boost?
 
4:18 PM
I am glad I use boost at work, and I regret using boost on ogonek.
 
A lot of the stuff is already in the standard
 
I try to minimize unnecessary dependencies, though. There are some nice things to it, but I enjoy implementing stuff myself.
 
Minus boost::any or boost::optional
 
@R.MartinhoFernandes not a fan of having added the dependency?
 
as far as "important" things go anyway
 
user142019
4:18 PM
@Telkitty parts of it, but surely not the entire OS.
 
@thecoshman No, not a fan of Boost.Range. I have no interest in people allergic to good code.
 
user142019
Small parts of the kernel and the boot loader.
 
I use it because I am stuck with VS2010 (@home) and RAD Studio 2010 (@work) - only partial/no C++11 standard lib
 
@R.MartinhoFernandes blog post request, 'why Boost.Range is bad'
 
@thecoshman I have expanded upon that here many times. It boils down to: "it only helps for trivial tasks, and non-trivial tasks are just as painful with it as they are without it"
 
4:20 PM
@R.MartinhoFernandes You should write your own library. And call it "Banana" or something.
 
@thecoshman meh, most of boost is header only. The dependency isn't huge since you can extract the specific parts you need.
 
@EtiennedeMartel bitbucket.org/martinhofernandes/rtl (That isn't meant seriously, just to be clear)
 
@Rapptz indeed
 

"bind+cata+ana" or "Why Boost.Range sucks"

Feb 12 at 9:02, 46 minutes total – 144 messages, 8 users, 0 stars

Bookmarked Feb 12 at 10:03 by R. Martinho Fernandes

 
I'd like to see a boost-overusers implementing stuff they take for granted. That would be hilarious. :D
 
4:21 PM
More technical explanation there.
@DomagojPandža I don't see why.
 
@R.MartinhoFernandes Shiit.
 
Xeo
@Rapptz boost::property_map, boost::program_options, boost::filesystem I find very nice
 
@R.MartinhoFernandes From my experience, most people that depend on boost can't implement the stuff they use themselves. Of course, this doesn't apply to Loungers.
 
@Rapptz Those are the things I actually don't use :( (no moves)
 
Xeo
@R.MartinhoFernandes Yeah, that hurts. :|
I always cringe at filesystem::path because of that
 
4:23 PM
So why not patch them? ;)
 
I cannot "patch" Boost.Range.
 
Boost looks so outdated now.
It's weird.
 
It needs too much.
Because it gives so little, basically.
 
Xeo
@EtiennedeMartel It still got many good parts.
 
@nneonneo Do you have any idea what this guy is talking about?
@Mysticial For the first, First zero, then last zero would be hit. It would be two drops. That's because each time it drops a bomb, it recalculates the next best target. For the last example, the middle zero again; One drop. — Anthony Queen 15 mins ago
 
4:25 PM
@R.MartinhoFernandes didn't mean Boost.Range but the others that are lacking move support
 
I kinda just trolled him by asking for an implementation.
 
Ah, that.
@Mysticial Confusing mix of tenses there.
 
@R.MartinhoFernandes SHHHHHH
 
Xeo
@R.MartinhoFernandes Btw, I think I still have a problem with understanding what bind exactly is. I know it from Haskell now as a monadic bind m a -> (a -> m b) -> m b, but I'm not sure I get the concept behind it. :<
 
You mean the uber-general one (for any monad) or its specific realisation for ranges/lists?
 
I think the latter is easier to understand; the former requires a lot more abstract thought.
 
@Xeo Can't say I use any of them.
 
Rated C for Childish.
 
The only things I use out of boost is already in the standard library
 
@CatPlusPlus I own everything I want from there :/
 
Xeo
4:28 PM
@R.MartinhoFernandes I understand that the list / range version, which does unnesting, is kinda the only sensible thing. Given the type signature, that is.
 
@Mysticial Either you've been trolling him from the start, or you should re-read his strategy. I'm not saying it's optimal, but your first comment at least doesn't make any sense with his idea.
 
@Xeo You understand ana+cata+join/flatten, right? You don't need bind :P
 
Xeo
@R.MartinhoFernandes I understand ana+cata, at the very least
 
@SamDeHaan I had to re-read his answer at least 5 times before I was able to get around this phrase, "Drop a bomb on the highest value target".
 
flatten is easy.
It turns a list of lists into a list with all elements.
[[a]] -> [a]
 
Bind is just that with a map/transform thrown in.
 
Why are review audits so obvious
 
@R.MartinhoFernandes ana/cata?
 
@Mysticial Ah. Yeah, I can understand how that could mean multiple things.
 
@DeadMG See bookmark above. Generate/fold, more or less.
 
4:31 PM
I did
still not sure what they are
 
I think I get what he's saying now. But now I feel bad just trolling him with counter-examples.
 
Hah
 
Granted, that's how the way it usually works in math and proofs.
 
By the way, @R.MartinhoFernandes, I'm going through RTL, and can't you use std::distance to calculate the length?
 
"std::distance sucks"
I remember hearing that
 
4:34 PM
@EtiennedeMartel For which range?
(std::distance is O(N), btw)
 
@R.MartinhoFernandes Not for random access iterators.
 
And which range would make use of that?
 
Iterator ranges?
With random access iterators?
 
Oh. Those only have the stuff needed for ranged-for.
 
And a length() method.
 
4:35 PM
Haven't thought of adding more stuff yet.
@EtiennedeMartel Ok, I'm confused. Can you link to it?
 
Xeo
@DeadMG ana -> std::generate, cata -> std::accumulate if we don't care about composability.
 
@EtiennedeMartel Oh.
Because that's shorter :P
 
Xeo
haha
 
Tsk tsk.
I was actually right for once. I'm gonna put something on my calendar.
 
4:37 PM
@R.MartinhoFernandes it doesn't evaluate to numbers. it evaluates to true or false until converted to some other type. so what you said makes no sense. perhaps you were talking about the underlying storage?
 
Xeo
@R.MartinhoFernandes Yeah, but ... Why flatten specifically? Or are we really only talking about ranges here?
 
@Xeo Oh, you want to grok the generic ones.
 
Xeo
@LightnessRacesinOrbit So, basically, Neither true nor false should be convertible to std::nullptr_t? :) Since they're both not "integral constant expressions that evaluate to zero"?
@R.MartinhoFernandes Mm, yeah
 
@R.MartinhoFernandes Like LINQ's SelectMany.
 
Xeo
@EtiennedeMartel That one is actually bind
 
4:39 PM
Hm?
 
Flatten is SelectMany(x => x)
 
Ah. Yeah.
Although it's more flexible because you're not limited to x => x.
 
Xeo
id is so useful
@EtiennedeMartel aka bind
 
I DON'T KNOW
I'M JUST A CARROT
 
@EtiennedeMartel Combined with the other two, it's just as flexible.
 
Xeo
4:40 PM
It's a flatten with a transform thrown in between
 
@R.MartinhoFernandes Yeah.
@Xeo Hence the Select part of SelectMany.
 
@Xeo Can't really help you there :/ It makes sense to me because I studied the mathematical bits.
 
Xeo
@R.MartinhoFernandes Damn
 
I could link you to my PC teacher's in-progress book, but I'm not sure if it is understandable.
 
4:44 PM
 
Xeo
@R.MartinhoFernandes Hm, is it English? :P
 
> An integral constant expression is a literal constant expression of integral or unscoped enumeration type. [5.19/3]
 
that's a house of cards
 
> Types bool, char, char16_t, char32_t, wchar_t, and the signed and unsigned integer types are collectively called integral types. [3.9.1/7]
There's a defect here, if the intent is for false to convert to std::nullptr_t. The passage should make special mention for bools, because bools do not evaluate to 0.
 
@Xeo Yes. "English"...
 
Xeo
4:45 PM
I think I'll pass, then. :s
 
(It's not that it is bad English, but it's full of CT stuff)
 
Xeo
Ah
 
Here is an online test that demonstrates ArrayList being about 3 times faster than LinkedList, despite the necessary reallocations. I had to reduce N to make it work online. With N = 50000000 on my own machine, ArrayList is about 10 times faster than LinkedList. What results do you get on your machine? I would be really surprised if LinkedList was faster, because it needs more assignments per insertion (time), and each element needs an additional Node object (space). — FredOverflow 23 mins ago
 
@Xeo Anyway, if you want to see if you can stomach it, this is it: wiki.di.uminho.pt/twiki/pub/Education/CP1011/Bibliografia/…, wiki.di.uminho.pt/twiki/pub/Education/CP1011/Bibliografia/…, wiki.di.uminho.pt/twiki/pub/Education/CP1011/Bibliografia/…. Chapter 4 has the bind bits, but it might not be understandable without the others. Sorry if this melts your brain :P
 
4:54 PM
Hello, World!
 
Xeo
@R.MartinhoFernandes Heh, will take a look at them
But first, I have to get home. :)
 
@MooingDuck lol
 

« first day (878 days earlier)      last day (4062 days later) »