« first day (1584 days earlier)      last day (3373 days later) » 

7:00 PM
@Puppy heeeey im trying to do a simple ECS too. That guy's design is... interesting.
 
@Pris Yes, but you're a moron.
 
Ell
woah now pup
easy, boy
 
rude
 
Ell
bad dog
 
user1804599
My GC needs to keep track of all GCPtr objects that exist.
 
7:01 PM
Who actually needs garbage collection man?
(Besides of some "garbage" needs to be collected here)
 
user1804599
Hmm, I can also introduce extra indirection to make it easier.
 
@Puppy This guy's design is shit.
@Puppy What if I want to use, I don't know, some kind of level editor.
And I want to add behavior to various game objects without having to recompile everything everytime?
 
then use a dynamic language, that's what they're for.
 
user1804599
Reflection.Emit.
 
@EtiennedeMartel Right. You can't data-drive anything with his template design that you can't drive with regular member variables.
 
7:05 PM
@Puppy What if I don't want to have to write code for that?
What if I'm an artist or a level designer?
 
Ell
ECS sounds like being able to make a game without writing source code
 
then I'd lead to question why you're doing a programmers job changing behaviour without an appropriate tool.
 
Why is that the programmer's job?
 
are you telling me you hire artists to write level editors?
 
@Ell Not really no
 
7:07 PM
@Puppy What? I never said I was writing an editor.
 
@райтфолд That's called an object table. Thirty years ago, most GC was written that way.
 
Ell
@Puppy levels, not level editors
 
I'm using one.
 
right, so have the level editor emit code behind the scenes and let the artist use the UI that you made for him.
 
@Puppy Why are you thinking in code?
Game state is data. It's all data.
 
7:09 PM
logic isn't
there's more to state than information
 
If I have a dude that can jump up and down, then it's a mesh with a ridigbody and some sort of collider.
 
@EtiennedeMartel see, I could say you're overrigidizing the idea in data, too
 
The ground he walks on is just a collider.
 
code is data and data is code.
 
@BartekBanachewicz No, because each bit of what I just said is a separate component.
You can mix and match between them.
A system that manages physics only needs to know about colliders and rigid bodies and stuff.
 
7:10 PM
the main reason to prefer code over raw data is because code is a lot more flexible than just a data dump, and you can express data as code anyway.
 
The renderer only needs to know about meshes and materials.
So anything that has a mesh and a material can be rendered.
See the composition?
 
that's how mixins work, too.
 
we both agree that it's clearly composition (are you talking to Bartek?)
 
@EtiennedeMartel you have to implement the system at some point and puppy's remark about a dynamic language was spot-on
in a dynamic language you can think in raw language primitives
in a static language you can create the dynamic structure
 
What if I'm not using a dynamic language?
 
7:12 PM
It's dynamic composition, regardless of the language
 
@EtiennedeMartel then you have to create the dynamic system yourself. But there's a lot of value in the static parts, too.
The fact that some parts have static guarantees makes it easier to keep the invariants of the dynamic state.
 
lol now you're just picking clever sounding words
 
What I experienced first hand is that going the ECS route makes it way more easier to create tools for that.
 
or, in other words, going more dynamic is always possible
 
user1804599
 
7:14 PM
@CatPlusPlus right, because if the words I chose to present what I meant have more than 5 letters, that must mean I'm picking them just because they're clever. Fuck you, cat.
 
have you considered going less dynamic?
 
user1804599
Fuck, assignment operators.
 
@EtiennedeMartel that might be very possible.
 
The previous version of our engine is the traditionnal Unreal style class hierarchy. The current version uses ECS. It made several things much simpler.
 
@EtiennedeMartel You mean, "What if I arbitrarily don't pick the right tool for the job"? Sounds self-inflicted to me.
 
7:15 PM
@EtiennedeMartel just like using dynamic languages makes several things much simpler
 
@R.MartinhoFernandes that's not possible (attributes are implicitly bound to the reference passed in parse(), phrase_parse(), match(), phrase_match(), tokenize_and_parse() and friends. I use inherited attributes to write into pre-existing values under my control (that is, when I need it - i.e. "never")
 
