« first day (1589 days earlier)      last day (3356 days later) » 

4:01 AM
@Blob Well, you can use your favorite 3D modeling program like Blender to create models and export them as .obj files, which contain vertices and other information required to create a 3D model. You create a vertex buffer and copy this data into this buffer, and this data goes through the shader pipeline to be altered and then this gets displayed to your screen.
 
Do animations come into this?
 
You can implement animations, but no, OpenGL is just for drawing things onto your screen.
OpenGL is very barebones.
That's how you make animations though. Draw to screen, swap buffers, draw, swap, draw and so on.
That's where frames per second comes in.
In simple terms, we take data in vertices, send them to the GPU and the GPU rasterizes or turns this data into pixels, which gets sent to a framebuffer.
 
> simple terms
i understood what you said before that
 
the GPU takes a picture of the 3D world you give it and sends it over
 
Kinda sorta yeah.
In a typical OpenGL program, we use double buffering. This way, we can draw on one buffer, and the other one is shown to the display, after we're done drawing, we swap buffers so you can see the updated frame, and draw on the other one.
All of this should be done in less than 16ms.
 
4:24 AM
@LightnessRacesinOrbit - Added the option to not murder tiny animals. — Travis J 9 hours ago
legend
he actually did
and the edit reason was mint
<3
 
@LightnessRacesinOrbit Well, well.
 
inorite
HI GUYS!!!!!!!!!!
 
> It's not size, it's what you do with it that matters
 
ready for some Friday night Lounge lolz?!
 
Super ready!
 
4:26 AM
awesome
so do I cook food, or just chill
cooking in this state seems unwise yet I am hungry
also I'm not sure that I can stomach actually eating
 
you order food
 
too late everywhere closed
cook or bust
 
IRTA cock or bust
 
i bet you did
ITT Alex is Telkitty in disguise
 
oh you changed avatars
whodat
 
4:28 AM
a painting of me done by a friend
16 hours ago, by Lightness Races in Orbit
It's a painting my friend did of me!
yesterday, by Lightness Races in Orbit
It's a painting of me that a friend did
See? Proof!
actually I'm quite proud that I've unintentionally phrased it differently each time
I am, indeed, your God.
2
 
seems legit
 
QED
nice star ta
alright, salmon and bacon it is#
 
do I suck for liking this song
 
@AlexM. Yes.
(not really)
 
@AlexM. I'll allow it. Fuck yes
 
4:34 AM
Slightly.
 
34
Q: Should we delete the old answers if another user answers with a better solution?

Mr. Alien Note : Comments from all the answers are now deleted. So recently this guy is commenting on each and every answer on this question Make a div fill the height of the remaining screen space Deleting this answer will help others jump straight to the best content, and you'll keep the poin...

So Vlad hasn't been back
:sadface:
 
private void engagePlayer()
{
	_player.GetEngaged();
}
I got this shit
 
If you start out by assuming that there's "no real reason" for a compiler error, you've already lost, bub. — Lightness Races in Orbit just now
/cc @Rapptz
@AlexM. NEVER GET ENGAGED
i mean it
 
lol
 
@LightnessRacesinOrbit lol
 
4:38 AM
hi there ;p
 
Heyo.
 
figured you were lurking
you.. lurker
 
Always am.
What do you guys think of this awful creation?
 
it's among the few code snippets produced in this chatroom that I can actually read
 
pretty awful
actually that looks okay
 
4:40 AM
@Rapptz I would tell a UDP joke, but you wouldn't get it.
 
assuming it's more flexible than it looks
 
I especially noticed the lack of template craziness
 
@Nooble More awful than my snippet.
 
@Nooble might not get it
 
4:41 AM
@LightnessRacesinOrbit I only made sockets.
 
I repaired some socks once
 
@Blob :P
@LightnessRacesinOrbit I broke some socks once.
 
a year or so ago I was at this networking exam re-attendance
now the situation was bad enough because if you didn't pass you had to wait a year to retake and pay for it ($$$)
towards the middle the prof just started his laptop and the projector
to project a joke about TCP and UDP
 
wait wait wait
 
obviously nobody laughed :A
 
4:43 AM
this doesn't appear to have anything to do with socks
 
@AlexM. No one got it because it was a UDP joke!
 
