« first day (849 days earlier)      last day (4099 days later) » 

6:00 PM
I really need to make myself a notepad for ideas or something
 
user142019
org-mode
 
Vim implementation is meh and mostly a TODO list, and I can't use emacs sober
2
 
@Zoidberg I looked it up. std::basic_streambuf does byte IO, and std::locale does formatting. std::basic_ostream's only task is to hold an a list of active manipulators
 
My fingers just don't bend that way
There's basic_streambuf? What for
 
user142019
// How would you do say, Maybe in C++?
// Like this?
struct Nothing {};
template<class T> struct Just { T value; };
template<class T> using Maybe = boost::variant<Nothing, Just<T>>;
 
6:02 PM
boost::optional
 
user142019
Ah.
 
But really you need monads for Maybe to shine
The power lies in the bind
 
user142019
Yeah that's what I want to write. :P
 
Maybe with expression templates
 
user142019
That pun.
 
6:06 PM
C or C++? Pick one. — H2CO3 11 mins ago
Hah - I train them well.
 
@CatPlusPlus buffering byte io. std::stringstream`'s basic_streambuf is a std::string(ish)
 
@LightnessRacesinOrbit We've been telling everyone that for the past few years.
 
@EtiennedeMartel Yes, we have.
@EtiennedeMartel And now, using my precise wording, the underlings are passing the kindness on.
 
user142019
How do I get the type of the first argument of a function type?
 
@LightnessRacesinOrbit Does C even have auto?
 
user142019
6:12 PM
@Mysticial yes, but it means something completely different.
 
Well, not the old auto.
I mean the C++11 auto.
 
user142019
It means automatic storage duration.
 
@Mysticial Not in that form
 
user142019
Oh, no C doesn't have that.
 
user142019
C++ and C# do.
 
6:13 PM
C does of course share C++03's meaning of auto, but you knew that.
 
but C#'s auto can be dynamic, right?
 
user142019
template<class F, class U = type_of_first_arg_of<F> /* ??? */> how do I do this where F is a function type?
 
user142019
I can't find anything relevant in <type_traits>.
 
@Zoidberg I think wheels has something like that. Not 100% sure though.
 
@Zoidberg I'd look in <functional> too
@Zoidberg std::function<F>::first_argument_type ?
 
user142019
6:16 PM
@MooingDuck <3
 
@Zoidberg that typedef may or may not only apply to functions with exactly two parameters, I'm unsure.
yeah, it appears to only be there for functions with exactly two parameters. argument_type is there if there's only one parameter.
I don't see any typedefs for 3+ parameters, I'd guess you'd have to manage it yourself
I wonder if I can make a tuple...
 
@Zoidberg I don't think it can be done in the general case, since a function type might have multiple functions with different parameters. std::function works around this by requiring the "interface" to be known ahead of time: std::function<void(char, int)>
struct functionoid {
    void operator()(char a);
    void operator()(int a);
};
std::functional<?????>::first_argument_type
 
posted on February 11, 2013 by Scott Meyers

The official announcement about dates and location for C++ and Beyond 2013 just went out on the C&B Blog.  They're December 9-12 at the Salish Lodge in Snoqualmie, Washington, USA (not far from Seattle). This fourth incarnation of C&B will harken back to its roots, in the sense that we're returning to our original venue, and we're also reinstituting some of the features of the i

 
6:31 PM
Sweet tits, they're gonna make a Mass Effect-themed Risk.
 
@EtiennedeMartel Massively risky, unless they can pull off the effect.
 
@Zoidberg wtf
 
user142019
@MooingDuck Almost a Maybe monad!
 
@Zoidberg so is boost::optional
 
@LightnessRacesinOrbit . . .
 
6:32 PM
using Maybe = boost::optional;
 
user142019
boost::optional has no bind.
 
user142019
Return is the ctor, but there is no bind.
 
@Zoidberg I see no "bind" in your code so I cannot deduce what you're referring to
 
@Zoidberg needs documenting comments, for the love of god
 
user142019
@MooingDuck >>=.
 
user142019
Yes, operator overloading abuse. I don't care.
 
user142019
Infix ftw.
 
@EtiennedeMartel are you a risk or a mass effect fan?
 
user142019
Prefix bind is terrible.
 
@MooingDuck It's a bad concept, really
There's only one kind of buffer you need
 
6:34 PM
why do you move in the ctor?
 
user142019
Because I don't want to copy it.
 
user142019
Because moving is more efficient and I'm not gonna use it afterwards.
 
for ints and doubles? no it's not
why is everybody piss-scared of cheap copies since C++11?
 
user142019
In this case I use ints and doubles.
 
6:35 PM
@bamboon I was a ME fan before they fucked it up with ME3's ending.
 
user142019
Somebody else may use giant vectors of millions of objects.
 
Bah lambdas
Do it with expression templates
 
@Zoidberg so accept const ref then initialise normally.
@Zoidberg you already have one copy
 
user142019
@LightnessRacesinOrbit yeah I don't want to copy it again.
 
@Zoidberg so accept const ref then initialise normally.
 
user142019
6:37 PM
@CatPlusPlus Never done that.
 
you lose nothing, but gain (a) backward-compatibility, (b) sanity, (c) easier-to-read code
 
Xeo
@Zoidberg Boost.Proto!
 
@Zoidberg Something fun to do!
For some values of fun
 
user142019
I love lambdas.
 
user142019
They're the best.
 
Xeo
6:38 PM
They're unwieldy though, without type inference.
 
user142019
I rather study the Hask category.
 
user142019
I still need to figure out what its subcategories are.
 
@AndrewC: We don't close as duplicate to help the OP; we do it to keep the site clean and help those who are helping. The OP already dissed us by not searching first and ignoring all the hints given during the question-writing process - I don't see any reason to optimise for them at our expense after that. — Lightness Races in Orbit 44 secs ago
 
user142019
I think types are but I'm not sure.
 
user142019
But I can't imagine what the morphisms would be.
 
6:42 PM
>>= in C++ has wrong associativity
 
user142019
lol
 
oh man, where is this scrub with my laptop
 
Far, far away
 
@LightnessRacesinOrbit You lose the ability to use move-aware types, which is a massive minus, and substantial performance costs for non-trivially-copyable types, and also, there is no backwards-compatibility loss for move semantics.
 
@CatPlusPlus meh
 
6:44 PM
void f(T t) { T obj(std::move(t)); } is quite idiomatic C++11
 
@DeadMG There's no backwards-compatibility loss? C++03 doesn't have std::move.
 
posted on February 11, 2013 by Herb Sutter

Most of the talks I gave at C++ and Beyond 2012 last summer are already online at Channel 9. Here are two more. This is a two-part talk that covers the C++ memory model, how locks and atomics and fences interact and map to hardware, and more. Even though we’re talking about C++, much of [...]

 
@DeadMG In what way do you lose the ability to use move-aware types?
 
Who cares about C++03
 
@LightnessRacesinOrbit Because you can't copy a unique_ptr.
 
6:44 PM
@DeadMG What are the substantial performance costs, and where do they come from?
 
@CatPlusPlus Well, not you.
 
@DeadMG Okay, that's a good reason.
 
Seriously that code is using lambdas
 
@LightnessRacesinOrbit They come from redundant copies of types which have unknown copying costs- for example, complex data structures.
 
And you're worried that std::move breaks backwards compatibility
 
6:45 PM
@CatPlusPlus Everybody in the real world working on production code, particularly in the embedded sphere.
 
@LightnessRacesinOrbit It works fine on all C++03 types, if not C++03 compilers.
 
user142019
Ohh I understand.
 
@CatPlusPlus Maybe isn't
 
@LightnessRacesinOrbit The embedded sphere is an irrelevantly small sphere compared to overall development.
2
 
I'm not interested in embedded sphere
 
user142019
6:45 PM
A functor maps from Hask to a subcategory of Hask.
 
@DeadMG It most certainly is not!!!
@DeadMG Are you on drugs?
 
When I write C++11, I write C++11
 
@CatPlusPlus More sage wisdom from @CatPlusPlus.
 
last I checked, $300 billion was spent on software development; and $3billion went to embedded software.
 
I seriously can't picture doing it any other way but okay
LET'S WRITE C++11 BUT NO LAMBDAS OKAY
 
give or take
 
@DeadMG Er, zero billion dollars go to it in this country, for a start.
 
@LightnessRacesinOrbit I think they were global figures.
 
user142019
@MooingDuck nice. xD
 
but not sure, it was a while ago that I actually checked this.
 
6:47 PM
Oh no std::move how will poor embedded developers use my class~
 
@DeadMG That's because embedded software is cheaper to produce. That says nothing at all about how much is produced.
But your capitalist logic is fun
 
Xeo
@MooingDuck My thinking, yeah.
 
@Zoidberg as I said, using Maybe = boost::optional.
 
Look at all network infrastructure, ever. Telecoms. The GPS constellation.
this stuff is not irrelevant
 
@LightnessRacesinOrbit Unless skilled embedded developers command a much lower salary, or don't require other normal overheads of development, there's no reason to believe that their costs would be lower than normal.
 
user142019
6:48 PM
And e.g. the Lst category contains type [a] for every a.
 
user142019
Objects are still types and morphisms are functions [a] -> [b].
 
@DeadMG Equipment is cheaper. No need to train people in the ways of C++11.
 
@LightnessRacesinOrbit It is irrelevant from the perspective of a general-purpose programming language.
 
How is that relevant
 
@DeadMG And, yes, engineers in such industries do get paid substantially less
 
6:48 PM
Nobody gives a fuck jesus
 
the embedded sphere would be better off sticking with C, or developing their own languages specific to that environment.
 
@DeadMG Oh, it's general-purpose now?
 
@LightnessRacesinOrbit Pretty sure.
 
We're talking about C++11 code and you bring up some crap about backwards compatibility
 
@DeadMG Best not give it support for processes and filesystems then
 
6:49 PM
 
user142019
 
@CatPlusPlus Remove head from anus
 
@LightnessRacesinOrbit Why not? Even phones have those things now.
 
the fuck is this?
 
6:49 PM
@DeadMG Oh, phones have them! I stand corrected then
 
user142019
@TonyTheLion Nicholas Cage!
 
my point is that you have no evidence about how few devices do not have those things.
 
@Zoidberg I'm not talking about that, I'm talking about this silly discussion
 
user142019
@CatPlusPlus ANIMATED GIF! DO NOT BIN IT SINCE I LIKE IT!
 
kill it with fire!
 
6:50 PM
here's the real question that I'm asking
 
are you DeadMG'ing?
 
if you're producing a library or function where networking is part of the functionality, is it really going to just port to an embedded device, regardless of the need for networking?
 
@CatPlusPlus How come you can put animated GIFs here?
 
user142019
You guys all suck since I have stroopwafels and you don't.
 
@EtiennedeMartel You can too, if you have any fun ones
 
6:51 PM
@EtiennedeMartel because he's the Cat.
 
@Zoidberg I just ate bread and butter pudding. You lose.
 
he has Cat rights
 
I'm the king
 
user142019
I'm the embodiment of the concept "god". Except I exist.
 
@CatPlusPlus hey!
 
6:52 PM
Pudding out of bread?
 
@CatPlusPlus Fuck monarchy.
 
@CatPlusPlus It's seriously tasty.
 
@Zoidberg you're a mere lobster, you're meaningless in the grand scheme of things.
 
@AndreiTita That's treason Johnny
 
@CatPlusPlus It's revolution!
 
6:53 PM
oh we have a moose now
 
user142019
Cat Plus Plus is our slave.
 
user142019
ENSLAVE THE CAT.
 
@Zoidberg no! As a fellow feline, I have to stand by his side.
 
user142019
Fuck you Tony.
 
user142019
6:54 PM
I thought we were friends.
 
Fuck you too
 
user142019
No I'll have to kill you.
 
ahahahahah
 
user142019
@TonyTheLion No thanks.
 
you're mistaken in the fact that you think I'm scared of death
 
user142019
6:54 PM
I don't think.
3
 
user142019
Thinking is for losers.
 
user142019
They lose precious time.
 
Sometimes I seriously look at the discussions I'm in and go all :psyduck:
 
user142019
@CatPlusPlus inb4 psyboom.gif
 
6:55 PM
oh lol
I needed to laugh like this
@CatPlusPlus that was funny
 
user142019
@CatPlusPlus Still use Vim and text files.
 
Remember, if I want to yell "WHAT THE FUCK ARE YOU TALKING ABOUT" at you using my entire lung capacity, it's bad
 
Xeo
@MooingDuck Getting Nothing worked into that is actually kinda tricky.
 
@Xeo what is Nothing? Is that a Maybe with no value? using Nothing = boost::none_t;
 
6:57 PM
@CatPlusPlus oh
 
I'll plonk you so hard you'll gain second escape velocity
 
Standard Star Fishing Tactics
Robot: something funny
Puppy: self-flagellation
Cat: hate on something (usually C++)
Tony: reddit dump
10
 
(Not you Tony, I'm just being illustrative)
 
I'm starting to think you guys might be slightly predictable
 
Are you saying I'm not funny
 
user142019
6:58 PM
You aren't.
 
Etienne: state what others are doing.
 
Fuck you Zoidberg nobody asked your opinion
 
user142019
I still gave it.
 
@CatPlusPlus I did.
 
@TonyTheLion I'm meta like that.
 
6:59 PM
@EtiennedeMartel Shotgun: Talking about stars, or calling oneself an idiot.
 
@EtiennedeMartel lol
 
Xeo
@MooingDuck Not that easy, >>= will break from that.
 
@DeadMG You're ruining the joke
 
@Xeo pffft. fixable.
 
Nothing >>= anything = Nothing
 
user142019
6:59 PM
DeadMG is the only one in the Lounge who is even remotely kind to me.
 
user142019
lol
 

« first day (849 days earlier)      last day (4099 days later) »