<< 18-04-2016 >>

01:07:08*vendethiel joined #nim
01:16:32*vendethiel quit (Ping timeout: 260 seconds)
01:41:37*ephja quit (Ping timeout: 260 seconds)
01:57:52*space-wizard joined #nim
02:14:02*krux02 quit (Quit: Verlassend)
02:23:43*nsf quit (Quit: WeeChat 1.4)
02:36:32*vendethiel joined #nim
02:42:19*Jesin joined #nim
02:52:21*ludocode quit (Remote host closed the connection)
02:53:06*ludocode joined #nim
02:57:46*vendethiel quit (Ping timeout: 250 seconds)
03:14:37*darkf_ joined #nim
03:15:39*darkf quit (Ping timeout: 276 seconds)
03:30:42*SirCmpwn quit (Ping timeout: 260 seconds)
03:31:14*veganskaway is now known as vegansk
03:32:05*SirCmpwn joined #nim
03:50:08*gmpreussner quit (Read error: Connection reset by peer)
03:51:20*darkf_ is now known as darkf
03:53:07*gmpreussner joined #nim
05:01:16*sillytime is now known as nchambers
05:02:35*space-wizard quit (Quit: My Mac has gone to sleep. ZZZzzz…)
05:24:10*space-wizard joined #nim
05:43:50*space-wizard quit (Quit: My Mac has gone to sleep. ZZZzzz…)
05:56:49*McSpiros joined #nim
06:02:54*vegansk left #nim ("Ухожу я от вас (xchat 2.4.5 или старше)")
06:03:21*vegansk joined #nim
06:19:16*desophos quit (Read error: Connection reset by peer)
06:49:22*Arrrr joined #nim
06:54:07*yglukhov joined #nim
06:54:30*Demon_Fox quit (Quit: Leaving)
07:38:48*McSpiros quit (Ping timeout: 250 seconds)
07:52:25*dorei joined #nim
07:56:48*gokr joined #nim
08:02:55*tankfeeder joined #nim
08:07:37*coffeepot joined #nim
09:25:23*jeffc joined #nim
09:28:38*jeffc_ quit (Ping timeout: 250 seconds)
09:29:51*jeffc quit (Ping timeout: 264 seconds)
09:31:04*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
09:58:11*yglukhov_ joined #nim
10:00:57*yglukhov quit (Ping timeout: 260 seconds)
10:03:36*nsf joined #nim
10:22:02*yglukhov_ quit (Remote host closed the connection)
10:22:36*yglukhov joined #nim
10:49:21*elrood joined #nim
11:01:51*zielmicha_ joined #nim
11:02:23*apotheon_ joined #nim
11:02:29*CARAM___ joined #nim
11:02:54*NhanH_ joined #nim
11:03:49*jck_ joined #nim
11:04:46*askatasuna_ joined #nim
11:05:24*lyro` joined #nim
11:05:33*maxgonzih joined #nim
11:05:42*zama_ joined #nim
11:05:56*CARAM__ quit (Ping timeout: 260 seconds)
11:05:56*askatasuna quit (Ping timeout: 260 seconds)
11:05:56*mrkishi quit (Ping timeout: 260 seconds)
11:05:57*themagician quit (Ping timeout: 260 seconds)
11:05:58*Gonzih quit (Ping timeout: 260 seconds)
11:05:58*zielmicha quit (Ping timeout: 260 seconds)
11:05:59*cnu- quit (Ping timeout: 260 seconds)
11:05:59*NhanH quit (Ping timeout: 260 seconds)
11:05:59*apotheon quit (Ping timeout: 260 seconds)
11:06:00*lyro quit (Ping timeout: 260 seconds)
11:06:01*zama quit (Ping timeout: 260 seconds)
11:06:01*\u quit (Ping timeout: 260 seconds)
11:06:01*niv quit (Ping timeout: 260 seconds)
11:06:01*allan0 quit (Ping timeout: 260 seconds)
11:06:02*jck quit (Read error: Connection reset by peer)
11:06:27*zielmicha_ is now known as zielmicha
11:06:37*ray joined #nim
11:07:00*ray is now known as Guest25624
11:07:06*themagician joined #nim
11:08:44*allan0 joined #nim
11:09:31*cnu- joined #nim
11:10:25*niv joined #nim
11:10:32*CARAM___ is now known as CARAM__
11:10:40*zama_ quit (Changing host)
11:10:40*zama_ joined #nim
11:10:50*zama_ is now known as zama
11:10:53*NhanH_ is now known as NhanH
11:11:54*mrkishi joined #nim
11:24:32wuehlmauswhen was nimrod renamed nim, 2014?
11:30:57wuehlmausnot even the nim wikipedia article in english says so.
11:39:06tankfeederwhy you care ?
11:39:51*ephja joined #nim
11:40:43dom96wuehlmaus: http://nim-lang.org/news.html#Z2014-12-29-version-0-10-2-released
11:40:51wuehlmausi always like history, also i am doing a company internal blog about nim :)
11:40:59dom96so end of 2014
11:41:24wuehlmausdom96: thanks , so i was right.
11:42:02tankfeederwuehlmaus, :) ok
11:42:53wuehlmausall my colleagues are plagued with my enthusiasm about nim :)
11:43:05dom96That's good :)
11:55:13*BrotherLy joined #nim
11:57:54*BrotherLy_ quit (Ping timeout: 244 seconds)
12:05:44*BitPuffin joined #nim
12:10:15*Demon_Fox joined #nim
12:15:03*BitPuffin quit (Remote host closed the connection)
12:17:17*Guest25624 quit (Changing host)
12:17:17*Guest25624 joined #nim
12:17:19*Guest25624 is now known as \u
12:20:04*Arrrr_ joined #nim
12:23:17*Arrrr quit (Ping timeout: 260 seconds)
12:25:21*fredrik92 joined #nim
12:32:15*yglukhov_ joined #nim
12:34:55*yglukhov quit (Ping timeout: 250 seconds)
12:37:51*arnetheduck quit (Remote host closed the connection)
12:40:30*avsej quit (Ping timeout: 276 seconds)
12:43:09*avsej joined #nim
12:43:09*avsej quit (Changing host)
12:43:09*avsej joined #nim
12:48:34*arnetheduck joined #nim
13:09:18*vendethiel joined #nim
13:12:03*arnetheduck quit (Ping timeout: 246 seconds)
13:12:49*arnetheduck joined #nim
13:16:51*Arrrr_ quit (Quit: WeeChat 1.4)
13:17:07*Arrrr joined #nim
13:32:36*saml joined #nim
13:35:06*dariusc93 quit (Ping timeout: 276 seconds)
13:37:25*arnetheduck quit (Remote host closed the connection)
13:37:55*vendethiel quit (Ping timeout: 252 seconds)
13:38:23*darius93 joined #nim
13:39:18*tankfeeder left #nim ("Leaving")
13:39:20*arnetheduck joined #nim
14:06:12*yglukhov_ quit (Remote host closed the connection)
14:06:47*yglukhov joined #nim
14:07:25*fredrik92 quit (Read error: Connection reset by peer)
14:17:06*enthus1ast joined #nim
14:32:23*vendethiel joined #nim
14:32:39*apotheon_ is now known as apotheon
14:33:01*apotheon quit (Changing host)
14:33:01*apotheon joined #nim
14:37:07wuehlmausi have one question: what was the reason why it's not possible to do ``var e = echo'' ?
14:42:42wuehlmausno "aliasing" of system functions
14:46:39*dorei quit (Quit: Page closed)
14:47:05flyxI would guess because they're magic
14:50:52*heinrich5991 quit (Ping timeout: 260 seconds)
14:56:01*heinrich5991 joined #nim
15:01:56ArrrrIt's a kind of magic
15:13:30*heinrich5991 quit (Ping timeout: 246 seconds)
15:14:59Araq_wuehlmaus: most builtin operations are not represented as functions and have no function address that could be used
15:15:35wuehlmausthanks for all the answers!
15:15:44*vendethiel quit (Ping timeout: 250 seconds)
15:16:51reactormonkwuehlmaus, you could wrap it.
15:19:09Araq_see https://github.com/Araq/NimCon2015/blob/master/nimcon.rst for more information about Nim's history
15:23:22*heinrich5991 joined #nim
15:27:49*arnetheduck quit (Ping timeout: 250 seconds)
15:30:28*allan0 quit (Ping timeout: 250 seconds)
15:36:00*allan0 joined #nim
15:40:23*pregressive joined #nim
15:54:11wuehlmausreactormonk: could you show me what you mean?
15:54:52wuehlmausor point me to stuff on webpages that show it
15:55:52wuehlmausor did you mean using a template?
15:57:20ephjait could be wrapped in another proc
15:57:41ephjaa generic helper could also be created
15:58:12nivAraq_: cool thing reading about the history. i spotted something though: "set of chars", and i know sets are stored as bitmasks. is it possible to get the backing bitmask for a set? is it possible to specify the bit order? that would make writing/reading bitmask integers much cleaner than faffing with bit operators
16:00:29*darkf quit (Quit: Leaving)
16:09:41*RR_ joined #nim
16:11:12*RR_ quit (Client Quit)
16:14:10*yglukhov_ joined #nim
16:16:54*fredrik92 joined #nim
16:17:36*yglukhov quit (Ping timeout: 276 seconds)
16:24:37*Demon_Fox quit (Quit: Leaving)
16:26:05*elrood quit (Quit: Leaving)
16:27:56*BitPuffin joined #nim
16:29:37dom96This is spam right? http://forum.nim-lang.org/t/671/9#13569
16:31:00*yglukhov_ quit (Remote host closed the connection)
16:32:03*yglukhov joined #nim
16:32:44*yglukhov quit (Remote host closed the connection)
16:34:30reactormonkyup
16:34:40*space-wizard joined #nim
16:35:15*elrood joined #nim
16:35:17*space-wizard quit (Max SendQ exceeded)
16:35:57*space-wizard joined #nim
16:40:02*ozra joined #nim
16:48:20Araq_niv: you can use the enum order to influence the bit mask but apart from that there are no means available
16:53:35*endragor joined #nim
17:01:39*brson joined #nim
17:05:37*vendethiel joined #nim
17:12:51*enthus1ast quit (Ping timeout: 276 seconds)
17:15:44cheatfateIs it possible to watch nim file after all macros/templates applied to it
17:16:17*zahary joined #nim
17:20:03*yglukhov joined #nim
17:24:39*yglukhov quit (Ping timeout: 260 seconds)
17:26:13reactormonkcheatfate, there's dumpTree
17:26:25reactormonkoh wait, that's before.
17:26:58cheatfatereactormonk, i just want to watch my nim file after {.async.} and all other async staff applied to file
17:27:49dom96You can see what the result of a specific async invokation is by uncommenting this: https://github.com/nim-lang/Nim/blob/devel/lib/pure/asyncdispatch.nim#L1581
17:30:03cheatfatedom96, it looks a little bit weird :)
17:30:40dom96the two lines below might be better :)
17:31:16dom96The venue that the World Wide Haxe conference is taking place in looks awesome http://wwx.silexlabs.org/2016/
17:34:27ArrrrOne day you may lead one of those conferences
17:36:22*yglukhov joined #nim
17:42:55cheatfatedom96, my implementation for some reason don't give any great speed improvements
17:44:02cheatfatedom96, but i have made tests only on windows
17:44:12dom96Arrrr: I hope that I will :)
17:44:21dom96cheatfate: what did you change?
17:44:35*endragor quit (Ping timeout: 244 seconds)
17:46:50cheatfatedom96, i understand that i can't beat your windows async implementation, but i dont want to test unix implementation because this stack overflow bug makes me crazy
17:47:49cheatfatedom96, i think there big bug hiding in current asyncdispatch "macro magic"
17:49:16dom96it's possible, take a look at `createCb` (or similar name), it might be where the bug is hiding
17:49:22dom96since it calls things recursively
17:50:03*lawnchair_ joined #nim
17:50:08dom96you could also try replacing the async procs with whatever the async macro generates
17:50:30dom96but that may take a lot of time to find
17:50:43dom96hello lawnchair_
17:51:17cheatfatedom96, i'm just tired of this bug
17:53:14cheatfatedom96, i think in big complex projects which using async proc -> async proc -> async proc and so on it can causes stack overflow even on unix
17:53:15dom96cheatfate: completely understandable, don't feel that you must fix it.
17:54:05dom96hrm, I just got an idea
17:54:32dom96You're seeing lots of calls to this proc right? https://github.com/nim-lang/Nim/blob/devel/lib/pure/asyncdispatch.nim#L1254
17:54:33cheatfatedom96, its my holy problem... i have started to learn/using nim only because i need async for my projects
17:54:54dom96have you tried uncommenting that {.push....} pragma?
17:55:34dom96cheatfate: That's the best way to learn and help Nim :)
17:56:12dom96That's why I wrote much of what I wrote in Nim.
17:56:23dom96A project depended on it :)
17:57:12cheatfatehttps://github.com/nim-lang/Nim/blob/devel/lib/pure/asyncdispatch.nim#L1262
17:57:12*yglukhov quit (Read error: Connection reset by peer)
17:57:18cheatfateand https://github.com/nim-lang/Nim/blob/devel/lib/pure/asyncdispatch.nim#L260
17:58:53*yglukhov joined #nim
17:59:10cheatfatedom96, but uncommenting push pragma is just to hide problem not to solve
17:59:23dom96I don't think so
17:59:30dom96The stack traces are just noise anyway
18:00:12cheatfatedom96, it makes more than 2000 deep recursion... on heavy load it can get 10000 or even 100_000
18:00:24dom96How else should it be implemented?
18:00:48dom96although I'm not sure why it would ever have such a deep recursion
18:01:52dom96oh wait
18:02:03dom96I think I see.
18:02:10dom96The async procedure has a while loop
18:02:22dom96so it calls the 'await' thousands of times, causing such a deep recursion
18:03:09dom96because after each 'await' completes, this `cb` proc is called
18:04:10dom96and because it sets itself as the next callback, it essentially calls itself
18:04:51*boopisaway is now known as boop
18:04:57cheatfateand tell me you can solve it :)
18:05:18dom96I still think that uncommenting that pragma is the solution
18:05:27dom96I can't think of any other way to implement this
18:06:37cheatfatei think it was commented to do recursion check
18:07:09dom96IIRC I added it to try and get nicer stack traces, but it didn't work so I commented it out
18:07:22*irrequietus joined #nim
18:07:30dom96I added it commented out already in this commit https://github.com/nim-lang/Nim/commit/f830aed869235518451c44659d47ca07b142f1aa
18:09:45cheatfatedom96, is it possible to queue callbacks in some way? like cpython do it?
18:12:00dom96how does cpython do it?
18:21:55cheatfatedom96, i think they using some kind of queue
18:25:26*lawnchair_ quit (Quit: Page closed)
18:26:45cheatfatei'm currently investigating windows implementation because unix implementation is equal
18:26:49cheatfatelooks like equal
18:27:47*ephja quit (Quit: WeeChat 1.4)
18:33:18cheatfatedom96, https://github.com/python/cpython/blob/9a65678ab1c2f332118dae91d2cd521ed1cf8906/Modules/overlapped.c, try to watch this implemenation, they all try to omit "immediately completed" operations
18:33:54*Jesin quit (Quit: Leaving)
18:34:04*alexsystemf__ joined #nim
18:38:37*Jesin joined #nim
18:38:51*zaquest quit (Ping timeout: 264 seconds)
18:40:18dom96cheatfate: I'm not sure the "immediately completed" handling has much to do with this
18:40:35dom96it's simply immediately completed most of the time because of how fast the data is coming in
18:41:24cheatfateour problem is started from handling this operations... we call future.complete() which causes this recursion
18:43:34*zaquest joined #nim
18:43:48dom96cheatfate: yes, but future.complete() will be called anyway
18:43:54dom96when the operation completes
18:44:19dom96if the operation completes immediately then the results are simply faster
18:45:54cheatfateok let me describe situation
18:46:29cheatfatelets assume that we are receiving many many connections (under heavy load)
18:49:02cheatfatewait i'm gist it
18:54:45cheatfatedom96, ok i think, for some reason we are calling "poll()" while we are in context of "complete" callback()
18:54:54cheatfatethats only reason we get such big recursion
18:55:12dom96Interesting. How did you figure that out?
18:55:18*Ven joined #nim
18:56:29*Ven quit (Client Quit)
18:57:47dom96I was actually thinking that I should detect that and raise an error for that case.
18:57:48cheatfatedom96, i feel it :) i just want to expand this {.async.} macro to watch my nim file clear
18:58:11dom96So if this turns out to be the problem then that should definitely be done
18:58:19dom96Although I'm not sure where the call to it could be coming from
18:58:27cheatfateYou know windows vista and later has function GetQueuedCompletionStatusEx
18:58:34dom96Maybe you could check by adding a writeStackTrace() into poll?
18:59:34cheatfateWhen i have implement it to use in pool i have found interesting thing... it always return exactly 1 completed operation
19:01:24cheatfateeven under heavy load this function returns only 1 completed operation... and this is very strange
19:08:06*BitPuffin quit (Read error: Connection reset by peer)
19:09:40*enthus1ast joined #nim
19:11:36cheatfatedom96, when i added writeStackTrace() i have found then it never returns to poll() again it just run until stack overflow happens
19:12:06dom96yeah, because it all happens immediately
19:13:01dom96I guess normally the poll() breaks it up so that a stackoverflow doesn't happen
19:14:07*regtools_ quit (Quit: leaving)
19:20:03*vendethiel quit (Ping timeout: 240 seconds)
19:23:10cheatfatedom96, that's why i propose to remove "completed immediately" staff
19:24:22cheatfatedom96, or enqueue callbacks to call it in context of "poll()"
19:25:11dom96but that's less efficient
19:25:18cheatfatedom96, and you know that even if operation completed immediately, iocp will be notified
19:25:26*vendethiel joined #nim
19:26:29dom96Are you sure about that?
19:26:35cheatfatedom96, yes completely
19:26:55cheatfatelook this function was introduced in vista https://msdn.microsoft.com/en-us/library/windows/desktop/aa365538(v=vs.85).aspx
19:27:13cheatfatelook "FILE_SKIP_COMPLETION_PORT_ON_SUCCESS" flag
19:28:55dom96Alright. Can you measure how much the speed differs when you remove the "completed immediately" stuff?
19:29:08dom96vs. when it's there in -d:release mode?
19:29:55*Arrrr quit (Quit: WeeChat 1.4)
19:30:01cheatfatedom96, i dont have good tool for doing this on windows
19:30:33cheatfatemy virtual linux -> wrk to host windows is not very good measure tool :(
19:32:34*def- quit (Ping timeout: 244 seconds)
19:33:31dom96Yeah, I found most tools that I tried kinda unreliable.
19:33:42dom96But maybe you could try weighttpd?
19:37:39cheatfatedom96, weighttpd uses libevent which uses select() not iocp
19:38:02dom96maybe it's time to write a good http benchmarking tool for Windows? ;)
19:39:37cheatfatedom96, i have started :) but we dont have multithreading async :)
19:39:57cheatfateso its too slow to be called "benchmarking" :)
19:40:04dom96maybe you could get away with just launching multiple processes?
19:40:36cheatfateand nim has some kind of IPC?
19:40:40cheatfatei dont think so :)
19:44:47cheatfateok i will test with old staff "guest Linux wrk -> host Windows asynchttpserver"
19:48:24elroodparaphrasing a quote, you keep using this word staff, i don't think it means what you think it means
19:50:58*jeffc joined #nim
19:50:58*yglukhov quit (Remote host closed the connection)
19:52:31*def- joined #nim
19:53:19*jeffc quit (Remote host closed the connection)
19:56:13*yglukhov joined #nim
19:57:24*jeffc joined #nim
20:01:24*jeffc quit (Remote host closed the connection)
20:02:08*jeffc joined #nim
20:03:00*Trustable joined #nim
20:04:09cheatfatedom96, https://gist.github.com/cheatfate/5be2811217c2c3b8761c6df49e1b3252
20:05:17dom96so no difference. Okay.
20:05:25dom96Make a PR :)
20:05:51dom96just make sure to add a comment explaining the removal with a link to the issue
20:09:28*jeffc quit (Remote host closed the connection)
20:09:33*jonafato joined #nim
20:11:15cheatfatedom96, i will not patch devel in such way
20:12:26cheatfatedom96, i will present new asyncdispatch.nim when i finish epoll and kqueue staff
20:21:01*krux02 joined #nim
20:31:12*krux02 quit (Ping timeout: 250 seconds)
20:33:44*krux02 joined #nim
20:35:24*Demon_Fox joined #nim
20:38:32*themagician quit (Ping timeout: 260 seconds)
20:43:54*themagician joined #nim
20:57:17*rok joined #nim
20:57:19*boop is now known as boopisaway
21:09:17*alexsystemf__ quit (Quit: Connection closed for inactivity)
21:22:31*krux02 quit (Remote host closed the connection)
21:33:10*vendethiel quit (Ping timeout: 250 seconds)
21:35:39*andi___ joined #nim
21:45:15*yglukhov quit (Remote host closed the connection)
21:46:39*lokien quit (Ping timeout: 264 seconds)
21:57:19*rok quit (Quit: rok)
22:05:15*vendethiel joined #nim
22:09:38*Trustable quit (Remote host closed the connection)
22:13:42cheatfatedom96, i think we can made Windows nim stress test tool easy, because there no table usage
22:14:07cheatfatedom96, we only need to make PCustomOverlapped switch from "ref" to "ptr"
22:14:47cheatfatedom96, there also some work needed on getting number of cpu cores to setup iocp port properly
22:20:00*Demon_Fox quit (Quit: Leaving)
22:24:09*BrotherLy quit (Quit: Leaving)
22:25:22*vendethiel quit (Ping timeout: 252 seconds)
22:27:22*andi___ quit (Quit: ChatZilla 0.9.92 [Firefox 45.0.2/20160407164938])
22:30:23*desophos joined #nim
22:30:23cheatfatedom96, are you still here?
22:33:47*cheatfate_ joined #nim
22:34:33*cheatfate quit (Read error: Connection reset by peer)
22:35:39*cheatfate_ is now known as cheatfate
22:37:19*elrood quit (Quit: Leaving)
22:49:49*lokien joined #nim
22:59:22*fredrik92 quit (Read error: Connection reset by peer)
23:23:46*kulelu88 joined #nim
23:24:14*irrequietus quit ()
23:32:05*jeffc joined #nim
23:34:32*jeffc quit (Remote host closed the connection)
23:48:02*darkf joined #nim
23:51:59*space-wi_ joined #nim
23:54:33*space-wizard quit (Ping timeout: 240 seconds)
23:58:15*zahary quit (Read error: Connection reset by peer)
23:58:22*zahary joined #nim