« first day (1908 days earlier)      last day (3058 days later) » 

12:00 AM
I had religion classes when I was a lil toddler in school and it was 100% about jesus. my country used to be very catholic
 
Who the f is jesus
 
@JohanLarsson I don't think so. The name that comes to mind is "Bethel", but I wouldn't put much confidence in that.
 
jesus is a mexican dude I know from childhood
 
> "Guns should be part of any upstanding Christian family," Hoflinger said, sticking a long, thick, oily pipe-cleaner 14 inches up an 1886 Remington. wp
 
@JerryCoffin Again I trust you.
 
12:01 AM
@sehe Now you're just hurting yourself
 
Cicada comes from a muslim family :p
not do we care
I was born in a communist country, as such I am not religious
 
lier
 
Hard to click the wp link, was hidden behind the arrow at many screen sizes
 
@JohanLarsson size matters
 
12:04 AM
@sehe hot
 
@TonyTheLion hahaha, awwwwwwwwww :3
 
anyone else watching agdq right now
the guy looks like an annoying prick
 
@AlexM. whats that
 
google agdq
 
8K SUHD TV #SamsungxCES2016 https://t.co/uFgk2MPe60
I think I'm gonna way for 16K SDUHD (Super Duper Ultra HD)
 
12:08 AM
happy streaming :)
 
How about Ultra Ultra Definition.
 
agdq is that speed run thingy
 
MLG Definition
 
@user3886129 Low HD
 
@bitcode ye
hl2 is getting sped now
 
12:10 AM
hl2 and hl and dark souls. people never get tired of speed running these games
 
@milleniumbug Large HD.
 
@user3886129 Large Hadron Definition.
 
@JerryCoffin Large Hadron Compiler.
 
guys serious question that could change the course of human kind: do you write the first bracket in the same line or in the line below? like this:
if(true) {
//stuff
}
or
if(true)
{
//stuff
}
 
The second one is for sensible people.
 
12:15 AM
I prefer the second one, but I don't really care about this nowadays
 
Also add a space after control thingies (what are they called?)
 
I don't do that
it's unnecessary
 
you mean this: if [space] ()?
 
