<< 21-10-2015 >>

00:00:38Araq case e.kind
00:00:39Araq of WindowEvent:
00:00:41Araq let w = e.window
00:00:42Araq if w.event == WindowEvent_Resized:
00:00:44Araq screenW = w.data1
00:00:45Araq screenH = w.data2
00:00:47Araqit's a bit messy.
00:01:11desophoshmm
00:01:13Araqthere are accessor procs like 'window', 'button'
00:01:22Araq'wheel'
00:01:24desophosyeah i thought evConv had something to do with it
00:01:29Araqthat do the casting for you.
00:01:35desophoscouldn't quite figure it out, i think i understand now
00:01:51Araqrun doc2 over the file to see the expansions
00:03:00desophosooh built-in doc tools, shiny
00:05:43desophos`nim doc2 ~/.nimble/pkgs/sdl2-1.1/sdl2` -> "Error: unhandled exception: lib/system.nim(24, 4) Error: cannot open '../doc/exception_hierarchy_fragment.txt' [ERecoverableError]" :(
00:07:33*Jesin joined #nim
00:11:16Araqdesophos: thanks for reporting, I'm sick of this, wait a sec
00:11:50desophosi'm using 0.11.2 installed with `brew install nim`
00:12:07desophosi assumed it was something i did wrong, not a bug haha
00:12:27Araqit's not a bug
00:12:42desophosoh good
00:12:49Araqbut packagers are too stupid, so I remove it anway.
00:13:23AraqI tell people not to spread stuff over the unix "hierarchy", but nobody would listen
00:14:04Araqso *shrug* I will remove useful things now to please Unix.
00:15:22desophosaww
00:15:27desophoswell at least it wasn't my fault c:
00:19:15NimBotnim-lang/Nim devel 3d512a7 Araq [+0 ±2 -0]: documentation improvements; system.nim docs adapted to unix's braindead idea of how software should be packaged which didn't work in 1970 and surprise doesn't work in 2015 either
00:19:23desophoshaha
00:20:53reactormonkdesophos, following conventions isn't a strong suit either...
00:21:28desophosreactormonk, re: what?
00:21:51reactormonkdesophos, ah, just the good old subject line in git commits max. 80 chars ;-)
00:21:57desophosoh haha
00:22:45Araqright. because word wrap is evil.
00:22:53Araqbecause of reasons.
00:24:05desophosoh, i think i finally understand the evConv template: it creates an accessor proc (like you said) that casts the Event to another Event type
00:25:02desophosalso i think i found a typo: `evConv(EvKeyboard, key, KeyboardEventPtr, {KeyDown, KeyUP})` shouldn't that be `KeyUp`?
00:25:29*bjz joined #nim
00:25:36Araqyeah but Nim doesn't care (partial case sensitivity)
00:25:48desophosoh okay
00:25:56desophosi remember that
00:26:41Araqturns out the exception hierarchy was also documented in the manual. :-)
00:26:47Araqso we didn't lose anything.
00:32:55*desophos quit (Remote host closed the connection)
00:58:53*bjz quit (Ping timeout: 250 seconds)
01:02:49*bjz joined #nim
01:03:21*desophos joined #nim
01:15:30*strcmp1 joined #nim
01:17:50*strcmp2 quit (Ping timeout: 250 seconds)
01:21:39*jaco60 quit (Ping timeout: 240 seconds)
02:21:59*jakesyl quit (Ping timeout: 240 seconds)
02:35:23*jakesyl joined #nim
02:37:43*gmpreussner_ joined #nim
02:44:48*desophos_ joined #nim
02:49:08*desophos_ quit (Ping timeout: 246 seconds)
02:49:52*gmpreussner_ quit (Quit: Konversation terminated!)
02:53:33desophoswhat's the best way to add references to existing objects to a sequence?
02:56:44*no_name joined #nim
02:56:46*devzerp joined #nim
03:04:59*darkf joined #nim
03:15:24desophosthe explanations i can find don't talk about how to create a reference to an object returned by a constructor proc
03:15:43desophosas opposed to direct invocation of the type
03:19:18*no_name quit (Remote host closed the connection)
03:19:18*devzerp quit (Remote host closed the connection)
03:20:48*devzerp joined #nim
03:20:49*no_name joined #nim
03:23:55desophosi guess i just don't understand ref objectas
03:23:58desophos*objects
03:24:53*yglukhov joined #nim
03:26:07*coryg joined #nim
03:26:47ephjadesophos: you would do it in the same way, as a constructor proc would just be a wrapper around the type constructor
03:27:35desophosephja, then why doesn't `let foo: ref Bar = new bar(args)` work if Bar isn't declared as a ref object?
03:28:49desophosi'm trying to figure out how to create object references
03:28:59*yglukhov quit (Ping timeout: 240 seconds)
03:29:10desophosoh, `bar` there is the wrapper for `Bar`
03:29:31ephjaright, so 'new' should appear in 'bar' then
03:29:52desophosoh, hmm
03:29:57desophosoh okay
03:30:49ephjaFoo(...) is a shortcut for that if Foo is defined as a ref object, IIRC
03:31:49desophosso do i have to duplicate all my code in my non-ref initializer?
03:32:16desophosseems like i'd have to duplicate all my initialization code
03:32:34desophosoh... templates maybe? haven't used those yet
03:33:08desophosof course by templates i mean generics
03:33:28desophoshmm
03:33:57desophosi guess not
03:36:10desophosi can't just create a reference to an existing object?
03:36:19desophosi guess addr would do that?
03:39:41desophosalso i don't understand why variables declared with `let` aren't l-values
03:58:19*coryg quit (Ping timeout: 240 seconds)
03:58:41desophosephja, where do i need to put the `new`?
03:59:42desophosoh wait
03:59:50desophosare you sure about that shortcut?
04:04:33desophosephja, you are right about the shortcut
04:06:14desophosi'd still like to know how to create a reference to an existing object though
04:11:04*bjz_ joined #nim
04:12:35*bjz quit (Ping timeout: 250 seconds)
04:21:18ephjait's documented here http://nim-lang.org/docs/system.html#new,ref.T
04:21:22ephjadesophos: "a = b" basically
04:22:07ephjanow you have two references
04:22:45desophosephja, i mean a reference to a non-ref object
04:24:37ephjadesophos: http://nim-lang.org/docs/system.html#addr,T
04:25:07ephjahaving only refs might be preferable, and if it's a parameter, annotate it with 'var'
04:26:14desophosi guess having all refs is preferable to using ptrs when i need references?
04:26:44desophosbecause i can just deref a ref when i need to i guess
04:28:00ephjayes, unless you have specific requirements
04:28:50desophoshmm, alright
04:31:59*phira quit (Excess Flood)
04:32:54*phira joined #nim
04:32:56*phira quit (Excess Flood)
04:33:24*phira joined #nim
04:33:25*phira quit (Excess Flood)
04:33:53*phira joined #nim
04:33:55*phira quit (Excess Flood)
04:34:26*phira joined #nim
04:39:16*strcmp2 joined #nim
04:43:11*strcmp1 quit (Ping timeout: 256 seconds)
04:46:21*strcmp2 quit (Quit: bbs)
05:04:32*gokr joined #nim
05:05:26*bjz_ quit (Ping timeout: 240 seconds)
05:05:47*bjz joined #nim
05:13:36*yglukhov joined #nim
05:17:53*yglukhov quit (Ping timeout: 246 seconds)
05:21:06*dewdrop quit (Ping timeout: 240 seconds)
05:21:06*gokr quit (Read error: Connection reset by peer)
05:40:43*nande quit (Remote host closed the connection)
06:00:55*ephja quit (Ping timeout: 250 seconds)
06:34:05*gokr joined #nim
06:56:03*Ven joined #nim
07:12:17*desophos quit (Read error: Connection reset by peer)
07:19:12*vegansk joined #nim
07:41:26*yglukhov joined #nim
07:42:33*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:51:51*edaaa_ joined #nim
07:53:40*Ven joined #nim
07:57:20*Ven quit (Client Quit)
08:09:06*coffeepot joined #nim
08:27:49*Ven joined #nim
08:38:20*vqrs quit (Max SendQ exceeded)
08:38:39*vqrs joined #nim
08:52:53*aidenatt joined #nim
08:54:30*aidenatt left #nim ("Textual IRC Client: www.textualapp.com")
09:15:16*bjz_ joined #nim
09:15:19*bjz quit (Ping timeout: 240 seconds)
09:17:55*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:21:39*Arrrr joined #nim
09:24:22*Ven joined #nim
09:35:14*jaco60 joined #nim
10:13:37*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:15:24*Ven joined #nim
10:27:23*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:38:49*desophos joined #nim
10:43:18*desophos quit (Ping timeout: 260 seconds)
10:45:29*jakesyl quit (Ping timeout: 246 seconds)
10:47:04*joelmo joined #nim
10:58:34*jakesyl joined #nim
10:59:06*vegansk left #nim ("Ухожу я от вас (xchat 2.4.5 или старше)")
11:01:12yglukhovDoes nimble support nims already?
11:05:33dom96yglukhov: Haven't had the time to properly review Araq's PR yet.
11:05:43dom96So not yet.
11:06:10yglukhovok
11:07:18*Trustable joined #nim
11:07:53*irrequietus joined #nim
11:11:25*irrequietus quit (Client Quit)
11:13:25*Kingsquee quit (Quit: http://i.imgur.com/EsXzoum.png)
11:21:10*irrequietus joined #nim
11:22:27*Ven joined #nim
11:42:53*jck_ quit (Remote host closed the connection)
11:59:31ArrrrFrom the point of view of the gc, does it make any difference to collect 10 bytes or 10kb ?
11:59:34Arrrrin time
12:00:03Arrrra reference pointing to these contigious data
12:00:32reactormonkArrrr, possibly, cache lines.
12:01:10ArrrrWhy? does it have to clean every byte?
12:04:15*jck joined #nim
12:06:04*jck quit (Remote host closed the connection)
12:06:22*jck joined #nim
12:07:28*jck quit (Remote host closed the connection)
12:07:43*jck joined #nim
12:27:41*BitPuffin joined #nim
12:31:10*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:33:48*elrood joined #nim
12:33:49*Ven joined #nim
12:36:42*xet7_ joined #nim
12:44:28*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:14:56*UberLambda joined #nim
13:29:11*ephja joined #nim
13:59:29*pregressive joined #nim
14:01:21*pregressive quit (Read error: Connection reset by peer)
14:01:27*pregress_ joined #nim
14:02:12*joelmo quit (Quit: Connection closed for inactivity)
14:22:43*mtj_ quit (Ping timeout: 250 seconds)
14:37:31*darenthis joined #nim
14:37:59*Arrrr quit (Ping timeout: 264 seconds)
14:40:14*strcmp1 joined #nim
14:44:39*Arrrr joined #nim
14:47:28*razaaa joined #nim
14:54:29*Jesin quit (Quit: Leaving)
15:01:07*pregress_ quit (Remote host closed the connection)
15:08:01yglukhovHey guys, check out new coverage lib for Nim ;) https://coveralls.io/builds/3907528/source?filename=tests%2Ftest.nim
15:20:26*pregressive joined #nim
15:22:12federico3yglukhov: how do you implemented coverage in Nim?
15:22:59yglukhovthere's a hint in the README.md, that says: inspired by Andreas' talk at OSCON ;)
15:23:53yglukhovhttps://github.com/yglukhov/coverage
15:25:48yglukhovAraq's original example: https://github.com/Araq/oscon2015/blob/master/2_meta.rst
15:26:38*strcmp1 quit (Remote host closed the connection)
15:27:05*strcmp1 joined #nim
15:27:13*razaaa quit (Read error: Connection reset by peer)
15:27:39*razaaa joined #nim
15:28:31*edaaa__ joined #nim
15:30:56*edaaa__ quit (Client Quit)
15:36:43*strcmp1 quit (Remote host closed the connection)
15:37:54*thotypous quit (Ping timeout: 260 seconds)
15:39:51federico3yglukhov: aha, I was expecting something like that - hopefully I will not have side effects apart from performance
15:41:15federico3very nice work
15:43:33*desophos joined #nim
15:45:45desophoswhy are bindings created by `let` statements not lvalues?
15:46:23*strcmp1 joined #nim
15:50:16yglukhovfederico3: actually performance impact is even less than nim line/stack tracking. 1 bounds check + 1 increment per line. Could not find a way to disable bounds check :(
15:50:50yglukhovdesophos: let in nim is like const in C
15:53:11*thotypous joined #nim
15:56:47*pregressive quit (Remote host closed the connection)
15:56:53desophosbut aren't consts just unmodifiable?
15:56:57desophosi don't really know C
15:57:09desophosi don't know the exact behavior of const
15:57:47*strcmp1 quit (Ping timeout: 264 seconds)
15:57:51desophosit seems that let does more than const; not only does it create an unmodifiable binding, it also doesn't even give that binding an address somehow
15:58:12desophosit seems to behave like an expression substitution
15:59:44yglukhovdesophos: internally let is like var, except you can't modify it. addr of let is considered to be a potential modification. if you really want an addr and know what you're doing, use unsafeAddr
16:02:52desophosoh okay. the compiler tells me "expression has no address" when i try to take addr(someLetVar). that seems misleading
16:04:24yglukhovwell, "expression has no address" might not be the best explanation of whats going on. also unsafeAddr is introduced recently in Nim. pleviously there was no way of taking addr of let.
16:05:28desophosah okay. i was under the impression that bindings created by let were somehow expressions (rvalues)
16:05:40desophosthanks for the clarification
16:06:55yglukhovanytime
16:10:14*strcmp1 joined #nim
16:12:07*pregressive joined #nim
16:14:43*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:22:06*yglukhov quit (Ping timeout: 272 seconds)
16:22:48*razaaa____ joined #nim
16:23:24*razaaa quit (Read error: Connection reset by peer)
16:35:56desophosis there any way to get the directory of the running executable? os.getCurrentDir (http://nim-lang.org/docs/os.html#getCurrentDir) just returns the directory from which the executable is invoked
16:36:42desophoswhich on OS X is apparently always home?
16:37:16desophoswell, i mean if i go and click on it instead of directly invoking it from an open terminal
16:41:19*cryzed quit (Ping timeout: 240 seconds)
16:42:34*smodo joined #nim
16:43:51*cryzed joined #nim
16:44:47*sarlalian quit (Quit: WeeChat 0.4.2)
16:45:15*sarlalian joined #nim
16:45:59*Ven joined #nim
16:49:49*Ven quit (Client Quit)
16:54:21*desophos quit (Remote host closed the connection)
16:55:35reactormonkdarenthis, getAppDir?
16:56:13*darenthis quit ()
16:56:35*razaaa____ quit (Ping timeout: 264 seconds)
17:02:27*smodo quit (Remote host closed the connection)
17:04:25*yglukhov joined #nim
17:04:44*razaaa____ joined #nim
17:07:27*BitPuffin quit (Ping timeout: 255 seconds)
17:08:56*yglukhov quit (Ping timeout: 268 seconds)
17:13:33*thotypous quit (Quit: WeeChat 1.3)
17:14:09*darkf quit (Quit: Leaving)
17:18:28*smodo joined #nim
17:24:26*xificurC_ joined #nim
17:25:23*xificurC quit (Remote host closed the connection)
17:25:54*NhanH quit (Ping timeout: 240 seconds)
17:26:46*clone1018 quit (Ping timeout: 240 seconds)
17:28:15*wh1t3r0s3 quit (Ping timeout: 240 seconds)
17:28:15*NhanH joined #nim
17:28:15*NhanH quit (Changing host)
17:28:15*NhanH joined #nim
17:28:50*clone1018 joined #nim
17:29:05*wh1t3r0s3 joined #nim
17:29:49*RushPL quit (Quit: No Ping reply in 180 seconds.)
17:29:49*Amun_Ra quit (Ping timeout: 240 seconds)
17:31:05*Amun_Ra joined #nim
17:32:11*RushPL joined #nim
17:35:17*desophos joined #nim
17:36:11*yglukhov joined #nim
17:38:49*Guest46705isaway is now known as Guest46705
17:49:40*Matthias247 joined #nim
17:55:59*desophos quit (Remote host closed the connection)
17:57:46*desophos joined #nim
17:58:19*vendethiel joined #nim
17:59:19*brson joined #nim
17:59:30*desophos quit (Remote host closed the connection)
17:59:43*desophos joined #nim
18:03:48*desophos quit (Remote host closed the connection)
18:08:10*desophos joined #nim
18:08:35*strcmp1 quit (Ping timeout: 264 seconds)
18:12:43*desophos quit (Ping timeout: 260 seconds)
18:13:11*pregressive quit (Remote host closed the connection)
18:21:03*brson quit (Ping timeout: 250 seconds)
18:27:33*pregressive joined #nim
18:32:50*brson joined #nim
18:42:43*pregressive quit (Remote host closed the connection)
19:06:41*brson quit (Ping timeout: 246 seconds)
19:06:46*desophos joined #nim
19:07:00*razaaa____ quit (Quit: Leaving)
19:08:49*desophos quit (Remote host closed the connection)
19:09:05*desophos joined #nim
19:11:21*pregressive joined #nim
19:12:29*yglukhov quit (Remote host closed the connection)
19:17:16*yglukhov joined #nim
19:35:54desophoswill https://github.com/fowlmouth/nimrod-chipmunk be updated to chipmunk 7? looks like it's no longer actively maintained
19:36:22desophosoh https://github.com/fowlmouth/nimrod-chipmunk/issues/1
19:39:01*Arrrr quit (Quit: WeeChat 1.2)
19:39:03*UberLambda quit (Quit: GTG)
19:39:23*UberLambda joined #nim
19:45:13*aaed_ joined #nim
19:45:49dom96Can anybody here compare Nim to Julia? https://www.reddit.com/r/programming/comments/3pns1z/what_is_nim_and_why_it_matters_for_scientific/
19:46:21*cyraxjoe quit (Ping timeout: 244 seconds)
19:48:14*cyraxjoe joined #nim
19:50:02*strcmp1 joined #nim
19:54:07*brson joined #nim
19:54:23*THE_LORD quit (Excess Flood)
19:54:24*desophos quit (Remote host closed the connection)
19:54:53*Sornaensis joined #nim
19:56:04*desophos joined #nim
19:56:37*Sornaensis is now known as THE_LORD
19:57:26*aaed_ quit (Ping timeout: 246 seconds)
20:02:08*thotypous joined #nim
20:02:52*aaed_ joined #nim
20:13:38*desophos quit (Remote host closed the connection)
20:16:19*smodo quit (Ping timeout: 244 seconds)
20:16:28*desophos joined #nim
20:18:39*desophos quit (Remote host closed the connection)
20:26:11*desophos joined #nim
20:28:02*desophos quit (Remote host closed the connection)
20:35:07*desophos joined #nim
20:36:59*UberLambda quit (Quit: GTG)
20:58:13*Matthias247 quit (Read error: Connection reset by peer)
20:59:07desophosi wish Nim had a bigger community :( needs more library & wrapper support
20:59:23desophosi know i know, write my own
21:01:36aaed_desophos, what libraries/wrappers do you have in mind? i am looking for a way to contribute
21:02:37desophosaaed_: currently i'd like more game dev support, especially since Araq has said game dev is a target domain for Nim
21:02:57desophose.g. graphics, physics
21:03:02desophosphysics in particular
21:03:14desophosthere are a few graphics libs but only SDL2 seems to be actively maintained
21:04:06desophoshttps://github.com/fowlmouth/nimrod-chipmunk appears to be the only Nim physics lib
21:04:30desophos"Chipmunk 6.1.* bindings for Nimrod 0.9.0"... Chipmunk is at 7.0.x and Nim is at 0.11.3...
21:05:34*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:05:41*strcmp1 quit (Ping timeout: 246 seconds)
21:06:05desophosupdating that library would be a great place to start imo
21:06:09*mtj_ joined #nim
21:06:59desophostbh i doubt that wrapper still works
21:08:34desophosalso apparently it only supports Linux lol
21:09:38*vendethiel quit (Quit: q+)
21:15:11*strcmp1 joined #nim
21:17:15*irrequietus quit ()
21:17:22*Guest46705 is now known as Guest46705isaway
21:21:14dom96desophos: Same. You can help make it bigger :)
21:24:20*Kingsquee joined #nim
21:25:54*desophos quit (Remote host closed the connection)
21:27:25*Jesin joined #nim
21:32:41*mtj_ quit (Remote host closed the connection)
21:33:59*mtj_ joined #nim
21:34:59*strcmp1 quit (Remote host closed the connection)
21:44:09*thotypous quit (Ping timeout: 244 seconds)
21:44:43*desophos joined #nim
21:48:36*strcmp1 joined #nim
21:55:34desophosdom96: i can try :)
21:55:52desophosi'm totally willing to proselytize
21:56:19*strcmp1 quit (Remote host closed the connection)
21:57:46*gokr quit (Ping timeout: 260 seconds)
22:06:47*strcmp1 joined #nim
22:07:53*strcmp1 quit (Remote host closed the connection)
22:08:19*strcmp1 joined #nim
22:08:43*yglukhov quit (Remote host closed the connection)
22:14:00*Trustable quit (Remote host closed the connection)
22:19:02*pregressive quit (Remote host closed the connection)
22:19:52*pregressive joined #nim
22:20:35*strcmp1 quit (Remote host closed the connection)
22:21:01*strcmp1 joined #nim
22:28:06*aaed_ quit (Remote host closed the connection)
22:43:37*Salve joined #nim
23:05:19*Salve quit (Ping timeout: 240 seconds)
23:11:13*elrood quit (Quit: Leaving)
23:11:29*desophos quit (Remote host closed the connection)
23:15:03*desophos joined #nim
23:25:59*strcmp1 quit (Ping timeout: 264 seconds)
23:29:42*desophos quit (Remote host closed the connection)
23:30:03*desophos joined #nim
23:33:48*desophos quit (Remote host closed the connection)
23:33:53*shevy joined #nim
23:34:06*desophos joined #nim
23:51:33*jaco60 quit (Quit: Leaving)
23:57:27*desophos quit (Remote host closed the connection)