<< 12-04-2016 >>

00:32:34*Trustable quit (Remote host closed the connection)
00:46:48*fredrik92 quit (Quit: Exiting)
00:47:09*fredrik92 joined #nim
01:04:33*ephja quit (Ping timeout: 276 seconds)
01:07:54*brson_ quit (Quit: leaving)
01:15:57*fredrik92 quit (Read error: Connection reset by peer)
01:24:04*nsf quit (Read error: Connection reset by peer)
01:26:04*nsf joined #nim
01:41:11*nsf quit (Quit: WeeChat 1.4)
02:39:00*NimBot joined #nim
02:39:16*space-wizard joined #nim
03:25:39*space-wi_ joined #nim
03:28:39*space-wizard quit (Ping timeout: 268 seconds)
04:06:20*endragor joined #nim
04:07:37*Demon_Fox quit (Quit: Leaving)
04:17:05*Demon_Fox joined #nim
05:31:44*apotheon quit (Ping timeout: 244 seconds)
05:32:39*vendethiel quit (Ping timeout: 246 seconds)
05:34:10*vendethiel joined #nim
05:49:03*desophos_ joined #nim
05:54:57*desophos_ quit (Ping timeout: 244 seconds)
05:58:45*McSpiros joined #nim
06:05:09*Demos_ quit (Quit: Leaving)
06:10:11*zahary quit (Read error: Connection reset by peer)
06:24:51*apotheon joined #nim
06:25:06*endragor_ joined #nim
06:28:58*endragor quit (Ping timeout: 252 seconds)
06:37:57*perturbation joined #nim
06:40:50*desophos quit (Read error: Connection reset by peer)
06:41:14perturbationdom96: made some more changes to the nimforum edit PR at https://github.com/nim-lang/nimforum/pull/82 Should be ready for CR.
06:41:46*endragor_ quit (Remote host closed the connection)
06:42:14*endragor joined #nim
06:45:08perturbationalso - just starting a new programming blog and first post is about Nim and POSIX APIs http://singularperturbation.github.io/what-the-fork.html
06:45:15perturbationfeedback greatly appreciated :)
06:47:18*gokr joined #nim
06:49:47*gokr left #nim (#nim)
06:50:43*gokr joined #nim
07:06:30*yglukhov joined #nim
07:21:14*McSpiros quit (Ping timeout: 250 seconds)
07:23:56*Trustable joined #nim
07:40:10*kulelu88 quit (Quit: Leaving)
07:41:26*dorei joined #nim
07:47:10*endragor quit (Remote host closed the connection)
07:47:20*simplyianm joined #nim
07:50:20*vegansk joined #nim
07:52:14Araqperturbation: nice, reading it. (I would call it a 'stream', not 'file'. IMHO there is hardly a term that Unix got right...)
07:56:25Araqyeah, well done. One small suggestion: can you explain why sockets don't use open/close/write/read ? why create, bind, accept?
07:57:06Araqiirc Plan 9 indeed got rid of this arbitrary API.
08:09:39*endragor joined #nim
08:23:15*Demon_Fox quit (Quit: Leaving)
08:25:52*fredrik92 joined #nim
08:34:50*ephja joined #nim
08:35:22*space-wi_ quit (Quit: My Mac has gone to sleep. ZZZzzz…)
08:39:33*jeffc quit (Ping timeout: 276 seconds)
08:42:49*jeffc joined #nim
09:02:53*apotheon quit (Read error: Connection reset by peer)
09:03:08*apotheon joined #nim
09:03:34*M-Quora quit (Ping timeout: 244 seconds)
09:04:37*M-max quit (Ping timeout: 260 seconds)
09:09:44*M-Quora joined #nim
09:10:15*M-max joined #nim
09:13:03CcxCZAraq: they did, but changed the semantics slightly
09:14:25CcxCZUnless you want to emulate things like dial… I think it's better to stick what underlying OS actually gives you.
09:17:24CcxCZYou can always layer such abstraction on top, as plan9port does https://swtch.com/plan9port/man/man3/dial.html
09:19:24*M-Quora quit (Remote host closed the connection)
09:19:24*M-max quit (Remote host closed the connection)
09:22:30*Arrrr joined #nim
09:22:30*Arrrr quit (Changing host)
09:22:30*Arrrr joined #nim
09:30:47*M-max joined #nim
09:32:51*vendethiel- joined #nim
09:34:27*vendethiel quit (Ping timeout: 248 seconds)
09:41:30gokrHacked together https://github.com/gokr/nim-sophia
09:50:04*fredrik92 quit (Ping timeout: 250 seconds)
10:01:05wuehlmausperturbation: great blog, thank you!
10:35:37*M-Quora joined #nim
10:48:09veganskAraq, hi! I implemented scala like for comprehension and haskell like do notation in my nimfp library. But it looks so ugly without type inference for ``proc(x: auto): auto`` lambda call :-(
10:49:54dom96perturbation: very nice article :)
10:54:27*vendethiel joined #nim
10:54:59*vendethiel- quit (Ping timeout: 248 seconds)
10:56:50Araqvegansk: what's wrong with => from future?
11:00:13veganskAraq, I have a function ``flatMap`` for containers like option, list, either etc. It has signature proc flatMap(c: C[T], f: T -> C[T]): C[T], where C is Option|List|Either in concrete implementations. But => doesn work with it, and I mus use (x: T) => ...
11:02:37veganskBut it works with function ``map`` with signature proc map[T,U](c: C[T], f: T->U): C[U]
11:03:14veganskOops, the real signature for flatMap is ``flatMap[T,U](c: C[T], f: T -> C[U]): C[U]``
11:08:04veganskAraq, here is the example of error: https://gist.github.com/vegansk/8876ca453de0cf572c65b210fa004eab
11:11:31*Arrrr quit (Ping timeout: 248 seconds)
11:12:42*lyro quit (Ping timeout: 244 seconds)
11:33:27*fredrik92 joined #nim
11:38:33*Arrrr joined #nim
11:45:18*BitPuffin joined #nim
11:46:06*vegansk is now known as veganskaway
11:49:28nivrandom noob question: what's the best way to pass a key-value pair of strings to a method? I've tried seq[(string, string)], Table[string, string] and array variants, but i cant get the calling syntax sugar to look right: {"a": "b", "c": "d"}
11:51:27ArrrrCan't you use tuples? like addRegister(("A", "B"))
11:51:59nivyeah, i could do that. thats the seq[tuple] thing. and that works. im looking for the "official"/canonical way to do such a thing
11:52:27ArrrrWell, no idea. Maybe varargs/open array tuple
11:53:35nivheh :) i have no idea either. im just looking for the best supported way to do such a param type. i want it to be interoperable with the minimum amount of fuss
11:55:33*simplyianm quit (Quit: Connection closed for inactivity)
11:58:02Araqniv: openarray[(string, string)]
11:58:19nivgot it. i assume seq[] in case of async?
11:58:31Araqyeah ...
11:58:56nivive seen a lot of libraries use Table[str, str], so i was confused about what's "the best way"
12:02:20*elrood joined #nim
12:10:16*filcuc joined #nim
12:12:17*kerze joined #nim
12:14:14*boopsies is now known as boopsiesisaway
12:48:51*arnetheduck joined #nim
12:50:48*irrequietus joined #nim
12:53:30Araqreally? interesting.
12:57:20perturbationthanks for the kind words, guys :)
12:59:42nivperturbation: lovely blog post. especially the colours and font make for pleasant reading too. not everyone is that kind to their readers nowadays
13:01:18perturbationheh thanks niv - the theme I'm using comes from http://jekyllthemes.org/themes/immaculate/
13:01:33nivregardless where it comes from, good choice
13:08:11*irrequietus quit ()
13:16:07dom96wow, $386 so far in our bountysource campaign :D
13:17:07nivtry to get to $686 at least
13:17:47nivdom96: think there's a way to get the connection fd off a asynchttpclient socket and detach it from the module?
13:17:55dom96Including $75 from Boxifier, I wonder if they use Nim.
13:19:01dom96niv: don't think so, you can add a proc to give you access to it but I wonder why you need access to it in the first place
13:19:41nivdom96: want to use the async httpclient to make the handshake and do ssl for me, but then detach it and use the fd for a websocket connection. if that makes any sense
13:19:55*fredrik92 quit (Quit: Exiting)
13:21:10dom96oh, interesting. Could you maybe extend the async httpclient in a way that makes such extensions easy?
13:21:21nivno idea. just looking into it
13:21:21dom96Also in a way which isn't too specific to your problem.
13:21:32dom96Might be good to look at how other websocket libs do it
13:21:55nivwell, there's no other websocket libs for nim at least. and all the others basically do the negotiation handshake themselves
13:22:20dom96yeah, well look at how ones written in python, go, w/e do it
13:22:23nivi might just do that too i guess. the ws handler doesn't really need to know much http
13:22:43dom96if they do it themselves then you probably should too
13:22:48nivits just "hey gimme socket, upgrade, id" "ok, here you go" and the rest is just binary frames
13:23:29dom96HTTP isn't that difficult :)
13:23:48nivwhat httpclient could use though is streaming support, you're right there
13:23:57dom96And it doesn't seem like you need all the response parsing stuff
13:23:59nivit needs to be able to read chunks at a time, for example for SSEs
13:24:35dom96that would be cool, would need streaming futures for that too though.
13:24:53nivyeah.
13:25:18nivif you care, i want to have websockets for this: https://github.com/niv/pusher.nim
13:26:28dom96I love seeing what people are coding in Nim :)
13:27:15nivits a lovely language
13:27:37dom96looks cool, not sure what pusher.com really is though
13:28:03nivthink of it like a fanout websocket-as-a-service, cross-device
13:28:16nivthey're cool guys, very approachable
13:28:52nivinstead of having to set up your own ws infrastructure and all the shehanigans that come with it you can use their lib, much easier to get started on
13:29:27*Arrrr quit (Ping timeout: 276 seconds)
13:29:31nivhere's another small lib that i felt was missing from nim cryptoland. https://github.com/niv/ed25519.nim but its not exactly vetted/verified yet .. so .. not publishing it to nimble
13:43:49federico3btw I got some functions in libsodium wrapped :)
13:44:26nivi had a look at libsodium, but all i wanted was fast sign/verify/xchg
13:44:45nivlibsodium pulled in a million c files and ten lightyears of headers and i decided not to bother
13:46:06nivif you have a working nim wrapper i'd love to see it. the ones i found on github were either straight up broken or ran into compiler bugs
13:47:12federico3niv: https://paste.debian.net/432373/
13:47:53nivah, right
13:48:48federico3it's just a prototype but seems to be working
13:50:15federico3feedback and hints would be welcome
13:51:41nivwell, im not exactly the best person to ask for advice on crypto
13:53:20federico3more on stuff like casts, pointers & friends - dom96 ?
13:53:46nivi guess what nim really needs is a comprehensive binding to libsodium with all the hmac, hashes, crypto helpers and auth/sig stuff easily accessible. but thats a huge task
13:58:50federico3libsodium is not huge
14:03:55*nchambers is now known as sillytime
14:14:11CcxCZthere's tweetnacl
14:14:30*tymat quit (Ping timeout: 246 seconds)
14:14:58CcxCZhttp://tweetnacl.cr.yp.to/ used for example by https://github.com/vstakhov/asignify
14:15:25ehmryif you think libsodium is bad, look at the original NaCl build system
14:15:57federico3I'd rather trust libsodium
14:19:44ehmrylibsodium is not so bad I think, I've gotten to compile without even libc before
14:20:11ehmryjust need to provide stuff like memcpy
14:30:19CcxCZThey should be API identical, the difference is that tweetnacl is signle-file (two, if you count header) & self-contained. Actually, the .h file might be useful for wrapping it.
14:37:11nivtweetnacl makes me sad, there's not a single comment to be found anywhere
14:37:38*darkf quit (Quit: Leaving)
14:39:46CcxCZAFAIK it's mostly just copypasted reference implementations from ECRYPT.
14:39:57CcxCZOr rather, that's what it seems to me.
14:40:41nivclaims its auditable but without documentation .. not sure why someone would want to optimise doc away just so it would fit twitter
14:42:05federico3also, it's not widely used
14:42:18nivnot a good track record for inclusion as a widely used lib
14:42:38nivanyways. lunch! laters.
14:44:45CcxCZI guess for auditing you don't want to be fooled by those pesky misleading comments. :] Or whatever, would also like it to be more verbose.
14:50:03*apotheon quit (Ping timeout: 276 seconds)
14:50:51*apotheon joined #nim
14:55:49*Arrrr joined #nim
14:55:49*Arrrr quit (Changing host)
14:55:49*Arrrr joined #nim
15:10:30*dorei quit (Quit: Page closed)
15:16:44*lyro joined #nim
15:21:58*kerze quit (Remote host closed the connection)
15:28:03*yglukhov quit (Ping timeout: 248 seconds)
15:41:55*endragor quit (Ping timeout: 248 seconds)
16:13:19*wuehlmaus quit (Quit: Lost terminal)
16:28:22*yglukhov joined #nim
16:30:58*yglukhov quit (Read error: Connection reset by peer)
16:31:14*filcuc quit (Read error: Connection reset by peer)
16:31:31*yglukhov joined #nim
16:31:55*yglukhov quit (Remote host closed the connection)
16:32:27*yglukhov joined #nim
16:35:29*desophos joined #nim
16:36:41*yglukhov quit (Ping timeout: 244 seconds)
16:38:31*yglukhov joined #nim
16:46:48*space-wizard joined #nim
16:48:14*yglukhov quit (Remote host closed the connection)
16:50:37*yglukhov joined #nim
16:53:05*irrequietus joined #nim
16:59:49*arnetheduck quit (Ping timeout: 260 seconds)
17:12:16*brson joined #nim
17:20:25*yglukhov quit (Remote host closed the connection)
17:20:49*wuehli joined #nim
17:22:57*yglukhov joined #nim
17:29:31*boopsiesisaway is now known as boopsies
17:31:46*sheerun joined #nim
17:44:36*McSpiros joined #nim
17:57:10*yglukhov quit (Remote host closed the connection)
18:05:55*yglukhov joined #nim
18:10:59*wuehli is now known as wuehlmaus
18:11:15*Arrrr quit (Ping timeout: 248 seconds)
18:39:06*Arrrr joined #nim
18:39:06*Arrrr quit (Changing host)
18:39:06*Arrrr joined #nim
18:50:05ArrrrWell, no idea. Maybe varargs/open array tuple
18:50:21Arrrrujj, wrong shell
19:02:13*Arrrr quit (Quit: WeeChat 1.4)
19:02:53*desophos quit (Remote host closed the connection)
19:23:03*BitPuffin quit (Ping timeout: 276 seconds)
19:26:14*Trustable_2 joined #nim
19:29:07*Trustable quit (Ping timeout: 248 seconds)
19:31:06*mnemonikk quit (Quit: ZNC - http://znc.in)
19:50:20*yglukhov quit (Remote host closed the connection)
19:54:13*desophos joined #nim
19:54:14cnclhttps://gist.github.com/randrew/315dad7be2811cb652f664e1d3b6b0f7
19:54:20cnclis this expected? am i doing something wrong?
20:03:13*yglukhov joined #nim
20:03:38*Trustable_2 quit (Remote host closed the connection)
20:07:07*mnemonikk joined #nim
20:07:07*mnemonikk quit (Changing host)
20:07:07*mnemonikk joined #nim
20:07:10*mnemonikk quit (Remote host closed the connection)
20:07:45*mnemonikk joined #nim
20:07:45*mnemonikk quit (Changing host)
20:07:45*mnemonikk joined #nim
20:11:09Araqcncl: good question.
20:19:20cncli guess now would be a good time for me to change to using a source build of nim instead of the binary release, that way i don't have to wonder if the behavior is still the same in the devel version
20:23:12*Jesin quit (Quit: Leaving)
20:29:20cnclseems it has the same behavior
20:35:35*irrequietus quit ()
20:58:09*boopsies is now known as boopsiesisaway
20:59:10*desophos quit (Remote host closed the connection)
21:02:31cnclit seems that the outer proc is not necessary
21:02:44cnclmaybe i am misunderstanding how nested templates should work?
21:05:21*boopsiesisaway is now known as boopsies
21:13:47cnclusing the dirty pragma allows it to compile, which leads me to believe i'm misunderstanding something
21:15:45*Demon_Fox joined #nim
21:25:54*McSpiros quit (Quit: Page closed)
21:42:29*yglukhov quit (Remote host closed the connection)
22:06:33*desophos joined #nim
22:08:02*desophos quit (Remote host closed the connection)
22:08:18*desophos joined #nim
22:09:17Araqcncl: looks like symbol lookups in doubly nested templates are not properly implemented
22:11:19cnclah ok
22:11:54cnclmarking the inner template as dirty makes it work. i was expecting it to give me warnings/errors about redeclaring a variable, but it doesn't do that
22:12:55cnclnot sure why :) another way to make it work is to mark the declared variables in the inner template as injected, and then put it in a block
22:13:51*desophos quit (Remote host closed the connection)
22:21:03Araqthat would be counter-productive
22:21:24Araqthe variables are gensym'ed, so warnings about any shadowings would be stupid
22:36:00*darkf joined #nim
22:46:52*Matthias247 joined #nim
22:50:30*elrood quit (Remote host closed the connection)
22:51:41*Matthias247 quit (Client Quit)
22:53:15*krux02 joined #nim
22:53:31krux02what should I do, when I encounter a bug in the nim compiler?
22:59:06*pregressive joined #nim
22:59:13*vendethiel- joined #nim
22:59:15*krux02 quit (Ping timeout: 264 seconds)
23:00:45*vendethiel quit (Ping timeout: 248 seconds)
23:07:03*desophos joined #nim
23:11:11*krux02 joined #nim
23:11:25*desophos quit (Ping timeout: 248 seconds)
23:12:24*desophos joined #nim
23:17:03*krux02 quit (Ping timeout: 240 seconds)
23:18:12*pregressive quit (Ping timeout: 268 seconds)
23:31:48Araqreport it?
23:32:17*krux02 joined #nim
23:34:34cnclAraq: ah, i assumed {.dirty.} removed gensymming
23:34:39cncli guess i don't know what it does
23:35:09Araqcncl: that is correct, .dirty removes gensym
23:39:18cnclhmm
23:39:52cnclhttps://gist.github.com/randrew/241990d52eb73b14eec3581ea6a4cbf4
23:40:26cnclthen why are there no shadowing warnings here? also due to nested template symbol lookup, or i'm misunderstanding what's going on?
23:55:50*chrisheller quit (Remote host closed the connection)