user1804599
And copy and move ctor.
 
and considering that a lifetime of a typical game's logic is way shorter than a lifetime of a typical codebase...
 
@BartekBanachewicz Plink me again, I can't seem to configure my speakers correctly and everything sounds weird or too quiet or waahhasdhjasdfhjasfd
 
@BartekBanachewicz Yeah, but ECS isn't just for the gameplay.
 
Xeo
7:16 PM
@CatPlusPlus plink
 
Dammit
It's muffled somehow
 
@CatPlusPlus have you enabled some "sound correction"?
 
Speaker fill does it
 
@EtiennedeMartel I suppose you meant to reply to my last message
 
@sehe This is that time when local(_a = foo)[ construct(_1, _a) ] is very ill-advised right?
 
Anyway, we have our entities in a database that you can query by looking them up by types of components.
 
@LucDanton it does the copy, I assume that's what Robot is trying to avoid
 
? then you’d ref(foo)
 
@LucDanton wait, what is construct anyhow?, I know phoenix::construct<> (which constructs an object, not in-place)
 
Or similar, yes.
 
Xeo
7:20 PM
> gc->discoverGCPtr(*this);
gc->forgetGCPtr(other);
 
Of course you don't go playing with inplace construction because that makes the whole deal hopelessly complex, even without the lazyiness factor
 
user1804599
@Xeo !!!
 
user1804599
There's also some syntax errors.
 
user1804599
like typename Object& lol
 
user1804599
no idea how that got there
 
Xeo
7:22 PM
@райтфолд Shouldn't reset(new_obj) have the same forget/discover dance as swap?
 
user1804599
No.
 
user1804599
gc isn't changed.
 
user1804599
GC discovers/forgets the pointer, not the pointee.
 
Xeo
ah, right
 
user1804599
And I forgot return *this; in my assignment operators as always. :D
 
user1804599
7:24 PM
Stupid boilerplate.
 
Xeo
You can have a void operator= :P
 
@райтфолд -Wextra -Wall
 
user1804599
Ok at least my code still runs with the new GCPtr (was using GCPtr = Object*;) previously.
 
user1804599
@sehe Yes I do that. Without it I wouldn't have known.
 
user1804599
Now I need an extra step in the collection procedure to update all GCPtr objects. 3:
 
user1804599
7:28 PM
@райтфолд why was this starred?
 
user1804599
Can't wait to implement collection. :P
 
i'm in refactor hell
 
@LightnessRacesinOrbit what are you refactoring?
 
at least I'm using templates properly now
@BartekBanachewicz code
 
@LightnessRacesinOrbit yeah but what code? Work?
 
7:33 PM
Bad code
Like all code
 
a system that takes config files containing metadata for hundreds of data fields and generates structs, enums, utility functions (inc. lexcasting) for them
I used to have just the one config file but now I have multiple config files, so I have to "type" all the generated output
template specialisations ftw, I guess
@BartekBanachewicz yeah. I don't have any code but work code :sniff:
 
user1804599
I'm so happy.
 
@LightnessRacesinOrbit what about lolphin
 
@BartekBanachewicz You mean the one with "18/01/2009" at the top of the changelog?
:cries:
Besides, that code is so bad I'd have to do it all from scratch to save that project
that's potentially months of work
ain't nobody got time for dat
 
@LightnessRacesinOrbit who would have thought
 
7:36 PM
@BartekBanachewicz inorite
That project predates my status as programming God of the universe
 
@LightnessRacesinOrbit (as do all your others).
4
 
Dat pun!
 
Now you can write a programming
 
7:39 PM
@LightnessRacesinOrbit I don't see it either.
 
user3010322
I came in here a long time ago, thinking I was going to bikeshed stuff.
 
user3010322
.... I've decided against that idea.
 
user3010322
In fact, I forgot what I was going to do in the first place.
 
user3010322
I'm going to go make some food. .-.
 
