« first day (1673 days earlier)      last day (3501 days later) » 

Ell
Ell
00:00
I feel sad of myself
Time2sleep
Ell
Ell
I donno man
It ain't good news though
Night folks!
sweet dreams
@Brian "Liquidating", perhaps? (I think even Brits manage to get that one right).
@Ell G'night.
@Ell Night
@JerryCoffin Thanks.
00:03
I'm starting to think I don't like scifi anymore. It's weird.
@Jefffrey Surely.
@R.MartinhoFernandes sci fi books?
@R.MartinhoFernandes I'd guess the problem is lack of new scifi good enough that you could even hope to like it. I've seen virtually nothing recently.
@JerryCoffin That's very subtle by the way. Just randomly specified in a note and nowhere else that I can find.
@Jerry yeah, that's the feeling I get.
00:07
@Jefffrey Well, the "may assume..." part isn't a note, but yeah.
So whether this prints 0 or 10 is implementation defined?
I think that would be UB on a technicality, because it has signed integer overflow
If you changed it to unsigned int then idk
wait nvm
I'm stupid
Why would that be implementation defined? It's not an infinite loop
@Jefffrey I don't think so. That's no longer an empty loop; the loop contains a decrement. It probably can factor out the actual looping, however, and just so the equivalent of int i=0; std::cout << i;
@Brian The standard seems to define this optimization for "empty loops".
@JerryCoffin Yeah, but I don't understand the wording of that part.
The "removal of empty loops" appears in a note
@Jefffrey
00:12
Like, why would a call to a library I/O function matter? Interrupts?
@Brian Yup
Because it produces observable effects.
@Cicada we should buy Rust 1.0 shirts to celebrate Rust 1.0 release.
@Rapptz im in, where can i buy?
Wait what. Since when are programming language releases worthy of shirts and parties?
Fucking hipsters
They'll have a Rust launch party here in Berlin.
devswag.com of course
@R.MartinhoFernandes I mean with regards to the "empty loop" thingy
the art is actually pretty neat
I don't really get what it's trying to convey though
It's a flying ship.
00:14
terrible
Launch? iunno
its steampunk
It's gonna crash and burn
It just means that if a loop has no observable effects, the compiler doesn't have to prove it terminates.
smh guys
00:14
I got that part.
That doesn't imply anything
everyone knows steampunk = airships = rust
I want a JavaScript toilet cleaner
man
Someone make this happen thanks
I like how the stickers are placed on a macbook.
They really know their audience.
00:16
Stickers are very hipster like
would buy it if it was a plunger
an effective one
Because a thread is assumed that it will produce observable effects, therefore a loop without them must terminate.
>2015, not hacking on a macbook
@Rapptz faggots!
@nick low level system hacking!
because Rust is a low level systems programming language
A loop with observable effects doesn't have to terminate.
00:17
>2015, thinking hacking != web dev
So who is going to learn Rust now that it's 1.0
I already did.
I lost interest a while ago
rip rust
I was hoping for more hype in /r/programming
Can't believe I'm disappointed
@R.MartinhoFernandes Well it mustn't terminate. It can be optimized out, it seems. But it can also not.
00:18
I was so hyped for this language
No, it must terminate.
@R.MartinhoFernandes 1.0-beta?
user1804599
Rust isn't Haskell and it isn't JavaScript and it isn't Ruby. We can conclude that Rust is a failure.
If it doesn't, there won't be any effects happening.
It's been so long that I forgot what version I initially tried.
00:18
That's a contradiction.
How do you guys name your files?
@R.MartinhoFernandes Effects can happen in an infinite loop.
user1804599
@Nooble which files?
Err CPP files.
user1804599
I name them after what's inside them.
00:19
Whatever version was available in Sept. 2013 is the one I tried
user1804599
If there is an interpreter in it I call it interpretation.cpp.
dang that's old
3 mins ago, by R. Martinho Fernandes
A loop with observable effects doesn't have to terminate.
Would you do my_file.cpp or MyFile.cpp
If it was a multi-word one.
user1804599
my_file.cpp
user1804599
00:20
maybe myfile.cpp
user1804599
I don't like underscores in filenames.
what wrongfold said
@Nooble yes
ew underscores
@R.MartinhoFernandes Oh ok. It took me a while but I think I understand the wording now.
user1804599
00:20
I don't like hyphens in source file names.
user1804599
Camelcase is just ugly.
@Jefffrey The wording doesn't really say anything about optimising out loops. It just says that an implementation can assume that all loops either terminate, or produce some of those effects listed.
at least you don't have to hold shift with hyphens
making infinite loops UB :/
according to some
maybe most people
@Rapptz Only the useless ones.
00:22
I tried arguing that before
it didn't go very well
That they're useless?
user1804599
Optimise for (;;) { } to eternal parking of thread!
No I mean I thought only while(true) {} and for(;;) {} were UB or any variation similarly useless.
And that is true.
yo lounge
what is vOv
is it a face
is it a dud ethrowing up double peace signs
00:23
The wording doesn't actually mention loops. The loops are just a consequence.
@Prismatic It's a shrug.
but iirc while((x = f())) { ... } is UB too depending on what f() does
ohhhhhhhhhhhhhhh
ohh
@Rapptz If it does nothing observable, yes, it is.
00:24
It's also still useless.
man that is not obvious at all
iunno
How can it be useful if f() has no observable effects?
there's a body
that I wrote 3 dots for because I'm lazy
Oh. If the body has observable effects then it doesn't apply.
00:26
my point was that I think only empty infinite loops are UB not the ones with bodies.
I think I might be simplifying it too much to the point of being wrong though
Depends on the body.
Wait. The standard doesn't say anything about UB.
@Jefffrey Well, the implementation can make assumptions that differ from what the code does. I don't see a practical difference between that and UB.
read between the lines
I don't know. I find that "implementation may assume that X" wording very confusing.
00:29
is anything truly infinite though? i think that's the question we should be asking ourselves
wow
a question by alf there
what a twist of events
:23328021 I'm saying it's effectively UB because the compiler's assumptions are incompatible with the code. (Which is more or less the same as any other case of UB)
Nope I'm wrong. "Unspecified" does not require the implementation to document it.
I'm shocked, shocked I tell you
Is this true:
content_ = newContent;
delete[] newContent;
content_ is NOT deleted; only newContent is. (content_ is dangling)
I'm confused on: content_ is NOT deleted. We never performed the delete operator on it so it must be true it's not deleted , only dangling.
00:38
is content_ a pointer?
both are pointers to the same type
lol this code
no there's no dangling
@Rapptz content_ is not null and it points to garbage, how is it not dangling?
how is it dangling
one new for every delete.
@Rapptz it's totally dangling
00:41
you too?
@DonLarynx not enough info: content held two values, one was deleted, one was not
really?
@DonLarynx delete doesn't zero the pointers.
@Rapptz a pointer to data that no longer exists? That's the definition of dangling!
Both content_ and newContent are not null and point to garbage (assuming they were actually pointing to something before that).
00:42
Brendan 4th Reich
Oh wait I missed the fact that content_ was new'd and then reassigned.
@Rapptz oopps; sry forgot to mention they're dynamic.
Anyway
@MooingDuck can you clarify that? how does content_ hold two values?
What's a good way of handling game states?
00:44
@DonLarynx it held one value. Then it was assigned to hold a different value. Not at the same time.
I used to do it the FSM way with different classes for every state
but that seems kinda meh w.r.t. state sharing and what not
what is a game state
@MooingDuck it held one value, *newContent. that was freed. now it's garbage
door is locked, door is unlocked, door is being opened
states
state machine
you know?
brb researching what computer science is
00:47
@DonLarynx oh, I'd assumed there was prior code in which it had a previous value, since it didn't have a declaration. If it had no prior value, then you're right
@Rapptz an enum?
@MooingDuck meh
very ugly
@MooingDuck nope. that's all you're given. two ptrs to the same type. (assuming they point to something)
fuck it all i could find were flowcharts
anyways thanks for the backup <333333333333333
@DonLarynx you said you were assuming that content_ started by pointing at "nothing", and newContent pointed at some data.
00:49
@MooingDuck dont know where i said that, quote me
4 mins ago, by Don Larynx
@MooingDuck it held one value, *newContent. that was freed. now it's garbage
@Prismatic this is how I've always done it
I'm looking for alternatives
Use a smart pointer.
Your raw pointers suck.
@MooingDuck you're right!
@DonLarynx I know :D
00:51
@Prismatic thanks that link was helpful
that jumping thing always got me
I might try the enum approach if the number of states is fairly small.
i guess that approach works for simple games or small parts or larger games
What kinda game are you making @Rapptz
I'm not making anything
oh i like the hierarchical state machine
00:54
?
you mean the dynamic dispatch?
yeah i think thats the idea
yeah that's how I used to do it
what would you be looking for?
ideas of different ways people have done it
"a good way of handling game states" is pretty vague
00:57
on purpose
i would assume it depends on the situation right?
59 secs ago, by Rapptz
ideas of different ways people have done it
Xeo
Xeo
halp. can't sleep. cat sleeping on me.
@nick I just realised how strange their way of doing enter/exit is.
put cat outside door, close door
01:00
This is what a constructor/destructor can be used for.
Less error prone.
new X(...) is enter and delete X; is exit.
that's how I do it anyway
@Rapptz there's always the "object oriented" thingy, pointers to derived somethings
ya
enums and dispatch
Xeo
Xeo
whatcha guys talking about?
was wondering if anyone knew a different way of handling states other than dynamic dispatch and enums
I'm bored
Xeo
Xeo
I'm sleepy
but cat.
01:09
@Rapptz function pointers
hah
It took a long time before someone answered with that.
i'm doing my laundry
Cicada's fascinating life
Xeo
Xeo
ah, Taiga moved. Time for sleeps
shoulda just pushed it off
dangerous
01:11
it's all part of the thrill
Xeo
Xeo
@Rapptz no, screw you.
your loss!
@Xeo you misspelled Tyga
you misspelt misspelt
How do I use jQwerty with JabbaScript (/cc @Scott for next April 1st or something)
01:32
wish we had native tuples
auto x, y, z = my_tuple;
std::tie sucks
yes please
also multiple return
01:44
@Cicada That automatically follows native tuples.
@Griwes no, not multiple return values, coroutines
@Griwes return/continue in functions
(I assume, I could be mistaken)
(I think I'm mistaken)
Oh man, I love these websites that give you minute-by-minute breakdown of positions of a plane... makes finding the locations you manage to capture on photos so much easier :D
@Griwes I had a similar idea, but taking the picture of the plane and showing getting its info based on realtime location info.
@MarkGarcia Geotagging your photos while flying 900km/h?
@Griwes Nope. You're in the ground, taking pics of the plane.
01:50
@MarkGarcia Ah, of the plane.
@Griwes That's more like what you've mentioned.
I meant photos taken while being on the plane. :P
@Griwes So, we're clear of each other's patents right? ;)
@MarkGarcia lol
is a char 4 bytes in c?
01:52
sizeof(char) is 1 by definition
1 bit?
or byte?
byte
thanks
And that info is available on thousands of pages on the internet
@Cicada The internet is a reliable source and sizeof(int) == 4 always.
01:54
lol, I was just confirming. Some sources said 4 bytes..
No
That's character literals, not char
@Zaghie The confusion comes from the fact that 'a' is int not char in C but in C++ it's char.
since you're always doing parsing stuffs
So sizeof('a') is sizeof(int) in C but sizeof(char) in C++.
01:55
What Repptz said
But sizeof(char) == 1 in both
@Rapptz TIL
@MooingDuck I meant to write 8 bits
@Zaghie heh, you missed. lots.
@Cicada @Rapptz , so in C it's 8 bits?
No
It's 1 byte
01:57
@MooingDuck I'm a bit new to all this..
Number of bits in a char is not specified
Ugh silly facebook. When you upload photos with timestamps, it can remember the timestamp with a resolution of a minute, but once you edit it, the resolution becomes 10 minutes.
@Zaghie usually, but not always
Ugh stupid "engineers".
@Cicada so how much memory will a a char* like "a happy boy" need to be stored
01:59
number of chars in the string + null terminator
@Griwes Saving a byte means saving lives.
@MarkGarcia But they are not saving any bytes!
Or the Amazon rainforest.

« first day (1673 days earlier)      last day (3501 days later) »