@bitcode If you work on small (I'm tempted to say puny) projects, the second is usually preferred. On larger projects, fitting more code on screen at once becomes sufficiently useful that the first is clearly preferable.
 
@bitcode It's what I do.
@milleniumbug Eh I suppose.
 
12:17 AM
there is one guy in this chat. his name is something like "olp"
he writes like in the first example. his code is so pretty
 
@orlp
 
yeah, that guy
 
Call him nightcrackaddict.
 
@milleniumbug I stopped caring a few years back.
 
Hm.
 
12:18 AM
I was stalking his github and after I saw his code I was like "I'm gonna change my style to his style"
 
Consistency is nice. Readability is key.
 
@bitcode My style is like way better because I'm a koala.
 
@user3886129 koalas are fluffy sloths, but they lack the charisma
 
PSA: Niebler works for Facebook now
 
@user3886129 lack of pointers. 2/10
 
12:21 AM
@bitcode same line
placing something on its own line is pretty but wastes a lot of space
 
wait a second!!!! @user3886129
is that github your code?
 
it's convenient for comments though
 
@bitcode void******.
 
@bitcode yes
 
@user3886129 you sinned. brother. you're going to hell. you betrayed me: const char* shader_source_c_str = shader_source.c_str();
 
12:22 AM
@bitcode That's because of OpenGL.
Sometimes there's just no choice.
 
@user3886129 unique_ptr<>
 
@bitcode Also because OpenGL.
Also smart pointers are fine sometimes.
 
just kidding. I love pointers and you know it
 
lol pointers
 
Pointers are literally Meta Hitler.
 
Ell
12:24 AM
What is wrong with c_str?
 
@Ell can you statically prove it's null terminated
can you prove it exists in the first place
can you prove that it doesn't destroy all of your memory
 
@Ell Ah I forgot. Something about const.
 
and can you prove that it doesn't segfault because the memory location is invalid
 
Oh right never mind what I said.
I needed a const char** and you can't take the address of a temporary.
 
@VermillionAzure ...pretty sure std::string guarantees those things?
 
12:26 AM
@melak47 But it's not just a string
 
morning
 
A default constructed std::string is 32 bytes
 
@MarkGarcia Hi.
 
@VermillionAzure Doesn't matter if default constructed or not.
 
12:29 AM
@VermillionAzure (3 pointers * 8 bytes) + whatever for SSO
 
Because the 32 bytes appears to be the cost of indirection
@MarkGarcia what is sso
 
@VermillionAzure something string optimization or something
 
Small String Optimization™
By Microsoft™
 
Ah.
So you place small strings directly in the body
But regardless
A std::string is already complex
and, if I'm not mistaken, it throws exceptions
 
std::string has a complex
 
Ell
12:31 AM
@user3886129 so put it in a variable you ball bag
That's what they're for
 
@Ell That's what I did :P
 
@LucDanton Yeah, sorry, I should've just said that
But 32 bytes for a small string is still quite large
 
Would we rather hold 8 + 8 for the size and location or 8 + 8 + 16 for SSO?
 
12:33 AM
I'm gonna write in the "backet in the same line" format from now on. maybe someday I'll go back to Nooble's "sensible" format @user3886129
 
@bitcode I can make you hate Allman right. now.
 
@bitcode Nooooooo.
 
Wanna see?
 
@VermillionAzure YES.
 
12:33 AM
When minorities try to cover Wiggle by Jason Derulo
 
@VermillionAzure Considering how similar the std::string is to std::vector, you must also add 8 bytes for capacity there
and if you have 24 bytes, you can add 8 bytes more and have it align nicely to the stack on x64
(well, it's an implementation detail, but a most commonly used processor architecture should be a valid concern for the implementer of the most used class in C++)
 
well, it would look terrible even with braces on the same line
 
For me, it saves vertical space
I hated Allman because when I had to write nested stuff, it didn't look very nice
Too much space
 
don't nest stuff then :P
 
12:44 AM
@milleniumbug Every line you waste means more scrolling down
 
@AngryLettuce Persistence, bby :P
 
that's why I switched to K&R
@milleniumbug hm
 
if you write the whole program on the one line then you never have to scroll down
 
@VermillionAzure at least be consistent! :p
 
12:47 AM
waste of space
 
With languages that are easier to parse than C++, this is usually a solved problem thanks to autoformatters
 
also, again with the stack alignment...
 
you can have your cake and eat it too
 
32 bytes is not small, mind you
 
@milleniumbug clang-format works alright if your code isn't broken :D
 
12:48 AM
That's 4 doubles
 
4 pointers
 
Indeed
 
struct string {
	size_t size;
	union {
		struct big_string {
			char* ptr;
			size_t capacity;
		};
		char[sizeof(big_string)] small_string;
	};
};
save one pointer! woo!
 
derp
I'd rather have ptr outside to make indexing not dependent on a branch
choices, choices
you could move size_t size inside
 
@melak47 If anything, why not just reserve a large table of memory?
 
12:52 AM
of what now
 
a what?
 
You guys got cinched
 
Lel
 
Just grab a large amount of bytes and then manage it yourself
 
rekt
@VermillionAzure That's a concern separate of the object.
 
12:52 AM
@VermillionAzure IOW pool allocator
 
@ThePhD Not necessarily
A std::string is supposed to be in charge of its own memory
 
Building that in directly to the object is a violation of SRP and writing code like that is how you have classes that are tied exclusively to the existence of a stupid PoS singleton.
 
or do you mean struct string { char data[40]; };
 
@milleniumbug Something among those lines, yes
 
@ElimGarak I’m still safe in my bunker
 
12:53 AM
meh, I don't see any advantage of this
 
@VermillionAzure basic_string<Elem, Traits, Allocator >
 
The advantage is that you can use pointer arithmetic instead of having to access each object's pointer
 
@VermillionAzure ?
 
no, you still have to get the size from somewhere
 
I only see one "object"
 
12:55 AM
@melak47 Suppose I have a fixed size string
Let's make it...
Let me look up the Haswell or Nahalem specs
 
not sure how is that relevant, but go on
 
Let's say it's 64 bytes for Haswell
Suppose we allocate a large amount of memory
 
so now you've filled an entire cache line with your string object, even though you probably only care about the pointer and size? idgi
 
No, this is just the storage
64 bytes is room for so many pointers...
8 I believe
So if we store the raw pointers but have a static string size, we automatically don't need to worry about capacity
 
> static string size
 
12:58 AM
so now we have an array of pointers to strings? for what?
 
I’ve decided to hide under the bed that is in my bunker
 
Moving the Goal Posts: we're doing it.
 
Eh, you only need to store what you... need.
 
I think cinch cinched himself, this is a new one
 
@MarkGarcia But the problem is that you never do store what you need
if you store 7 bytes, you're also storing 8 because a word is still 8
 
12:59 AM
@ElimGarak So... Cinch? :D
 

« first day (1908 days earlier)      last day (3058 days later) »