@ThePhD so, you're back.
 
7:40 PM
I was going to have a productive evening in and get yummy takeaway and stuff. Then a friend found a new pub quiz.
 
@ThePhD When in fear, when in doubt, run in circles, scream and shout eat. Unless you're overweight, but in that case you've probably already done so (just a bit too much).
 
user1804599
 
If you're overweight then you definitely didn't run in circles enough
 
user1804599
doesn't exist anymore
 
@CatPlusPlus I prefer squares.
 
7:42 PM
@райтфолд The stuff of which Greek tragedies comedies are made.
 
Ah, squares.
I'm still on level 18.
 
@райтфолд It's why I use them. Indeed. But it's hardly different in other languages. C# would just fail to compile. With YouCompleteMe I have pretty cringly lines just like VS/C# there...
 
user1804599
OK, time to implement the marking step.
 
@sxpert1 @hashbreaker what if you combined the joy, wonder, and speed of printing with the joy, wonder, and speed of bureaucracy
 
user1804599
Which is very easy.
 
7:45 PM
yet more bugs bite the dust
 
@Puppy And more raise like a Phoenix from the dust. :)
 
@райтфолд learn a programmings in 24 hours! Or 21 days!
 
@Puppy Pfft
0
A: "Naming" template class instantiations

πάντα ῥεῖAs you've noticed, typedef X Y; doesn't provide you with a new type Y, but just something like an alias for type X. A probably better approach to tackle this is inheritance. But to get this right and efficient, you'll to consider some refactoring of your Entity template class. The idea I have is...

 
fortunately, your answer is substantially worse than mine.
"Missed the point of the solution? No problem, just go back to the original even worse problem!".
well, not that I'd be against such people paying an Idiot Tax
 
It's not cryptic. That's brief. — sehe 46 secs ago
 
user1804599
7:50 PM
Hmm actually. I don't need a sweep step.
 
user1804599
Or rather, sweep is automatic.
 
@sehe Isn't that the same sometimes (or maybe "overly brief")
 
user1804599
Because I do heap = std::move(newHeap);.
 
@πάνταῥεῖ No.
 
user1804599
And newHeap doesn't contain collected objects.
 
7:51 PM
cryptic means that you don't understand what I'm saying.
 
@Puppy I don't understand ECS in particular, to be honest (doubt the OP does either)
 
he clearly doesn't
but you also clearly don't
and your proposed solution is even worse than his original design because you have MI fuckups and giant inheritance chains that at least supposedly should not really happen with ECS.
 
@Puppy So that's what I meant with cryptic
 
@πάνταῥεῖ it's not overly brief.
 
I didn't realize that non-cryptic meant writing a book on ECS.
 
7:53 PM
A lot can be elaborated/explained, but it's prudent to first see whether the clue stick lands. Perhaps people intuitively understood this and they just needed someone to spell it out
@πάνταῥεῖ Confusion is not disspelled by loading more information.
It's dispelled by repeating/highlighting the essentials. Robot and Luc are masters of this in the lounge
 
user1804599
Can you return temporary by const ref?
 
I can't
 
no.
 
user1804599
Fuck.
 
7:56 PM
Ck.
 
OK got the points about Entity Component System. Depends on the actual type hierarchies, where a CRTP and mixins make sense vs pure virtual interface aggregation.
 
> Depends
What does?
Your opinion? Validity of question? Validity of answer?
 
If you can't attach and detach components at will, you're doing it wrong
 
@R.MartinhoFernandes That's easy to do in assembly. But that's probably not the answer you're looking for. :)
 
7:58 PM
@FredOverflow The extra limitations
2 hours ago, by R. Martinho Fernandes
@JerryCoffin Ah, yeah. I'm interested in SIMD, though.
Then still?
 
oh
That's hard.
 
last I checked there were no cross size arithmetic instructions in SIMD on any modern platform
 
> Do you understand basic design patterns?
lol
 
what is cross size?
 
@FredOverflow it doesn't. What it represents is the willingness to go over old ground and learn more than one way of doing the same thing
 
