« first day (1799 days earlier)      last day (3156 days later) » 

8:00 PM
@Puppy enum { A = 4, B = 23, C = -5 }; specifies an order there
 
@milleniumbug No, it does not.
 
ah, offnes :P
 
It's A, B, C
do you see a connection between "enumerated type" and "enumeration"? hello
 
just because the programmer happened to write A first does not mean that that has any meaning whatsoever.
the programmer has to write the values in some order in the source code, that does not mean that the source ordering relates to any meaningful ordering.
for example you could obviously argue that the order is C, A, B as they are now sorted by integral value.
he could have simply written them in the order in which he learned of a need for them, for example.
or grouped them by semantic meaning
or simply written them alphabetically
or generated them from a build tool
 
fine, let's go with your argumentation. There's no order, fine. I still need to map the enum values to specific positions. I can't do that in C++. Therefore, C++ enums are useless.
 
8:03 PM
expecting massive crash in 3... 2...
 
7 mins ago, by Puppy
@milleniumbug They're of perfectly good use as enumerations. Their use as a completely different language feature is obviously limited. I don't see how this adaptation requires the use of a max value, though - the only use I see in that answer could be done with any value.
 
Enums shouldn't be tied up with their internal numerical representation
 
key bit there being "completely different language feature"
there's a large difference between "enumeration" and "bitset".
 
The order of enum is the order the labels are defined in
 
C++ bitsets are shit I grant you, but it's no grounds to say that enums suck for a use that is completely different to their actual purpose.
 
8:04 PM
@melak47 @набиячлевэлиь I give up because .bat precedence.
I'll just use -pthread now.
Stupid bug.
 
Enums suck for any purpose because they don't guarantee shit
 
why do you even care
 
@milleniumbug Well, you don't need to. You could just use a hash table or something similar which is unordered and therefore not care in the slightest.
but oh noes the slow, right? even though it probably turns out that our users don't give a shit.
 
@Puppy Well, I can't in C++. I can't see the difference between A and B in enum { A = 5, B = 5 };
 
probably because C++ itself does not define any difference, and therefore, there's no difference to see.
 
8:07 PM
@Nooble put it somewhere nearer the beginning of your path
@Nooble plz don't
 
@Puppy Once again, fine. Let's go your way: C++ enums have a very narrow applications and have no extensibility, therefore, C++ enums are useless.
 
that's a massive jump to conclusions.
C++ enums have a specific purpose; therefore, they're useless?
far from it
 
They're shit at what they're supposed to be doing so
 
I rarely use enums but they are perfectly good for the thing they should do - enumerate shit.
 
@набиячлевэлиь I put it in System32 ok. It goes first in CMD but not in a Makefile.
 
8:08 PM
What about Java enums?
 
no, the key part is "almost no extensibility"
 
oh noes?
 
@Morwenn much better
 
@Nooble So that should work
 
you also can't extend templates to act like generics
 
8:08 PM
Extensibility of what
 
at least I can query the set of all defined values in the enum
 
That's reflection
 
or extend functions to randomly support partial application
 
Well, you should point it to a path
@Nooble what.
 
@набиячлевэлиь When I call clang++ manually it calls clang++.bat.
 
8:09 PM
it's a core language feature; obviously it's not extensible, just like every other feature in the entire language.
 
put echo $(CXX) somewhere in the makefile
 
@Puppy which is a deficiency which could or couldn't be fixed
 
@набиячлевэлиь It's obviously clang++.
 
@Nooble Put it in the same folder as clang
ANd make sure the .bat file has the full path to the clang you want.
 
well it can't be fixed.
you cannot partially apply a function in C++.
 
8:10 PM
@ThePhD Alright it works again now.
 
C++ chose to not support it because it complicates stuff too much when combined with other C++ features
 
@Borgleader Nice!
 
all you can do is define a new function that happens to delegate to the function you want to apply, which happens to be mostly useful in the same places.
there's not one single whit of extending functions to support partial application.
 
The difference is academical and irrelevant. The partial application could be defined in terms of creating a forwarder function.
Once again, it isn't because
2 mins ago, by milleniumbug
C++ chose to not support it because it complicates stuff too much when combined with other C++ features
 
why it isn't supported is irrelevant.
what matters is that there is not one single core language feature that is extensible and enums are no different in this regard.
 
