<< 20-03-2015 >>

00:05:26*girvo quit (Quit: leaving)
00:07:15TEttingerwoah, what is nim-vec?
00:07:54EXetoCwhere?
00:08:23def-TEttinger: the vectorized implementation of the nbody program tstm posted before
00:08:42TEttingerah ok
00:08:52TEttingernot a different nim compiler
00:08:59TEttingerwow
00:10:53EXetoCit's a common prefix for bindings
00:12:17EXetoCbut I guess it's a port in this cas
00:12:19EXetoCe
00:12:39CryptoToadGuys my hooks are working as they should now
00:12:42CryptoToadthanks to everyone for your help
00:13:02CryptoToaddef- k1i araq
00:19:22def-Great, CryptoToad
00:20:12tstmdef-: Of course real men would implement such vector calculus with SoA instead of AoS that I used.. but I'm not quite sure how I would do that in a neat fashion.
00:21:12tstmYou'd have to collect 4 vectors at once and then process the x of all 4 and then the y and so on.
00:24:33*fizzbooz1 joined #nim
00:37:17*jholland quit (Quit: Connection closed for inactivity)
00:41:59*zipR4ND joined #nim
00:46:07*MyMind quit (Ping timeout: 252 seconds)
00:50:03*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
00:53:52*CryptoToad quit (Quit: Leaving)
00:54:04*davidhq joined #nim
00:56:23*fluoride quit (Ping timeout: 252 seconds)
00:56:26*MyMind joined #nim
00:56:40*davidhq quit (Client Quit)
00:57:03*bcinman quit (Read error: Connection reset by peer)
00:57:09*bcinman_ joined #nim
01:02:29*FusionGaming joined #nim
01:06:35*MyMind quit (Ping timeout: 246 seconds)
01:14:51*saml_ joined #nim
01:15:48*reem quit (Remote host closed the connection)
01:16:30*reem joined #nim
01:28:43*pregressive joined #nim
01:32:19*brson joined #nim
01:34:22*pregress_ joined #nim
01:35:22*reem quit (Remote host closed the connection)
01:36:08*pregressive quit (Ping timeout: 252 seconds)
01:37:38*reem joined #nim
01:48:41*bcinman_ quit (Read error: Connection reset by peer)
01:49:07*bcinman joined #nim
01:49:41*zipR4ND quit (Ping timeout: 265 seconds)
01:50:10*darkf joined #nim
02:02:01*fizzbooz1 quit (Ping timeout: 252 seconds)
02:23:32*reem quit (Remote host closed the connection)
02:30:47*pregress_ quit (Remote host closed the connection)
02:34:10*Woflox_ joined #nim
02:37:03*reem joined #nim
02:37:57*Woflox quit (Ping timeout: 252 seconds)
02:40:31*Woflox_ quit (Ping timeout: 252 seconds)
02:46:15*adu joined #nim
02:46:22aduhi
02:50:33*MyMind joined #nim
02:52:47tstmI'm reading into more SIMD
02:53:13tstmWith changing the data structures, there should still be massive speedups to be had.. but it does get a touch ugly. :P
03:05:24*reem quit (Remote host closed the connection)
03:22:07*reem joined #nim
03:27:04*Woflox joined #nim
03:27:16*pregressive joined #nim
03:38:49*wb quit (Ping timeout: 252 seconds)
03:44:19*bcinman_ joined #nim
03:45:29*bcinman quit (Ping timeout: 246 seconds)
03:45:50*Maxdamantus quit (Ping timeout: 246 seconds)
03:54:30*kjo quit (Quit: Leaving.)
03:58:50*bcinman_ quit (Ping timeout: 272 seconds)
04:00:34*bcinman joined #nim
04:06:09*reem quit (Remote host closed the connection)
04:08:00*reem joined #nim
04:20:46*pregressive quit (Remote host closed the connection)
04:24:41*reem quit (Remote host closed the connection)
04:31:14adutstm: I know a bit about simd
04:37:05*reem joined #nim
04:40:03*reem quit (Remote host closed the connection)
04:45:25*reem joined #nim
04:55:19*saml_ quit (Quit: Leaving)
04:56:20*brson quit (Ping timeout: 252 seconds)
05:00:05*reem quit (Remote host closed the connection)
05:01:00*reem joined #nim
05:09:22*Senketsu quit (Read error: Connection reset by peer)
05:11:44*Senketsu joined #nim
05:13:34*mwbrown quit (Ping timeout: 252 seconds)
05:18:38*Woflox quit (Ping timeout: 272 seconds)
05:26:33*adu quit (Quit: adu)
05:49:25*fizzbooze quit (Ping timeout: 265 seconds)
05:57:38*dtscode quit (Ping timeout: 265 seconds)
06:33:24*epichero quit (Remote host closed the connection)
06:33:25*gsingh93 quit (Ping timeout: 255 seconds)
07:32:15*BlaXpirit joined #nim
07:34:01*dtscode joined #nim
07:38:29*nande quit (Remote host closed the connection)
07:49:08*Ven joined #nim
08:02:07*Ven quit (Ping timeout: 264 seconds)
08:18:15*Ven joined #nim
08:46:32*allan0 joined #nim
08:57:55*fluoride joined #nim
08:58:38*bcinman quit (Quit: My Mac has gone to sleep. ZZZzzz…)
09:09:10*dtscode quit (Ping timeout: 272 seconds)
09:24:31*xificurC joined #nim
09:28:55*fluoride quit (Ping timeout: 255 seconds)
09:31:24*BlaXpirit_ joined #nim
09:32:06*Aszarsha joined #nim
09:34:16*BlaXpirit quit (Ping timeout: 252 seconds)
09:53:13*BlaXpirit_ quit (Quit: Quit Konversation)
09:59:44*reem quit (Remote host closed the connection)
10:03:00*Aszarsha quit (Ping timeout: 272 seconds)
10:24:52*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:26:27*matkuki joined #nim
10:27:33matkukiIs there a quick way to iterate a sequence in reverse? I couldn't find it in the docs.
10:33:01tstmmatkuki: for i in 10..1
10:33:12tstmmatkuki: http://nim-lang.org/tut1.html#for-statement
10:33:54matkukitstm: I didn't think about the manual, thanks!
10:35:43matkukitstm: But 'for i in 10..1' doesn't work with Nim 0.10.3?
10:37:18flaviu.eval for i in 10..1: stdout.write($i)
10:37:21Mimbusflaviu: <no output>
10:37:41matkukiMimbus: Exactly.
10:37:57flaviu.eval for i in countdown(10, 1): stdout.write($i)
10:37:58Mimbusflaviu: 10987654321
10:38:33tstmmatkuki: Well, the countdown(10,1) seems to work.
10:38:40tstmYeah.
10:38:42tstmToo late. :D
10:39:44matkukitstm: I first tried '10..1'. Seems more Nim-ish, but hey. 'countdown' works to.
10:40:28matkukiBut 'for i in 10..1' shouldn't compile then.
10:41:09flaviusure it should. i = 10; while i < 1; yield i; inc i
10:42:22flaviuhttps://github.com/Araq/Nim/blob/master/lib/system.nim#L1574-L1579
10:42:41*epichero joined #nim
10:43:42matkukiflaviu: Ok, sorry. But it's very counter-intuitive.
10:45:00*johnsoft quit (Ping timeout: 256 seconds)
10:45:04flaviuI agree. It'd be a good candidate for checking by a lint tool.
10:46:20*johnsoft joined #nim
10:47:59*arnetheduck joined #nim
10:57:04*davidhq joined #nim
11:17:08*matkuki quit (Quit: ChatZilla 0.9.91.1 [Firefox 36.0.1/20150305021524])
11:17:11*zipR4ND joined #nim
11:50:12*Ven joined #nim
11:52:16*wb joined #nim
12:04:28*Trustable joined #nim
12:16:29*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:17:58*Maxdamantus joined #nim
12:20:36*Ven quit (Read error: Connection reset by peer)
12:21:46*Ven joined #nim
12:28:26*irrequietus joined #nim
12:28:32*mwbrown joined #nim
12:41:18*banister joined #nim
12:41:22*banister quit (Max SendQ exceeded)
12:42:05*zahary quit (Read error: Connection reset by peer)
12:42:11*zahary1 joined #nim
12:51:40*banister joined #nim
12:55:47*TEttinger quit (Ping timeout: 252 seconds)
12:58:43*Etheco quit (Quit: Leaving)
13:00:22*reem joined #nim
13:00:45*pregressive joined #nim
13:02:42*pregressive quit (Remote host closed the connection)
13:03:31*epichero quit (Remote host closed the connection)
13:05:23*reem quit (Ping timeout: 265 seconds)
13:13:10*mwbrown quit (Ping timeout: 252 seconds)
13:21:22*davidhq quit (Quit: Textual IRC Client: www.textualapp.com)
13:23:22*davidhq joined #nim
13:33:14*OderWat quit (Quit: Textual IRC Client: www.textualapp.com)
13:33:46*OderWat joined #nim
13:48:50*Woflox joined #nim
13:48:56*mpthrapp_ joined #nim
13:55:19*pregressive joined #nim
13:55:24*pregressive quit (Remote host closed the connection)
13:56:10*pregressive joined #nim
13:56:41*pregressive quit (Remote host closed the connection)
13:57:24*pregressive joined #nim
13:58:16*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:06:24*banister joined #nim
14:06:29*banister quit (Max SendQ exceeded)
14:07:08*zipR4ND quit (Ping timeout: 246 seconds)
14:07:30*banister joined #nim
14:18:51*irrequietus quit (Ping timeout: 265 seconds)
14:19:23*epichero joined #nim
14:24:10*epichero quit (Ping timeout: 265 seconds)
14:29:33*davidhq quit (Quit: Textual IRC Client: www.textualapp.com)
14:32:21*BroseROC joined #nim
14:32:54*davidhq joined #nim
14:38:37*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:40:04*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
14:55:29*OderWat quit (Quit: Textual IRC Client: www.textualapp.com)
15:12:36*irrequietus joined #nim
15:13:14*mpthrapp_ quit (Ping timeout: 246 seconds)
15:14:01*mpthrapp_ joined #nim
15:20:04*epichero joined #nim
15:20:44*jholland joined #nim
15:23:03*darkf quit (Quit: Leaving)
15:25:05*epichero quit (Ping timeout: 256 seconds)
15:44:38*sepisoad joined #nim
15:50:50*davidhq joined #nim
15:58:26*BroseROC quit (Quit: Leaving)
16:01:33*banister joined #nim
16:02:39*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:14:01*Ven joined #nim
16:19:07*BitPuffin joined #nim
16:34:15*bcinman joined #nim
16:43:43*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
16:45:58*xificurC quit (Ping timeout: 256 seconds)
16:50:15*gsingh93 joined #nim
16:51:52*brson joined #nim
16:53:27*Matthias247 joined #nim
16:56:50*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:00:16*epichero joined #nim
17:17:07*sepisoad quit (Quit: Leaving)
17:22:58*epichero quit (Read error: Connection reset by peer)
17:23:36*epichero joined #nim
17:35:43*johnsoft quit (Ping timeout: 264 seconds)
17:37:11k1ibitwise and on unsigned ints
17:37:31k1isystem.and isn't implemented on unsigned types - should it be
17:39:46EXetoCk1i: import unsigned
17:44:47k1ity
17:48:33k1iinterfacing with C: proc(arrayOfUints: pointer, count: csize) - I cannot make the cast of var x: array[count, uint] = arrayOfUints[] as count isn't known at compile time - can this check be disabled?
17:49:54k1iinterfacing with C: proc(arrayOfUints: pointer, count: csize) - I cannot make the cast of var x: array[count, uint] = arrayOfUints[] as count isn't known at compile time - can this check be disabled?
17:49:58k1isry
17:50:22emilspcan't you const count = 128 or something ?
17:50:37*clynamen quit (Quit: ZNC - http://znc.in)
17:51:10k1iemilsp: variable count coming from C, but the array is that length
17:51:43*clynamen joined #nim
17:53:12*BlaXpirit joined #nim
17:53:45EXetoCcoming from C how? if it's a run-time value then it doesn't make sense to use an array. what you should be using then is a seq
17:54:05emilspis seq just a linked list of sorts ?
17:54:19EXetoCarrayOfUints is also a run-time value so that does seem to be the case
17:54:37EXetoCemilsp: a random-access sequence
17:55:20EXetoCbut with a length decided at run-time, unlike arrays where the length is specified at compile-time
17:57:27k1iauto deref isn't working was my only issue
17:57:51k1ican't [] w/ ptr uint
17:58:53EXetoCarray[count, uint] actually works? that seems unlikely. either way, don't do that
17:59:01k1ihttps://github.com/Araq/Nim/blob/master/lib/system.nim#L1230
17:59:03EXetoCk1i: you have to cast it
17:59:16k1ithat's how it's done for a cstringarray
17:59:29k1i"The array's high value is large enough to disable bounds checking in practice."
17:59:48EXetoCyes well that's an array *pointer*
17:59:59k1isorry, so is this
18:00:08EXetoCno, not 'x'
18:02:46EXetoCdo "var x = newSeq[uint]()" and then append, or do "var x = newSeq[uint](count)" and fill in the values by doing "for i in 0 .. <count: x[i] = cast[ptr array[someLargeValue, uint]](arrayOfUints)[i]"
18:03:44EXetoCis uint correct though? keep in mind that it's either 32-bit or 64-bit depending on the architecture
18:04:10k1icuint
18:04:21EXetoCthere are aliases for the C types such as cuint... ok nevermind
18:04:52k1ii just did that cast in the proc def
18:05:06k1iptr array[0..50_000, cuint]
18:05:30*itPuffinB joined #nim
18:05:42EXetoCsome relevant conveniences: https://github.com/fowlmouth/nimlibs/blob/master/fowltek/pointer_arithm.nim
18:06:17k1i:)
18:06:26*tPuffinBi joined #nim
18:06:44EXetoCtPuffinBi: you look a little shifted. is something wrong?
18:06:52*BitPuffin quit (Ping timeout: 272 seconds)
18:07:07k1ipointer arithmetic runs the world
18:09:39*itPuffinB quit (Ping timeout: 244 seconds)
18:10:13*tPuffinBi is now known as BitPuffin
18:10:13BitPuffinEXetoC: yeah I dunno why the client did that lol
18:10:45*xet7 joined #nim
18:18:26*BitPuffin quit (Ping timeout: 244 seconds)
18:19:50*clynamen quit (Ping timeout: 246 seconds)
18:25:16*clynamen joined #nim
18:27:47*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:36:34*xificurC joined #nim
18:39:09*AckZ quit (Ping timeout: 252 seconds)
18:39:09*biscarch quit (Ping timeout: 252 seconds)
18:39:27*clone1018 quit (Ping timeout: 256 seconds)
18:40:05*a5i quit (Read error: Connection reset by peer)
18:40:29*hguux__ quit (Ping timeout: 250 seconds)
18:41:04*jholland quit (Ping timeout: 272 seconds)
18:42:19*xificurC quit (Remote host closed the connection)
18:49:12*banister joined #nim
19:23:22*UberLambda joined #nim
19:23:28*_UberLambda_ joined #nim
19:23:32*gokr joined #nim
19:23:44*_UberLambda_ quit (Remote host closed the connection)
19:30:50*Demos joined #nim
19:33:03*dtscode joined #nim
19:34:18*epichero quit (Remote host closed the connection)
19:40:26reactormonkk1i, doesn't mean you can't delegate it to the compiler
19:41:10*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:43:56*reem joined #nim
19:48:17*bcinman quit (Quit: My Mac has gone to sleep. ZZZzzz…)
19:48:38*banister joined #nim
19:49:48*vbtt joined #nim
19:52:13*vbtt quit (Client Quit)
19:53:57*reem quit (Remote host closed the connection)
19:55:05*jholland joined #nim
19:58:47*reem joined #nim
20:00:04*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:00:21*BlaXpirit quit (Remote host closed the connection)
20:00:47*UberLambda quit (Quit: Leaving the Matrix)
20:02:21*BlaXpirit joined #nim
20:05:28*mpthrapp_ quit (Remote host closed the connection)
20:06:00*hguux__ joined #nim
20:06:12*AckZ joined #nim
20:14:27*alex99 joined #nim
20:14:51alex99what is the proper syntax for a multi-line `if` expression (returning a value)
20:14:58alex99something like
20:15:03alex99result = if something:
20:15:06alex99 someProc()
20:15:08alex99else:
20:15:13alex99 someOtherProc()
20:15:48def-alex99: indent everything from the second line on and it should work
20:16:40alex99tried that, still getting "invalid identation"
20:16:44alex99you meant:
20:16:47def-full example?
20:16:50alex99result = if something:
20:16:54alex99 someProc()
20:16:56alex99 else:
20:17:01def-yes, that works for me
20:17:06alex99 someOtherProc()
20:17:28*biscarch joined #nim
20:17:48flyxcan nim do variadic generics?
20:18:04alex99ah, yes, working
20:18:09alex99thanks for insisting!
20:18:17alex99i had an extra parenthesis in the way
20:18:44*clone1018 joined #nim
20:20:23*vbtt joined #nim
20:20:51vbttflyx: what do you mean?
20:21:23flyxlike, eg I want to write a proc that take another proc as argument, and then a varargs list of arbitrary variables of arbitrary types
20:21:32flyxthen, it calls the given proc with the supplied values
20:22:04flyxmy proc would need to be generic and instantiated for every proc it's called with
20:23:38flyxI wonder if I could just use varargs[auto], but I don't think I would be able to call the proc with the variable containing the varargs arguments
20:24:17*rzzz joined #nim
20:24:26Demosflyx, I don't think you can do that right now. That is perfect forwarding, which c++ required variadic templates for
20:24:35Demosand rval refs but that is not something nim needs
20:24:38flyxI know, that's why I ask
20:25:40vbttwouldn't it be possible with a macro?
20:25:46Demosmaybe
20:25:51flyxprobably.
20:26:05flyxI mean, yes, it's definitely possible
20:26:15EXetoCit's just inconvenient atm
20:26:19flyxyes
20:26:36vbttsee http://nim-lang.org/manual.html#expression-macros, debug macro
20:26:45Demosyou probably want something besides varargs[auto] though
20:27:06vbttunless you need to pass this function around as well, a macro might work fine here
20:27:47flyxwell I'm writing lots of macros here anyway, so another one won't be much pain
20:28:21*a5i joined #nim
20:35:13*epichero joined #nim
20:39:51*epichero quit (Ping timeout: 250 seconds)
20:41:13*banister joined #nim
20:41:42*vbtt quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
20:42:21*banister quit (Client Quit)
20:48:03*banister joined #nim
20:50:52*zipR4ND joined #nim
20:58:55*brononymous joined #nim
21:05:53*CryptoToad joined #nim
21:06:15EXetoCCryptoToad: have you mastered the language yet?
21:06:21CryptoToadWouldn't say msatered
21:06:25CryptoToadbut i'm getting much better
21:06:26CryptoToad:)
21:06:27*brononymous quit (Quit: Page closed)
21:06:37EXetoCsome day
21:07:09CryptoToadI plan to make Nim my go-to language for both scripting stuff and small native projects.
21:07:26CryptoToadso i'm sure over the next few months i'll learn a fair bit more
21:08:41*kjo joined #nim
21:12:21CryptoToadIs there any way i can pass a dword array as a dword pointer? I tried casting but no dice.
21:13:08CryptoToadit's for https://msdn.microsoft.com/en-us/library/windows/desktop/ms682629(v=vs.85).aspx first argument
21:20:42*jsudlow joined #nim
21:21:16*jsudlow quit (Client Quit)
21:25:54*gsingh93 quit (Ping timeout: 256 seconds)
21:27:46*gsingh93 joined #nim
21:27:53*rzzz1 joined #nim
21:28:28*davidhq joined #nim
21:28:52*Jesin quit (Quit: Leaving)
21:29:41*bcinman joined #nim
21:29:52EXetoCCryptoToad: did you cast the address? otherwise you get a pointer whose value is that of the first element and possibly extending it
21:30:11CryptoToadcast the address... no i'll try that.
21:30:33EXetoCor you would, had it been working
21:31:46CryptoToadit works now thanks
21:32:02flaviuk1i: This was a while ago, but the correct approach would be to use an unchecked array.
21:32:02*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:32:22flaviuhttp://nim-lang.org/manual.html#unchecked-pragma
21:32:46EXetoCsometimes you know it won't extend a certain length
21:33:13*Jesin joined #nim
21:43:38*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:53:27*epichero joined #nim
22:03:31*brson quit (Quit: leaving)
22:04:57*jholland quit (Quit: Connection closed for inactivity)
22:11:50*saml quit (Quit: Leaving)
22:12:34*gsingh93 quit (Ping timeout: 255 seconds)
22:12:43*reem quit (Remote host closed the connection)
22:13:26*reem joined #nim
22:22:58*epichero quit (Remote host closed the connection)
22:23:12*epichero joined #nim
22:25:23*bcinman quit (Quit: My Mac has gone to sleep. ZZZzzz…)
22:40:39*davidhq joined #nim
22:41:15*elbow_jason joined #nim
22:45:23*Demos quit (Read error: Connection reset by peer)
22:45:42*BlaXpirit quit (Quit: Quit Konversation)
22:51:14*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:52:29*davidhq joined #nim
22:57:30flyxit's possible to call a macro from within a macro, right
22:58:07EXetoCyes
22:58:11flyxgood
22:58:36flyxI was too long abstinent from Nim
23:01:56*johnsoft joined #nim
23:02:45*johnsoft quit (Client Quit)
23:02:49*rzzz1 quit (Quit: Leaving.)
23:03:00*johnsoft joined #nim
23:06:55*rzzz quit (Ping timeout: 256 seconds)
23:07:02zipR4NDis it possible to have jester running as one component of a programm listening for http events without its mainloop blocking the rest of the app?
23:07:25*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:07:36flaviuzipR4ND: Maybe try running it in a thread?
23:08:29flaviuOr another process, processes are really cheap in linux at least.
23:09:11zipR4NDflaviu: yes i thought of that, but i didn't find out how to make the jester thread communicate with the programs main thread ..
23:10:39flaviuzipR4ND: You could try sending it http requests, as you would normally.
23:12:33zipR4NDthat sounds like a workaround ... actually i would really like to use threading, but i couldn't find an example of threads sharing variables (callbacks) and using locking in nim ..
23:14:50EXetoChttp://nim-lang.org/queues.html
23:14:58flaviuzipR4ND: You can read from http://nim-lang.org/channels.html in your request handlers.
23:14:58flaviuWhat are you trying to accomplish here?
23:15:26*irrequietus quit ()
23:16:59zipR4NDflaviu: im trying to write a modular application, that can have different networking and storage components hooked in and out and uses an internal event bus and rules to orchestrate the whole thing. thatfor i need a certain amount of parallellism. components shouldnt block each other but still be able to communicate ...
23:18:21zipR4NDflaviu: is thera an example of the use of channels with threads somewhere? i'm really new to programming on this (low) level :)
23:19:05flaviuIf you don't have a strict uptime requirement, the best solution would be to read a config file at startup.
23:19:18*davidhq joined #nim
23:19:32flaviuI don't know of any examples, but the operations availbe in the docs seem to be self-explainatory enough.
23:19:50zipR4NDok thanks for the hints
23:20:59EXetoCoops, looked up the wrong thing
23:22:58dom96zipR4ND: you should be making everything async
23:23:10zipR4NDok, just for the log: found an example of the use of threads and TChannel : https://github.com/winksaville/nim-testTChannel/blob/master/testTChannel.nim
23:23:40dom96I wouldn't currently recommend mixing threads and async if you can avoid it
23:24:16zipR4NDdom96: ok, but i didnt get async to work either. do you have any example ?
23:24:31dom96zipR4ND: what are you trying to do?
23:24:32wbI tried using channels a little while ago, couldn't even get it to compile ("unique type" and other mystery errors)
23:24:34dom96that doesn't work?
23:24:59zipR4NDi described to flaviu a few lines earlier
23:25:35dom96you need to be more specific
23:25:49dom96what IO is your app doing?
23:26:45zipR4NDok, lets say i have a jester-component, that gets a request via http, and this component was registered with a callback, that it should use to inform the main programm of the request
23:27:21dom96right
23:27:23zipR4NDit does so, and the waits for an event to occur on the main programms event bus marking the response to that request
23:27:42dom96so what's the problem, what is blocking?
23:28:12dom96from what I can tell you are only using IO for networking (Jester)
23:29:14zipR4NDjesters request methor (get "smth":) should call the callback on the mainloop, than register its interest for a response, get a Future and wait for this Future to fulfill, before going on answering ...
23:30:52zipR4NDyes, but i am striving for this main-event-bus architecture and want all the other components not to block each other, unless on decides to do so, because it waits for something to happen (therefor i could use the 'await' function ...)
23:31:56dom96so use the 'await' function
23:34:09zipR4NDhmm, ok. maybe I didn't get this async idea right ...
23:35:27zipR4NDfor example: how can my main program start the jester loop in the component without this blocking the main programm without the use of threads? (in a registerAndBootComponent() proc ..)
23:35:34*akiradeveloper joined #nim
23:36:25flaviuzipR4ND: That question doesn't really make sense.
23:36:54flaviuJester is really a `while true: do stuff` loop at it's core
23:38:29zipR4NDflaviu: so i should break this while loop, and create a global while loop incorporating all the loops into one?
23:38:52dom96no
23:38:59dom96Asyncdispatch is an event loop
23:39:02dom96jester makes use of it
23:39:08dom96you should make use of this event loop
23:39:13dom96you shouldn't make your own
23:39:23EXetoCoh yeah that's right
23:39:27dom96if you want something called periodically then you can use sleepAsync
23:39:58dom96proc callEvery(x: int) {.async.} = while true: await sleepAsync(x); doStuff()
23:40:11dom96asyncCheck callEvery(400) #ms
23:40:18dom96routes:
23:40:20dom96 ...
23:40:23dom96runForever()
23:41:24zipR4NDdom96: thanks, this helps me understand things... i will try to implement this
23:47:35*filwit joined #nim
23:49:34Araqhi filwit
23:49:41filwithey
23:52:48*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:53:05zipR4NDok dom96 now i think i understand how this works, thanks again ..
23:53:11EXetoC.eval import macros; macro x(s: stmt):; stmt = discard strVal(s); x(1)
23:53:12MimbusEXetoC: stack trace: (most recent call last)
23:56:05EXetoCAraq: that does look correct judging by the code in other macros
23:57:11EXetoC"Error: field 'strVal' cannot be found"
23:57:38Araqhi
23:57:46Araqdon't aks Araq
23:57:59Araqhe's busy/drunk/sick/away
23:58:07EXetoCoh ok
23:58:07Araqask fowl
23:58:44CryptoToadhttp://hastebin.com/huyefojupi.vbs anyone know why the getModuleBaseName call is failing? It's modeled after this example - https://msdn.microsoft.com/en-us/library/windows/desktop/ms682623(v=vs.85).aspx
23:59:00CryptoToadignore the function name lol
23:59:01fowlEXetoC, thats correct
23:59:10*brson joined #nim
23:59:18fowlEXetoC, are you trying to get a string representation of the argument?