<< 27-10-2015 >>

00:04:30desophosi don't understand this error :( https://bpaste.net/show/21ac070dbf51
00:05:03*Demos quit (Ping timeout: 265 seconds)
00:11:09*Matthias247 quit (Read error: Connection reset by peer)
00:12:38desophosbbiab
00:13:10*desophos quit (Remote host closed the connection)
00:15:50*MyMind joined #nim
00:18:06*Sembei quit (Ping timeout: 255 seconds)
00:27:59*jakesyl quit (Ping timeout: 240 seconds)
00:37:23*Varriount quit (Ping timeout: 264 seconds)
00:38:10*Varriount joined #nim
00:40:38*desophos joined #nim
00:44:36makoLineWell, it's true that result isn't initialized https://github.com/nim-lang/Nim/blob/bb7604c06fb2adc6999d47fdfcbf9cf2979bef9e/lib/pure/collections/queues.nim#L26
00:45:03makoLineRight?... (I'm new)
00:48:59*yglukhov joined #nim
00:50:30desophosmakoLine, why would it not be initialized there?
00:51:38desophosresult.mask can be assigned to because result is of type Queue[T]
00:51:45desophosright?
00:52:09desophoshmm, is it because of the assert that it doesn't guarantee initialization?
00:53:00*yglukhov quit (Ping timeout: 244 seconds)
00:53:07*solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…)
00:54:34desophosi assume the fields in result that aren't assigned to use their default initializers
00:56:08*boopsiesisaway is now known as boopsies
00:56:17*boopsies is now known as boopsiesisaway
01:01:04makoLineIt's been that way since 2011 so I assume I just don't know how result works.
01:06:39*Varriount_ joined #nim
01:08:51*Varriount quit (Ping timeout: 265 seconds)
01:22:43*johnsoft quit (Read error: Connection reset by peer)
01:23:33*johnsoft joined #nim
01:27:23*askatasuna joined #nim
01:43:24desophosidk, maybe a recent compiler change broke it
01:46:28desophosmore likely i'm just not using it right
01:50:21*jakesyl joined #nim
01:50:32*jakesyl quit (Read error: Connection reset by peer)
01:50:54*jakesyl joined #nim
02:03:46*Varriount_ quit (Ping timeout: 260 seconds)
02:04:14*Varriount joined #nim
02:15:15*askatasuna quit (Ping timeout: 256 seconds)
02:20:03desophosi'm also getting "SIGSEGV: Illegal storage access. (Attempt to read from nil?)" on the line with `eventHandler()`
02:23:47desophossolution: don't use a Queue :p
02:25:03*desophos_ joined #nim
02:29:54*desophos_ quit (Ping timeout: 260 seconds)
02:31:30*Varriount_ joined #nim
02:32:42*Varriount quit (Ping timeout: 260 seconds)
02:48:31*darkf joined #nim
02:48:34*darkf quit (Changing host)
02:48:34*darkf joined #nim
03:00:21*jackv quit (Quit: ZNC - 1.6.0 - http://znc.in)
03:01:18*Varriount_ quit (Ping timeout: 260 seconds)
03:26:08*jackv joined #nim
03:48:48*Varriount joined #nim
03:54:37*zepolen joined #nim
04:00:33*Varriount_ joined #nim
04:01:02*Varriount quit (Ping timeout: 260 seconds)
04:26:57*Varriount joined #nim
04:29:30*Varriount_ quit (Ping timeout: 260 seconds)
04:41:33*Demon_Fox quit (Ping timeout: 252 seconds)
04:42:45*Demon_Fox joined #nim
04:46:45*Demon_Fox quit (Ping timeout: 240 seconds)
04:47:32*Demon_Fox joined #nim
04:52:51*Demon_Fox quit (Remote host closed the connection)
04:57:53*desophos quit (Read error: Connection reset by peer)
05:03:23*nande quit (Read error: Connection reset by peer)
05:13:18*coryg quit (Ping timeout: 240 seconds)
05:17:50*Demon_Fox joined #nim
05:54:35*solidsnack joined #nim
06:01:50*Guest78532 joined #nim
06:26:20*yglukhov joined #nim
06:31:14*yglukhov quit (Ping timeout: 265 seconds)
06:38:40*solidsna_ joined #nim
06:39:53*solidsnack quit (Ping timeout: 256 seconds)
06:48:52*bjz joined #nim
06:56:25*bjz quit (Ping timeout: 240 seconds)
06:56:59*bjz joined #nim
07:04:26*Guest78532 left #nim (#nim)
07:09:39*solidsna_ quit (Ping timeout: 244 seconds)
07:31:39*Trustable joined #nim
07:41:22*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
07:42:10*bjz joined #nim
07:54:37*zv joined #nim
07:59:09*yglukhov joined #nim
08:00:29*Demon_Fox quit (Remote host closed the connection)
08:02:11*Kingsquee quit (Read error: Connection reset by peer)
08:02:21*Kingsquee joined #nim
08:14:16*yglukhov_ joined #nim
08:14:16*yglukhov quit (Read error: Connection reset by peer)
08:16:52*zv left #nim (#nim)
08:26:20*gokr joined #nim
08:26:43*gokr1 joined #nim
08:26:44*gokr quit (Read error: Connection reset by peer)
08:31:28*yglukhov joined #nim
08:31:28*yglukhov_ quit (Read error: Connection reset by peer)
08:43:16*Arrrr joined #nim
08:44:08*barosl quit (Ping timeout: 268 seconds)
08:57:43*yglukhov quit ()
08:58:43*yglukhov joined #nim
09:02:53*coffeepot joined #nim
09:06:16*yglukhov quit (Remote host closed the connection)
09:17:04*yglukhov joined #nim
09:27:06*yglukhov_ joined #nim
09:27:06*yglukhov quit (Read error: Connection reset by peer)
09:29:19*vqrs quit (Ping timeout: 256 seconds)
09:31:44*vqrs joined #nim
09:36:53*barosl joined #nim
09:42:44*strcmp2 joined #nim
09:43:03*bjz_ joined #nim
09:44:02*bjz quit (Ping timeout: 260 seconds)
09:55:00*makoLine quit (Ping timeout: 255 seconds)
10:13:56*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
10:14:07*coffeepot joined #nim
10:16:31*bjz_ quit (Ping timeout: 246 seconds)
10:17:21*bjz joined #nim
10:53:09*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
10:59:45*strcmp2 quit (Remote host closed the connection)
11:08:01*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
11:08:41*coffeepot joined #nim
11:12:34*gokr1 quit (Ping timeout: 260 seconds)
11:14:53*gokr joined #nim
11:22:22*dashed quit (Quit: Connection closed for inactivity)
12:00:14*strcmp1 joined #nim
12:04:22*elrood joined #nim
12:04:25*strcmp1 quit (Ping timeout: 240 seconds)
12:05:35*yglukhov_ quit (Ping timeout: 250 seconds)
12:14:46*yglukhov joined #nim
12:17:25*strcmp1 joined #nim
12:51:25*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
12:52:08*boopsiesisaway is now known as boopsies
12:58:47*yglukhov quit (Remote host closed the connection)
12:59:20*yglukhov joined #nim
13:28:30*yglukhov quit (Ping timeout: 240 seconds)
13:35:19*BitPuffin joined #nim
13:37:05*bjz joined #nim
13:40:52*bjz_ joined #nim
13:42:02*bjz quit (Ping timeout: 260 seconds)
13:49:24*pregressive joined #nim
15:04:11*zepolen quit (Remote host closed the connection)
15:06:30*zepolen joined #nim
15:06:56*zepolen quit (Remote host closed the connection)
15:07:19*strcmp1 quit (Remote host closed the connection)
15:08:31*zepolen joined #nim
15:09:04*zepolen quit (Client Quit)
15:28:55*darkf quit (Quit: Leaving)
15:45:23*strcmp1 joined #nim
15:58:07*elrood quit (Remote host closed the connection)
16:01:50*yglukhov joined #nim
16:06:06*yglukhov quit (Ping timeout: 260 seconds)
16:21:58*elrood joined #nim
16:41:38*desophos joined #nim
16:48:22*brson joined #nim
16:52:56*CcxCZ joined #nim
16:54:05*elrood quit (Ping timeout: 240 seconds)
17:00:29CcxCZHello. I'm looking into asyncdispatch and I can't tell if callback is called in the presence of error - or if there are separate means for that (like Twisted's errback)
17:02:21Arrrrdom96, a question for you
17:02:48CcxCZI guess since it passes the Future it's like .addBoth() and one determines in the callback wheter it's failed or succeeded
17:12:27desophosbtw my questions still stand; still haven't been able to figure them out
17:13:01CcxCZAh, and trivial cases will just read(future), re-raising the error
17:16:15Arrrrwhat is your question desophos ?
17:18:50*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
17:18:56desophosArrrr: one is about the Nim SDL2 wrapper, one is about the stdlib Queue, and one is about my own code that i think has to do with ref objects
17:19:26Arrrri have no experience with sdl2, but maybe i can answer you
17:20:41desophoswell i'm confused about how to use sdl2.addEventWatch
17:21:26desophoshttps://github.com/nim-lang/sdl2/blob/master/src/sdl2.nim#L1425
17:21:50desophosi don't know how to construct an EventFilter proc
17:22:19*solidsnack joined #nim
17:22:25desophosand i don't know how to get a `pointer`; is that just an addr or is it something else? i read through the relevant sections in the manual but i still don't understand either of these problems
17:24:28desophosthe EventFilter declaration is at https://github.com/nim-lang/sdl2/blob/master/src/sdl2.nim#L1425
17:26:59Arrrromg. Is for a game?=
17:27:06desophosyeah
17:27:47ArrrrWell, i'll try to understand it, but i think there is a wrapper for sfml.
17:28:04ArrrrAnd another for glfw
17:28:46desophosnever saw the glfw wrapper; i'd rather use sfml but the wrapper doesn't look so good
17:29:50Arrrrhttps://github.com/exetoc/nim-glfw
17:32:12desophoswhy is glfw preferable to sdl2?
17:32:31desophossdl2 isn't so bad, i've just been wrapping the low level stuff
17:33:10Arrrri dont know, i havent used before sdl2, but glfw gives you the basic stuff, and i prefer it that way
17:33:55ArrrrThis is an example for getting a pointer http://ideone.com/R1ioir
17:35:36ArrrrEventFilter is just a proc, so you only have to declare one like https://github.com/nim-lang/sdl2/blob/270eb471e5b4c16de8167a7a0cb35ef45c97c4f1/src/sdl2.nim#L208
17:36:16desophoswhat if type A were an object instead of a ref object? what type would addr(a) be then?
17:36:50ArrrrWell, i think it could work, but addr would point to the stack
17:36:50desophosand okay, so the proc just has to have the same declaration
17:37:14*solidsnack quit (Ping timeout: 260 seconds)
17:39:38desophosokay, thanks, i'll try out those solutions
17:40:23desophosbut i have another problem in a module that has to compile before the one that had those problems
17:40:37desophoswhat's wrong with this? https://bpaste.net/show/21ac070dbf51
17:40:59desophosif i change EventHandler to a non-ref object, i get "invalid type: EventHandler"
17:41:35ArrrrWell, in line 13 you cannot declare a variable like that, use 'var gEvent...' or 'let gEvent...'
17:41:46desophosit can't be a const?
17:42:03desophosoh sorry. in my actual code it's in a const block
17:42:21desophoswow
17:42:21Arrrror const, except if the variable is a ref
17:42:24Arrrri believe
17:42:37desophosyeah being a const might be a problem... haha
17:43:17desophosyeah it compiles when i change it to var, which it should be anyway
17:43:20desophosthanks!
17:43:47ArrrrAnything else?
17:43:50*vqrs quit (Ping timeout: 240 seconds)
17:43:52*elrood joined #nim
17:44:08desophosthere's the issue with Queue
17:44:26desophosthe second error line in the paste
17:44:42desophoshttps://github.com/nim-lang/Nim/blob/master/lib/pure/collections/queues.nim#L26
17:44:51*pregressive quit (Remote host closed the connection)
17:45:31*pregressive joined #nim
17:45:47desophosi don't *really* need a Queue so i used a seq and just implemented a hacky "peek" proc
17:45:51*vqrs joined #nim
17:46:19desophosactually it's less hacky haha
17:48:17Arrrrthe warning you mean=
17:48:19Arrrr?
17:48:31desophosyeah the warning
17:48:51desophosit's not a real issue but it's concerning
17:49:53Arrrrwtf who knows, but with seq you can pop
17:50:32desophosyeah that's what i'm doing
17:50:53desophosadding to front using `event & events`
17:51:09desophosand popping off end
17:51:24desophosprobably less efficient than the actual Queue implementation but that's not a concern yet
17:51:35ArrrrAlso you can insert http://nim-lang.org/docs/system.html#insert,seq[T],T
17:51:48desophosoh nice
17:56:35*Matthias247 joined #nim
18:02:58*yglukhov joined #nim
18:15:46desophoshow do i initialize an array indexed by an enum? i know how to declare it but i can't figure out how to give it a default value when it's a parameter
18:17:41desophosits type is `array[PhysicsEvent, seq[(PhysicsBody, PhysicsBody) -> void]]` where PhysicsEvent is an enum and PhysicsBody is an object
18:18:23*solidsnack joined #nim
18:19:48desophoshmm, it compiles if i define a proc that inits it and call that proc for the default value :p
18:21:36*mat5 joined #nim
18:21:44mat5hello
18:22:24*mat5 quit (Client Quit)
18:36:35desophosis it possible to define object variants that define the same field as different types?
18:36:46desophosi get a redefinition error
18:37:42desophosi want a polymorphic field
18:41:21Arrrrwhat?
18:41:43Arrrrif you mean having the same name, it is not possible
18:44:28*pregressive quit (Remote host closed the connection)
18:44:46*pregressive joined #nim
18:45:00desophosokay
18:45:25*solidsnack quit (Ping timeout: 265 seconds)
18:47:51*desophos quit (Remote host closed the connection)
18:48:24VarriountAraq: I have the two installers built from the buildbots. You want it?
19:00:10*desophos joined #nim
19:00:33*BitPuffin quit (Read error: Connection reset by peer)
19:05:24*desophos quit (Remote host closed the connection)
19:09:03*mat4 joined #nim
19:09:06mat4hello
19:10:25*solidsnack joined #nim
19:18:31*mat4 quit (Quit: leaving)
19:27:11avsej`undeclared identifier: 'map'`
19:27:23avsejdid someone change map()?
19:28:04avsejhttps://gist.github.com/avsej/0f565ce4cfd62a6ba092
19:29:39avsejah, sequtils. sorry
19:30:47AraqVarriount: well ok, I can test these, but I'm sure you are aware we need to update the version number first.
19:35:13Arrrrnow is map and apply
19:43:04*solidsnack quit (Ping timeout: 250 seconds)
19:48:46*jakesyl quit (Ping timeout: 246 seconds)
19:50:33*strcmp1 quit (Remote host closed the connection)
20:02:10*jakesyl joined #nim
20:12:50*silven quit (Ping timeout: 240 seconds)
20:13:05*silven joined #nim
20:14:05*Arrrr quit (Quit: WeeChat 1.2)
20:25:48*strcmp1 joined #nim
20:31:21*desophos joined #nim
20:34:26*tomp is now known as tome
20:34:55*tome is now known as Guest54507
20:38:49*nande joined #nim
20:39:33*Guest54507 is now known as tomes
20:51:58*solidsnack joined #nim
20:53:08*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
20:53:27*bjz joined #nim
20:58:30desophoscan i just say that "expression _____ cannot be called" is an extremely unhelpful error
20:59:25*makoLine joined #nim
20:59:26Araqvar foo = 89
20:59:34Araqfoo() # expression cannot be called
20:59:48Araqwhat else can you say for this snippet?
20:59:59desophosyes but when the expression is a proc it gets more complicated
21:00:17desophosi wonder "cannot be called because...? WHY"
21:00:55desophosin this case it was because i was passing a type to a constructor
21:01:01desophoswhere it wanted an object
21:01:08desophosbut it didn't tell me "type mismatch"
21:05:05*solidsnack quit (Ping timeout: 250 seconds)
21:09:26*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:11:20*strcmp1 quit (Quit: bbs)
21:11:32*strcmp1 joined #nim
21:15:13*linkedinyou quit (Quit: linkedinyou)
21:18:48*Jesin quit (Quit: Leaving)
21:19:52*pregressive quit (Remote host closed the connection)
21:28:42*linkedinyou joined #nim
21:35:04desophosomg my project finally compiles after days of not compiling :_D
21:40:35*jaco60 joined #nim
21:45:41*Trustable quit (Quit: Leaving)
21:56:41*Demon_Fox joined #nim
21:57:12*brson_ joined #nim
21:58:33*brson quit (Read error: Connection reset by peer)
21:59:29*yglukhov quit (Remote host closed the connection)
22:06:25*jaco60 quit (Ping timeout: 240 seconds)
22:11:22*jaco60 joined #nim
22:18:17*Jesin joined #nim
22:23:30dom96http://nim-lang.org/news.html#Z2015-10-27-version-0-12-0-released :)
22:24:27desophos:O :O :O
22:25:19desophoscongratulations!
22:25:52dom96desophos: thanks!
22:31:05Araqsee? Oscon works.
22:31:18desophosyay tuple unpacking!
22:39:43Araqyay a tremendous amount of bugfixes!
22:40:42*desophos quit (Remote host closed the connection)
22:42:01*Kingsquee joined #nim
22:50:36*desophos joined #nim
22:56:42*yglukhov joined #nim
23:00:44*desophos quit (Remote host closed the connection)
23:01:21*yglukhov quit (Ping timeout: 256 seconds)
23:17:52*ulyssesdwolfe joined #nim
23:20:45*desophos joined #nim
23:21:16VarriountYay!
23:40:39*jaco60 quit (Ping timeout: 240 seconds)
23:42:17*boopsies is now known as boopsiesisaway
23:49:13*someplac- quit (Ping timeout: 246 seconds)
23:53:15*desophos quit (Remote host closed the connection)
23:55:49*desophos joined #nim
23:58:13*yglukhov joined #nim