« first day (1326 days earlier)      last day (3848 days later) » 

00:00
@BenjaminGruenbaum Yeup.
user3010322
@Rapptz I don't have it, unfortunately.
@Jefffrey std::unique_ptr, std::tuple, std::make_tuple, std::tuple_element
It's just that it's not ready for prime time imo, at all, there was a good post about it a few months ago featured in HN.
@nightcracker I'm not seeing boilerplate there. v0v
lol
00:01
How many pointers does your program have anyway?
That might explain why he likes the retarded shortened keywords.
@Jefffrey std::move
heaven forbid.
@nightcracker It's... 4 letters...
@Jefffrey pretty sure that's 9
00:02
it has to be mv to be any good obviously.
@Jefffrey plus holding shift
@nightcracker using std::move; tada, made it four, amazing eh?
@nightcracker :lol:
Jesus man.
19 mins ago, by Rapptz
@nightcracker priv, proc, pub, ref, mod, mut, impl, fn.
Am I missing anything here btw?
@Rapptz no, to be good you shouldn't even need to specify that you're moving
00:03
ProTip: You don't have to.
@Rapptz super clear
especially pub
that would be public
I need a beer.
user3010322
pubic.
00:04
5 mins ago, by Rapptz
Again, convinced you don't know C++11 at all.
@nightcracker Oh. So I didn't.
@Rapptz pretty sure you forgot more than half
I meant the shortened retarded keywords.
as box break continue crate else enum extern false fn for if impl in let loop match od mut priv proc pub ref return self static struct super true trait type unsafe use while
of all of them there the only decent one is fn and impl
@Rapptz really, you want to type let mutable x = 5; all the time?
00:05
I think most people are just unreasonably shit scared of c++ because they don't understand it. They think it's similar to C for some reason.
@nightcracker Yes.
std::vector::shrink_to_fit is kinda silly. I can give you that. But as far as naming is concerned the standard library is fair.
Just like the C++ casts
I like the sentiment in Rust, but I don't think it does enough to improve over C++, the overhead of writing code in a new language is huge.
If you type all of it out, it'll make you feel a little bad.
00:06
@Rapptz function empty(constant reference std::vector<integer> x) returning constant reference std::vector<integer>
you sure got me m8
@Jefffrey I think emplace is kind of a silly name
it's exotic and sexy
I don't know what else I'd call emplace
I remember jerking off multiple times the first time I discovered its beauty
00:08
Me neither, and I get the use case, I just think it's a silly name.
user3010322
@Rapptz Can you modify makefiles with a few variables from the command line?
yes
what is the difference between "to place" and "to emplace"?
I can speak for hours about stuff I hate about C++, I just don't see how Rust is a solution to any of that.
> place: to put (something or someone) in a particular place or position
> emplace: to put into position
00:10
Even if it wasn't unreliable to write code in (which it is, they break bc every other day).
I don't see how Wide is a solution to that either. :P
@BenjaminGruenbaum what do you hate about C++?
one thing I particularly hate is the shallow standard library
Oh, I actually like Rust to be crystal clear. I just wouldn't use it for anything real.
@nightcracker use boost, srsly, that's what everyone does.
00:10
it's just too unstable/immature right now
the standard library has a lot of things that people are unaware of
all that is really really missing is std::any and std::variant
IMO anyway
My chooks are turning into roosters ... we are not allowed to keep roosters in the urban backyards, even though our backyard is decent sized :'(
The rest of the stuff in boost is already accepted for C++11 and C++14 or is incredibly niche.
boost::filesystem
@nightcracker well, verbose iterators for one thing, the fact I can't opt into "non-deterministic" resource management when that benefits me, having to interop with C code and bad C++ wrappers, raw pointers and anything around them. The tooling (oh god the tooling).
00:12
@nightcracker C++14
srly?
@nightcracker I'd love to have generators (coroutines), I really miss those - they save me a lot of time in laziness). Better type inference.
Yup.
std::filesystem
@Rapptz don't see it on en.cppreference.com/w
> Filesystem library (filesystem TS)
read better
00:13
was looking for c++14
not filesystem
lol
@nightcracker I'd like to be able to JIT more easily when it is useful for me, I'd like a stronger and better REPL to play with.
that's good, if they put that into c++14
well, I really can go all day.
there are actually C++ REPLs
Every C++ API I've ever had to work with was somewhat poorly documented, especially on windows.
00:14
somewhere on the internet
@Rapptz :lol: yeah, and I appreciate them and use them.
It doesn't come close to what I have with JavaScript or Python REPLs though.
I use coliru for my scratch C++ files though
yeah sometimes I wish I had a REPL for C++
it's nice to be able to just type python and just test something impromptu
same with lua I guess
Also, the fact everything is a resource is both awesome and tiring at once.
@BenjaminGruenbaum boost::coroutine.
@Rapptz how did I not hear of that :O checking.
00:17
There's a proposal to add Coroutines to C++.
I posted it a week or so ago.
Oh, and that compilers refuse to give me meaningful error messages when I mess up templates by mistake :/
things I hate about C++ include, but are not limited to: boilerplate (for example helper classes, include guards, bad type inferrence), bad API interfacing, 1970's linking/building model (slooow), preventible unsafity without benefits, shallow standard library, very few guarantees about underlying platform, bad error messages
@BenjaminGruenbaum GCC is better at template errors than Clang.
a lot of the issues I have come forth from "source compatability" with C
@Rapptz yeah but it's still a lot more work than it is in other languages, not really a fair comparison given C++ templates are very different from let's say - C# generics, but still.
00:19
I don't know what you guys talk about with type inference.
But both of you said it
Sounds like an issue I'm unaware of.
I've never had issues with it.
I had to type the following the other day:
typename std::deque<K>::iterator removeIter = std::remove(_keyEntries.begin(), _keyEntries.end(), key);
auto x;
if (y == 0) {
    x = &y;
} else {
    x = &z;
}
@BenjaminGruenbaum auto..?
@Rapptz didn't work :)
literally impossible
file a compiler bug
user3010322
00:21
@Rapptz look at this: INCLUDE_DIRS = $(INCLUDE_DIRS:/=\)
user3010322
It complains about infinite self-referencing
user3010322
and idea what I should do?
Use :=
user3010322
Ah.
user3010322
Well, it's working better now.
00:22
Lemme give you context
@nightcracker boost::any.
@Rapptz lol no
what is decltype(x) then?
user3010322
@Rapptz Improvements to work better with windows, no "sh.exe" required: gist.github.com/ThePhD/894c87d515243e53bea3
@Rapptz that's not compile time nor free
@Rapptz decltype(x) == decltype(&y) == decltype(&z)
00:23
You want varying types on a statically typed language for free?
Are you on drugs?
@Rapptz if decltype(&y) != decltype(&z) it's a syntax error
woah, I updated the compiler and it's fixed :D
there is no "varying" type
Thennnnnnnnnnnnnnnnnnnn
decltype(&y) x; :v
really
a reference type without initializing
please tell me more
00:24
&y isn't a reference
it's a pointer
derp
been using rust too much
haha
and you initialise it anyway
@nightcracker what types are y and z?
@BenjaminGruenbaum told ya, impossible.
@BenjaminGruenbaum an unspecified type, but the same type
a more generic example would be this
auto x;
if (condition) {
    x = f();
} else {
    x = g();
}
sure you could write decltype(f()), but that is repeating yourself, it could be inferred
00:27
@nightcracker I assume the condition is not compile time?
@BenjaminGruenbaum correct
and it might lead to unwanted automatic conversion if you later change one f to f2 but keep the other at f
Rust gets that correctly?
@BenjaminGruenbaum yes
@nightcracker auto x = condition ? f() : g();
00:29
@nightcracker Wait, is that even legal?
it isn't
@Mysticial not in C++, no
but my code snippet is :v
@Rapptz now there are two conditions in an if-elseif-else
Oh ok. Had me scared there. I knew I don't know C++, but I was scared that I might've been that incompetent.
00:30
auto x;
throw x;
@Jefffrey is an syntax error
because throw is not called throw?
@Jefffrey because you used x before it was possible to infer it's type
@nightcracker ..?
This doesn't really change anything.
I just realised you said two conditions, not two variables.
@nightcracker nested x ? y : z
00:33
besides
C++ compilers HAVE the technology needed for such an inferment
auto infer(bool condition) {
    if (condition) {
        return f();
    } else {
        return g();
    }
}
auto x = condition ? f() : (other ? g() : h());
readability at its peak
@Jefffrey it's beautiful
the technical term is cute
You could uglify it more.
user3010322
Yech.
user3010322
00:35
I've run head-long into my first big issue with most build systems.
NEEDS MORE TRIGRAPHS
auto x = [&]{ if(condition) { return f(); } else if(other) { return g(); } else { return h(); } }();
user3010322
I can't directly reference the output of one "project" with another, and have it drag along any necesary dependencies.
@Rapptz that's actually more beautiful
also, string processing in C++ could be a bit better
00:39
auto x = [&]{
    if(condition) {
        return f();
    } else if(other) {
        return g();
    } else {
        return h();
    }
}();
I wonder if C++ compilers* can optimize out the lambda
usually are
the compiler optimizes, not the language
@Jefffrey already fixed, too late :P
read the timestamp newb :P
user3010322
00:41
WEll.
user3010322
QtCreator's handling of formatting is completely underwhelming.
user3010322
And going to drive me nuts.
My issues with C++: No modules, no concepts, no language level tuple support, no ~ranges~, no pattern matching, template parameter packs could be easier to work with, standard library is missing (sane) std::any and std::variant.
Unicode is also an issue but it's not one that personally affects me but it's there.
'bout it.
80% of that is going to be fixed ~~~soon~~~
str.join(begin, end), str.split(char), str.(l/r)strip(chars), str.beginswith(str), str.endswith(str), str.replace(this, that) are all incredibly useful in Python and would be nice in C++
00:43
@nightcracker no
not member functions please
I just noticed a typo in my code lol
@Rapptz more stuff to download, add into repos, update, maintain and compile while it could've been just in the standard
DAMNIT WHY DO I KEEP USING APOSTROPHE'S FOR PLURAL
I agree with you on the fact that the standard should provide such utilities.
I don't know what happened
but std::join and std::split were proposed.
str.replace technically exists but it's a bit awkward to use.
str.endswith and str.beginswith are provided but named different.
the strip functions aren't there at all
that's the main issue with C++
almost all of my complaints are in the language
00:48
Not really C++'s fault that you suck bud.
it's just all ranging from "a bit awkward" to "write a virtual base class, then 3 classes with methods" in terms of awkwardness
@nightcracker Use Haskell, problem solved.
@Jefffrey last time I tried haskell it was nice until I actually wanted to do things with it
besides my way of thinking is very much procedural, not functional =/
you don't have reference or pointers, nor stupid inheritance, free concept support
fuck C++, long live Haskell
I can work with functional stuff, and I even enjoy it for small snippets (I quote Python's incredibly powerful list comprehension with all kinds of operators)
but to go purely functional is counter-productive for me =/
00:51
And I'm done fanboying for today. Night buds.
@nightcracker you just have to get used to it
@Jefffrey night
@Jefffrey I tried, didn't work
user3010322
01:02
What
user3010322
the
user3010322
std::iterator<...> in g++ doesn't define any of the required member types
user3010322
How the fuck do people check these libraries?
oh that's also a nitpick of mine of C++
user3010322
Whatever.
user3010322
01:03
I'm getting so fed up with C++.
the "standard interfaces" how APIs can communicate (like iterators) are so large and the documentation on them is so scattered that fulfilling them is a science
user3010322
std::iterator has been there for ages and we just don't define this shit?
@ThePhD What..?
I truly have no clue how to properly implement a a container with all the required methods, constructors, move constructors, iterator, iterator methods, typedefs and all of the previous ones with all of the stuff added by allocators
user3010322
01:05
Derive from it in coliru and try to use it.
lol
user3010322
Any of the member types.
That's not g++
That's how C++ works
user3010322
@Rapptz You can't be serious.
01:06
Indeed I am.
user3010322
typedefs of a base class are visible if the base class is public.
user3010322
Isn't that how it's supposed to work?
I just recall having your issue before
and the fix was to define them again locally for some reason
i.e.
using value_type = typename Base::value_type;
was weird
user3010322
... That's just beyond silly.
user3010322
VC++ didn't pull that shit.
01:08
Indeed.
user3010322
Oh my god, I have to rewrite all these typedefs
user3010322
... Ugh.
I'm not sure if it's due to g++'s retardation though.
user3010322
Well, hey, my templates will compile
user3010322
it's all worth it.
01:08
I never tried it on Clang
but
I can't reproduce this anymore
so iunno what happened
user3010322
I'm repro'ing it right now
user3010322
I should try clang...
I thought it was a compiler bug
clang?
I hope you're not on windows
user3010322
01:10
Clang doesn't do it right either.
or you're going to have a fun time
  template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
           typename _Pointer = _Tp*, typename _Reference = _Tp&>
    struct iterator
    {
      /// One of the @link iterator_tags tag types@endlink.
      typedef _Category  iterator_category;
      /// The type "pointed to" by the iterator.
      typedef _Tp        value_type;
      /// Distance between iterators is represented as this type.
      typedef _Distance  difference_type;
      /// This type represents a pointer-to-value_type.
user3010322
... So they're defined.
indeed they are.
user3010322
It just doesn't let you access them without some retarded shenanigans.
user3010322
01:12
That's...
user3010322
... What.
user3010322
What is the fucking point
user3010322
What's the point
user3010322
of having it there in the first place?!
This works though.
I have no idea why std::iterator is acting special
user3010322
01:12
I
user3010322
I dunno man.
Clang errors too?
user3010322
Yeah.
iunno what to say
user3010322
01:15
Rubs face.
user3010322
I don't understand C++ anymore.
user3010322
Maybe, maybe they accidentally made it class or something.
definitely says struct
user3010322
I've got no other explanations...
user3010322
Maybe it was forward-declared as class?
user3010322
01:17
I dunno.
Looking it up online
All I get are answers saying that the sole purpose of std::iterator is to provide those typedefs
lol
not really doing your job there std::iterator.
@ThePhD Ask a question on SO.
Get buttloads of rep.
user3010322
Eh.
and probably an answer
user3010322
I don't want any rep.
ask anyway
Obviously something's fucky.
01:21
So, as some of you might know, Riot decided to release an album for Pentakill, a fictional metal band made of LoL's characters. And I have to say, it ain't half bad. At least, the parts they've released thus far. The actual album comes out tomorrow.
@ThePhD Oh.
I found out why.
user3010322
Why?
It's because the class is templated.
user3010322
....
In my example, I directly inherit from test<int>
user3010322
01:23
<_______________________________________________________________________________________________________________________>
If I change it to test<T> it stops working.
lol
user3010322
Do I need to sprinkle typename on it or just be direct?
main.cpp:9:5: error: 'type' does not name a type
     type x() {
     ^
main.cpp:9:5: note: (perhaps 'typename test<T>::type' was intended)
user3010322
LOL
user3010322
That makes so many typedefs fucking useless
01:24
makes sense at least
but at the same time it doesn't
welcome to real templates :v
33
Q: Why do I need to use typedef typename in g++ but not VS?

Robert GouldIt had been a while since GCC caught me with this one, but it just happened today. But I've never understood why GCC requires typedef typename within templates, while VS and I guess ICC don't. Is the typedef typename thing a "bug" or an overstrict standard, or something that is left up to the com...

01:38
neat, 1251 errors
user3010322
105 for me
user3010322
But it's only 1 source file.
1885 now
weird
where did I go wrong :(
user3010322
Eh.
user3010322
QtCreator isn't as good an IDE as Visual Studio.
user3010322
01:41
Maybe it'll just take soem getting used to.
user3010322
I still can't navigate to definitions by just hitting a key, and I can't find the define for it in the keyboard mapper...
user3010322
Auto-complete is tits...
user3010322
Wow
user3010322
Really g++?
user3010322
id<char>() is not a legal way of making an object of type id with template char ?
user3010322
01:43
I HAVE to use {}, even when that's in the middle of a function call?
user3010322
Holy shit.
..?
user3010322
c0 = endian( id<TChar16>( ), reinterpret_cast<byte*>( &c0 ) );
user3010322
id<TChar16>() is an error
So?
idgi
user3010322
01:44
It shouldn't be one????
says who?
user3010322
I do.
user3010322
It's a zero-arg constructed object.
user3010322
That's not what g++ 4.9 is saying here.
01:47
does for me.
test.cpp: In instantiation of 'void f(const T&) [with T = id<int>]':
test.cpp:10:16:   required from here
test.cpp:7:17: warning: unused parameter 't' [-Wunused-parameter]
 void f(const T& t) {}
                 ^
[Finished in 0.1s]
user3010322
I don't know what's wrong then.
user3010322
It's giving me a carat diagnostic for that line pointing to that character, so.
user3010322
I dunno, I'll tackle other errors and sort this out later...
done fixing all my errors
neato.
shogun.get works
user3010322
Wow
01:54
?
user3010322
The whole "it's a template so you have to explicitly call the base typedef" applies to (const) static members too.
huh
user3010322
std::cbegin doesn't exist?
not in C++11 no
user3010322
I'm using 4.9 and std=c++1y
01:59
Probably not in their standard library.
user3010322
.... wHATEVER.

« first day (1326 days earlier)      last day (3848 days later) »