eh, fuck it
 
everyone got it
 
Now it's a TCP joke :(
 
Let's shake hands
I acknowledge your joke
 
4:44 AM
I don't know if I should do more w.r.t. the socket.
 
Everything is in order here
And on time
 
I really only made it to implement HTTP/1.1 or 2.
 
@LightnessRacesinOrbit Right, only small socks. These are called sockettes.
 
those are female socks obv.
 
yes
lol as if anyone's implementing HTTP 2
give me a break
that's like saying you're going out of your way to write C++14!!!!!!!!!!!!!!!!!
or Perl 6
same thing
 
4:48 AM
@LightnessRacesinOrbit \n
 
HTTP 1.1 is so old school.
All the cool kids are in the HTTP 2.0 train!
Nah I'll probably do 1.1
Hm.
In the train or on the train?
 
All aboard the HTTP 2 train! Choo choo!
 
The latter makes more sense to me but they're not actually on top of it.
 
@Rapptz Looks okay, but it’s hard to be enthused by a synchronous interface.
 
@LucDanton I explicitly didn't want to be async. Mainly cause at that point I can just use Boost.Asio.
 
4:50 AM
For me the looming concern is 'when will that ever come in handy?', no offence intended.
 
5 mins ago, by Rapptz
I really only made it to implement HTTP/1.1 or 2.
 
'When will' etc.
 
Soon™
 
well alright then
 
4:52 AM
I already know it sucks.
 
If I want at(prev(stop())) to supersede back() then that means prev() works for double-ended ranges. I’m in a pickle.
before(stop()) it is
 
I wonder if I'll ever find a job posting tailored 100% for me
something that doesn't mention "a young and friendly team" and "team building" as benefits
 
Probably not.
 
and instead mentions
"a team that mostly leaves you alone"
company in my city, this is shown on their job postings
what the fuck
 
that’s a cat
 
5:18 AM
yes
 
Suddenly demotivated again :(
Oh well.
Time for vidya.
What should I play
 
No thanks x 2.
 
you suck
go play Mario
or w/e
 
Go back this
 
5:23 AM
lol
Beta Tester
lol @ achievements
 
I need some wiki soft that lets ppl attach comments (or better: comment threads) inline in the wiki article (like a popup link next to the line commented on ..or something); instead of talk pages (because that shit gets messy).
Anyone?
 
Wrong place to ask.
 
should i feign my apologies now?
 
It's fine.
I don't think anyone can help you here.
 
better be ^^
okay
was worth a shot tho'&
 
5:29 AM
you know there's a software rec SE right?
 
a what?
 
it's a big site
where you can ask questions like that
and not spam chatrooms
 
thanks! that's helpful!
 
you're welcome
 
@LucDanton If I really want to I could make it async though. I was thinking about it just now and it seems possible but I don't have a use for it yet.
I still stand by my comment that if it reaches that point then I might as well consider Boost.Asio though.
 
5:39 AM
get back to the vidya you slacker
 
I found nothing to play!
So I'm staring at the screen like a bum.
 
yeah don’t have a recommendation either sorry
 
So, if a range is a triplet r = (state, start, stop) and a bidi-range is copyable, I want that given positions (a, b) it is possible to construct r' = (state, a, b). I.e. a generalised version of slicing (and I intend to use the name slice for random-access ranges), but what name to pick?
assign(r, a, b) is an option (nevermind the mutating syntax), but it reminds me too much of containers and vec.assign(ita, itb) does something else
I’ll try r' = cut(r, a, b) for a pun on slice. Non-mutating syntax though.
 
dice.
slice & dice.
 
5:46 AM
haha
I think I need 4 names actually—I’m fairly sure I want mutating and non-mutating variants.
r = slice(r, a, b) === slice_in_place(r, a, b) if you will
 
MLM
6:27 AM
Why do I have to define a class field default value in the header file when I set it in the corresponding cpp?
Just got hit by the uninitialized variable is undefined behavior pitfall
 
Can you show an example?
 
MLM
Not quite sure how to define a class in the sandbox single file: coliru.stacked-crooked.com/a/da5ed1277cf9ff8c
 
It’s okay, just indicate where the files would begin/end. Oh, you did :D
@MLM What presumably happened is that you didn’t define any constructor for your class, so you ended up with the compiler-generated default constructor.
 
MLM
I have multiple constructors. Actual class looks like: .cpp and .h
If I don't define a value for isValid in the .h file then: On the embedded arduino-like platform I got a bunch of random values for isValid and the value swayed sometimes. On desktop it likes to be 204
 
The only way you have an uninit member is that one or more of those constructors aren’t performing initialization; or you are using an object before initialization is completed (e.g. using *this in a constructor).
@MLM Is the problem with static data members, or non-static data members?
 
MLM
6:35 AM
@LucDanton non-static. The isValid bool
 
The (float x, float y) constructor does not perform any initialization of isValid, does it?
 
MLM
@LucDanton Correct, hmmm. I believed those variables at the top(x, y, isValid around line 18) were instance variables but now I am suspecting they are not :/
 
btw with any luck your compiler supports delegating constructors, which is helpful in getting rid of a lot of the redundancy you have here—cooking an example
 
MLM
kk :)
Makes sense now that those variables at the top of the .cpp are not instantiated every time for each Vector2 instance.
 
