<< 20-12-2015 >>

00:02:29*entrobert joined #nim
00:10:28*Trustable quit (Remote host closed the connection)
00:24:42*Demon_Fox joined #nim
00:37:17cryzedCan someone shed light on the UseBase deprecation? Warning: use {.base.} for base methods; baseless methods are deprecated [UseBase]
00:49:55*jaco60 quit (Ping timeout: 260 seconds)
00:51:40*vendethiel quit (Ping timeout: 260 seconds)
00:52:11sqwishyI have a function that writes to a stream and I have a socket. How do I hook them up so that the function writes to the socket?
00:57:09*gokr quit (Quit: Leaving.)
00:57:50krux02how can I transform a type into a NimNode, so I can compare it with sameType
01:00:22krux02sqwishy: I would say, without knowing a lot of nim, you do it by polling, regulary check, if that stream has some data, and then write it to the socket
01:01:37krux02sqwishy: you can also create a theread, that does nothing, except reading the sockets and writing to the socket
01:14:20sqwishyHrm ... I can't even figure out how read the thing out of the stream ...
01:47:09*desophos quit (Ping timeout: 265 seconds)
01:58:16cryzeddom96, is it possible to use varargs without having a leading fixed positional argument?
02:17:12cryzedAraq, https://gist.github.com/cryzed/baa46dea7ae36f1ef3d0 my code looks like this. I am trying to do something like newGameObject(newComp1(), newComp2()) where Comp1 and Comp2 are subclasses of Component. I get the following error: https://gist.github.com/cryzed/bcf0ccfe4b014bcad1e2
02:17:13cryzedAny idea
02:27:21krux02cryzed can you add the calling part, too ?
02:27:40krux02have you tried openArray, too?
02:34:27cryzedkrux02, yes, one second
02:34:41cryzedkrux02, openArray is not really what I want -- that would require me to pass a sequence or array
02:35:07cryzedkrux02, https://gist.github.com/cryzed/10d7668680f1f6b63866 calling part
02:39:06cryzedbut yeah when I use openArray[Component]: snake.nim(76, 32) Error: type mismatch: got (Array constructor[0..1, Component:ObjectType])
02:39:17cryzedah that might be my fault
02:39:49*krux02 quit (Quit: Page closed)
02:40:05*krux02 joined #nim
02:40:18cryzedkrux02, I found the error. I forgot to put "ref" when subclassing
02:41:13cryzedhm, I still can't use varargs though
02:45:09cryzedit works for simple types, just not the Component type, or its subclasses
02:49:59*desophos joined #nim
03:22:00*krux02 quit (Quit: Page closed)
03:23:41*lockdown joined #nim
03:33:07*lockdown quit (Remote host closed the connection)
03:58:37*entrobert quit (Ping timeout: 265 seconds)
04:44:07*vendethiel joined #nim
05:06:44*vendethiel quit (Ping timeout: 272 seconds)
05:54:47*entrobert joined #nim
05:59:56*entrobert quit (Ping timeout: 265 seconds)
06:25:42*darkf joined #nim
06:30:44*pregressive joined #nim
06:52:08*Demon_Fox quit (Ping timeout: 265 seconds)
06:52:35*Demon_Fox joined #nim
06:56:28*entrobert joined #nim
06:58:09*Demon_Fox quit (Quit: Leaving)
07:03:15*entrobert quit (Ping timeout: 265 seconds)
07:08:33*entrobert joined #nim
07:29:13*Demos quit (Read error: Connection reset by peer)
07:42:39*pregressive quit (Remote host closed the connection)
07:48:48*entrobert quit (Quit: WeeChat 1.3)
08:22:24*zaquest quit (Quit: Leaving)
08:35:45*zaquest joined #nim
08:45:35*BitPuffin|osx quit (Ping timeout: 240 seconds)
09:01:58*kerze joined #nim
09:05:54*yglukhov joined #nim
09:17:37*kerze is now known as smodo
09:23:06*desophos quit (Read error: Connection reset by peer)
10:06:34*jaco60 joined #nim
10:19:01*irrequietus joined #nim
10:23:50*irrequietus quit (Read error: Connection reset by peer)
10:24:56*irrequietus joined #nim
10:25:53*Matthias247 joined #nim
10:32:55*irrequietus quit ()
10:33:06*irrequietus joined #nim
10:44:46*smodo quit (Ping timeout: 240 seconds)
10:52:24*yglukhov quit (Remote host closed the connection)
11:01:20*lokulin quit (Changing host)
11:01:20*lokulin joined #nim
11:44:00M-maxAnswer to my question: at compilation stage, use when T is int, not if type(t) == int => it is possible to have type specific code paths within generic code
11:44:42M-maxI don't think there's a "when case T" equivalent though?
11:49:31*yglukhov joined #nim
11:53:41*yglukhov quit (Ping timeout: 246 seconds)
11:55:12*vendethiel joined #nim
12:01:40dom96M-max: yeah, I don't think there is a way to do a static case statement currently. Unless maybe using `static: case ...` but then you can't use the `is`.
12:11:09*Demon_Fox joined #nim
12:27:30*yglukhov joined #nim
13:17:06*irrequietus quit ()
13:33:37*yglukhov quit (Remote host closed the connection)
13:34:51*Demon_Fox quit (Quit: Leaving)
13:51:56*Matthias247 quit (Read error: Connection reset by peer)
14:18:12*vendethiel- joined #nim
14:20:16*vendethiel quit (Ping timeout: 272 seconds)
14:45:29*yglukhov joined #nim
14:55:30*kulelu88 joined #nim
14:55:30*kulelu88 quit (Changing host)
14:55:30*kulelu88 joined #nim
14:56:08*sepisoad joined #nim
15:22:18*exebook_ quit (Read error: Connection reset by peer)
15:35:17*Trustable joined #nim
15:43:28*yglukhov quit ()
15:47:18cryzeddom96, https://gist.github.com/cryzed/baa46dea7ae36f1ef3d0 my code looks like this. I am trying to do something like newGameObject(newComp1(), newComp2()) where Comp1 and Comp2 are subclasses of Component. I get the following error: https://gist.github.com/cryzed/bcf0ccfe4b014bcad1e2. Any idea?
15:48:05dom96hi cryzed
15:48:11cryzedhi dom96 :)
15:48:23*dom96 takes a look
15:48:52cryzedThe varargs works for simple types, string int etc. But as soon as I try to pass subclasses of Component to varargs I get an error
15:49:07dom96cryzed: can you gist your full code?
15:49:11cryzedYes, one second
15:49:13cryzedit has changed since
15:51:29cryzedUhm, I had to zip it dom96. There's no executable in there, so don't worry: https://dl.dropboxusercontent.com/u/835469/resources.zip -- The files are components.nim and main.nim -- respectively line 32 and line 62. I had to change the code to accept an array instead, but as soon as you change the signature back and adapt it in newRandomButton it will error -- I'll do that every second if that's too much to task
15:51:56*sepisoad quit (Read error: Connection reset by peer)
15:52:49dom96I don't see any main.nim and snake.nim compiles fine?
15:55:31cryzedit does
15:55:38cryzednow, yes. Since I pass an array to newComponent
15:55:40cryzedinstead of varargs
15:55:50cryzedI meant snake.nim
15:56:07cryzedif I remove the [ ] and change the signature of newGameObject to accept varargs instead it doesn't work
15:56:09cryzedone second
15:56:52cryzeddom96, https://gist.github.com/cryzed/671bf0f63c4b347c9df2 adapted code
15:56:59cryzedline 32 and 60
15:57:40cryzedcomponents.nim(61, 16) Error: type mismatch: got (GraphicsComponent, RandomPositionComponent)
15:57:41cryzedbut expected one of:
15:57:41cryzedcomponents.newGameObject(components: varargs[Component])
16:00:03dom96cryzed: Looks like a bug to me.
16:00:09cryzedoh
16:00:25cryzedWell I'll ping Araq again then, he didn't get around to answering yesterday
16:00:27cryzedAraq, ping
16:00:53cryzedthank you dom96
16:02:22dom96Sure, if you want. I would just report it already.
16:02:27cryzedAh ok
16:02:38cryzeddom96, I'm trying to implement the component system from http://gameprogrammingpatterns.com/component.html. You were planning to port a game engine too right? Or an entity system?
16:02:57dom96cryzed: Somebody on the forum wanted to do that, I was offering my help
16:03:04cryzedah I see
16:03:10dom96But with the amount of work I have it doesn't look like I will be able to do that.
16:03:59cryzedthat's too bad :(. Hope your workload eases soon
16:06:25dom96Thank you :)
16:10:02cryzedhttps://github.com/nim-lang/Nim/issues/3656 -- created
16:11:10cryzedthanks for your support, as always
16:11:25cryzedI am trying to implement an approximation of a game component system
16:11:42cryzedmight be overkill for snake, but I want to do something similar to what you did -- a dungeon crawler/roguelike thingy
16:13:59dom96oh, you mean futurehack?
16:14:06dom96Never got that finished lol
16:14:26dom96Would be awesome if you could create a game component system as a standalone library
16:14:43*Ven joined #nim
16:14:53cryzeddom96, I'll try to abstract it out once I got all the kinks out by having to actually use it
16:15:20cryzedalthough there's not much of a library in the end. You just need a type that accepts component-subtypes and calls a method on them. But yes, that was the plan -- I'll try to do that
16:15:26dom96cryzed: Awesome. That usually results in great libraries :)
16:15:31cryzed:)
16:22:29*allan0_ quit (Ping timeout: 246 seconds)
16:23:12*allan0 joined #nim
16:45:39*Matthias247 joined #nim
16:51:11*vendethiel- quit (Remote host closed the connection)
16:51:32*vendethiel joined #nim
17:09:06*def- quit (Ping timeout: 240 seconds)
17:13:15*def- joined #nim
17:19:31*brson joined #nim
17:26:14*boopisaway is now known as boop
17:29:00*BitPuffin|osx joined #nim
17:31:09*vikaton joined #nim
17:36:10*vqrs quit (Ping timeout: 260 seconds)
17:38:11*vqrs joined #nim
17:39:03*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:42:19*Ven joined #nim
17:49:47*vendethiel quit (Read error: Connection reset by peer)
18:10:18*Jesin quit (Quit: Leaving)
18:10:44*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:11:52*vendethiel joined #nim
18:13:27*Jesin joined #nim
18:17:32*brson quit (Read error: Connection reset by peer)
18:18:52*brson joined #nim
18:28:48*Matthias247 quit (Read error: Connection reset by peer)
19:32:44*desophos joined #nim
19:56:12*irrequietus joined #nim
20:11:08*darkf quit (Quit: Leaving)
20:29:41*brson quit (Quit: leaving)
21:03:55*jakesyl quit (Ping timeout: 240 seconds)
21:06:00*gokr joined #nim
21:17:40*jakesyl joined #nim
21:18:14*kulelu88 quit (Ping timeout: 246 seconds)
21:34:23*kulelu88 joined #nim
21:35:05*desophos quit (Read error: Connection reset by peer)
21:41:06*lazypenguin quit (Read error: Connection reset by peer)
21:41:48*lazypenguin joined #nim
21:41:54*ephja joined #nim
21:51:00*Matthias247 joined #nim
21:52:15*themagician_c is now known as themagician
21:58:40*chasmo joined #nim
22:06:05*Demos joined #nim
22:18:03*vikaton quit (Quit: Connection closed for inactivity)
22:25:27*boop is now known as boopisaway
22:31:43*chasmo left #nim (#nim)
23:17:50*kulelu88 quit (Ping timeout: 255 seconds)
23:29:37*kulelu88 joined #nim
23:55:16cryzedAraq, dom96: When you get time it would be awesome if you could help me out with this: https://gist.github.com/cryzed/409893a53be0842751eb https://gist.github.com/cryzed/2d125034be103d5bc5d5. It's the first time I'm attempting a more complicated class hierarchy with method overriding etc. and it fails entirely. I have defined generic send/receive methods in the baseclass and want to override them in my subclasses, and I expect some kind of
23:55:16cryzedpattern matching for the types at runtime. i.e. if I override it with receive[T] I expect all arguments to match that method, if I override [string] specifically only string types etc. But no matter what I do, the 2 methods aren't called. Is what I'm attempting to do impossible? Does Nim always think that the elements in my seq[Components] of class GameObject are "just" Component types?
23:56:43*Matthias247 quit (Read error: Connection reset by peer)