« first day (1608 days earlier)      last day (3342 days later) » 

10:00 AM
@Rerito = default and = delete are considered user-declared
 
@Rerito foo() = default; is defaulted and declared.
If not declared, it often is defaulted.
 
I do!
λ go run hello.go
hello, world
there we go.
 
More specifically, if I declare a copy ctor (or cpy assignment), the move stuff is said not declared
What does that mean? Are they defaulted by the compiler?
 
No, they are not present.
 
10:01 AM
So... They are deleted?
 
Nope. = delete; introduces a definition!
 
No they are not declared
 
They are not even implicitly declared, is the gist of it.
 
@Rerito it doesn't exist
never was there
 
@LucDanton Installation was a bit more troublesome than MinGW tbh.
If only because I had to edit 2 environment variables instead of just 1.
 
10:02 AM
Ok I see the subtlety now
 
zero points!
 
The side effect is the same as if it were deleted but they aren't explicitly
Got it
 
If you declare any constructor, no default constructor is implicitly declared, too.
@Rerito No…
 
lol
it's deadline day and I'm sitting here with no tasks
 
The opposite of a declaration, is the lack of a declaration. Not defining as deleted.
 
10:03 AM
we kinda fucking panicked on monday, did a day worth of overtime and suddenly there's nothing to do
 
What I meant by the side effect is that (taking a user defined ctor with an arg), if I say MyClass stuff;, I'll get a compiler error telling me there is no available candidate
If it were deleted the message would be different, and it wouldn't compile either
 
λ go run hello.go
# command-line-arguments
.\hello.go:6: syntax error: unexpected semicolon or newline before {
lol I thought this was a joke
 
@Rerito In that case yes
 
It's a real thing? Apparently so.
 
@Rerito Right. That difference matters for e.g. overload resolution! …except not in the case of the move special members… see you’re making more complicated than it really is!
 
10:06 AM
@LucDanton An example is welcome here, I wanna be sure I get this straight =)
 
If you have void foo(int); void foo(unsigned) = delete; then foo(0u) is an error. It wouldn’t be if it weren’t for the second definition.
 
There is no implicit conversion from 0u to int?
 
There is.
 
void foo(unsigned) is a perfect match but since it's deleted it errors out so no implicit conversion takes place
 
7 mins ago, by Luc Danton
Nope. = delete; introduces a definition!
There really is a void foo(unsigned); function.
 
10:09 AM
You mean since it is declared, it is found by the name lookup (because perfect match)
 
Yeah.
 
Ok I got it, that's quite subtle
 
> A function is user-provided if it is user-declared and not explicitly defaulted or deleted on its first declaration.
 
alright time to delete go
 
hahahaha
 
10:11 AM
> The omission of certain features (for example, functional-programming shortcuts like map and C++-style try/finally blocks) tends to encourage a particular explicit, concrete, and imperative programming style.
I should have checked if tab indentation errors out
 
Thanks @LucDanton and @ParkYoung-Bae by the way :)
 
Oh it doesn't.
func stuff()
{
}
however does..
 
gofmt I think is the tool?
 
seems like it
 
@Rerito Pas de quoi
 
10:14 AM
> Good package names are short and clear. They are lower case, with no under_scores or mixedCaps. They are often simple nouns
 
@Rapptz what the fucking
 
@Rerito The rules are slightly different for copy/move special members though :s
 
So they list simple examples which is cool and they say stuff like "priority_queue" etc is not idiomatic Go so it shouldn't be used
 
Go basically sounds like a language designed for bad programmers
 
but they don't list alternatives
 
10:15 AM
Are you serious?
 
What would you use instead of "priority_queue"? "priorityqueue"?
 
everything I hear about it is like "it's the dumb, round thing you can hardly cut yourself with"
 
@LucDanton Ouch, could you direct me on an article or any resource on that matter? It would prevent me from bothering you again :p
 
@Rapptz I think they do stuff like pqueue :/
 
10:16 AM
@LucDanton yay simple nouns
 
@LucDanton Oh right. Abbreviate judiciously.
 
@Rerito I don’t know of any, sorry. Well, technically the Ro0 is relevant. And there may be a on the topic?
 
@Rapptz pq
 
@ParkYoung-Bae No, jdsly!
It’s probably const&, but yeah.
 
@LucDanton Value.
 
10:19 AM
Is that a C++11 change?
 
That's weird though.
 
lemme check the overloads for std::move(stringstream).str()
 
I think cppreference is lying to me.
 