8:02 PM
@JohanLarsson mixed size
 
@FredOverflow It fits the "work outside your comfort zone" part.
 
@sehe like int + double?
 
In case of going from C# to Java you learn about nothing new
 
@sehe K
 
@CatPlusPlus But doing Java is quite uncomfortable.
It teaches you about pain.
 
8:03 PM
@JohanLarsson int32_t + int64_t
 
@JohanLarsson like int64-int32 (which is the question)
 
Programming is uncomfortable enough without forcing yourself to work with bad tools
 
ty & ty
 
@CatPlusPlus Weakling.
 
@EtiennedeMartel By that definition, going from Java to Java is also uncomfortable.
 
8:04 PM
I'm sure you never eat spicy stuff as well.
 
regardless it's easy to deal with, you just or what you're not going to use into another register and then do it 64bit
 
@CatPlusPlus yes you do, you learn about badly done generics, interesting possibilities of co/contra-variance, competing ideas with Class<?> for type faux deduction etc.
@Mgetz you're not the quickest. First Jerry has been over this, then Mysticial. Please scroll up a bit
 
user3010322
Being forced to do a course about Java right now, I can assure you that not only does Java not teach you anything new, it also has a gross lack of functionality. Every statement feels more and more like shitty boilerplate; I don't know how a language trying to mock C++ managed to make me feel like I was doing more boilerplate-y shit.
 
@R.MartinhoFernandes The easiest solution is probably to hack with floating-point. Convert both numbers to double-precision. Do the division. Convert back to integer and do a multiply-back + correction. It will be slow, but possibly still faster than pulling it out into scalar integer divisions.
 
@ThePhD Java is not an improved C++. Java is an improved C with classes.
 
user3010322
8:06 PM
C# makes things better with extension methods but I can't even find that in Java.
 
@ThePhD then you haven't had the ahem joy of Objective-C yet.. which is someone randomly deciding that smalltalk and c would be great together
 
user3010322
And then I spent 20 minutes running around only to find out I can't have multple public class X in one file, I need to have every public class be separated into its own file.
 
@FredOverflow The Mercedes-Benz C-Class comes to mind...
 
Java has no extension methods
 
@R.MartinhoFernandes Can you use x86 assembly? The instruction idiv divides edx:eax by the operand.
 
user3010322
8:07 PM
And GOD FORBID you want to invoke a main that doesn't match the name of the file its been compiled from.
 
@FredOverflow But be careful how you read that. Java is an "(Improved C), with classes", but (IMO) probably not really even an "Improved (C with classes)".
 
user3010322
GOD HELP YOU.
 
class per file sounds right imo
 
@ThePhD It's boolsheet I know.
 
@ThePhD Who the hell thought that one up?
 
8:07 PM
@FredOverflow He wants it in SIMD.
 
@ThePhD Java had some things that C#2.0 lacked dearly. Nested (anonymous!) classes implicitly capturing final variables from surrounding scope and implicitly receiving a reference to the outer class instance (unless static class) are vastly vastly underrated. This is crazy powerful.
Of course, C#3.0 lambda's ran flat over that
 
@sehe Those crazy inner classes are just "Lambdas but we apologize hard for them sucking so tremendously"
 
3 mins ago, by sehe
@Mgetz you're not the quickest. First Jerry has been over this, then Mysticial. Please scroll up a bit
:)
 
All the 'grr java code organisation' is silly
 
@Puppy That's actually exactly what James Gosling said :)
 
8:08 PM
@Puppy Directly above your message :)
 
user3010322
I don't mind it, I just don't know why they force that convention on me.
 
user3010322
So much so that they give me half-cryptic compiler errors about it.
 
Because they do, what's it matter
 
@sehe Yeah, I know. All I'm saying is, I don't think C# lacking that feature is a real lack. They lacked a solution to the lambda problem. They did not lack that particular non-solution.
 
