<< 10-01-2016 >>

00:00:01ldleworkdom96: yeah I can't wait to ask Araq_ actually
00:00:03ldleworkI'm curious
00:00:29ldleworkhe will probably say, write your own run and tell the library author to refactor their code into smaller more reusable parts
00:00:31ldleworkor something?
00:00:48dom96possibly
00:01:02*Trustable quit (Remote host closed the connection)
00:01:04*dom96 needs to get back to studying
00:01:28dom96Excited to see dadren progress, keep me updated :)
00:07:02*gokr quit (Ping timeout: 246 seconds)
00:12:56*vendethiel quit (Ping timeout: 276 seconds)
00:59:22ldleworkIf I have a type A and I make a type alias of it B, how can I specify a type that covers them both? Like a proc parameter?
00:59:55*jaco60 quit (Ping timeout: 240 seconds)
01:04:32*desophos_ joined #nim
01:06:46*desophos quit (Ping timeout: 240 seconds)
01:06:49*desophos_ is now known as desophos
03:06:08*vendethiel joined #nim
03:29:20*vendethiel quit (Ping timeout: 246 seconds)
04:22:00ldleworkIs there any kind of enumerate() like iterator such as there is in python
04:22:05ldleworkthat will return int, T
04:35:38def-ldlework: pairs for types where it makes sense
04:36:01ldleworkyeah I have a list of scalars
04:36:35ldleworkdef-: check it out, tilemaps support: https://gist.github.com/dustinlacewell/00049efdfc5e65a332c0
04:38:57ldleworknow time for Tilesets, which bring together multiple Tilemaps
05:44:57*darkf joined #nim
05:52:04*ludocode quit (Ping timeout: 250 seconds)
07:11:56ldleworkanyone bored?
07:39:42*darkf_ joined #nim
07:41:30*darkf quit (Disconnected by services)
07:41:31*darkf_ is now known as darkf
07:50:47*vqrs quit (Ping timeout: 246 seconds)
07:52:30*vqrs joined #nim
07:59:19*Demon_Fox quit (Quit: Leaving)
08:07:16*ludocode joined #nim
08:12:49*zepolen joined #nim
08:13:51ldleworkCan I use types as values?
08:16:02ldleworkIf anyone is around I'd love some advice.
08:20:07ldleworkbleh
08:39:00*NimBot joined #nim
08:40:50*zepolen quit (Ping timeout: 246 seconds)
08:47:56*yglukhov joined #nim
08:50:26*zepolen joined #nim
08:52:58*kas_ joined #nim
09:00:46*yglukhov quit (Read error: Connection reset by peer)
09:01:22*yglukhov joined #nim
09:02:21*yglukhov quit (Remote host closed the connection)
09:15:29*vendethiel joined #nim
09:15:41*yglukhov joined #nim
09:20:04*yglukhov quit (Ping timeout: 250 seconds)
09:27:40*HakanD joined #nim
09:33:06*awsteele joined #nim
09:34:56*yglukhov joined #nim
09:35:03nsftype A = ref object ...
09:35:07nsftype B = distinct A
09:35:10nsfvar b: B
09:35:14nsfassert b == nil
09:35:18nsffails to compile, is it expected?
09:35:49nsfI understand the main point of distinct is to overload all operators
09:35:58nsfbut nil comparison too?
09:36:36*awsteele quit (Client Quit)
09:36:54nsfhave no idea how nil is implemented and whether you can actually override those
09:37:08nsfin modern C++, there is nullptr_t
09:37:27nsfand you can override operator== for nullptr_t as one of operands, something similar in nim?
09:38:29*sepisoad joined #nim
09:38:35*vendethiel quit (Ping timeout: 246 seconds)
09:38:45nsfor perhaps nil is generic and works for any type, but "distinct" simply removes all operator overloads (are they automatically generated for ref object types?)
09:38:50nsfanyways, interesting thing
09:40:44*zepolen quit (Remote host closed the connection)
09:47:40*zepolen joined #nim
09:48:38*cyraxjoe joined #nim
09:49:30*cyraxjoe_ quit (Ping timeout: 260 seconds)
09:51:53*zepolen quit (Ping timeout: 246 seconds)
10:03:53*vendethiel joined #nim
10:11:46*kerze joined #nim
10:21:47*zepolen joined #nim
10:22:18*zepolen quit (Remote host closed the connection)
10:50:03*yglukhov quit (Remote host closed the connection)
11:39:23*gokr joined #nim
11:39:24*gokr quit (Read error: Connection reset by peer)
11:39:38*gokr joined #nim
11:54:56*jaco60 joined #nim
12:30:33*HakanD quit (Quit: Be back later ...)
12:31:21*irrequietus joined #nim
12:33:46*desophos quit (Read error: Connection reset by peer)
12:40:23*HakanD joined #nim
12:42:04*FreeArtMan joined #nim
13:12:49*HakanD quit (Read error: Connection reset by peer)
13:13:25*HakanD joined #nim
13:23:25*HakanD quit (Quit: Be back later ...)
13:33:08*nsf quit (Quit: WeeChat 1.3)
13:39:08*SirCmpwn quit (Ping timeout: 255 seconds)
13:42:21*SirCmpwn joined #nim
13:48:22*joelmo joined #nim
13:55:11*vendethiel quit (Ping timeout: 276 seconds)
14:02:42*vendethiel joined #nim
14:07:28*kerze_ joined #nim
14:12:47*anonkun joined #nim
14:13:03*anonkun left #nim ("Leaving")
14:22:11*Ven joined #nim
14:34:44*bdenham joined #nim
14:35:03*HakanD joined #nim
14:35:20*bdenham quit (Client Quit)
14:46:41*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:52:21*yglukhov joined #nim
14:54:48*perturbation joined #nim
14:59:05perturbationAnyone who's familiar with tables module in stdlib - CR https://github.com/nim-lang/Nim/pull/3703 please?
15:00:04perturbationI think I fixed a bug with CountTableRef and I want to make sure the fix makes sense
15:03:54*Jesin joined #nim
15:04:36*dixit joined #nim
15:05:25*dixit quit (Client Quit)
15:08:14perturbationbbl
15:08:17*perturbation quit ()
15:25:57*gokr left #nim (#nim)
15:31:58*Trustable joined #nim
15:40:17*yglukhov quit (Remote host closed the connection)
15:46:45*nsf joined #nim
16:25:49*pregressive joined #nim
17:04:33*Demon_Fox joined #nim
17:06:15*yglukhov joined #nim
17:11:21*pregressive quit (Remote host closed the connection)
17:11:56*pregressive joined #nim
17:16:23*pregressive quit (Ping timeout: 246 seconds)
17:24:48*kerze_ quit (Quit: Leaving)
17:58:44*HakanD quit (Ping timeout: 272 seconds)
17:59:07*desophos joined #nim
17:59:18*HakanD joined #nim
17:59:18*Jesin quit (Quit: Leaving)
18:07:04*pregressive joined #nim
18:13:51*joelmo quit (Quit: Connection closed for inactivity)
18:25:18*Matthias247 joined #nim
18:34:11*umurgdk joined #nim
18:51:52*sepisoad quit (Ping timeout: 256 seconds)
19:13:15*Trustable quit (Remote host closed the connection)
19:23:26*HakanD quit (Quit: Be back later ...)
19:24:07*umurgdk quit (Remote host closed the connection)
19:36:47*kniteli joined #nim
19:37:23*umurgdk joined #nim
19:43:55*dv- quit (Ping timeout: 240 seconds)
19:51:41*darkf quit (Quit: Leaving)
20:01:15*dv- joined #nim
20:14:54*gokr joined #nim
20:18:40*kerze quit (Ping timeout: 276 seconds)
20:28:28*yglukhov quit (Remote host closed the connection)
20:41:14*kas_ quit (Ping timeout: 255 seconds)
20:45:59*kas_ joined #nim
20:54:17*yglukhov joined #nim
20:58:38*yglukhov quit (Ping timeout: 246 seconds)
21:00:56*BitPuffin|osx joined #nim
21:01:18ldleworkhello
21:13:19Araq_hi
21:18:12*yglukhov joined #nim
21:20:11ldleworkAraq_: Macros are insane
21:21:03Araq_in a good way?
21:23:21ldleworkAraq_: yeah
21:23:32ldleworkAraq_: I wonder if you have some ideas for me
21:23:49Araq_always.
21:24:02ldleworkif yout get a chance to skim this for context, https://gist.github.com/dustinlacewell/19a69d454218a7321f98
21:25:11ldlework`component` is a modification of the class macro that records the types created. then `registerComponents` creates a new type called ComponentManager. The macro that creates it creates a `typeName`: Table[string, `typeName`] table for each component type created
21:25:33ldleworkSo, the result is the ComponentManager has a string-table for each Component type that gets created
21:26:10ldlework(well, a uint-table, not string)
21:26:31ldleworkThis allows me to instantiate Entities and assign components of any Component type to them
21:26:33ldleworkThis is nice
21:26:47ldleworkBut the goal is to actually create Entities and assign components to them, by way of a JSON description
21:27:00ldleworkIE, an object, then a list of components and their field values.
21:28:16ldleworkI'm not sure how to take {"name": "CVisible", "tile": "@"} or {"name": "CPosition", "x": 10, "y": 20} and create the right type, or how to initialize that type, when the json has different fields
21:28:46ldleworkIE, I'm not sure how to map the types to their names, or how to generate code that allows me to use a string, to instantiate the correct type (with the correct field values from the JSON object)
21:29:48ldleworkAraq_: should I generate a big case statement that switches on the Component name in the JSON, and then does a specialized marshal for the related type? How do I return the instantiated type since return types can't possibly cover all the possible Component types?
21:33:37*dthrvr joined #nim
21:34:36Araq_er
21:35:38Araq_dunno, I would make the macro generate specialized types
21:36:11Araq_and then take care there is no proliferation of types.
21:37:26Araq_but you might like it better to just create a base class for Component that the proc with string case can return
21:37:59*HakanD joined #nim
21:40:47ldleworkAraq_: lets say with the macro I generate a function that takes a string
21:40:58ldleworkAnd it switches on that string to satements like
21:41:23ldleworkof CVisible: to[CVisible](json_data)
21:41:33ldleworkof CPosition: to[CPosition](json_data)
21:41:47ldleworkHow can I return the different types? Is it because I have to use inheritance?
21:41:55ldleworkAnd what does the caller do with the result?
21:42:06ldleworkHow does the c all site know what kind of Component it is getting back?
21:42:32ldleworkDoes Nim have type assertions?
21:42:42Araq_well as I said, CVisible and CPosition have to inherit from 'Component' for this to work out
21:42:57Araq_the 'of' operator is the check you're asking for.
21:43:26ldleworkAraq_: so 'casing' the value, I can discriminate by type and then treat the value as that type?
21:43:46Araq_yes, but use T(x) not cast[T](x)
21:43:58Araq_aka type conversions, not casts
21:44:07ldleworkAraq_: to is the marshal thing
21:44:17Araq_I know.
21:45:16ldleworkAraq_: Nim is an amazing language
21:45:24Araq_but I wouldn't do it like this at all.
21:45:33ldleworkAraq_: I would LOVE to know how you would do this
21:45:47ldleworkI can't believe I got as much of this working as I did.
21:45:55ldleworkNo data-driven-ness yet, but you make it seem like I'm close
21:46:01ldleworkBut I'm totally open to a better system.
21:46:05ldleworkThis macro code is huge!
21:46:31Araq_of CVisible: action(to[CVisible](json_data))
21:46:43Araq_likewise for CPosition etc.
21:47:04Araq_and 'action' is an overloaded set of actions
21:47:37Araq_this way you don't need inheritance at all
21:47:52Araq_but it's just the sketch of an idea, no promise it can work out.
21:48:06ldleworkhmm
21:48:10ldleworkMaybe I can go even shorter
21:48:13ldleworkand just cut to the chase
21:48:15ldleworksomething like
21:48:39ldleworkof CVisible: cm.CVisible[entity_id] = to[CVisible](json_data)
21:48:49ldleworkNow I'm loading components right into the component tables.
21:49:09ldleworkI suppose your idea is good if I need to do any sort of post-processing on the unmarshaled types.
21:49:20ldleworkBut evne then I could just generate that code right in the of-blocks...
21:49:22ldleworkHmm
21:49:39ldleworkAraq_: you can't use types as values right?
21:49:42*nsf quit (Quit: WeeChat 1.3)
21:49:56ldleworkBecause it would be super nice to just be able to use types as table keys/values :D
21:50:23ldleworkI guess that makes no real sense
21:52:10Araq_actually you can do that
21:52:20Araq_but it's never been shown to anybody :P
21:52:39ldleworkwhaaaaaaat
21:52:51ldleworklol
21:53:02Araq_and I need to lookup all sort of things
21:53:20Araq_but RTTI exists and you can hrm
21:53:53ldleworkAraq_: you know what these entity systems are/for?
21:54:02ldleworklike you get them conceptually
21:54:24Araq_no, because nobody does. ;-) They are in constant research.
21:55:14Araq_I know a bit about entity systems but I lack game programming experience to judge whether they are really useful or most of the time just overkill
21:55:17nivhey Araq! i'm really enjoying writing nim code. </interlude>
21:55:18ldleworkAraq_: I mean the baic premise is all
21:56:13ldleworkAraq_: at minimum, the goal is to associate a number of object types with a unique identifier. So you might have three types, A, B and C. Then you might that two "entities" which is just a number, say 1 and 2.
21:56:28ldleworkThe idea is to then, be able to associate any number of component instances with either entity.
21:56:37ldleworkSo say, A and B with 1 and B and C with 2.
21:57:01ldleworkI have that so far, just generate tables for each type and store component instances by entity ID
21:57:02ldleworkI have that.
21:57:09ldleworkNow the tricky part is driving it with data.
21:57:43ldleworkSo reading in a file that says "There exists an entity 1, that has component A with fields tile="@", and component B with fields x=10, y=5"
21:57:46Araq_ldlework: yeah I know, but plain old delegation/aggregation solves that too
21:58:09ldleworkAnd then doing the correct instantiations and record keeping in those tables.
21:58:36ldleworkAraq_: I am totally open to actual in-language implementation techniques - I only care that I can load the eventual tables by way of JSON descriptions.
21:59:24Araq_niv: thanks, always nice to hear :-)
22:00:01Araq_ldlework: I wrote an RTS "engine" once, scriptable by Lua.
22:00:02ldleworkAraq_: the diffuclty is the fact that the components are different types
22:00:17ldleworkAraq_: cool :D
22:00:25ldleworkAraq_: Nim has Lua support right?
22:00:43Araq_I had a 2 map with every square having a pointer to a 'Unit'
22:00:53Araq_*a 2d map
22:00:57ldleworkright
22:01:14ldleworkAraq_: the goal is to be able to create new Unit types without recompiling the game.
22:01:27Araq_and just that, well it was a tad more complicated
22:01:41Araq_and then in Lua the Unit definitions
22:01:54Araq_but in the engine itself there was only 1 type to deal with
22:02:23Araq_with lots of properties like 'canFly'
22:02:43Araq_well ok, to save space there was Unit and UnitClass
22:02:49ldleworkRight the goal is to get away from properties like "canFly"
22:03:02Araq_each unit having a pointer to its class
22:03:09ldleworkHaving large parametric classes
22:04:16Araq_it wasn't so bad and people could script the game and create new unit types
22:04:17ldleworkWith an ECS
22:04:25ldleworkI'm not saying it is bad
22:04:38ldleworkPeople been making games with monolithic entity classes for a long time
22:04:56Araq_now with an ECS, you can either hide the fact that you have that mono class
22:05:19Araq_by generating it from a macro, so you can distribute it, kind of.
22:05:30Araq_or you actually distribute its storage
22:05:46ldleworkheh
22:05:49ldleworkso you're suggesting
22:05:50Araq_by having more than 1 'array' holding these things and dealing with IDs
22:05:52ldleworkmodify the class macro
22:05:58ldleworkto actually pool definition blocks
22:06:12ldleworkand then to actually conglomorate a single monolith type
22:06:12*kas_ quit (Ping timeout: 250 seconds)
22:06:18ldleworkand then boom, the question I asked is done?
22:06:20ldleworklmfao
22:06:37Araq_so, that seems to be your question. Wether you distribute it only at compile-time or also at run-time.
22:06:40ldleworkthat is fuckin hilarious
22:07:00*ldlework ponders that.
22:07:14ldleworkWell
22:07:38Araq_and of couse all sort of efficiency considerations play a role here too. but ... since you're not developing an AAA game, shouldn't.
22:07:57ldleworkWell you would think that the monolith would be faster but heavier.
22:08:08ldleworkSince there's no runtime look up many hash tables.
22:08:11Araq_so ... we shall assume efficiency is irrelevant and you only care about how to model things
22:08:19ldleworkWhich is basically true.
22:09:07Araq_now, if you distribute it at runtime, destruction is a problem
22:09:12ldleworkAraq_: this is a fascinating take. I've been studying ECS for years and I have *never* come across this insight before.
22:09:22ldleworkanywhere
22:09:32ldleworkprobably because the languages everyone is using can't do this
22:09:52ldleworkAraq_: okay let me stand up a critique
22:10:30ldleworkpart of the advantage with true ECS is that the gameplay systems have an inherently natural way to gather the entities in the game that are relevant to that game system
22:10:43ldleworkfor example a RendererSystem might care about entities with a Position and a Sprite
22:10:54ldleworkAnd a PhysicsSystem might care about entities with a Position and a Velocity
22:11:18ldleworkIf you go the monolithic type route, you need an easy way to tell "what collections of fields are actually relevant for this entity"
22:11:24ldleworkIs that just a shit ton of bools on the object?
22:11:34Araq_that's just a bitset
22:11:41ldleworkBut you might have tons of components
22:11:43Araq_likely 1 word or less for Nim
22:12:28ldleworkAraq_: can you hold more values in the bitset than there are bits?
22:12:48Araq_the compiler computes the required size for you at compile-time
22:13:32ldleworkwhere are bitsets described? not in the manual
22:13:42Araq_it's just called 'set' in Nim.
22:13:46ldleworkah
22:14:51Araq_also you don't need to go the mono type route
22:15:15Araq_but I would do it, because I'm a crank.
22:15:36ldleworkwell it seems to have some advantages...
22:16:08Araq_now, if you distribute the type
22:16:13ldleworkAfter all, all of the advantages to ECS seem to be compile-time structural advantages...
22:16:27Araq_you need to distinguish between hard and soft references.
22:16:39Araq_actually ... you need this distinction anyway I think.
22:16:44ldleworkWhat?
22:17:33Araq_for example, the selected units shouldn't be kept alive just because they are selected
22:17:45Araq_so the UI holds weak refs to the units
22:17:52Araq_or some comparable mechanism
22:19:04ldleworkWell kept alive is a wierd way to put it
22:19:23Araq_perhaps.
22:19:41ldleworkWhether the entity has no references out there in the code and has been cleaned up by the GC is different than whether the game logically considers a unit to be deceased and unselectable/unrenderable/etc
22:20:21Araq_well that's my point. the GC won't tell you when the unit is dead.
22:20:38ldleworkright but generally those two events are not related at all
22:21:06ldleworkgenerally a referenced entity will be killed, logically in terms of field values on the object, and then later discarded from data structures.
22:21:16ldleworkIE, you don't kill things in the game by unreferencing them everywhere.
22:21:30Araq_ok ok, but let's move on
22:21:34ldleworkhehe ok
22:22:57Araq_when you have a mono type you can store all the instances in one seq and when you remove an instance all subsystems automatically stop handling it
22:23:03ldleworkI'm having a hard time coming up with justifications for actually distributed types
22:23:15ldleworkexactly!
22:23:25ldleworkeach system just gets all the entities and does a bitset filter
22:23:32ldleworkit seems far more straight forward...
22:23:46ldleworkwait
22:23:51Araq_well it's justified for a commercial engine where you just buy the physics engine part from another vendor or something
22:23:54ldleworkcan.. I use types as the bitset values?
22:24:14ldleworklike what would the query interface be
22:24:16Araq_no, but you do that mapping via a macro
22:24:18ldleworkI have an entity instance
22:24:25ldleworkoh hmm
22:24:42ldleworkso subsystems will use a macro to filter the entity list based on type nnkIdent's I pass to it
22:24:50ldleworkor something?
22:24:59Araq_you still have a macro fighting the boilerplate
22:25:10Araq_via some name convention
22:25:12ldleworkfilterThis(entities, [CVisible, CPosition]) ?
22:25:14ldleworksomething like that?
22:25:40Araq_oh yeah, I think so.
22:25:48ldleworkthat's such a nice interface
22:25:59ldleworkcan you call macros on types?
22:26:07Araq_yeah
22:26:10ldleworkentities.filterThis([CVisible, Cposition])
22:26:12ldleworkwow
22:26:33*ldlework hugs Araq_
22:26:37Araq_but I don't think that's actually necessary
22:26:43ldleworkwhich part
22:26:59Araq_you only need to transform CVisible to CVisibleFlag
22:27:10Araq_i.e. append 'Flag' to the identifier.
22:27:18Araq_in the macro.
22:27:34ldleworkah, so I guess that answers the question of whether I can use the types themselves at bitset values
22:27:48ldleworkwait what is the type of the bitset?
22:27:58Araq_the macro generates an enum
22:28:09ldleworkaha
22:28:23ldleworkthis feels so incredibly evil!!!
22:29:10Araq_well don't overdesign it, how many different components do you actually have? I always see people claim they have hundreds and yet they always list position and velocity
22:29:12ldleworkI should clean up and abstract this macro generation code a bit more
22:29:30Araq_and nothing else.
22:30:08ldleworkAraq_: If I don't make a game, it is a long-term goal of mine to implement an _nice to use_ ECS in a type-safe language for years
22:30:41Araq_ok but then you're designing a system for Nim, not for you.
22:30:50ldleworkhuh?
22:31:01Araq_I mean
22:31:36Araq_if you create a general purpose ERS, you definitely need to support non-mono type creations
22:31:44ldleworkWhy?
22:32:33ldleworkI think you're onto something when you observed, that in the abstract, there is *always* a mono type
22:32:38ldleworkI think that is deeply insightful
22:32:51Araq_because people like to buy external physics engines
22:32:52ldleworkECS offers no run-time advantages...
22:33:00ldleworkAraq_: that has nothing to do with it though
22:33:06Araq_no?
22:33:12Araq_why not?
22:33:29Araq_the physics engine comes with its own notions of positions and velocities
22:33:33ldleworkI don't think so. You can specify the data in a component, and then a subsystem uses an external physics engine and your component data.
22:33:52Araq_and if you went for a distributed entity system from the start, it's natural
22:33:52ldleworkSure, but that shouldn't inherently prevent you from using that engine to modify the states of your own objects.
22:34:12ldleworkThe physics engine isn't going to be built to integrate with my system.
22:34:24ldleworkSo either my system will have explicit code for mapping entities to physical bodies.
22:34:29ldleworkOr the application author will.
22:34:44Araq_yeah, you might be right about that.
22:34:52ldleworkHaving the physics simulated independently of the world state is typical.
22:35:31Araq_alright, well, happy hacking then. :-)
22:36:40ldleworkAraq_: here's the repo I'm working, https://github.com/dustinlacewell/dadren
22:40:23*vendethiel quit (Ping timeout: 276 seconds)
22:40:29Araq_cool, but why not realtime? turn based games tend to be ...
22:40:43Araq_hmm apparently English has no word for it?
22:42:22Araq_ah, 'dull'.
22:44:04*vikaton joined #nim
22:53:04*HakanD quit (Quit: Be back later ...)
22:57:30ldleworkAraq_: They're also much harder to implement and less susceptable to data-driven ness
22:57:43ldleworkAraq_: this whole engine is going to be entirely data-driven
22:57:55ldleworkAraq_: have you never played a good roguelike?
22:58:11Araq_I don't think I did.
22:58:27ldleworkAraq_: I can recommend one or two if you'd like
22:58:51ldleworkAccessible ones, that don't take a huge learning curve or have horrible interfaces
22:59:11*zepolen joined #nim
22:59:15ldleworkAraq_: https://crawl.develz.org/
22:59:52ldleworkneat you can watch people play on the web now
23:03:36*vendethiel joined #nim
23:05:35*FreeArtMan quit (Ping timeout: 264 seconds)
23:11:23ldleworkAraq_: is there anywhere to stick global compile-time data?
23:11:49*gokr quit (Ping timeout: 245 seconds)
23:12:05Araq_a .compileTime global var perhaps?
23:12:21ldleworkis that available outside of the defining module?
23:12:33ldleworkeh I guess I don't need a global
23:24:25*vendethiel quit (Ping timeout: 260 seconds)
23:24:44dom96interesting issue: https://twitter.com/tankfeeder/status/686263778783137792
23:28:41*FreeArtMan joined #nim
23:28:42dom96Anybody with Android can verify whether its browser crashes on http://nim-lang.org/docs/lib.html?
23:29:47dom96Good night
23:31:09def-dom96: takes a second to load, but no crash
23:40:12ldleworkAraq_: I was thinking "hmm, the runtime efficiency could be had with distributed types by caching lookups"
23:40:30ldleworkAraq_: but then I thought, when you're in the gameplay code and you go "give me all the entities with a CSprite and CPosition components"
23:40:50ldleworkyou get back values that have the fields of both CSprite and CPosition as first-level attributes
23:41:04ldleworkcompared to having to indirect to distinct child structures or anything else
23:41:26ldlework(I don't know if Nim has some crazy magic that can return literally unified values like that, but I'm guessing not)
23:43:08ldleworkalso it sucks being so west of the nim community heh
23:43:33Araq_yeah we need more Americans in #nim
23:44:23ldleworkAraq_: I think the field access egronomics is justification enough for the unified ecs model
23:44:31ldleworkdo you agree?
23:45:25ldleworkAraq_: hmm with the unified type, I can't unmarshal component descriptions anymore hmm
23:45:41ldleworkI have to have some code that takes a value from json and sticks it into the right field in the unified type
23:46:41ldleworkI need a PHP like language for nim-code so I can just abuse parseStmt more easy
23:46:49*FreeArtMan quit (Ping timeout: 245 seconds)
23:46:53ldleworklol
23:53:05ldleworkAraq_: do you think it would be possible to overload `.` for the unified Entity type such that, at run time it checks the attribute name against the bitset and a list of fields that are available for the active components in the bitset?
23:53:21ldleworkand like raise an exception if some code tries to access to fields that are not enabled by the bitset?
23:54:24*yglukhov quit (Remote host closed the connection)
23:55:05ldleworkugh this is starting to hurt my brain