@BartekBanachewicz Nor can you cut your problem with it.
 
alright straight to the horsie mouth’s then
 
10:20 AM
@Rapptz It is a conspiration against you!
 
It is by-value.
 
@Puppy precisely
 
It is indeed.
Checked as well.
 
same problem as Java.
might as well deny surgeons scalpels.
 
Hmm....
 
10:20 AM
Java has problems beyond that
@Puppy well you have to remember most of the programmers are dumb enough to need those
that's why java is so popular
 
And it is not new from C++11. It was always fine.
 
I see no overload that moves the inner buffer when stringstream is an rvalue though
So that means I have to copy the buffer anyhow
ugh
 
Heh.
You know what that means.
std::strstream time!
 
Or a tricky allocator :)
 
You manage your own buffer with std::strstream though but if you don't want copies it's god sent.
 
10:22 AM
deprecated no?
 
Yeah you get a 1 paragraph whine from GCC.
I just ignore it
 
If I know sigma and mi of a normal distribution, to get the probability that of X element (a;b), I just need to integrate the distribution densitiy function over the interval, right?
 
FWIW it isn't removed in C++17 because there is no suitable replacement for what it does (std::stringstream doesn't count as a replacement to the committee thankfully).
 
I just want a std::string str() && that moves :(
ufhgfuhghfudgihg
 
std::move((std::stringstream() << stuff).str()); // ?!
get the underlying rdbuf and fuck with it maybe?
I've tried that approach before.
 
10:26 AM
Yesterday we talked about build systems. Did anyone ever try waf?
 
@Rapptz No. std::move(stringstream).str(); gimme ur buffer
 
I did.
 
@Rerito yes
 
I didn't like it.
 
10:27 AM
A coworker seemed to like it
 
despite all the issues with Cabal, I like it and it's enough for my needs
 
Was he fired
 
@Rapptz By-val as well. Well, the string_buf. You can get lower level yeah.
 
I like the fact of how easy it is to install deps
 
@Rerito Cat likes it I think?
 
10:27 AM
I'm not afraid of using outer packages anymore
 
No Cat likes ninja and Python.
 
What is so bad about it?
 
@LucDanton rdbuf()? It's by pointer pretty sure.
Or you mean rdbuf()->str()?
 
yeah
Dec 11 '11 at 21:00, by Cat Plus Plus
waf is nice, but underdocumented.
 
you could go deeper down the polymorphic hole.
 
10:29 AM
Apr 28 '14 at 20:43, by Cat Plus Plus
Are you linking statically? Dunno, I never used waf much
I guess he moved on.
 
it's all about ninja these days
 
I found ninja pretty cryptic
 
mmmh the allocator approach isn’t going to work @_@
 
@R.MartinhoFernandes compared to SCons vOv
 
10:30 AM
lolwut
 
not really comparable.
@LucDanton Join the glorious std::strstream dark side.
 
@Rapptz they both build things, no?
well, in the end
 
about as appealing as the strtok kool kids klub
 
naw
 
@BartekBanachewicz Cows and humans both shit in the end. You're a cow.
 
10:31 AM
std::strstream is cool.
I have another hack that isn't deprecated
 
That’s just one letter removed from 'kool'! I told you!
 
@R.MartinhoFernandes hmpfh. The ultimate goal of using both is a transformation from source to binary
this should really be a simple thing
"my sources are here, i want my binary there"
 
@Rapptz std::strstream is deprecated
 
I know it is.
 
10:33 AM
But nothing in the stdlib replaces it
 
I've praised std::strstream before (disclaimer: long before I knew anything about C++; I daren't read this article now)
 
Oh I should make a big bold note
I'm only speaking about std::istrstream tbh
 
> Tomalak's Tuesday Tip
 
std::ostrstream is pretty meh and std::strstream is worse.
 
I like how it starts with meta.
@BartekBanachewicz Yeah, and ninja is by far the simplest.
 
10:35 AM
yeah ninja is really simple
would recommend
 
user3010322
ninja isn't very programmer friendly though, which is explicit in its goals, unlike make which declares its usable for everything and then becomes the snake in your boot.
 
@LightnessRacesinOrbit I don't see an issue!
@ThePhD ninja was designed to be generated by other things like python scripts.
 
I think 'simple' is a bit misleading, no? It’s really minimalist.
 
every time I visit your blog the glow effect bugs me
I filed a bug report 2 years ago pls fix
 
10:37 AM
@LucDanton Well, it is simple when put in Bartek's terms: "my sources are here, i want my binary there"
 