8:14 PM
Lounge<Irrelevance++>
 
@milleniumbug set it to "clang++.bat"
 
a chat room about c++ :D
 
I did it!
I finally got the stupid hack to work.
The var CXX apparently keeps on calling clang++.exe.
@JasonRice Hi.
 
@nooble you using llvm on windows?
 
@JasonRice Clang, yes.
 
8:17 PM
for c++14 or something?
 
Yes.
 
Anyway, the set of features enum and enum classes support is ridiculously small (that's a small issue), and can't be extended further with other language features in a generic way (that's a way bigger issue).
 
how much of a pita is that?
 
@JasonRice A very huge one.
 
lol
 
8:18 PM
You can type O(n) code (for each enum you want to support), or use another language to type O(1) code
 
@JasonRice Are you a webdev cowers?
 
pita om nom nom
 
yes
 
The only features I'd really like for enums are magic enum-to-string conversions and out-of-the-box iteration over the set of enum values.
 
i was looking at mxe.cc for cross compiling to windows
 
8:20 PM
@Nooble did you set it to ".bat" or what?
 
@набиячлевэлиь Yes.
 
nice, any editing except drag & drop just stopped working in clion. This is worse than intellisense crashing :v
 
i do a little c++ too github.com/ricejasonf/nbdl :P
 
@milleniumbug Alternatively, I could just not need this at all, and therefore type 0 code.
 
@melak47 :D
@Borgleader Gonna play games now that you succeeded?
 
8:22 PM
and restarting it doesn't help. awesome :D
 
@Puppy yeah, you can flip burgers and just not need this at all
 
template<typename Impl>
class ListenerHandlerBase
{
ewwwwww.
@milleniumbug Could do but instead I could work as a professional developer and also do a bunch of developing in my spare time and still just not need this at all.
 
yeah?
 
@ThePhD Maybe, but I also wanna get ze gbuffer working =/
 
@Borgleader Ah. Well, the concept of the gbuffer should be simple enough....
You're gonna need... intermediate textures / framebuffers?
 
8:25 PM
@ThePhD Oh I've done it before
 
Or do they call it a color_buffer?
OpenGL's terminology is so whack sometimes
 
@Nooble Nice. Thanks for betatesting
 
but sadly i dont know what i did with the source code (it was for a project for a class in uni)
 
Maybe you've got it in an e-mail somewhere?
Or on bitbukket?
 
Nope and nope. But it shouldn't be too hard to figure out again.
 
8:26 PM
@Puppy That's not an argument at all. Most C programmers also don't need templates if they can use void* and macros.
 
well, not really, because it's clear that templates are better and also that you actually need to replace it with something else
whereas it's frankly not clear at all what you actually need that thing for or why it would be better than anything else, ever.
 
It's the same argument with the same conclusions
 
nah
see I can just say "Templates are like void* and macros, but type safe" and then I clearly stated a simple and obvious advantage.
 
Use vodka instead
Is it that hard
 
user406009
But there are large disadvantages for templates as well.
 
8:29 PM
Time for a beer.
 
@Puppy any time I want to map all values of enum to something different
(after all, it is a set of values)
 
uh huh
 
@Morwenn Way ahead of you
 
but when and why would you ever want to do that.
 
templates provide a way to add layers of indirection that are resolved at compile time
 
8:29 PM
and why do you need to do it so often
 
@CatPlusPlus I mean the 3th one.
 
user406009
@JasonRice Yes, but at a large language complexity, compile time, and code bloat cost.
 
I wonder.
 
@Lalaland That's irrelevant because they are fun to use.
 
they ARE fun!
 
8:31 PM
Does the compiler know how to simplify code that instatiates over (const )T&, and T&& ?
 
user406009
@Morwenn Sure. If you are a masochist I guess.
 
they are ways to eliminate bloat and they can also reduce code size
 
user1804599
Stop writing C++ code.
3
 
ITT @Lalaland is Mike Acton
 
Or will it purposefully stamp out the three versions (or four with const T&&) and make no attempt to share functionality?
 
8:31 PM
 
user1804599
Write COBOL code instead.
 
@elyse Best advice
 
@Lalaland oh noes the code bloat!
 
Code bloat is an issue, yes
 
user406009
I put that last on the list because I truthfully don't care that much about code bloat.
 
8:32 PM
maybe if you live in 1986
 
@Lalaland Vectorization also code-bloats
 
Why would it be an issue in 1986 and not now
 
Yet I can't see you complaining about it
 
this is pretty useful for finding problem areas github.com/wmanley/bloat-blame
 
@ʎǝɹɟɟɟǝſ 128GB or RAM
 
8:33 PM
@ʎǝɹɟɟɟǝſ Because hard drive space with Moore's Law easily beats code size increases
 
I just really hope I can do
std::string x = R"(
#include <stuff.x>
)";
 
longer cache lines
 
Code bloat is a readability issue, not a memory one
 
One day.
 
ah you mean code bloat in terms of source code bloat rather than binary code bloat
 
user406009
8:34 PM
I meant both.
 
Binary code bloat is more of a problem for downloading over the internet.
 
I mean readability bloat
 
templates are way more readable than the alternatives
 
better than any other code generation tool
 
Well, templates reduce source code bloat and allow you to cover a wide range of T without writing large portions of your code in hard-to-debug macros: this is clearly a benefit over non-templated code.
 
8:35 PM
Unless they're overdone.
 
Agda ones are fairly readable
 
Not too sure how they compare feature wise though
 
user406009
@Borgleader Yeah, I really need to rewatch a bunch of cppcon 2014 talks.
 
user406009
Too many good talks to watch.
 
user406009
8:35 PM
So little time.
 
@Lalaland Skip that one.
 
@Mysticial Every feature can be misused or overdone.
 
true
 
am I the only one that finds talks an incredibly inefficient medium to convey information?
 
template code behind the scenes can offer a more idiomatic interface resulting in more readable code
 
user406009
8:36 PM
@orlp 2x speed. Always.
 
@orlp Can you give us a talk about that? :)
 
@orlp No, but they can be fun.
Especially if done right (see Scott's talks for example).
BBL
 
When will this fever pass...
 
user406009
@orlp Some are really well done and efficient. See channel9.msdn.com/Events/GoingNative/2013/…
 
user406009
It really depends on the talk.
 
8:37 PM
@Lalaland @ 80% light speed
@ThePhD When you die
 
@ThePhD So. What's the result?
 
@Morwenn lotsa vodka
 
@Puppy Well, what do you use enums for? If you pass them to functions, then automated testing if a function can handle all enum values. gcc has a warning if all enum values are handled in the switch statement. If I want to simulate this behaviour in an constexpr function, I'd like to have this too. Map enum values to string names. Map enum values to sounds. Iterating over all enum values. So on, and so on.
 
user406009
@набиячлевэлиь Really? You should share.
 
@набиячлевэлиь I don't like vodka :/
@orlp I don't know, I don't watch talks.
 
8:39 PM
@milleniumbug Well, like I said, I very rarely actually do use enums, I often find them too restrictive.
 
@Lalaland puts piece of rag in bottle; ignites; throws at @La
 
@Morwenn All of the #include's concents should end up in that string.
 
Of course I can emulate most of these in C++, sure. That requires typing code.
 
user406009
@ThePhD Wait, does that actually work?
 
user406009
Like legitimately?
 
8:41 PM
@Lalaland No.
 
user406009
Cause that would be cool.
 
That's what I wish could work.
@Lalaland Right? It'd be amazing.
 
user406009
Perhaps we should write a proposal?
 
It would probably get shot down.
 
@ThePhD I would expect the raw string to have higher priority.
 
8:42 PM
@Morwenn Right, it does, but I want some kind of syntax or loophole to allow that.
 
user406009
-1/10. Not enough template metaprogramming in the proposal.
 
@milleniumbug In fact, I think I'm going to have to grep my codebase to see if I do, in fact, use enums at all.
 
user406009
@Puppy Wait, how do you deal with items that can be one of multiple types?
 
@ThePhD Since it does not seem clean in any way, I doubt you'll ever get that :p
 
@Lalaland Inheritance? Templates?
 
8:43 PM
@Morwenn I know... but I can dream. I can hope.
 
user406009
Yeah, I guess you can use inheritance to eliminate most enum uses.
 
@ThePhD Hack the preprocessor around
 
user406009
But I find that enums work great for state machines.
 
@ThePhD too bad you cant do #include <stuff.hpp>_s
 
user406009
And state machines usually pop up somewhere in the code.
 
8:44 PM
@Borgleader Right?!
 
I'm looking at this and I basically only ever use enumerations as basically named booleans, more or less.
 
Or if there was some "escaping" syntax for # in strings.
Like \# lets you do preprocessor stuff.
 
and a couple "I wanted a boolean but turns out I needed three states instead of two"
so I have absolutely no enums with more than about four values, none of which are ever used for anything except equality comparison (if that) or map keys.
 
Wtf
glloadgen doesn't make glBlendColor...?!
 
user406009
Anyways, I hope everyone here is using the new scoped enums.
 
user406009
8:47 PM
enum class
 
Wow, I've wasted my day big time.
 
@Morwenn Oh?
 
I use MSVC so I've always explicitly scoped my enums
 
@Puppy You mentioned hashing the enum values. That's a nice workaround, but requires a static (thread local) map that needs to be searched in for the positions. That adds a little inefficiency (small problem) and adds complications like static initialization order fiasco (a bigger problem)
 
@ThePhD I've done pretty much nothing today. Maybe even less.
 
8:48 PM
@ThePhD I have it =/
 
@Morwenn Well I'm on 2rd
 
@Borgleader The gl 4.4 generation doesn't seem to have it...
 
@набиячлевэлиь Lel.
 
@Morwenn Well, get to doin' stuff then!
 
@milleniumbug Maybe I just make a new map whenever I need it instead of statically re-using the same map?
after all the different usages need different value types..
 
8:49 PM
@Borgleader It doesn't seem like an extension. It's core in GL 1.0, ffs.
 
Guess I need to go regenerate everything. <_>
 
user406009
It's Saturday. Working on Saturday is for suckers.
 
@ThePhD idk what to tell you other than: i have it :(
 
Oh my god are you still on the fucking enums
 
8:49 PM
@Borgleader Nothing productive nor remotely interesting.
 
@Morwenn Current status: eying FF7 "Fight". Wanna hear the struggle? livecoding.tv/sehe
 
@CatPlusPlus Great.
 
@Lalaland Or almost-rich people
 
but I believe that I basically no longer have any maps where an enum is a key.
 
@sehe Honestly, it probably took me longer to learn that much.
 
8:52 PM
how many enums does it take to justify using a hash?
 
how many enums?
 
@Borgleader Would you mind pasting the definition?
 
enum values
 
presumably it only takes one- the key type.
 
It definitely took me longer to learn that much, and the way I play it isn't clean in any way.
 
8:53 PM
@Cat how is dating?
 
How should I know
 
No point in ignoring, not gonna stop nagging
 
@JasonRice You say that like there's any correlation whatsoever between the number of values and the need to use a map.
 
We agreed you should create an account no?
and post it here for review?
 
user406009
@JohanLarsson I guess we have to create an account for him.
 
8:54 PM
A what
 
@Morwenn You drank beer...
 
Think about when you have the same legend status on match that you have here.
 
@набиячлевэлиь Yeah, but I could have done that with friends.
 
People making memes etc
 
currently I have a map where the enum has only two values
 
8:55 PM
@Morwenn lol friends
an obsolescent concept
 
so you have a map of two values?
 
I have it as a key
 
std.typecons.Flag from D is nice
 
@sehe Seriously, it took me months at least to learn that much and the way I play it is nowhere near clean :(
 
@CatPlusPlus he's getting nothing from me so has started harassing you. Just thought you ought to know this is my fault :)
 
8:56 PM
I don't know what this is about and I hardly care
 
You can do Flag!"isMinimized".yes or Flag!"isMinimized".no
 
all we know about the mysterious cat
is that he's fluffy and cute
 
user406009
@CatPlusPlus I don't if you are being sarcastic. But the joke is for you to start dating. Cause it would totally match your personality.
 
in C++ it would be essentially template<string s> enum class Flag { no, yes }; if C++ had strings as template parameters and templated enums
 
user406009
Thus the jokes about you creating an online dating profile.
 
8:58 PM
@ThePhD Erm... this?
// Extension: 1.2
PFNBLENDCOLORPROC BlendColor;
 
Great joke
Unrealistic though
 
It's filed under Extension 1.2 ?
I don't have that... hrm.
 
user406009
Jokes aren't supposed to be realistic.
 

« first day (1799 days earlier)      last day (3156 days later) »