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:42 | nsf | the fact that openArray is only allowed as an argument is a very bad idea |
07:11:26 | nsf | it'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:45 | nsf | the best design I know of when it comes to arrays handling is in Go |
07:12:11 | nsf | in general one of the interesting questions to answer about garbage collected languages is interior pointers |
07:12:26 | nsf | which 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:29 | nsf | http://pastebin.com/LnMg5M22 |
08:10:58 | nsf | did a coroutine scheduler prototype, it's shitty (the queue isn't FIFO, and single threaded), but works :) interesting.. |
08:12:17 | nsf | shows the idea how waiting is implemented |
08:13:47 | nsf | waitForAll ignores the results though |
08:17:20 | * | bbl_ joined #nim |
08:28:27 | yglukhov | dom96: funny thing. i cannot import into a nimble file %) |
08:44:15 | Araq_ | nsf: exactly. Interior pointers are very bad for GCs. |
08:45:07 | nsf | Araq_: Go supports them and that creates competition to other GCed languages, it has a very fancy low latency GC as well |
08:45:41 | Araq_ | for some definition of "fancy low latency GC" that is a joke... |
08:45:48 | nsf | compiling nim to Go, hm :) |
08:46:09 | nsf | it's not, the GC is really good |
08:46:20 | Araq_ | it's not. |
08:46:39 | nsf | if you think Go's GC is the one nim uses, that's not that GC |
08:46:55 | nsf | gccgo's GC is pretty bad, that's true |
08:47:31 | nsf | https://github.com/golang/go/blob/master/src/runtime/mgc.go |
08:47:34 | nsf | I'm talking about this one |
08:51:28 | nsf | https://blog.golang.org/go15gc |
08:51:34 | nsf | described well here, if you're interested |
08:51:42 | nsf | and in the comments of the file above |
08:52:08 | Araq_ | Go uses an incremental mark and sweep GC. |
08:52:51 | Araq_ | that means that in can only free objects after a full GC cycle. |
08:53:04 | nsf | that is true |
08:53:36 | Araq_ | and interior pointers really restrict of what GCs are allowed |
08:53:48 | nsf | but it doesn't stop the mutators (well, almost), that's why I said it's low latency |
08:54:09 | Araq_ | it's definitely cool and worth copying for Nim even |
08:54:33 | Araq_ | but that doesn't mean interior pointers is a good choice. |
08:56:16 | nsf | maybe you're right, I actually don't have much experience working without them, I'm mostly familiar with C++ and Go |
08:56:33 | nsf | just a bit of C# |
08:57:06 | nsf | maybe 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:09 | nsf | I think in nim you can |
08:57:44 | nsf | hm, is there a way to bypass {.gcsafe.} requirement on createThread? |
08:58:47 | Araq_ | yeah, you can cast proc types to a proc type that has the effects you claim |
08:59:15 | nsf | ok, I'll try to implement the global queue properly with locks in a moment, just want to try it out :) |
08:59:37 | nsf | I mean I do use locks, just not the pragma thing |
09:01:34 | nsf | http://pastebin.com/s6DbMz8V |
09:01:48 | nsf | coroutines and a simple scheduler multiplexed onto multiple threads |
09:02:28 | * | sepisoad joined #nim |
09:03:44 | nsf | will crash if used with refcounting for obvious reasons |
09:04:03 | nsf | well, it crashes sometimes, data races and all |
09:04:34 | nsf | but basically that's the model I want to implement :) |
09:05:44 | nsf | var workers: array[0..0, Thread[int]] |
09:06:01 | nsf | 0..0 :) |
09:06:16 | nsf | funny syntax, I'd say |
09:07:00 | Araq_ | array[1, ...] is also possible |
09:07:19 | nsf | oh, didn't know, thanks |
09:07:20 | Araq_ | are you sure you want a queue and not a channel? |
09:07:33 | nsf | uhm, yes |
09:07:43 | nsf | channel is a queue, isn't it |
09:08:02 | Araq_ | " |
09:08:05 | nsf | but nim's channel forces copying as far as I know, at least doc says it does a deep copy |
09:08:19 | Araq_ | // Because of benign races during marking, this number may not |
09:08:19 | Araq_ | // be the exact number of marked bytes, but it should be very |
09:08:19 | Araq_ | // close. |
09:08:28 | nsf | :) |
09:08:39 | Araq_ | -.- yay "benign" races in your GC technology. |
09:08:47 | Araq_ | that's reassuring. |
09:09:08 | nsf | it will power half of the internet soon :D |
09:09:23 | Araq_ | (This is why multithreaded GCs are so ugly...) |
09:09:36 | nsf | yes, I agree |
09:09:55 | nsf | but what you can you do about it.. wait for hardware which is GC friendly? :) |
09:10:12 | nsf | s/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:50 | Araq_ | nsf: or change the approach and do thread local GCs :P |
10:31:32 | nsf | yes, but at the moment I think it's very hard to do so for my model |
10:32:16 | * | thotypous joined #nim |
10:32:57 | nsf | I guess I could try to do more manual memory management when it comes to coroutines |
10:33:21 | nsf | but I really would like to keep an ability to migrate coroutines from one thread to another |
10:33:31 | nsf | which means doing that for an iterator basically |
10:33:41 | nsf | and that becomes tricky |
10:33:52 | nsf | I don't know what's in iterator body, could be GCed vars or not |
10:37:12 | nsf | I'll try though, but hard to say |
10:37:52 | nsf | the biggest problem is things like semaphores |
10:38:06 | nsf | which create little local queues and manage coroutines on their own |
10:38:13 | nsf | and that could be coroutines from different threads |
10:38:38 | nsf | if 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:48 | nsf | which won't be pretty |
10:41:38 | * | vendethiel joined #nim |
10:47:54 | nsf | and the scary part is load balancing |
10:48:10 | nsf | with a single queue it's sort of implicit |
10:48:18 | nsf | but if you stick a coroutine to a thread |
10:48:26 | nsf | it may become rather weird |
10:48:47 | nsf | usually even if people do per-thread queues, they do work stealing or something like that |
10:48:51 | nsf | but here you can't |
10:49:18 | nsf | would be interesting to try though |
11:03:08 | * | yglukhov joined #nim |
11:07:25 | dom96 | yglukhov: 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:11 | dom96 | nvm, 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:08 | matkuki | Happy new year |
19:48:27 | * | kulelu88 joined #nim |
19:52:07 | matkuki | Anyone 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:31 | federico3 | hi matkuki |
20:01:46 | federico3 | matkuki: how about a video demo? :) |
20:01:47 | matkuki | hi |
20:04:05 | matkuki | federico3: 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:38 | federico3 | Nice |
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 |