<< 02-01-2016 >>

00:00:07*NhanH_ joined #nim
00:00:20*jck joined #nim
00:00:22*k1io quit (Ping timeout: 240 seconds)
00:00:24*OmlkRoNiXz quit (Ping timeout: 240 seconds)
00:00:26*jaco60 quit (Ping timeout: 240 seconds)
00:00:26*def- quit (Ping timeout: 240 seconds)
00:00:27*zxtx quit (Ping timeout: 240 seconds)
00:00:27*dv- quit (Ping timeout: 240 seconds)
00:00:28*NhanH quit (Ping timeout: 240 seconds)
00:00:28*Heartmender quit (Ping timeout: 240 seconds)
00:00:29*\u quit (Ping timeout: 240 seconds)
00:00:29*jck_ quit (Ping timeout: 240 seconds)
00:00:29*clone1018 quit (Ping timeout: 240 seconds)
00:00:30*flyx quit (Ping timeout: 240 seconds)
00:00:30*thotypous quit (Ping timeout: 240 seconds)
00:00:31*zxtx_ is now known as zxtx
00:00:50*thotypous joined #nim
00:00:59*Heartmender joined #nim
00:01:23*Heartmender is now known as Guest10472
00:01:56*ray- joined #nim
00:03:10*NhanH_ is now known as NhanH
00:03:22*flyx joined #nim
00:04:22*bbl_ quit (Ping timeout: 260 seconds)
00:05:02*nchambers quit (Ping timeout: 246 seconds)
00:05:47*def- joined #nim
00:08:22*irrequietus quit ()
00:09:05*clone1018 joined #nim
00:17:26*bbl_ joined #nim
00:21:26*def- quit (Ping timeout: 256 seconds)
00:21:31*yglukhov joined #nim
00:24:48*def- joined #nim
00:25:46*yglukhov quit (Ping timeout: 240 seconds)
00:32:25*dv- joined #nim
00:54:59*bamorim joined #nim
00:57:20*Matthias247 quit (Read error: Connection reset by peer)
01:14:45*jaco_ quit (Ping timeout: 260 seconds)
01:31:41*mto_ left #nim ("WeeChat 1.3")
02:22:23*bamorim quit (Ping timeout: 264 seconds)
02:23:00*yglukhov joined #nim
02:27:15*yglukhov quit (Ping timeout: 240 seconds)
02:34:05*vendethiel quit (Ping timeout: 260 seconds)
03:24:35*yglukhov joined #nim
03:29:14*yglukhov quit (Ping timeout: 260 seconds)
03:32:32*bbl_ quit (Ping timeout: 276 seconds)
04:13:58*jakesyl quit (Ping timeout: 250 seconds)
04:26:00*yglukhov joined #nim
04:28:33*krux02_ joined #nim
04:30:20*yglukhov quit (Ping timeout: 246 seconds)
04:32:59*krux02 quit (Ping timeout: 276 seconds)
05:04:52*vikaton joined #nim
05:26:31*vendethiel joined #nim
05:36:41*darkf joined #nim
05:37:53*thotypous quit (Ping timeout: 246 seconds)
05:49:41*vendethiel quit (Ping timeout: 276 seconds)
06:27:31*yglukhov joined #nim
06:31:47*yglukhov quit (Ping timeout: 246 seconds)
06:52:57*Demon_Fox quit (Quit: Leaving)
07:09:42nsfthe fact that openArray is only allowed as an argument is a very bad idea
07:11:26nsfit's like "ref" in C#, passing struct via reference to a function is sort of allowed, but nobody really does that because it's hard to do so
07:11:45nsfthe best design I know of when it comes to arrays handling is in Go
07:12:11nsfin general one of the interesting questions to answer about garbage collected languages is interior pointers
07:12:26nsfwhich is sort of related to arrays/slices/strings
07:28:15*yglukhov joined #nim
07:41:53*zaquest quit (Quit: Leaving)
07:45:17*yglukhov quit (Remote host closed the connection)
07:49:59*zaquest joined #nim
07:54:02*yglukhov joined #nim
08:10:29nsfhttp://pastebin.com/LnMg5M22
08:10:58nsfdid a coroutine scheduler prototype, it's shitty (the queue isn't FIFO, and single threaded), but works :) interesting..
08:12:17nsfshows the idea how waiting is implemented
08:13:47nsfwaitForAll ignores the results though
08:17:20*bbl_ joined #nim
08:28:27yglukhovdom96: funny thing. i cannot import into a nimble file %)
08:44:15Araq_nsf: exactly. Interior pointers are very bad for GCs.
08:45:07nsfAraq_: Go supports them and that creates competition to other GCed languages, it has a very fancy low latency GC as well
08:45:41Araq_for some definition of "fancy low latency GC" that is a joke...
08:45:48nsfcompiling nim to Go, hm :)
08:46:09nsfit's not, the GC is really good
08:46:20Araq_it's not.
08:46:39nsfif you think Go's GC is the one nim uses, that's not that GC
08:46:55nsfgccgo's GC is pretty bad, that's true
08:47:31nsfhttps://github.com/golang/go/blob/master/src/runtime/mgc.go
08:47:34nsfI'm talking about this one
08:51:28nsfhttps://blog.golang.org/go15gc
08:51:34nsfdescribed well here, if you're interested
08:51:42nsfand in the comments of the file above
08:52:08Araq_Go uses an incremental mark and sweep GC.
08:52:51Araq_that means that in can only free objects after a full GC cycle.
08:53:04nsfthat is true
08:53:36Araq_and interior pointers really restrict of what GCs are allowed
08:53:48nsfbut it doesn't stop the mutators (well, almost), that's why I said it's low latency
08:54:09Araq_it's definitely cool and worth copying for Nim even
08:54:33Araq_but that doesn't mean interior pointers is a good choice.
08:56:16nsfmaybe you're right, I actually don't have much experience working without them, I'm mostly familiar with C++ and Go
08:56:33nsfjust a bit of C#
08:57:06nsfmaybe actually nim doesn't repeat some of the mistakes made in C#, like their ref type passing, you can't take a ref of a List (their dynamic array) element
08:57:09nsfI think in nim you can
08:57:44nsfhm, is there a way to bypass {.gcsafe.} requirement on createThread?
08:58:47Araq_yeah, you can cast proc types to a proc type that has the effects you claim
08:59:15nsfok, I'll try to implement the global queue properly with locks in a moment, just want to try it out :)
08:59:37nsfI mean I do use locks, just not the pragma thing
09:01:34nsfhttp://pastebin.com/s6DbMz8V
09:01:48nsfcoroutines and a simple scheduler multiplexed onto multiple threads
09:02:28*sepisoad joined #nim
09:03:44nsfwill crash if used with refcounting for obvious reasons
09:04:03nsfwell, it crashes sometimes, data races and all
09:04:34nsfbut basically that's the model I want to implement :)
09:05:44nsfvar workers: array[0..0, Thread[int]]
09:06:01nsf0..0 :)
09:06:16nsffunny syntax, I'd say
09:07:00Araq_array[1, ...] is also possible
09:07:19nsfoh, didn't know, thanks
09:07:20Araq_are you sure you want a queue and not a channel?
09:07:33nsfuhm, yes
09:07:43nsfchannel is a queue, isn't it
09:08:02Araq_"
09:08:05nsfbut nim's channel forces copying as far as I know, at least doc says it does a deep copy
09:08:19Araq_// Because of benign races during marking, this number may not
09:08:19Araq_// be the exact number of marked bytes, but it should be very
09:08:19Araq_// close.
09:08:28nsf:)
09:08:39Araq_-.- yay "benign" races in your GC technology.
09:08:47Araq_that's reassuring.
09:09:08nsfit will power half of the internet soon :D
09:09:23Araq_(This is why multithreaded GCs are so ugly...)
09:09:36nsfyes, I agree
09:09:55nsfbut what you can you do about it.. wait for hardware which is GC friendly? :)
09:10:12nsfs/you//
09:20:23*sepisoad quit (Read error: Connection reset by peer)
09:28:05*vikaton quit (Quit: Connection closed for inactivity)
09:29:27*desophos quit (Read error: Connection reset by peer)
09:53:55*zepolen joined #nim
09:55:14*zepolen quit (Read error: Connection reset by peer)
09:55:37*zepolen joined #nim
09:57:44*zepolen quit (Read error: Connection reset by peer)
09:58:40*zepolen joined #nim
10:00:54*sepisoad joined #nim
10:03:14*yglukhov quit (Remote host closed the connection)
10:03:47*zepolen quit (Ping timeout: 264 seconds)
10:04:49*yglukhov joined #nim
10:06:26*krux02_ quit (Remote host closed the connection)
10:11:59*yglukhov quit (Remote host closed the connection)
10:12:14*sepisoad quit (Remote host closed the connection)
10:30:50Araq_nsf: or change the approach and do thread local GCs :P
10:31:32nsfyes, but at the moment I think it's very hard to do so for my model
10:32:16*thotypous joined #nim
10:32:57nsfI guess I could try to do more manual memory management when it comes to coroutines
10:33:21nsfbut I really would like to keep an ability to migrate coroutines from one thread to another
10:33:31nsfwhich means doing that for an iterator basically
10:33:41nsfand that becomes tricky
10:33:52nsfI don't know what's in iterator body, could be GCed vars or not
10:37:12nsfI'll try though, but hard to say
10:37:52nsfthe biggest problem is things like semaphores
10:38:06nsfwhich create little local queues and manage coroutines on their own
10:38:13nsfand that could be coroutines from different threads
10:38:38nsfif I attach coroutines to threads it means I still want to be able to resume them from other threads (put into the thread local queue)
10:38:48nsfwhich won't be pretty
10:41:38*vendethiel joined #nim
10:47:54nsfand the scary part is load balancing
10:48:10nsfwith a single queue it's sort of implicit
10:48:18nsfbut if you stick a coroutine to a thread
10:48:26nsfit may become rather weird
10:48:47nsfusually even if people do per-thread queues, they do work stealing or something like that
10:48:51nsfbut here you can't
10:49:18nsfwould be interesting to try though
11:03:08*yglukhov joined #nim
11:07:25dom96yglukhov: why not?
11:07:55*Matthias247 joined #nim
11:08:43*yglukhov quit (Remote host closed the connection)
11:09:58*vendethiel quit (Ping timeout: 250 seconds)
11:32:09*HakanD_ joined #nim
11:36:11dom96nvm, saw issue
11:40:39*sepisoad joined #nim
11:48:34*HakanD_ quit (Ping timeout: 260 seconds)
11:58:34*kulelu88 joined #nim
11:58:34*kulelu88 quit (Changing host)
11:58:34*kulelu88 joined #nim
12:27:28*jaco_ joined #nim
12:28:18*fedons joined #nim
12:28:25*Matthias247 quit (Read error: Connection reset by peer)
12:42:05*irrequietus joined #nim
12:44:45*Trustable joined #nim
12:50:35*irrequietus quit ()
12:53:20*fedons_ joined #nim
12:53:43*Matthias247 joined #nim
12:55:49*ray- quit (Changing host)
12:55:49*ray- joined #nim
12:55:58*ray- is now known as \u
12:56:56*fedons quit (Ping timeout: 272 seconds)
13:14:35*Jesin quit (Ping timeout: 264 seconds)
13:37:42*fedons_ quit (Quit: This computer has gone to sleep)
13:52:31*jakesyl joined #nim
13:59:08*jakesyl quit (Ping timeout: 276 seconds)
14:11:10*jaco_ quit (Quit: Leaving)
14:11:41*jaco60 joined #nim
14:30:33*filcuc joined #nim
14:37:56*kulelu88 quit (Ping timeout: 246 seconds)
14:39:40*Sembei joined #nim
14:46:34*fedons_ joined #nim
14:52:43*vendethiel joined #nim
14:54:16*kulelu88 joined #nim
14:58:43*Jesin joined #nim
15:06:05*Jesin quit (Ping timeout: 276 seconds)
15:06:22*fedons_ quit (Read error: Connection reset by peer)
15:15:48*irrequietus joined #nim
15:34:25*boopisaway is now known as boop
15:37:39*boop quit (Quit: WeeChat 1.3)
15:46:25*Jesin joined #nim
16:59:11*sepisoad quit (Ping timeout: 265 seconds)
17:06:07*zepolen joined #nim
17:07:44*vikaton joined #nim
17:10:58*vendethiel- joined #nim
17:12:54*vendethiel quit (Ping timeout: 260 seconds)
17:47:16*yglukhov joined #nim
18:07:32*johnsoft quit (Read error: Connection reset by peer)
18:22:08*jakesyl joined #nim
18:24:57*darkf quit (Quit: Leaving)
18:25:15*Sahnvour joined #nim
18:28:26*zepolen quit (Remote host closed the connection)
18:42:07*vendethiel- quit (Read error: Connection reset by peer)
18:42:17*vendethiel joined #nim
19:03:36*Demon_Fox joined #nim
19:22:38*vendethiel quit (Ping timeout: 272 seconds)
19:32:43*desophos joined #nim
19:34:22*matkuki joined #nim
19:36:11*kulelu88 quit (Ping timeout: 264 seconds)
19:48:08matkukiHappy new year
19:48:27*kulelu88 joined #nim
19:52:07matkukiAnyone interested, a port of a simple 2D physics engine: https://github.com/matkuki/Nim-Impulse-Engine
19:55:42*yglukhov quit (Remote host closed the connection)
19:58:23*kulelu88 quit (Ping timeout: 264 seconds)
20:01:31federico3hi matkuki
20:01:46federico3matkuki: how about a video demo? :)
20:01:47matkukihi
20:04:05matkukifederico3: https://www.youtube.com/watch?v=AzA_owsZU04
20:10:19*kulelu88 joined #nim
20:13:09*yglukhov joined #nim
20:17:26*yglukhov quit (Ping timeout: 246 seconds)
20:17:45*filcuc quit (Quit: Konversation terminated!)
20:18:38federico3Nice
20:50:29*vendethiel joined #nim
21:14:09*Jehan_ joined #nim
21:14:45*yglukhov joined #nim
21:16:24*bigfondue quit (Ping timeout: 245 seconds)
21:19:02*yglukhov quit (Ping timeout: 246 seconds)
21:20:41*bigfondue joined #nim
21:58:16*matkuki quit (Quit: ChatZilla 0.9.92 [Firefox 43.0.3/20151223140742])
22:08:05*vikaton quit (Quit: Connection closed for inactivity)
22:13:48*vendethiel quit (Remote host closed the connection)
22:13:57*vendethiel joined #nim
22:16:12*yglukhov joined #nim
22:16:32*codingcan joined #nim
22:20:38*yglukhov quit (Ping timeout: 246 seconds)
22:28:28*codingcan quit (Remote host closed the connection)
22:32:12*Jehan_ quit (Quit: Leaving)
22:38:35*Sahnvour_ joined #nim
22:43:46*vendethiel quit (Remote host closed the connection)
22:43:57*vendethiel joined #nim
22:48:41*Ven joined #nim
22:49:13*Ven quit (Client Quit)
23:00:18*krux02 joined #nim