« first day (1176 days earlier)      last day (3997 days later) » 

00:00
looks neat
what happens if the value doesn't exist?
you create a null
meh, cruddy behaviour
why?
What if you want to check if a value exists?
other APIs have something like has etc
@Rapptz I don't see any kind of querying in that sample.
I wonder why you're asking about a feature that likely doesn't exist.
00:02
@EtiennedeMartel Look again.
Oh, right.
Skipped those lines. Huhu.
Now there's a sweet prime
@sehe Look again.
00:03
predictable
well...I suppose has might be a useful thing to have :p
Funny, it doesn't say something has been voted
@melak47 Depends on what you're aiming for. If you want your API to feel like you're using JavaScript, then leave it at that.
Ell
Ell
I actually think points are useful
Even if just debugging
00:05
And the hats are gone.
For those tweeting that they can't login. We know this is occurring and are working to resolve.
And the person who won is from the Anime room.
user3010322
I still have a hat on my avatar.
That's whay I dislike about Riot: an utter lack of transparency. When something goes down, it takes a while before they talk about it, and they never give any kind of roadmap.
It's like they just cross their fingers and hope nobody'll notice.
This is me saying hi from my raspberry pi! :D
00:06
nice... rhyme?
And when people notice, they just cross their fingers and hope it'll be fixed fast enough that people won't come looking for more information.
@EtiennedeMartel Maybe the reasons are embarassing? (like: "our codebase sucks so we keep breaking things every n commits.")
@Borgleader I'm guessing in this case it's a crappy infrastructure.
It really looks like growing pains.
They're getting awfully big, and the piece of crap they ran the thing on a few years back isn't really holding up anymore, so they're in "let's hope nothing goes wrong" mode.
@Rapptz what would you rather happened if a value doesn't exist?
user3010322
Exceptions!
user3010322
00:09
All the exceptions!
depends how you go about doing it
you could provide a way to receive the value but if it doesn't exist the user can provide a default
like jsoncpp's get
Ell
Ell
@melak47 you could let the user choose?
callback/failbit/exception
@Ell if you're using operator[] you've already chosen :p
Hmm Chrome feels faster than this Midori browser that was there by default on Raspbian.
Ell
Ell
00:12
Pis are really slow
which is why I'm really happy that chrome is faster (it could be placebo effect from me expecting it to be faster also... who knows)
either way I'll take it
user3010322
I think this is nice. :D
user3010322
@melak47 Look, I can pull triangles out of the list!
user3010322
Sort of.
00:15
I'm thinking I might also try to replace this class 4 SD card (that I borrowed) with a class 6.
@ThePhD What's topology? A member?
user3010322
@R.MartinhoFernandes Yeah, a member.
If so, the exception should be thrown when it gets set to the bad value, not there.
Oh, wait, that's about switch warnings, right? :(
switch sucks.
user3010322
You've lost me a little.
@ThePhD There should be no way for topology to not be a supported value.
user3010322
00:18
@R.MartinhoFernandes There's a throw in teh constructor if it's not actually triangle-style member.
user3010322
Of which there are only 2.
@ThePhD Ah, yeah, that's what I meant.
I would not put the default there in the switch, but compilers will complain about missing returns and shit :(
user3010322
IndexedTriangleList( PrimitiveTopology primitivetopology ) : topology(primitivetopology) {
			if ( topology != PrimitiveTopology::TriangleList && topology != PrimitiveTopology::TriangleStrip ) {
				throw ArgumentException( "The specified topology is not supported for IndexedTriangleList" );
			}
		}
user3010322
@R.MartinhoFernandes Yeah.
user3010322
Also, wooow the format on that looks pretty horrible, haha.
00:20
@ThePhD if there's only two. ya might want to consider a simple if-else (unless you plan to add others)
user3010322
OpenGL supports TriangleFan, IIRC
user3010322
So I might have to add that
user3010322
as well as Quad something or whatever.
user3010322
@R.MartinhoFernandes Maybe a better exception would be "UnreachableCodeException()" ?
00:21
Ugh, no.
user3010322
So that if it ever actually happens I know something truly bizarre happened?
no, definitely ArgumentException
user3010322
No, I meant
user3010322
Inside the operator[]
I'd just assert.
user3010322
00:22
that's throwing an UnsupportedException
user3010322
assert( "Fuck you" && false );
user3010322
Works for me~
It's fucked up anyway.
user3010322
Could return an optional, all things considered?
assert is nothing on release builds, so it doesn't quite solve the missing return thing.
@ThePhD Eww wat
user3010322
00:23
Shrug.
user3010322
Just throwing out ideas.
__builtin_unreachable()
@ThePhD That's an idea you should definite throw out.
Dont use optional for something that should not happen (since you check elsewhere with an exception)
user3010322
@R.MartinhoFernandes What does that do? Crash?
00:24
@ThePhD Nothing. It's for truly unreachable code.
But the compiler won't complain that that branch is missing a return.
user3010322
Is that a *Nix thing, or can I find it everywhere?
That's the GCC thing, but I guess MSVC has one too.
I use a macro that defaults to throw "some bullshit here"; if on a compiler for which I don't know the builtin.
user3010322
Guess I'll just throw Unreachable() then.
Hmm, abort() might be better now that I think about it.
Abortion ;-;
00:29
Though that works only if [[noreturn]] void abort();.
user3010322
struct unreachable_t {};
const auto unreachable = unreachable_t( );
user3010322
throw unreachable;
user3010322
Guess I gotta wrap this up in a macro.
> The __assume(0) statement is a special case. Use __assume(0) to indicate a code path that cannot be reached. The following example shows how to use __assume(0) to indicate that the default case of a switch statement cannot be reached. This shows the most typical use of __assume(0).
Yep, seems purposedly supported for this.
user3010322
00:31
Remove unreachable_t and then use #define unreachable __assume(0) on MSVC and #define unreachable __builtin_unreachable() for GCC
user3010322
That looks like it'd do the trick.
lol, _GCC_VER?
user3010322
No clue what GCC's thing is.
user3010322
GLIBC, maybe?
00:35
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#if GCC_VERSION >= 40500
user3010322
Oh. So it's __GNUC__
user3010322
What's the clang define?
user3010322
__CLANG__ ?
__clang__ I believe.
user3010322
00:38
Yeap, it's lowercase.
user3010322
Id on't thinkt hat makes a difference though?
hmm
tomorrow, I need to eat solid food again.
this will be le risky
user3010322
#pragma once

namespace Furrovine {

#ifdef _MSC_VER
#define FURROVINE_VC
#elif __GNUC__
#define FURROVINE_GCC
#elif __clang__
#define FURROVINE_CLANG
#else
#error Unknown Compiler -- set unique define for this compiler
#endif // VC++ || GCC || Clang

}
user3010322
I don't think I'll check versions, because I always compile against the latest.
lol
00:41
bah
"I'm not going to bother checking anything because I know I'll always be perfect."
3
@Rapptz hm, I could make an empty json value be != a null value, but what should happen when you try to serialize something that is or contains an empty value?
make it null
just on serialization or always?
probably on serialization
like I said, user should IMO be able to specify a reasonable default
00:46
@Rapptz well, I don't like the idea of being able to construct an invalid value, so empty values are kind of icky :/
01:02
Is it rude to ask information before sending an application to a potential employer?
01:12
depends. but, no, not in principle
alrighty, thanks
I wonder if I should ask Nicol Bolas to review my repo
even though it's not much
user3010322
@DeadMG I don't plan on using old crap in my compiler, so I always get the latest.
user3010322
01:28
If I'm always using the lowest common denominator (VC++), it doesn't matter what version it is: VC++ has the worst support out of all the compilers, latest version of all compilers means my code always compiles against everything (so long as I use lowest subset of latest availability).
user3010322
Notwithstanding buggy code VC++ lets me write, but some simple cross-compiling should whip me straight right away.
Can your engine even work with clang/gcc?
user3010322
Not a clue. I've hidden DirectX and Windows-specific stuff behind defines, but I never tried a mingw build of it.
user3010322
When I get to using OpenGL, that's when I'm going to make the ninja files and whip out all the linux-y dependencies, including GCC.
user3010322
The worst trip is probably going to be my template code.
user3010322
01:31
Those MSVC extensions are reeeeallly going to bite me there.
user3010322
Fucking .template get <.>
I can imagine well over 10k errors :P
user3010322
Ultimately I've been delaying the move to OpenGL because I just don't want to do it. Shit's gonna be a lot of really goddamn hard work.
user3010322
Question.
user3010322
Does boost::variant deal with type hierarchies?
user3010322
01:38
e.g. boost::variant<int, derived_type> arf = derived_type();
Why didn't you do OpenGL from the get-go?
user3010322
@Rapptz All of my code and knowledge is in DirectX.
user3010322
I read OpenGL tutorials when I was getting started. I got lost. Fast.
user3010322
The state of DirectX tutorials were marginally better than OpenGL.
user3010322
The state of DirectX frameworks -- Managed and Unmanaged -- are vastly superior to openGL.
user3010322
01:40
Learning from them was cakewalk. Learning from and handful of OpenGL wrappers was obnoxiously painful.
user3010322
Plus, I was on windows. The backflips required to write fresh OpenGL 4.3 or 3.3 or even 3.1 code to get going is huge.
user3010322
To get started with DirectX on a Windows Development machine, I needed a handful of includes that were automatically installed by teh Windows SDK, but if Iw anted older shit I could ask for it from the well-documented DirectX SDK.
user3010322
OpenGL had no such niceties for windows users.
@ThePhD Erm, that's too much FUD.
Given that why didn't you do OpenGL?
user3010322
01:43
The learning curve was too steep for OpenGL and there were not enough knowledge sources to get me started.
user3010322
The first iteration of my engine was in OpenGL.
user3010322
I was rendering with shaders and everything, writing GLSL, and a bunch of other stuff.
user3010322
I had a working GLSL preprocessor. It was there. But it was painful.
Another day, another repcap
user3010322
01:44
@LightnessRacesinOrbit You hit repcap already?
user3010322
The minute I started peeling away libraries I didn't want to use -- SDL, GLEW -- it got even worse, far more quickly.
user3010322
Manually query the functions I want from the driver?
user3010322
Double-create my window? What?
user3010322
Version Checking? Are you kidding me?
Oh, right, I forgot you are allergic to code written by others.
Solved problem? Are you kidding me?
user3010322
01:46
That doesn't mean I didn't return to using GLEW, or GLLoad.
your engine has lexical_cast :s
you know the Boost one is 1000x superior right?
user3010322
@Rapptz Obviously, but I don't have boost right now.
it's a single header
just... peel it off
user3010322
01:47
No thank you, and I'm not using lexical cast anywhere in my code. It was written for fun, much like cowboy_cast.
user3010322
With direct X, the version was built into the api: #include <d3d11.h>. And all my D3D9 stuff? Most of it was just change it to 11: ID3D11Device, ID3D11Buffer: learning it was simple.
user3010322
Very, very simple.
user3010322
Using the GL API directly, on the other hand...
You know Github allows me to search your code right?
You do use lexical_cast
@ThePhD ... would have required no such change!
user3010322
01:48
Yes. Look for uses of lexical cast. I'll be happy to remove them, if they're anywhere.
The names of the buffer API functions don't change with versions.
user3010322
Yes -- because they no longer exist.
evenin
@ThePhD Jesus Christ. That's horrible.
01:49
Such bullshit.
Microsoft actually does this?
user3010322
@R.MartinhoFernandes Write an OpenGL application using glload in C mode or GLEW. Then, take the GLEW out.
user3010322
Enjoy the massive number of compiler and linker errors to stuff "not found".
I don't even.
Stop FUDing.
user3010322
01:50
It's not FUD. Try it.
why does rapptz get to see furrovine and I don't?
No trying such absurdity.
I'm so pissed
Why would anyone do that.
@Jefffrey I'm cool!
and offer constructive criticism.
01:51
and I'm not?
"Write an X application using Y. Then take Y out. Enjoy the massive number of compiler and linker errors to stuff "not found"."
user3010322
@Rapptz What the hell is wrong with it?
@Rapptz yeah, you might be right about that :(
no initialisation list, using raw new and delete, etc
Okay I have to eat.
just because I'm not experienced enough though
not because I don't want to
user3010322
01:52
@R.MartinhoFernandes The point was when I was peeling back frameworks to learn how they worked, I could much more easily understand D3D because all I had to do was change what version I was including and teh API was there. When I peeled off OpenGL frameworks, I had no more functions. I had to learn how to manually query them, check driver functions, and a bunch of other stuff.
@ThePhD There's no need to understand how GLLoad works.
@ThePhD Not yet today. The challenge begins anew!
GLLoad is OpenGL.
I'm only on +10 :( 1.52am. I'm slipping.
user3010322
01:53
@R.MartinhoFernandes It's not; it's a wrapper that needs to be init.
@LightnessRacesinOrbit you are making jerry proud
All you get from "peeling back" GLLoad is how your platform's OpenGL implementation works.
@ThePhD It is.
user3010322
Shrug. Well, okay.
BufferData is part of OpenGL.
Yes, most systems provide horrible APIs to access >1.1 functions. That's irrelevant.
Stop hitting your head against the wall and it stops hurting.
2
@Jefffrey Well we'll see about that
user3010322
01:55
@Rapptz Fixed the 3 places it's actually used... I guess I can remove the header now.
You're confusing OpenGL with opengl32.lib or something.
btw, don't get mad at me
what is there to see?
I'm just trying to help
user3010322
I'm nto getting mad at you.
user3010322
01:55
I was just saying I fixed it.
i wanna help too
My hobby: raping the fuck out of Markdown's formatting options to make my answers look as fully-featured as possible. Seriously, it sets them apart. I highly recommend it.
4 mins ago, by ThePhD
@Rapptz What the hell is wrong with it?
user3010322
What the hell, I can't make hearts on this code.
@Rapptz It is in accessible, is the main problem.
user3010322
01:56
@Rapptz I'll fucking use nice goddamn language, okay? <3
@R.MartinhoFernandes You seem to know a thing or two about OpenGL. If you ever have time, may I invite you to quickly review this.
user3010322
Also I CAN"T MAKE HEARTS ON THIS COMPUTER
user3010322
WHERE IS TEH UNICOOODE
user3010322
Oh, I have to enable the registry hack again to do it hex-style. =/
user3010322
I think I'll just do the 0 style, then.
01:58
@Borgleader I'm far from an expert. I had a course in University (that I took two years in a row because I felt it tried to cram too much into a single semester), and then I played around with it sometimes. Though now I do use it at work (not games). But yeah, sure.
user3010322
@MohammadAliBaydoun Dont' taunt me!!
user3010322
I tyhink I need to restart to use the Unicode numpad after changing teh settings.
user3010322
Goddamnit, Microsoft. =[
01:59
@ThePhD IME that registry hack sucks, because it doesn't avoid application shortcuts.

« first day (1176 days earlier)      last day (3997 days later) »