the first foo constructor ends up as a 'shortcut' so to speak to the second one
 
MLM
6:41 AM
I've seen that format before but was wary without real cause. Refactoring now
 
Also you shouldn’t be needing those unsigned and int overloads. The float one will do the right thing.
@MLM Perhaps this will help you see what’s going on: suppose we were writing a function which sets up some local variables, and not a constructor which sets up some non-static data members…
…then we could be doing void foo(init_type init) { member_type local = init; }, or we could be doing void foo(init_type init) { member_type local; local = init; }
I think you’ll agree that the first version is more direct: we’re constructing our local with the value we care about in one go; whereas the second version is roundabout because it first constructs the local without a meaningful value, then assign our initializer to it.
That’s the difference between foo(init_type init): member { init } {} and foo(init_type init) { member = init; }
(Actually the constructors do the equivalent of member_type local { init }; and not member_type local = init;, but that’s minor.)
 
accidentally watched the entire 2-hour SGU pilot
nn
 
MLM
For the copy constructor, How can I transform the Vector2::Vector2(const Vector2& vec) to delegate to the main constructor?
I believe:
Vector2::Vector2(const Vector2& vec)
	: Vector2 { vec.x, vec.y, vec.isValid }
 
That looks about right. You didn’t forget the {} block that should come after, did you?
If the braces are confusing you another syntax is foo(…): member(init) { …block} }
 
MLM
nope, saving precious space here
 
6:49 AM
:)
Alternatively you could simply not declare a copy constructor and use the compiler-generated one.
 
MLM
And I believe that will work sufficiently based on the fact that I don't use any pointer fields (read some stuff today about it)?
 
That’s a sensible rule of thumb, yes.
 
MLM
The compiler one does a nice shallow member copy
 
Sort of. If you had a struct foo { int x; int y; } member it would copy all of it, too.
But the idea is that copying Type* nets you a pointer to the same thing (i.e. a pointer with the same value), yes. Not a pointer to a copy of the pointee.
 
MLM
ahh sort of "recursively" down the tree
 
6:53 AM
Yup.
 
@MLM The compiler generated one does a member-wise copy using copy constructors for the members. If those do deep copies, then it does deep copy. If those do shallow copies (e.g., your object contains a raw pointer) then it does shallow copy. It all depends on what the copy constructors for the contained objects do.
 
MLM
Also, I probably don't need a assignment operator overload for my class either operator= (const Vector2& v)
 
Yeah, 'member-wise' if my favourite way to describe it. 'Recursively' can be ambiguous.
 
MLM
@JerryCoffin good to know, Thanks
 
@MLM Right. The copy constructor and copy assignment operator almost always come in pair: if you define one, you’ll want to define the other one.
 
6:55 AM
@LucDanton ...and (the big five) if you have those, chances are pretty good you'll need a destructor and want move assignment/construction as well (and yes, I realize this isn't exactly news to you).
 
so that they 'agree'—having types that behave so that foo a_copy(f); is the same thing as foo not_a_copy = …; not_a_copy = f; leaves out nasty surprises
@JerryCoffin Let’s not go too fast! :)
 