The point is, Java had this earlier. And it is still pretty vastly underrated. I can hardly say I'm limited by that. I feel the absense of decent library classes much harder
@Puppy Nobody said this.
 
8:09 PM
@sehe Why don't you just ask on SO? :)
 
Ell
yeah lambdas in java before lambdas proper are a pain
 
user3010322
@sehe The weirdest thing in Java's library is the fact that primitive arrays don't actually implement the Collection and the like interfaces.
 
user3010322
So you have to have that boilerplate-y Arrays.asList( myarray ) stuff to make it play nice with the rest of the collections library.
 
8:10 PM
Arrays in Java are terrible.
Everything in Java is terrible.
2
 
@FredOverflow it's not my question?
@FredOverflow yet it is reasonably usable. But going to C# is like going from a trike to a mercedes
 
I concur
 
I don't hate using Java at work (it's full time the last months). But I hate Swing and a variety of other libraries
 
user3010322
@sehe I had a fun time figuring out that not including the static keyword made any inner class get immediately instantiated.
 
@sehe swing is 99% of why people think java is slow
 
8:13 PM
@sehe The libraries definitely don't make Java better.
 
@ThePhD fantastic nonsense
 
@Mgetz The reason why 99% people think Java is slow is because Java is slow. :)
 
Who cares about Swing
 
I do.
 
what is swing? UI framework?
 
8:14 PM
It's the reason I'm doing Java a.t.m.
 
@ThePhD It doesn't
JavaFX is the primary UI thing in Java now
 
user3010322
It's really weird that they made it do that when the word "class" already has a meaning. I'd understand if there was some kind of syntax like "object X { ... }" for something that'd get immediately instantiated, rather that "class X {}" inside of some class Y.
 
@ThePhD You meant this: (note the "unless static")
7 mins ago, by sehe
@ThePhD Java had some things that C#2.0 lacked dearly. Nested (anonymous!) classes implicitly capturing final variables from surrounding scope and implicitly receiving a reference to the outer class instance (unless static class) are vastly vastly underrated. This is crazy powerful.
 
user3010322
@CatPlusPlus JavaFX is apparently pretty great!
 
user3010322
But I haven't had the chance to try it.
 
8:15 PM
@ThePhD The meaning doesn't chang
It's not instantiated for you
Non-static inner classes just implicitly inherit this from the parent class
 
Perhaps he means anonymous types, but they involve the new keyword, so no surprise there
 
I.e. can't be instantiated without the parent object, but they're not created automatically by any means
Anonymous types don't use the keyword class afair
 
anonymous types really wouldn't be so bad if they could reference outer variables properly like a full lambda.
@CatPlusPlus I also don't believe they do.
 
They can?
 
@CatPlusPlus Pretty sure that they cannot.
 
8:17 PM
@CatPlusPlus which admittedly feels kinda nice; unless you enter reflection territory where it comes crashing down with a vengeance (special cases!)
 
They just need to be final because of closure limitations
 
@JohanLarsson A collection of UI anti-patterns.
 
right.
 
@Puppy Sure they can
 
@CatPlusPlus You just said they can't.
they can only be final.
 
8:17 PM
2 mins ago, by sehe
7 mins ago, by sehe
@ThePhD Java had some things that C#2.0 lacked dearly. Nested (anonymous!) classes implicitly capturing final variables from surrounding scope and implicitly receiving a reference to the outer class instance (unless static class) are vastly vastly underrated. This is crazy powerful.
The "final" but it for you
 
