<< 23-05-2016 >>

00:18:20*fredrik92 quit (Read error: Connection reset by peer)
01:30:49*sorakun quit (Ping timeout: 244 seconds)
01:38:00*lubos_cz quit (Ping timeout: 260 seconds)
01:47:03*cheatfate quit (Ping timeout: 240 seconds)
01:47:40*libman quit (Ping timeout: 252 seconds)
01:52:22*libman joined #nim
01:56:30*user2 joined #nim
01:58:33*mksandwich quit (Ping timeout: 250 seconds)
02:25:13*zacts joined #nim
02:44:16*cheatfate joined #nim
03:00:39*zxtx quit (Remote host closed the connection)
03:01:22*|2701 quit (Quit: Connection closed for inactivity)
03:02:05*zxtx joined #nim
03:04:59*Demon_Fox joined #nim
03:15:46*libman quit (Remote host closed the connection)
03:18:17*cheatfate quit (Ping timeout: 244 seconds)
03:34:11*cheatfate joined #nim
04:07:53*cheatfate quit (Ping timeout: 244 seconds)
04:28:04*cheatfate joined #nim
05:02:08*cheatfate quit (Ping timeout: 244 seconds)
05:22:11rkeeneHow do I get nim to give me the C source it generated ?
05:29:36*endragor joined #nim
05:31:02fowlrkeene: look in the folder that is created, i think its called nimbuild
05:37:47*cheatfate joined #nim
05:42:47*gokr joined #nim
06:11:53*cheatfate quit (Ping timeout: 244 seconds)
06:13:47*gokr quit (Ping timeout: 250 seconds)
06:16:19*endragor_ joined #nim
06:19:38*endragor quit (Ping timeout: 244 seconds)
06:26:40*fredrik92 joined #nim
06:38:36*endragor_ quit (Remote host closed the connection)
06:43:06*endragor joined #nim
06:43:42*endragor quit (Remote host closed the connection)
06:44:12*endragor joined #nim
07:00:14*endragor quit (Remote host closed the connection)
07:14:01*fastrom joined #nim
07:22:12*lubos_cz joined #nim
07:26:54*gokr joined #nim
07:34:45*endragor joined #nim
07:51:27*bjz joined #nim
07:55:56*rok joined #nim
07:59:42*Trustable joined #nim
08:03:57*themagician quit (Ping timeout: 276 seconds)
08:07:00*filcuc joined #nim
08:08:18*themagician joined #nim
08:12:28*bjz quit (Ping timeout: 260 seconds)
08:15:50*themagician quit (Ping timeout: 276 seconds)
08:21:42*themagician joined #nim
08:22:49*PMunch joined #nim
08:23:17*bjz joined #nim
08:23:49*fastrom quit (Remote host closed the connection)
08:24:16*Arrrr joined #nim
08:24:16*Arrrr quit (Changing host)
08:24:16*Arrrr joined #nim
08:25:36*lubos_cz quit (Ping timeout: 276 seconds)
08:33:00*fastrom joined #nim
08:56:16*rok quit (Ping timeout: 264 seconds)
09:08:40*rok joined #nim
09:08:46*cheatfate joined #nim
09:16:21*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
09:17:41*cheatfate quit (Quit: Leaving)
09:29:47veganskrkeene, the folder is called ``nimcache``. And you can use ``--nimcache:PATH`` switch to change it
09:35:39*gokr quit (Ping timeout: 260 seconds)
09:36:07*themagician quit ()
09:36:56*yglukhov joined #nim
09:37:44yglukhovAraq_: hi, looks like there are some problems with recent gc commits. are you aware of any?
09:38:13Araq_no.
09:38:29*endragor quit (Remote host closed the connection)
09:38:41Araq_I tested it extensively before merging on 3 OSes
09:47:33*gokr joined #nim
09:50:27*kingofoz quit (Ping timeout: 260 seconds)
09:51:01*kingofoz joined #nim
09:54:27*MyMind joined #nim
09:57:49*StarBrilliant quit (Ping timeout: 250 seconds)
09:57:59yglukhovAraq_: so the issue is likely introduced in dcf830bba9f69676c9cb66f5b3654f1817ad68d1. It seems like GC_ref doent keep ref from collection.
09:59:24Araq_ah yeah good catch. that's easy to fix.
09:59:29yglukhovwhat i do is create a ref to MyCtx, GC_ref it, pass it to another thread as pointer, and after some time it gets back to the main thread, and i get SIGSEGV when trying to access a string inside MyCtx
09:59:41yglukhovoh ok cool
10:01:00yglukhovalso there's some problem with gc:v2. it doesnt compile
10:01:58yglukhovAraq_: lib/system/gc_common.nim(26, 14) Error: undeclared field: 'toDispose'
10:02:21*gokr quit (Read error: Connection reset by peer)
10:04:32Araq_so fix it but I never announced v2 anywhere
10:09:02*lubos_cz joined #nim
10:09:29*fastrom quit (Quit: Leaving.)
10:09:53*fastrom joined #nim
10:09:57*fastrom quit (Client Quit)
10:09:58*StarBrilliant joined #nim
10:21:00*gokr joined #nim
10:21:41*lubos_cz quit (Ping timeout: 240 seconds)
10:31:59*nsf quit (Quit: WeeChat 1.4)
10:32:27*endragor joined #nim
10:43:11*endragor quit (Remote host closed the connection)
10:44:56*endragor joined #nim
10:57:11Araq_yglukhov: fixed, but untested, please add a test case
10:57:53*Demon_Fox quit (Quit: Leaving)
11:01:25*rok_ joined #nim
11:04:50*rok quit (Ping timeout: 244 seconds)
11:07:11*endragor quit (Remote host closed the connection)
11:07:31*endragor joined #nim
11:09:10yglukhovAraq_: it works, thanks. will try to come up with a test.
11:09:50*Pisuke joined #nim
11:11:09*MyMind quit (Ping timeout: 276 seconds)
11:13:31*MyMind joined #nim
11:16:21*Pisuke quit (Ping timeout: 276 seconds)
11:20:21*MyMind quit (Ping timeout: 240 seconds)
11:22:15*MyMind joined #nim
11:23:34*endragor quit (Remote host closed the connection)
11:28:39*Pisuke joined #nim
11:29:05*endragor joined #nim
11:31:04*MyMind quit (Ping timeout: 264 seconds)
11:31:26ArrrrI'd like to give nim a string like "Name:{0}, Age{1}" and parse another string, extracting 0 and 1 by using the first string as a template
11:31:38ArrrrDoes nim handle this with any lib?
11:32:52*MyMind joined #nim
11:35:52*Pisuke quit (Ping timeout: 264 seconds)
11:36:45*Pisuke joined #nim
11:37:11*derka joined #nim
11:37:19derkaHello people of Nim
11:38:50*MyMind quit (Ping timeout: 260 seconds)
11:39:54Araq_Arrrr: strscans module, new in devel
11:40:13ArrrrWelcome earthling
11:40:24ArrrrThank you Araq_, i'll have a look at it
11:42:38ArrrrIt does exactly what i needed
11:53:35yglukhovAraq_: i can't reproduce the gc bug easily. the one that reproduced is bueried deep in our project, and i can't do an isolated test out of it.
11:54:15yglukhovi'm trying to alloc an obj in a proc and return it casting to pointer and then fullCollect and cast back, but it doesn't crash.
11:56:09yglukhovit looks like the stack has to be a bit more complex than that to make it happen.
12:02:26*|2701 joined #nim
12:02:45*yglukhov quit (Ping timeout: 260 seconds)
12:21:47*endragor quit (Remote host closed the connection)
12:21:58*endragor joined #nim
12:45:48*lubos_cz joined #nim
12:56:35*derka quit (Quit: derka)
13:01:25*nsf joined #nim
13:02:08nivdom96: *sadface*
13:02:49nivdom96: plz2befixink try await except
13:07:02*derka joined #nim
13:11:29*derka quit (Ping timeout: 260 seconds)
13:15:43arnetheduckAraq_, when an iterator takes an openarray, the magic invoked for length is still mLengthOpenarray even though the actual type is an array (like here: https://github.com/nim-lang/Nim/blob/devel/tests/iter/titervaropenarray.nim)... is that a bug or a feature?
13:18:30dom96niv: which issue #?
13:18:36arnetheduckin the c gen, all the length magics call the same function that looks at the actual type, not what the magic is intended for
13:19:42*derka joined #nim
13:19:45arnetheduckdom96, did you manage to get nlvm to run on osx?
13:19:47*Salewski joined #nim
13:20:20dom96arnetheduck: Haven't tried in a long time.
13:20:21*gokr quit (Ping timeout: 244 seconds)
13:23:32Salewskihttp://nim-lang.org/docs/tut1.html#modules # write(stdout, x(3)) # ambiguous: which `x` is to call? ### So I can write in module C C.x(3) . Problem is when I later rename module names. Is there something like self.x(3) or this.x(3) ?
13:25:44*endragor quit (Remote host closed the connection)
13:29:46nivdom96: not sure if there's an issue open for it. its the good old "Error: 'yield' cannot be used within 'try' in a non-inlined iterator". I tried reworking the websockets package to have a distinct type and i wanted for the server websocket helper to return a new socket or throw an exception otherwise, so i ran into try: sock-await(..); except: and then got reminded that there's still a thing about it
13:30:04*endragor joined #nim
13:34:13dom96niv: well, unfortunately there isn't much I can do.
13:34:43dom96The 'async' macro attempts to transform the code as best as it can, but ultimately the limitation is with Nim's closure iterators which don't support 'yield' in a 'try'
13:35:05dom96The 'async' macro tries to move the 'yield' out of the 'try' but sometimes fails to do so.
13:35:15nivah, right. that sounds complicated
13:35:30dom96The code to do it is already way too complex, and doesn't achieve the right semantics
13:35:46dom96Best way is to check the future's failed state automatically.
13:35:55dom96do something like:
13:35:58dom96yield myFut
13:36:03dom96if myFut.failed: ...
13:36:05Araq_Salewski: there is no such feature, I'm afraid. bbl
13:36:34SalewskiThanks Araq.
13:36:52nivdom96: yeah, the problem is, i want the api for my package to look clean and what you propose works, but isnt really what i think an api consumer should go do. right now i cant really throw exceptions from an async proc unless i expect the user to work around what you say
13:37:53*Salewski quit ()
13:38:32dom96niv: yes, but it's not really a workaround
13:38:35dom96it's simply how it works :P
13:39:00dom96I will likely change the 'async' macro to give a better error when it can't transform a try
13:39:13dom96and suggest doing it like I showed above
13:39:43nivfair enough :) thanks.
13:40:05dom96there is another issue which I need to fix around it though
13:40:12dom96still haven't decided what to do
13:41:20dom96currently you can't use 'await' instead of 'yield' there, because of https://github.com/nim-lang/Nim/issues/4170
14:00:21*boop quit (Ping timeout: 276 seconds)
14:03:04*saml joined #nim
14:03:23*boop joined #nim
14:12:03*lubos_cz quit (Ping timeout: 240 seconds)
14:13:44*BitPuffin|osx joined #nim
14:13:49*gokr joined #nim
14:29:17*themagician joined #nim
14:37:53*Arrrr quit (Ping timeout: 244 seconds)
14:50:51*arnetheduck quit (Ping timeout: 276 seconds)
14:58:40*cheatfate joined #nim
15:03:25*fredrik92 quit (Quit: Shutting down...)
15:09:22*cheatfate quit (Quit: Leaving)
15:13:36*Demon_Fox joined #nim
15:21:23*|2701 quit (Quit: Connection closed for inactivity)
15:25:58*fastrom joined #nim
15:27:09*fastrom1 joined #nim
15:27:10*fastrom quit (Read error: Connection reset by peer)
15:37:32*gokr quit (Ping timeout: 260 seconds)
15:37:46*aaa_ joined #nim
15:41:22*redalastor joined #nim
15:46:29redalastorI'm trying to write a GC-safe function that makes http calls and it's not working because postContent is not GC-safe.
15:46:47redalastorWhat would be the best way to have my HTTP calls in a different thread?
15:49:48Araq_redalastor: postContent should be GC-safe. file a bug report for that
15:50:26redalastorAraq_: Ok, will do. Thanks.
15:52:06*rok_ quit (Ping timeout: 244 seconds)
15:56:21redalastorAraq_: I merged in https://github.com/nim-lang/Nim/pull/4033 to be able to compile code that relies on -d:ssl on Arch Linux (otherwise it's plain 0.13.0), I wonder if that could have an effect.
15:58:08dom96redalastor: you may want to just grab devel. It might just work.
15:58:57redalastorSure, I'll try that.
16:07:20redalastordom96: devel doesn't complain that postContent isn't GC-safe and compiles correctly.
16:07:22redalastorThanks
16:09:41endragorIs there a way to wrap C++ template method that doesn't use its template parameter(s) in the signature? From what I can see in the manual, the pattern language only allows referring to types of arguments or return value.
16:11:33*filcuc quit (Read error: Connection reset by peer)
16:14:09dom96redalastor: awesome :D
16:19:59*endragor_ joined #nim
16:23:16*sora joined #nim
16:24:01*endragor_ quit (Ping timeout: 240 seconds)
16:24:08*endragor quit (Ping timeout: 272 seconds)
17:15:01*mwbrown joined #nim
17:17:07*gokr joined #nim
17:23:06*lubos_cz joined #nim
17:34:17*aaa_ quit (Quit: Page closed)
18:02:10*Matthias247 joined #nim
18:16:23*sora quit (Read error: Connection reset by peer)
18:16:26*fastrom1 quit (Quit: Leaving.)
18:29:26*derka quit (Read error: No route to host)
19:08:27*Pisuke quit (Ping timeout: 276 seconds)
19:15:29flyxI use templates to yield values for an iterator from within the template (which gets called by the iterator). I cannot transform this template into a proc, because a proc cannot yield values. I tried to transform it into an iterator, but this seems to lead to poorer performance of the code.
19:15:41flyxI wonder why this is the case. isn't the iterator, by default, inlined?
19:26:11*gokr quit (Read error: Connection reset by peer)
19:36:12*fastrom joined #nim
19:56:05Araq_flyx: .closure iterators are not inlined and inlining doesn't equal performance
20:14:04*|2701 joined #nim
20:29:55*Ven joined #nim
20:35:29*Pisuke joined #nim
20:40:36*Demon_Fox quit (Remote host closed the connection)
20:40:43*gokr joined #nim
20:52:00*libman joined #nim
20:53:10*fastrom quit (Quit: Leaving.)
21:10:21*yglukhov joined #nim
21:14:00*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:23:48*cheatfate joined #nim
21:33:09Pisukehttp://www.slant.co/topics/5984/~productivity-enhancing-well-designed-and-concise-rather-than-popular-or-time-tested-programming-languag
21:33:11Pisuke:D
21:40:05cheatfatedom96, i have made PR about #4200, but it turned out much larger than I expected, just because macosx and openbsd dont want to support sigtimedwait()...
21:55:39*fastrom joined #nim
21:56:36dom96cheatfate: might be better to just remove that flag.
21:56:54dom96and create an 'asyncproc' module
21:59:37*Pisuke quit (Ping timeout: 260 seconds)
22:01:55*ratiotile joined #nim
22:02:41ratiotilehello, how do I catch ctrl+c in nim?
22:05:51ldleworkera bigger net
22:08:22dom96ldleworker: that's not very helpful
22:09:04dom96ratiotile: http://nim-lang.org/docs/system.html#setControlCHook,_2
22:09:43ldleworkerdom96: a little levity can be
22:09:51ratiotilety
22:10:26*Trustable quit (Remote host closed the connection)
22:17:42ratiotileI tried to make my program exit gracefully on ctrl+c, but why does it still print out a traceback? I call system.quit(0) in the handler.
22:17:58ratiotilehttp://pastebin.com/Xk11qHP8
22:20:45ratiotileok, I fixed it - looks like system.quit should be passed nothing to exit normally
22:24:07*mwbrown quit (Ping timeout: 260 seconds)
22:25:45*fastrom quit (Quit: Leaving.)
22:32:39cheatfatedom96, linux dont have code to watch for process like BSD, there 2 ways - sigtimedwait and more async way is to use signalfd and watch with epoll...
22:46:18*mal`` joined #nim
22:47:37*MightyJoe joined #nim
22:48:45*wuehlmau1 joined #nim
22:49:15*zama_ joined #nim
22:50:38*M-max joined #nim
22:52:01*avsej_ joined #nim
22:52:01*avsej_ quit (Changing host)
22:52:01*avsej_ joined #nim
22:52:33*darius93 joined #nim
22:53:19dom96cheatfate: so there is a way?
22:53:34*user2 quit (*.net *.split)
22:53:34*wuehlmaus quit (*.net *.split)
22:53:35*dariusc93 quit (*.net *.split)
22:53:35*M-max1 quit (*.net *.split)
22:53:35*mal``` quit (*.net *.split)
22:53:35*alexsystemf__ quit (*.net *.split)
22:53:35*cyraxjoe quit (*.net *.split)
22:53:36*zama quit (*.net *.split)
22:53:36*DecoPerson_ quit (*.net *.split)
22:53:36*avsej quit (*.net *.split)
22:53:36*cnu- quit (*.net *.split)
22:53:39*avsej_ is now known as avsej
22:54:35*cnu- joined #nim
22:55:57cheatfatedom96, its a good way, until i complete async library, then we can change it. But i think would be better to build new async osproc and leave old osproc to sync adepts
22:56:44dom96cheatfate: I think you misunderstood me.
22:56:52dom96That is precisely what I suggeste
22:56:55dom96*suggested
22:57:09dom96The 'asyncproc' module would be an async osproc
23:00:35*zama_ quit (Changing host)
23:00:35*zama_ joined #nim
23:00:40cheatfatedom96, yeah i will try to adopt it after selectors :)
23:00:43*zama_ is now known as zama
23:01:29*Matthias247 quit (Read error: Connection reset by peer)
23:01:31*sorakun joined #nim
23:04:21*bjz joined #nim
23:18:40*Jesin quit (Quit: Leaving)
23:20:31*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:25:22*Learath2 quit (Ping timeout: 260 seconds)
23:28:02*yglukhov quit (Remote host closed the connection)
23:30:21*Learath2 joined #nim
23:34:38*saml_ joined #nim
23:56:28*dhk joined #nim