@LucDanton But I drive a sports car--when I'm going too fast, I accelerate. :-)
 
The more you speed, the less time you spend speeding.
 
MLM
7:08 AM
@LucDanton Thanks for help! Really improves my understanding and cleaned up the code signicantly
I did run into the weird platform specific issues of bools on the teensy where a true bool != (int > 0)
But it did eventually force me to find/reveal the true problem. On desktop, an unitialized bool == true
 
np!
 
 
1 hour later…
8:15 AM
rip lounge
 
@AlexM. Rip's here again? Lounge in peace, Rip!
 
@ScottW Now yes
 
the lounge was resting in peace, until you ppl came around
 
8:36 AM
@Nooble @Blob LOL that conversation waa hilarious
So.
I might buy a car today
Also wtf trains to my hometown display a warning about an accident and delays, but only for connections like 3 hours from now. Wut can they see the future.
 
8:54 AM
Well that's certainly better than British Rail managed in 1988. I asked at Euston station enquiries for an alternative route, as my usual was unavailable. They kept insisting that the only sane route was via Clapham Junction. Since there had been a massive crash at Clapham, three trains having collided with dozens dead, I was pretty sure Clapham was closed. The crash was all over the TV news - massed fire tenders, ambulances and choppers.

The only people to not know about the disaster were, aparrently, British Rail :((
 
posted on February 21, 2015 by Scott Meyers

For some years, I've wondered aloud why auto x { 1, 2, 3 }; deduces x's type as std::initializer_list, even though the braced initializer itself ("{1, 2, 3}") has no type. One example of my out-loud wondering took place on this blog about a year ago ("If braced initializers have no type, why is the committee so insistent on deducing one for them?"). Another was during my talk at CppCon 2014, "T

 
9:43 AM
this boss fight was awesome as fuck
QTEs done right
 
Xeo
mornin
 
hiya
 
10:04 AM
there's no such thing as QTEs done right
that's like saying, I dunno, memory corruption done right
 
play the game then
the point of the battle is to be quicker than deathstroke and the very short duration (sometimes less than a second) QTEs provide that and the actual challenge
I had to retry ~10 times until I got the rhythm right
 
you don't need QTEs to implement player speed gates
 
just do the actual battle and see how it works
QTEs fit it perfectly and it has been thought with them in mind, since the other battles in the game don't work the same way
 
user1804599
10:21 AM
ok calls in bytecode how do
 
Woah wtf the Meyers article
@Alex the fucking point of QTE sucking is that you repeat the scene over and over
If that is to be the justification of that particular QTE use, then you failed miserably
 
@BartekBanachewicz with shaders, you don't have to use the 'location = n' syntax right, but should/shouldn't you?
 
if memory serves correctly, location = n syntax is basically out parameters.
so I think you already know the answer to this question.
 
it's for in as well
 
10:29 AM
well that's double dumb
 
like saying in the vertex shader what numbers are location, what numbers are texture
so... either the shader dictates what order you send data (xyz, uv) of if the code can get the location of 'position' and 'texture' and decide what order to send that data
 
Don't listen to puppy
So, that out of the way
 
aaah
tests pass: 257, fail: 0.
finally.
 
It depends. But typically you want to bind in shaders
 
@BartekBanachewicz you mean you generally should use 'location = n'?
 
10:42 AM
@thecoshman yep
I also prebind samplers
 
samplers?
 
@thecoshman You can bind samplers to texture units in shaders
I don't mean Sampler Objects
I mean shader samplers
 
oh ok
 
IOW textures :P
 
user1804599
This is suck.
 
user1804599
10:52 AM
I could do calls in various ways.
 
user1804599
I know.
 
user1804599
I'll allocate an array of N elements where N is the largest number of arguments of all calls in the function.
 
user1804599
And have instructions to set elements of that array.
 
¬_¬ shit works so much better when you clear the depth buffer
 
@Puppy OK, time to find out why your testing is inadequate:)
 
11:05 AM
heh
 
Xeo
11:22 AM
whoop, time for D&D
 
mourning
23 hours ago, by Lightness Races in Orbit
inb4 16 stars
lol prophetic
 
@Xeo Mine had to be cancelled- sick GM
 
11:50 AM
Seems like @R.MartinhoFernandes is not allowed to post on Scott Meyers's blog: i.imgur.com/J5YkRew.png
 
Not bad, google /cc @райтфолд
@AndyProwl it's been manipulated
12 hours ago, by Martin James
Come one, someone. 'std::make_lrio_go_away' was forecast to reach 16, but it needs another star.
 
@sehe ouch
missed that
 
user1804599
I have a better idea.
 
user1804599
16 opcodes CallWith0Arguments to CallWith15Arguments and if you call with more than 15 arguments, an array is constructed and CallWithArgumentsFromArray is used.
 
why 15?
 
12:01 PM
@райтфолд Better: if you call with more than 15 arguments, an Estupidcode exception is raised.
 
user1804599
@AndyProwl Because then there are 16 such opcodes and 16 is a nice round number. :P
 
user1804599
Ok, time to figure out why a Boost variant with 96 variants doesn't work.
 
@райтфолд This may help
 
Booze has been procured. Aurora expedition bound for success.
Hi.
 
Hi R.
 
user1804599
12:08 PM
/usr/local/include/boost/mpl/list.hpp:36:13: fatal error: 'boost/mpl/list/list100.hpp' file not found
#   include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_LIST_HEADER)
            ^
 
user1804599
lol
 
user1804599
I guess I can use union instead.
 
user1804599
But then no nice visitor stuff.
 
user1804599
Union compiles fine.
 
user1804599
 
Hello.
 
user1804599
But it's weird since this is documented: boost.org/doc/libs/1_57_0/doc/html/… yet it doesn't use variadic templates by default and I do have Boost 57.
 
mawnin
 
user1804599
Well, let's try #undef __GNUC__ as a temporary workaround.
 
user1804599
12:33 PM
nice, with this the variant works!
 
user1804599
#define tmpgnuc __GNUC__
#undef __GNUC__
#include <boost/variant.hpp>
#define __GNUC__ tmpgnuc
#undef tmpgnuc
 
> what time zone is ATM?
 
user1804599
Automated Time Machine.
 
user1804599
12:56 PM
 
1:25 PM
@райтфолд that's just the universe, capable of traveling through time at one second per second.
 
user1804599
1:39 PM
fuuuuuuuuuuuuuuck
 
user1804599
std::vector<bool> breaks my generic code.
 
what you playing at?
 
@райтфолд Just use an unsigned long long. 64 bits should be enough for everybody.
 
user1804599
I need to design the register stuff differently.
 
user1804599
I should use a vector of variants instead of a tuple of vectors.
 
1:48 PM
@FredOverflow who needs more than 4k ram?
or what ever it was
 
640k
 
user1804599
Or just union; I don't need the tag.
 
user1804599
Can you do union t { int a; double b } x, y; x.a = 1; y = x;?
 
user784668
Of course?
 
user1804599
Nice.
 
1:53 PM
The only thing you're not allowed to do is write to a and then read from b.
 
user1804599
It's better to use std::variant.
 
user1804599
Easier to work with.
 
user1804599
Can you also do x = 2.34; or do you have to say x.b = 2.34;?
 
> auto main() -> int
what's the point of that?
 
user784668
@райтфолд 12.8/18: "If the class definition does not explicitly declare a copy assignment operator, one is declared implicitly"
 
1:56 PM
@Blob It looks sexy.
 
user1804599
test/../src/interpreter.hpp:49:30: error: no viable overloaded '='
            registers[index] = value;
            ~~~~~~~~~~~~~~~~ ^ ~~~~~
 
user1804599
meh
 
user784668
@райтфолд Also 12.8/29: "The implicitly-defined copy assignment operator for a union X copies the object representation (3.9) of X."
 
user1804599
How about std::memcpy.
 
Hey everyone
 
1:58 PM
@Dominik Hello. Are you Steve?
 
@Dominik No SQL questions, please.
 
@Blob no, whos Steve?
 
@Blob What did one snowman say to the other snowman?
 
@Dominik A "friend" :C
@FredOverflow what?
 
@Blob just checking
 
1:59 PM
@Blob nah, im new here, first time oon this chat lol
 
user1804599
aaaaaaaaaaaa register is a keyword
 
@FredOverflow ...
 

« first day (1589 days earlier)      last day (3356 days later) »