@Puppy OK, I tried improving my answer regarding your points (and I didn't DV your answer BTW)
 
@sehe Yes, I know this. That's why I was just complaining about it :P
 
What is "full lambda"
 
@Puppy Yes, closed-over variables must be declared final (prior to Java 8) or be effectively final (Java 8).
 
8:18 PM
@CatPlusPlus Well, as a simple example, in a proper lambda you can mutate the state of closed-over variables.
 
@CatPlusPlus Apparently Puppy prefers the kind that autoboxes ValueTypes, destroying their usual semantics
 
@Puppy Which the Java designers consider a bad idea. And I don't disagree.
 
@Puppy Lol that's about as arbitrary as being able to only close over final variables
 
I haven't observed C#'s lambdas to destroy any of int's usual semantics.
 
user3010322
I'm trying to pull up this code I had that gave me the error but IntelliJ is freaking out.
 
8:19 PM
@Puppy You can in Java, just need a "boxing" wrapper, just like for "out" params
 
@CatPlusPlus It's not arbitrary to say that in the body of a lambda you should be able to write pretty much anything you could have written in the enclosing function.
 
You can close over an int[1] in Java :-D
 
Sure it is
It's a design decision
Those tend to be arbitrary
 
@Puppy that's probably because you didn't think about it too much :) Valuetypes are boxed on capture, because otherwise the capture would be invalid when leaving the scope that defined them
 
The reference cannot change, the value can
 
8:20 PM
@sehe That's an implementation detail about which I am free not to give a shit.
 
It does come up sometimes
Trying to remember when
 
well, I personally have not observed any case where it was noticable, but you may have found one
 
Ell
woo I worked avrdude
 
Xeo
@thecoshman So, all "stretchgoals" done.
 
@Puppy maybe it was an observable secondary property like performance. I honestly don't remember and don't feel like looking for it. It was on Skeets blog once, or Lippert's
 
8:23 PM
you may be thinking of the foreach loop variable? ISTR they did do some funky shit with that and captures at some point, or something.
 
@BartekBanachewicz (as much as I hate to say it) you're right. Since I left uni... hell, even if I count uni, I've made barely a handful of games. So I'm going to start a wee 'project', 'technically a game'. I'm going to make stuff, really shit stuff, but my fucking god it's going to be a 'game'!
 
Ell
@BartekBanachewicz bb bby
 
user1804599
 
user1804599
Step two: std::memcpy the marked objects into the new heap!
 
8:35 PM
is mill a new language?
 
@thecoshman well then do it
 
@BartekBanachewicz gonna :D
 
@thecoshman I have a window and a update thread!
 
Is everyone making games now
 
The window is empty
 
8:40 PM
@CatPlusPlus see Hate can at least display asteroids already
 
I don't intend on using any graphics
 
@Borgleader posted a c++ version of the code
0
A: Speed of associative array (map) in STL

seheHere's a C++ version of your code. Note that you should obviously take the maps by reference when passing them in get/set. #include <iostream> #include <map> #include <chrono> #include <cstdio> using namespace std; int get(map<string, int>& e, char* s){ return e[s]; } int set(map<string, int>&

 
Xeo
Memo: Don't react to keyboard input when not focused.
 
@thecoshman Did you jam in any of the game jams?
 
When's the next jam anyway?
 
8:43 PM
2039
 
I can't wait!
 
Afternoon, everyone.
 
@CatPlusPlus ascii?
 
Spreadsheeeeeeeeeeeeeeeeets
idk
 
@Puppy nope
 
8:49 PM
@Maxpm Good morning!
 
'Sup?
 
@thecoshman Well there ya go then
 
@Puppy what?
 
Ell
@BartekBanachewicz I think a lot of people were always making games
but haven't voiced it
 
let's face it, a game was the thing to make.
now after I've made Wide everybody wants to make a language
4
 
Ell
8:51 PM
you trendsetters, you
 
they want some of the resulting pure sex appeal
 
user1804599
@JohanLarsson no it's the new name of Agluj.
 
No, only rightfold makes languages
Over and over again
 
@райтфолд You can name it slim next then.
How are things cat?
 
blogreader is making one as well
 
user1804599
8:57 PM
@Borgleader help
 
I'm writing a Brainfuck compiler. :T
 
user1804599
I wrote a compile-time Brainfuck compiler in D.
 
user1804599
It was about ten lines of code.
 
@sehe nice
 
Ell
@райтфолд does D have significant whitespace?
 
8:59 PM
@райтфолд im leaving work now, so i wont be here for 2h
 

« first day (1584 days earlier)      last day (3373 days later) »