@R.MartinhoFernandes that was so annoying
@R.MartinhoFernandes caused a bug for us
 
The only other thing you do is tell it how to make binaries from different kinds of sources.
 
Okay but what if you want that portably?
 
@BartekBanachewicz That depends on what transformations you need to apply to your sources to put out the binary.
 
uhwh fuck default params
I've introduced such a terrible bug
 
user3010322
10:38 AM
Right now I kind've just want a solution that takes my Visual Studio Project descriptions and runs that into a ninja file on the fly. :l
 
Wait. You know that.
 
2 mins ago, by Luc Danton
I think 'simple' is a bit misleading, no? It’s really minimalist.
 
@ThePhD Go make it
 
Not simple as in 'I can easily achieve X'.
 
user3010322
Then I can just use that in all the other build systems and be a happy camper.
 
10:39 AM
@LightnessRacesinOrbit Is that Windows XP?
 
user3010322
@ParkYoung-Bae Not.... SUPER DUPER interested in that.
 
@ThePhD Add it to the list of lounge projects so I can pick it up
 
editing the 'wiki' is annoying now
you have to make a PR
 
I'll just add it to my google keep
Eric Schmidt will certainly approve
 
@Rapptz Yeah I guess it was
 
user3010322
10:41 AM
@ParkYoung-Bae Well, if you really want the full version, I kind of want something that picks up Visual Studio project files on the *Nix side. Basically an IDE that has build commands that run the moral equivalent of MSBuild (sans bullshit) on *Nix.
 
@LucDanton It's not like you can use SCons with MSVC and GCC cleanly
 
so
 
user3010322
I already have something that takes VC++ arguments and turns them into appropriate g++ arguments (similar to the way clang does it's LLVM driver on Windows).
 
I remember when I used to use SCons. Good times.
 
18 instances of throw runtime_error I need to eliminate.
 
10:42 AM
@R.MartinhoFernandes Okay but I’m not claiming they are simple.
 
@ThePhD Wide just inspects the project settings to determine what options to pass to Clang.
 
@LightnessRacesinOrbit Haha it was fine until you actually started using std::strstream actually.
 
@LucDanton I just claimed that one is simpler than the other!
 
Your reasoning for the use was fine but then you started using it and I made a sad face.
 
10:43 AM
@Rapptz cos memcpy?
 
yeah it's like shit man what are you doing
 
using std::strstream it would seem.
 
@LightnessRacesinOrbit, The meaning of mononyms are usually pretty unmeaningful. But "lightness races in orbit" is made up of 4 English words. — Pacerier 4 hours ago
this guy doesn't approve of my name
but "Pacerier" is fine because it's one word
I'm like whut
 
Oh this was my workaround for deprecation.
struct readbuf : public std::streambuf {
    readbuf(char* str, size_t n) {
        setg(str, str, str + n);
    }
};
then I use the readbuf thing directly with std::istream.
@LightnessRacesinOrbit There was also this great line: str += (string)5;
 
10:47 AM
Just linked our QA engineer to http://en.wikipedia.org/wiki/Circumstantial_evidence
They tend to create overly specific tickets (assuming causes) and then today they refuse to add more failing cases to the same ticket (because it doesn't match the _assumption_...).
I gently tell them it matches the symptoms so the assumption is confusing and should be deleted :)
 
He uses it to showcase an error but I thought it was funny out of context.
 
@Rapptz that's ... the worst I've seen in a long time
 
Urgh I have a project whose submodules have the same submodule, meh
So I end up having several copies of that submodule
:w
 
user3010322
@ParkYoung-Bae git -wrekt
 
10:53 AM
@ParkYoung-Bae That sounds like you are using Git wrong. :)
 
No it's just that all these submodules have the same dependencies
 
@LightnessRacesinOrbit btw why do you call "footnotes" "bootnotes"?
It's not a good joke.
:3
 
@BartekBanachewicz le summary plz
 
user image
3
@Rapptz Habit picked up from El Reg
@Rapptz It's not a joke
 
You sure? It seems like a lame pun.
 
10:57 AM
@LightnessRacesinOrbit Yes, it's a great thing!
 
@Rapptz Well, it's not [meant to be]
 
Okay my problem has no solution
 
Oh god I forgot about this:
 
@Rapptz Is that from the horse's mouth?
 
@ParkYoung-Bae just don't submodule the thing that is being submoduled by the other submodule?
 

« first day (1608 days earlier)      last day (3342 days later) »