<< 11-01-2016 >>

00:02:35ldleworkI think I'm just gonna start over
00:03:30*jaco60 quit (Ping timeout: 260 seconds)
00:18:42ldleworkAraq_: how do I make a compiletime proc that returns a seq[NimNode] ?
00:19:04ldleworkI can't seem to initialize the seq
00:19:48ldleworkeh, doing `result = result & @[node]` gets around it
00:20:08*Matthias247 quit (Read error: Connection reset by peer)
00:20:15ldleworkoh just result = @[]
00:25:25*HakanD joined #nim
00:26:02*Jesin joined #nim
00:26:40*nande joined #nim
00:29:50*HakanD quit (Ping timeout: 255 seconds)
00:31:10*vendethiel joined #nim
00:32:15Araq_ldlework: just use getType for a 'typed' thing to generate the serialization code
00:32:33Araq_works for everything, independently from your entity framework
00:32:59Araq_... except that getType is so new no useful stdlib uses it
00:32:59ldleworkAraq_: I dunno what you mean or what I said you're referring to
00:33:26Araq_I referred to " hmm with the unified type, I can't unmarshal component descriptions anymore hm"
00:33:41ldleworkHow does getType help that?
00:34:01Araq_but actually ... serialization with the Mono type is esay enough with marshal.nim?
00:34:08Araq_what's your problem?
00:34:38ldleworkAraq_: the json definitions will still be defined in terms of component descriptions
00:34:47ldleworknot monolithic records
00:35:09ldleworkso I can't just say, oh deserilize this json object into an Entity
00:35:20Araq_why not? seems trivial.
00:35:26ldleworkbecause then the next component needs to deserialize too, but the Entity has already been created
00:35:49ldleworkUnless you can tell the unmarshaller, hey use this object instance instead of making a new one, and just overwrite shit.
00:38:15ldleworkIf not, then I need to remember what fields are associated with what component types. Then as I'm reading in JSON definitions I can say, "Oh okay, a "CVisible" component. This json should have a "tile" field, so get the value and assign it on the Entity instance. Also set the bitset for CVector on the entity too.
00:38:19ldleworksomething like that.
00:38:36ldleworks/CVector/CVisible
00:38:47ldleworkAraq_: does the problem seems clear?
00:41:04*zepolen_ joined #nim
00:42:02ldleworkAraq_: more importantly, why does the compiler say 'keys' is undefined, https://gist.github.com/dustinlacewell/470096485c961fb3fea7
00:42:33ldleworkI import tables right at the top...
00:43:04Araq_keys is an iterator
00:43:20Araq_you need to iterToSeq it
00:43:47*zepolen quit (Ping timeout: 255 seconds)
00:43:53ldleworkah I'm used to iteration just being a semantic of sequences, rather than a distinct type
00:43:55ldleworkthx
00:44:00*umurgdk quit (Remote host closed the connection)
00:45:07ldleworkAraq_: where is iterToSeq?
00:45:16Araq_sequtils
00:45:56ldleworkI don't see it are you sure?
00:46:15ldleworkoh just toSeq
00:46:17ldleworksorry
00:51:39Araq_my bad, I don't use sequtils
00:52:14*vendethiel quit (Ping timeout: 260 seconds)
01:03:19*vendethiel joined #nim
01:27:46*irrequietus quit ()
01:46:22*vendethiel quit (Ping timeout: 260 seconds)
01:52:09*Jesin quit (Quit: Leaving)
01:54:44*Jesin joined #nim
02:06:40ldleworkIf I have a proc foo that takes varargs[NimNode] and I have two NimNodes and a sequence of NimNodes
02:06:55ldleworkHow can I easily call Foo passing the two scalars and the sequence/
02:09:49*perturbation joined #nim
02:17:18ldleworkwait wtf
02:17:23ldleworkif I define a compileTime function
02:17:27ldleworkand then I define a macro
02:17:39ldleworkif I use the compileTime function in the macro's definition
02:17:55ldleworkthe compileTime function gets called... while the macro is being parsed/compiled?
02:18:04ldleworkNot when the macro is executed?!
02:18:05ldleworkwtf
02:18:24*ldlework picks his brains up off the floor.
02:26:45*HakanD joined #nim
02:30:46*HakanD quit (Ping timeout: 240 seconds)
02:30:59Araq_pretty sure that is not what is happening
02:45:55ldleworkAraq_: it totally is
02:46:11*xet7 quit (Ping timeout: 246 seconds)
02:46:14ldleworkRemoving the {.compileTime.} pragma from the library functions made them get invoked at the right times
02:46:26ldleworkIE, when the macro callsite, rather than at the macro declaration
02:46:51ldleworkwhich makes sense honestly
02:46:59ldleworkthe macro is being compiled
02:47:04ldleworkI'm calling a compiletime function
02:47:18ldleworkdunno
03:01:20ldleworkAraq_: can I overload based on enum?
03:02:26ldleworkI'm doubting it
03:02:43ldleworkWhich means it seems like I'll probably want to generate distinct types for each of the components
03:04:17ldleworkugh you can't pass types as values...
03:04:22ldleworkmeaning I can't do like
03:05:00ldleworkproc addComponent(e: Entity, ct: CVisible, tile: string) ...
03:05:24ldleworkoh right, just pass an instance of the type
03:08:07*vikaton quit (Quit: Connection closed for inactivity)
03:27:17*HakanD joined #nim
03:29:27*pregressive quit (Remote host closed the connection)
03:31:41*HakanD quit (Ping timeout: 246 seconds)
04:00:14ldleworkWhy does this say, instance of 'ComponentStmt' required: https://gist.github.com/dustinlacewell/98cd52ad05d7d7db823f
04:01:50def-ldlework: "=" instead of "of"
04:02:01ldleworkoop
04:02:06ldleworkthx def
04:02:11*nsf joined #nim
04:08:03*vendethiel joined #nim
04:10:56*gokr joined #nim
04:10:56*gokr quit (Client Quit)
04:21:31ldleworkokay
04:21:41ldleworknim is executing my file out of order!
04:21:52ldleworkwtf...
04:24:59ldleworkthis is so screwed up
04:25:41ldleworkCan you define compiletime types?
04:32:03*vendethiel quit (Ping timeout: 265 seconds)
04:36:35*BitPuffin|osx quit (Ping timeout: 276 seconds)
04:37:40*dapz joined #nim
04:37:46*dapz left #nim (#nim)
04:49:47ldleworkso
04:52:10ldleworkseriously I can get Nim to execute a function before all other functions, without changing pragmas simply by passing that function a NimNode or not
04:52:20ldleworkthis has got to be a bug but I don't know how to describe it
04:55:44ldleworklook at this: https://gist.github.com/dustinlacewell/058d327a096fdb9c52f7
04:55:46ldleworkdef-: ^
05:03:05ldleworkno matter what I do, it seems that unless I pass generate_entity_procs() a NimNode, it will be executed before all other code in the block
05:03:19ldleworkI guess this is what I get for playing with fire
05:04:35ldleworkinfact
05:04:45ldleworkit seems it is executed before any macros are executed
05:05:45*ldlework sighs
05:05:58ldleworkAraq_: around randmoly?
05:07:26*perturbation quit (Ping timeout: 240 seconds)
05:15:02ldleworklol I call the procs function in another place
05:15:17ldleworkand both callsites are executed before anything else in the file
05:15:18ldleworkwtf
05:15:25ldleworkwhat is so special about this proc?!
05:18:16ldleworkI guess I'll just reorganize the code so that my macro's compileTime library helpers are pure, or whatever
05:18:21ldleworkin that they take everything via params
05:29:56*pregressive joined #nim
05:34:59*pregressive quit (Ping timeout: 264 seconds)
05:40:59*jsudlow joined #nim
05:43:32*darkf joined #nim
06:15:26*gokr joined #nim
06:21:02*kas_ joined #nim
06:21:57*nande quit (Read error: Connection reset by peer)
07:32:11ldleworkI wish there were some better abstractions over the AST api
07:33:29*yglukhov joined #nim
07:35:32*yglukhov quit (Remote host closed the connection)
07:49:13*Demon_Fox quit (Quit: Leaving)
08:06:10*Trustable joined #nim
08:09:47*kas_ quit (Ping timeout: 276 seconds)
08:15:06*HakanD joined #nim
08:19:59*HakanD quit (Ping timeout: 264 seconds)
08:33:34*jaco60 joined #nim
08:34:43*HakanD joined #nim
08:44:25*yglukhov joined #nim
08:44:31*umurgdk_ joined #nim
08:45:21*umurgdk_ quit (Remote host closed the connection)
08:45:37*umurgdk_ joined #nim
08:50:05*yglukhov quit (Ping timeout: 276 seconds)
08:50:26*umurgdk_ quit (Remote host closed the connection)
08:51:35*exebook joined #nim
08:54:47*HakanD quit (Quit: Be back later ...)
08:55:46*kniteli quit (Ping timeout: 250 seconds)
08:58:31*yglukhov joined #nim
08:59:24*vendethiel joined #nim
09:01:33*umurgdk joined #nim
09:01:54*umurgdk quit (Remote host closed the connection)
09:02:10*umurgdk joined #nim
09:02:46*desophos quit (Read error: Connection reset by peer)
09:05:30Araq_ldlework: if a proc takes a NimNode it's automatically .compiletime since NimNode is not available at runtime at all
09:07:32ldleworkAraq_: yeah but this shit was already compileTime
09:07:57ldleworkdepending on whether or not I send it a NimNode, it would get executed /before macros and other compiletime functions/
09:08:00ldleworkjust look at the gist
09:08:08ldleworkit runs that proc before the rest of the code block
09:08:16ldleworkin fact before the rest of macros are run in general
09:08:23ldleworklike the very first thing that happens is that proc is run
09:08:41*umurgdk quit (Remote host closed the connection)
09:08:51ldleworkI resolved to only accessing global state from actual macros, and passing it into compileTime funcs
09:09:04ldleworkwhich seems to make everything work in correct order
09:19:55*umurgdk joined #nim
09:20:35*confundus joined #nim
09:22:26*vendethiel quit (Ping timeout: 240 seconds)
09:24:22*umurgdk quit (Ping timeout: 250 seconds)
09:24:34*HakanD joined #nim
09:25:13Araq_ldlework: dunno what's the problem here, but I don't think you should use .immediate with Nim 0.12
09:26:38*umurgdk joined #nim
09:26:58*umurgdk quit (Remote host closed the connection)
09:27:10*umurgdk joined #nim
09:31:27*pregressive joined #nim
09:36:26*pregressive quit (Ping timeout: 256 seconds)
09:50:35*confundus left #nim ("Leaving")
09:51:19*vendethiel joined #nim
10:00:48*gokr quit (Ping timeout: 256 seconds)
10:00:48*bbl_ quit (Ping timeout: 256 seconds)
10:00:48*zaquest quit (Ping timeout: 256 seconds)
10:01:06*bbl_ joined #nim
10:01:37*gokr joined #nim
10:02:39*zaquest joined #nim
10:14:34*vendethiel quit (Ping timeout: 260 seconds)
10:20:06*HakanD quit (Quit: Be back later ...)
10:36:17*vendethiel joined #nim
10:46:57*zepolen joined #nim
10:48:53*zepolen__ joined #nim
10:49:29*zepolen_ quit (Ping timeout: 255 seconds)
10:51:24*zepolen quit (Ping timeout: 245 seconds)
10:51:53*HakanD joined #nim
10:56:55*vendethiel quit (Ping timeout: 240 seconds)
10:59:56*vendethiel joined #nim
11:01:47*umurgdk quit (Remote host closed the connection)
11:13:11*umurgdk joined #nim
11:18:03*umurgdk quit (Ping timeout: 265 seconds)
11:18:50*umurgdk joined #nim
11:29:12*xet7 joined #nim
11:42:34*awsteele joined #nim
11:43:30*vendethiel quit (Ping timeout: 260 seconds)
11:50:38*umurgdk quit (Remote host closed the connection)
12:04:24*kas_ joined #nim
12:07:18*jaco60 quit (Ping timeout: 250 seconds)
12:11:47*umurgdk joined #nim
12:13:58*umurgdk quit (Remote host closed the connection)
12:14:11*umurgdk joined #nim
12:15:28*umurgdk quit (Remote host closed the connection)
12:16:49*mto_ joined #nim
12:24:59*ilariel joined #nim
12:27:12*vendethiel joined #nim
12:30:23*umurgdk joined #nim
12:31:18*chasmo joined #nim
12:33:15*umurgdk quit (Remote host closed the connection)
12:33:31*umurgdk joined #nim
12:34:45*BitPuffin joined #nim
12:36:06*strcmp1 quit (Ping timeout: 240 seconds)
12:36:15*ilariel quit (Ping timeout: 252 seconds)
12:36:27*strcmp1 joined #nim
12:41:21*kerze joined #nim
12:42:32*vendethiel- joined #nim
12:42:53*vendethiel quit (Ping timeout: 255 seconds)
12:49:11*vendethiel- quit (Ping timeout: 255 seconds)
13:08:17*vendethiel joined #nim
13:17:55*HakanD quit (Ping timeout: 240 seconds)
13:18:11*zepolen__ quit (Remote host closed the connection)
13:32:10*vendethiel quit (Ping timeout: 256 seconds)
13:32:57*pregressive joined #nim
13:33:33*umurgdk_ joined #nim
13:36:08*umurgdk quit (Ping timeout: 250 seconds)
13:37:32*pregressive quit (Ping timeout: 246 seconds)
13:58:07*vendethiel joined #nim
14:20:26*vendethiel quit (Ping timeout: 272 seconds)
14:20:31*awsteele quit (Quit: My Mac has gone to sleep. ZZZzzz…)
14:29:08*umurgdk_ quit (Remote host closed the connection)
14:36:44*umurgdk joined #nim
14:41:35*umurgdk quit (Ping timeout: 264 seconds)
14:46:55*vendethiel joined #nim
14:47:48*umurgdk joined #nim
14:52:14*umurgdk quit (Ping timeout: 245 seconds)
14:59:02*umurgdk joined #nim
15:00:27*saml joined #nim
15:01:03*umurgdk_ joined #nim
15:01:32*umurgdk quit (Read error: Connection reset by peer)
15:07:38*vendethiel quit (Ping timeout: 260 seconds)
15:20:40*pregressive joined #nim
15:25:39*jangko joined #nim
15:28:30*jangko quit (Client Quit)
15:30:32*pregressive quit (Remote host closed the connection)
15:50:07*vendethiel joined #nim
15:52:18*confundus joined #nim
15:54:48*jaco60 joined #nim
16:03:41*Demon_Fox joined #nim
16:10:59*vendethiel quit (Ping timeout: 245 seconds)
16:15:20*pregressive joined #nim
16:19:07*confundus left #nim ("Leaving")
16:25:02*elrood joined #nim
16:31:39*vendethiel joined #nim
16:34:26*elrood quit (Ping timeout: 240 seconds)
16:36:44*umurgdk_ quit (Remote host closed the connection)
16:36:50*pregressive quit (Remote host closed the connection)
16:37:06*elrood joined #nim
16:37:14*pregressive joined #nim
16:37:54ldleworkAraq_: is immediate deprecated?
16:37:59ldleworkor just buggy in 0.12
16:39:48*pregressive quit (Read error: Connection reset by peer)
16:39:57*pregressive joined #nim
16:42:34*umurgdk joined #nim
16:43:59Araq_it's neither but maybe that causes the immediate execution
16:44:45ldleworkAraq_: but it was some other .compileTime proc which was the thing getting executed out of order
16:44:51ldleworkhttps://gist.github.com/dustinlacewell/058d327a096fdb9c52f7
16:45:07ldleworkAraq_: notice how in the first gist, PROCS appears before anything else?
16:45:25ldleworkAraq_: but when I pass generate_entity_procs a NimNode, it appears in the correct order.
16:45:30ldlework(in the second gist)
16:45:39ldleworkboth macros are .immediate
16:46:37Araq_yeah I noticed but I need more code
16:47:25ldleworkYeah I already refactored it all :/
16:49:30ldleworkAraq_: I've been writing a higher-level AST over the one exposed in `macros` :3
16:49:53ldleworkIt might be horrible, I dunno I haven't tried it out yet.
16:50:17ldleworkSo far I've abstracted from nnkTypeSection down
16:51:39*AckZ quit ()
16:52:01*umurgdk quit (Remote host closed the connection)
16:52:06*vendethiel quit (Ping timeout: 240 seconds)
16:53:45*biscarch quit ()
16:54:03*vendethiel joined #nim
16:56:25Araq_interesting
16:59:03*allan0_ joined #nim
17:00:40*allan0 quit (Ping timeout: 250 seconds)
17:16:29*vendethiel quit (Ping timeout: 255 seconds)
17:19:21dthrvrNim will, sometime in the future, have an option for separate code in blocks '{ ... }' instead of identing?
17:19:23ldleworkAraq_: https://gist.github.com/dustinlacewell/839bd3162ff44040d1e5
17:19:43*vendethiel joined #nim
17:21:31ldleworkdthrvr: I hope not
17:21:34*pregressive quit (Read error: Connection reset by peer)
17:22:04*pregressive joined #nim
17:25:22*zepolen joined #nim
17:27:34*zepolen quit (Remote host closed the connection)
17:29:37*flyx quit (Quit: ZNC - http://znc.in)
17:30:09*flyx joined #nim
17:30:20*zepolen joined #nim
17:32:46*flyx quit (Client Quit)
17:33:11*flyx joined #nim
17:34:15*kniteli joined #nim
17:35:36*FreeArtMan joined #nim
17:37:12*chasmo left #nim (#nim)
17:40:42*vendethiel quit (Ping timeout: 260 seconds)
17:41:35Araq_ldlework: well this cannot be traversed as easily though
17:42:00Araq_dthrvr: I don't know. It was certainly planned in the past.
17:42:09ldleworkI guess I'm not super interested in iterating but manipulating and constructing.
17:42:54ldleworkIf I want to build complex types and procs, then you'd use this. If you wanted to say, post-process some AST, you might just use the raw API?
17:42:56ldleworkdunno
17:43:26Araq_ldlework: makes sense.
17:50:24*umurgdk joined #nim
17:55:06*umurgdk quit (Ping timeout: 256 seconds)
17:55:52*brson joined #nim
17:56:11dthrvrAraq_: would be nice, since I'm replacing a lot of automation in my servers with nim, but I miss block constructions ;)
17:59:18*pregressive quit (Read error: Connection reset by peer)
17:59:20*pregress_ joined #nim
18:02:05*FreeArtMan quit (Ping timeout: 260 seconds)
18:03:54*pregress_ quit (Read error: Connection reset by peer)
18:04:19*pregressive joined #nim
18:05:41*pregressive quit (Read error: Connection reset by peer)
18:06:30*pregressive joined #nim
18:07:11*vendethiel joined #nim
18:17:27*FreeArtMan joined #nim
18:18:04*yglukhov quit (Ping timeout: 245 seconds)
18:20:50*exebook quit (Ping timeout: 250 seconds)
18:21:57*exebook joined #nim
18:28:59*vendethiel quit (Ping timeout: 264 seconds)
18:37:29*umurgdk joined #nim
18:37:47*umurgdk quit (Remote host closed the connection)
18:38:02*umurgdk joined #nim
18:56:44*yglukhov joined #nim
18:58:40*mto_ quit (Ping timeout: 260 seconds)
19:00:59*yglukhov quit (Ping timeout: 245 seconds)
19:01:22*vendethiel joined #nim
19:13:26*kerze quit (Ping timeout: 240 seconds)
19:16:27*Demon_Fox quit (Quit: Leaving)
19:19:54*euantor joined #nim
19:36:00*Matthias247 joined #nim
19:41:13*Pzor joined #nim
19:58:54*yglukhov joined #nim
20:00:28*pregressive quit (Read error: Connection reset by peer)
20:00:58*pregressive joined #nim
20:05:01*darkf quit (Quit: Leaving)
20:30:26*xet7 quit (Quit: Leaving)
20:43:07*yglukhov quit (Remote host closed the connection)
20:43:55*yglukhov joined #nim
20:47:04*desophos joined #nim
20:54:19*kas_ quit (Ping timeout: 245 seconds)
21:01:02*euantor quit ()
21:03:11*pregress_ joined #nim
21:03:11*pregressive quit (Read error: Connection reset by peer)
21:04:21*yglukhov quit (Remote host closed the connection)
21:21:04flyxwhy isn't nim's doc2 output valid XML?
21:22:16flyxI mean, the favicon <link> tag is closed, while the font <link> tags are not
21:22:57flyxpost-processing the output would be much easier if it was XML
21:24:33dom96I don't think its output was designed with that in mind, also html5 won over xhtml long ago.
21:27:40flyxhtml5 still allows for valid XML output
21:29:50flyxw3c specified polyglot markup exactly for that use-case
21:31:14*FreeArtMan quit (Ping timeout: 276 seconds)
21:34:32flyxit's only the two <link>s in the header and one <br> in the footer that prevent the output from being valid XML, so I guess it could be easily fixed
21:39:29flyxwould it be accepted if I send a pull request?
21:48:43Araq_flyx: of course, go ahead
21:49:05Araq_I don't use validation anymore because it's a moving standard and no browser cares
21:49:21Araq_but that doesn't mean we reject improvements.
21:50:35*Demon_Fox joined #nim
21:51:21flyxwhile I'm at it, is it possible to configure nimdoc with nims instead of cfg?
21:52:04Araq_hmm. maybe.
21:53:10*mlitwiniuk quit (Ping timeout: 246 seconds)
21:53:30*mlitwiniuk joined #nim
22:00:47flyxPR done.
22:05:52flyxmeanwhile, I learned that I can just customize nimdoc.cfg instead of post-processing the result
22:06:53Araq_yeah it's quite flexible.
22:07:04Araq_I use it to generate the slides for my talks.
22:07:22Araq_Yes I know they are crappy, but that's because my CSS sucks and I only care about the content anyway
22:13:05*gokr quit (Quit: Leaving.)
22:13:19*gokr joined #nim
22:40:36*elrood quit (Remote host closed the connection)
23:05:09*gokr quit (Quit: Leaving.)
23:05:22*gokr joined #nim
23:09:54*vendethiel quit (Ping timeout: 272 seconds)
23:14:32*FreeArtMan joined #nim
23:16:51*pregress_ quit (Remote host closed the connection)
23:17:26*pregressive joined #nim
23:18:18*gokr quit (Read error: Connection reset by peer)
23:18:48*gokr joined #nim
23:21:26*pregressive quit (Ping timeout: 240 seconds)
23:22:01*gokr quit (Read error: Connection reset by peer)
23:22:08*Trustable quit (Remote host closed the connection)
23:23:21*gokr joined #nim
23:31:06*gokr quit (Quit: Leaving.)
23:40:46*FreeArtMan quit (Ping timeout: 256 seconds)