<< 19-09-2015 >>

00:00:38XeHow do I convert a varargs to a sequence?
00:03:28*saml_ joined #nim
00:12:10*yglukhov quit (Remote host closed the connection)
00:13:55*Sahnvour quit (Read error: Connection reset by peer)
00:28:08*Jehan_ quit (Quit: Leaving)
00:29:34*umurgdk quit (Remote host closed the connection)
00:35:10*vikaton quit (Quit: Connection closed for inactivity)
00:41:42*umurgdk joined #nim
00:46:22*umurgdk quit (Ping timeout: 260 seconds)
01:17:11*jaco60 quit (Ping timeout: 246 seconds)
01:23:52*keyle joined #nim
01:24:20*gokr quit (Quit: Leaving.)
01:26:09*vendethiel quit (Ping timeout: 265 seconds)
01:36:24*chemist69 joined #nim
01:39:27*chemist69_ quit (Ping timeout: 252 seconds)
01:56:50*Jehan` quit (Ping timeout: 260 seconds)
02:03:06*NimBot joined #nim
02:13:09*NimBot joined #nim
02:24:01*yglukhov joined #nim
02:26:50*pregressive joined #nim
02:28:35*yglukhov quit (Ping timeout: 252 seconds)
02:53:46*umurgdk joined #nim
02:54:01*NimBot joined #nim
02:54:15*Enamex quit (Ping timeout: 240 seconds)
02:57:55*umurgdk quit (Ping timeout: 252 seconds)
03:07:09*NimBot joined #nim
03:13:45*rupil quit (Ping timeout: 246 seconds)
03:46:35*pregressive quit (Remote host closed the connection)
03:49:18*saml_ quit (Quit: Leaving)
04:00:39*darkf joined #nim
04:01:27*cyraxjoe quit (Ping timeout: 240 seconds)
04:02:09*cyraxjoe joined #nim
04:22:19nchambersI thought it was done automatically?
04:26:41*NimBot joined #nim
04:30:00*pregressive joined #nim
04:31:29*vendethiel joined #nim
04:48:43*pregressive quit (Remote host closed the connection)
04:56:46*vendethiel quit (Ping timeout: 272 seconds)
04:58:55*Kingsquee joined #nim
05:03:23*mal`` quit (Quit: Leaving)
05:16:29*Demos joined #nim
05:17:29*mal`` joined #nim
05:20:02*keyle quit (Quit: http://twitter.com/keyle/)
05:21:32*Demos quit (Ping timeout: 265 seconds)
06:09:44*Enamex joined #nim
06:13:07*Enamex quit (Read error: Connection reset by peer)
06:13:31*Enamex joined #nim
06:50:49*gokr joined #nim
07:06:44*Enamex quit (Read error: Connection reset by peer)
07:06:56*Enamex joined #nim
07:12:32*Jehan_ joined #nim
07:14:35*Trustable joined #nim
07:18:48*gokr quit (Quit: Leaving.)
07:18:49*gokr1 joined #nim
07:23:20*Enamex quit (Ping timeout: 265 seconds)
07:24:12*Gonzih joined #nim
07:48:19*irrequietus joined #nim
07:48:39*Gonzih quit (Ping timeout: 240 seconds)
07:48:52*nueh joined #nim
07:57:48*Enamex joined #nim
07:59:39*nueh quit (Quit: My Mac has gone to sleep. ZZZzzz…)
08:01:30*nueh joined #nim
08:07:01*NimBot joined #nim
08:08:17*NimBot joined #nim
08:08:56*umurgdk joined #nim
08:13:44*umurgdk quit (Ping timeout: 272 seconds)
08:35:22*Gonzih joined #nim
08:37:13*Jehan_ quit (Quit: Leaving)
08:48:57*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
09:05:35*vendethiel joined #nim
09:09:42*NimBot joined #nim
09:14:18*nueh quit (Quit: My Mac has gone to sleep. ZZZzzz…)
09:15:21*elrood joined #nim
09:16:02*gokr1 quit (Quit: Leaving.)
09:18:06*Gonzih quit (Ping timeout: 255 seconds)
09:24:14*Raimondi quit (Ping timeout: 250 seconds)
09:25:49AraqXe: via @
09:28:41*gokr joined #nim
09:29:59*gokr_ quit (Ping timeout: 240 seconds)
09:36:17*umurgdk joined #nim
09:45:54*irrequietus quit (Ping timeout: 250 seconds)
09:46:51*nueh joined #nim
09:47:36*NimBot joined #nim
09:52:55*Matthias247 joined #nim
09:56:57*irrequietus joined #nim
09:59:03*nueh quit (Quit: My Mac has gone to sleep. ZZZzzz…)
09:59:55*boopisaway is now known as boop
10:02:28*nueh joined #nim
10:08:14*gmpreussner|work quit (Read error: Connection reset by peer)
10:09:03*gmpreussner|work joined #nim
10:09:47*xet7_ quit (Ping timeout: 264 seconds)
10:10:04*xet7_ joined #nim
10:12:15*irrequietus quit ()
10:17:29*tymat joined #nim
10:23:08*nueh quit (Quit: Textual IRC Client: www.textualapp.com)
10:40:52*vendethiel quit (Ping timeout: 246 seconds)
10:57:44*Jehan_ joined #nim
11:12:00*Matthias247 quit (Read error: Connection reset by peer)
11:15:56*Sahnvour joined #nim
11:16:34*Sahnvour quit (Client Quit)
11:16:52*Sahnvour joined #nim
11:43:08*Trustable quit (Remote host closed the connection)
11:45:24*gokr1 joined #nim
12:03:59*FedeOmoto joined #nim
12:12:15*boop quit (Ping timeout: 244 seconds)
12:14:07*irrequietus joined #nim
12:15:13dom96hello everyone
12:15:18dom96happy saturday
12:15:25tymatanyone seen this error: https://github.com/nim-lang/Nim/issues/3346
12:16:52*vendethiel joined #nim
12:17:42dom96tymat: hrm, let me take a look
12:18:26dom96tymat: s/include/import/
12:22:24gokr1dom96: Thanks
12:23:58tymatah gotcha
12:30:12*boop joined #nim
12:31:13*fichtl joined #nim
12:31:35*UberLambda joined #nim
12:33:55*Kingsquee quit (Quit: http://i.imgur.com/EsXzoum.png)
12:38:07*Arrrrrr joined #nim
12:40:16*vendethiel quit (Ping timeout: 240 seconds)
12:42:38*umurgdk quit (Remote host closed the connection)
12:42:51*umurgdk joined #nim
12:54:45*Arrrrrr quit (Ping timeout: 246 seconds)
13:00:02*vendethiel joined #nim
13:02:22NimBotnim-lang/Nim devel 492f5eb Dominik Picheta [+0 ±1 -0]: Fixes asyncnet.recvLine. Fixes #3346.
13:10:26*UberLambda quit (Quit: GTG)
13:14:07softinioHappy Saturday
13:30:27*gokr quit (Quit: IRC for Sailfish 0.9)
13:48:03*jaco60 joined #nim
14:07:43*NimBot joined #nim
14:09:40*Raimondi joined #nim
14:16:05*Jehan` joined #nim
14:19:17*Raimondii joined #nim
14:21:25*Raimondi quit (Ping timeout: 244 seconds)
14:24:40dom96softinio: thank you :)
14:25:42*Raimondii is now known as Raimondi
14:29:16*Raimondii joined #nim
14:31:18*Raimondi quit (Ping timeout: 255 seconds)
14:35:42*Raimondii is now known as Raimondi
14:37:58*federico3 quit (Ping timeout: 250 seconds)
14:39:24*Raimondii joined #nim
14:41:12*Raimondi quit (Ping timeout: 255 seconds)
14:45:42*Raimondii is now known as Raimondi
14:48:24*irrequietus quit ()
14:54:32*umurgdk quit (Remote host closed the connection)
14:56:32*umurgdk joined #nim
15:00:39*umurgdk quit (Ping timeout: 240 seconds)
15:00:46*federico3 joined #nim
15:27:06*NimBot joined #nim
15:31:56*yglukhov joined #nim
15:40:22Araqdoes pango work with SDL2?
15:44:09*umurgdk joined #nim
15:44:46*umurgdk_ joined #nim
15:48:42*umurgdk quit (Ping timeout: 255 seconds)
15:57:12*Matthias247 joined #nim
16:01:57*wuehlmaus quit (Quit: Lost terminal)
16:15:25*Sahnvour quit (Read error: Connection reset by peer)
16:16:22*gtk joined #nim
16:21:50*yglukhov quit (Remote host closed the connection)
16:36:49*xet7_ quit (Ping timeout: 250 seconds)
16:43:16Jehan_I think it may be a good idea to moderate posts that have the word "kitchen" in the subject line.
16:43:30Jehan_Or simulate a server error. :)
16:43:46*yglukhov joined #nim
16:46:14*fichtl quit (Ping timeout: 250 seconds)
16:46:47Araqyeah, it's pretty easy to do
16:49:01*BitPuffin|osx joined #nim
16:50:46*UberLambda joined #nim
16:53:06*smodo joined #nim
16:53:26*umurgdk_ quit (Remote host closed the connection)
16:56:13*yglukhov quit (Remote host closed the connection)
17:08:14*Jehan` quit (Read error: Connection reset by peer)
17:08:48dom96Jehan_: yeah, on my todo
17:10:28*Jehan` joined #nim
17:16:39*wuehlmaus joined #nim
17:22:48*xet7 joined #nim
17:29:52*irrequietus joined #nim
17:39:16*rollo joined #nim
17:39:54*yglukhov joined #nim
17:45:44federico3any documentation on packing/unpacking binary structures?
17:51:29dom96don't think so
17:52:44federico3at least few examples? Sounds like a basic requirement for implementing network protocols
17:53:01yglukhovI don't think packing/unpacking is applicable to Nim. They are kinda already packed =)
17:53:12*Gonzih joined #nim
17:53:40yglukhovIf you're familiar with C, Nim is pretty much the same with struct layout
17:55:01federico3yglukhov: e.g.?
17:56:14yglukhovtype MyBinaryMsg = tuple[kind: int32, payload: int32]
17:56:21yglukhovvar myMsg : MyBinaryMsg
17:56:39yglukhovmySocket.send(addr myMsg, sizeof(myMsg))
17:56:44yglukhovthats it
17:57:06dom96yep, what yglukhov said :)
17:59:46federico3yglukhov: mh, I saw some examples of using tuples for packing: are they designed to do that (forever) or could the implementation change in future and break that code?
18:01:04yglukhovhmm. that's a nice question. =) the simple answer is yes, they will remain compatible in future.
18:01:21yglukhovbut the right answer is a bit more complicated.
18:02:05yglukhovbut still yes %)
18:02:26yglukhovalso you can use objects, not only tuples.
18:03:24federico3what about unpacking? I suppose you cannot unpack into a tuple that contains (variable-length) strings
18:03:55yglukhovno, and you can't "pack" a tuple with a string as well.
18:04:06federico3uint8 arrays?
18:05:20yglukhovyep. or. var l : int32 = myString.len; mySock.send(addr len, sizeof(len)); mySock.send(addr myString[0], l)
18:05:58yglukhovreceiving is just a bit more complicated. read the length. alloc string with capacity. read into first char length bytes.
18:06:43dom96you could also serialise your data structure using the marshal module
18:07:16federico3dom96: that would produce JSON tho
18:10:24dom96federico3: would be cool if you modified the marshal module to produce a binary format
18:10:46yglukhovargh, just wanted to say that! =)
18:14:57*NimBot joined #nim
18:15:57*MyMind joined #nim
18:20:39federico3dom96: given that I'm asking how to do basic pack/unpack I don't see that happening :D
18:22:57dom96then just create a nice API over the low-level packing that yglukhov demonstrated :)
18:24:43*Jehan` quit (Read error: Connection reset by peer)
18:31:09*cupofteasir joined #nim
18:31:10federico3dom96: with some DSL Nim would make very nice packet generators
18:31:58*UberLambda quit (Quit: GTG)
18:32:17*irrequietus quit (Ping timeout: 240 seconds)
18:36:55*Jehan` joined #nim
18:38:46dom96federico3: definitely
18:42:54*Gonzih quit (Ping timeout: 265 seconds)
18:48:41*enamex_ joined #nim
18:49:04*yglukhov quit (Remote host closed the connection)
18:49:38*enamex_ is now known as blah
18:49:58*blah is now known as give_me_back_my_
18:50:12*give_me_back_my_ is now known as giveMeBackMyEnam
18:52:22*Enamex quit (Disconnected by services)
18:52:26*giveMeBackMyEnam is now known as Enamex
18:52:39*enamex_ joined #nim
19:02:35*Enamex quit (Ping timeout: 246 seconds)
19:02:52*Enamex joined #nim
19:04:28*rollo quit (Quit: Leaving)
19:07:24Jehan_If you use tuples or objects to send binary data, be careful that endianness doesn't matter (or the size of ints).
19:07:39onionhammerdom96 araq anyone looked at the CPP back end issue yet?
19:07:56onionhammerhttps://github.com/nim-lang/Nim/issues/3299
19:08:18Jehan_It's also possible to write a variant for the marshal module to do binary serialization. I got started on that one day, but never made it far (because I didn't really need it myself and had other things to do).
19:08:38Jehan_Ad-hoc binary marshalling of data structures is pretty easy, though.
19:08:57dom96onionhammer: nope, not yet sorry.
19:09:02dom96I'll +1 it
19:09:04*Enamex quit (Ping timeout: 240 seconds)
19:09:12*cupofteasir quit (Ping timeout: 244 seconds)
19:09:23dom96or better yet ping Araq
19:10:05federico3Jehan_: endianness does matter (obviously ;)) and that's also why I was asking
19:10:48Jehan_But really, it's not hard to write ints etc. in endian-neutral order to a string (or read them from the string).
19:11:32onionhammerdom96 its happening on osx as well
19:12:22*irrequietus joined #nim
19:13:59Jehan_onionhammer: You can fix the second problem with --passC:-Dconst=
19:14:50onionhammersorry?
19:14:51Jehan_Or by using gcc as the backend.
19:15:10Jehan_onionhammer: The github issue.
19:15:10onionhammerg++?
19:15:16Jehan_onionhammer: Yes.
19:15:23onionhammeriirc i tried with both
19:15:30Jehan_Basically, it tries to stuff a T* in a const T*
19:15:44Jehan_On OS X, gcc = clang.
19:15:50onionhammeri know
19:15:51Jehan_Unless you specifically install it.
19:15:59onionhammerI meant on my cubox
19:16:03onionhammerwhich is debian
19:16:18Jehan_onionhammer: Odd, it works for me with gcc-4.9.
19:16:25onionhammeri'll try again
19:16:40Jehan_On OS X at least.
19:16:56Jehan_Basically, the C++ compiler gets passed the flag -fpermissive
19:17:15Jehan_That allows the const -> non-const assignments for gcc, but not for clang.
19:17:25Jehan_--passC:-Dconst= is the brute force approach.
19:17:42onionhammergcc 4.9.2
19:17:59onionhammerjust double checked, it fails w/ gcc
19:19:03Jehan_onionhammer: Hmm, this is odd. Did you do --passC:-fpermissive explicitly also?
19:19:26Jehan_The crash is something deep in the VM. Not sure what's happening there.
19:20:31*enamex_ quit (Read error: Connection reset by peer)
19:20:58onionhammerneither of those things seem to have any effect
19:23:06*cupofteasir joined #nim
19:23:12*Enamex joined #nim
19:23:39*gokr1 quit (Ping timeout: 250 seconds)
19:27:01*dhertz joined #nim
19:27:53dhertzHi! Does the current HEAD of devel not build Futures correctly?
19:29:01*darkf quit (Quit: Leaving)
19:29:07Jehan_onionhammer: Umm, it works for me. With --passC:-Dconst= it should work at least. What do you get with --parallelbuild:1? Note that this doesn't fix the crash, only the compilation error later.
19:30:34dhertzI cannot even build my program - I get this compile error
19:30:45dhertzlib/system.nim(182, 13) Error: invalid type: 'Future' in this context: 'proc (a: var ref Future:ObjectType){.noSideEffect.}'
19:32:11onionhammerJehan_ both with and without --passC:-Dconst= I get sigsegv
19:32:14onionhammerat the same place
19:32:41Jehan_onionhammer: As I said above, this doesn't fix the crash. It fixes the problem with the C++ compiler not being able to compile the code.
19:32:42onionhammerit never finishes codegen
19:32:55Jehan_Yes, I am talking about the example without `import jester`
19:33:02onionhammeroh sorry
19:33:07onionhammeri'm using my original source
19:33:20onionhammermy mistake
19:35:37onionhammerok, i get the same behavior with that jester hello wolrld program
19:36:00onionhammeri'll switch back to gcc..
19:36:11onionhammeralthough it shouldnt matter
19:36:20onionhammersince it never gets to the c++ compiler
19:36:43*cupofteasir quit (Ping timeout: 246 seconds)
19:36:46onionhammerno nimcache is even created
19:37:00dom96hello dhertz
19:37:44dom96dhertz: it should work fine, did you edit system.nim?
19:38:32dhertzNope, just pulled down from the head of devel
19:38:40dom96or maybe you could show me the code you are trying to compile?
19:39:00dhertzhttps://github.com/Dhertz/AkaPi/blob/master/main.nim
19:40:20dom96dhertz: that's quite a long file, can you gist all the Nim compiler output you get when compiling?
19:45:56dhertzdom96: https://gist.github.com/Dhertz/1aa0996d13d6a38fabfa
19:47:34Jehan_onionhammer: Yeah, that's a bug in the compiler.
19:47:44Jehan_It breaks in the VM.
19:47:54*gokr joined #nim
19:49:41*yglukhov joined #nim
19:49:47dom96dhertz: that's a really strange error
19:51:05dom96dhertz: please report it on github
19:51:36dhertzWhat would you like me to report? Just the error?
19:54:50*yglukhov quit (Ping timeout: 272 seconds)
19:57:46*Trustable joined #nim
19:57:54*dhertz quit (Ping timeout: 246 seconds)
19:57:55*hertz joined #nim
20:05:45*Jehan` quit (Read error: Connection reset by peer)
20:09:13*Jehan` joined #nim
20:18:15dom96hertz: sorry, didn't notice your message. Yeah, the output, and a link to your code.
20:41:49*Jehan` quit (Read error: Connection reset by peer)
20:44:18*MyMind quit (Ping timeout: 260 seconds)
20:45:22*MyMind joined #nim
20:48:46*Jehan` joined #nim
20:50:27*smodo quit (Remote host closed the connection)
20:55:15*MyMind quit (Quit: WeeChat 1.4-dev)
20:55:40*MyMind joined #nim
21:05:16*MyMind quit (Read error: No route to host)
21:05:51*Pisuke joined #nim
21:14:01*irrequietus quit ()
21:14:20*irrequietus joined #nim
21:15:28*irrequietus quit (Client Quit)
21:15:36*hertz quit (Ping timeout: 246 seconds)
21:16:38*irrequietus joined #nim
21:31:29*elrood quit (Quit: Leaving)
21:38:17*yglukhov joined #nim
21:42:59*yglukhov quit (Ping timeout: 256 seconds)
21:44:18*gtk quit (Quit: Page closed)
21:44:35*Kingsquee joined #nim
21:49:54*Jehan` quit (Read error: Connection reset by peer)
21:50:55*vikaton joined #nim
21:57:00*Jehan` joined #nim
22:02:13XeI'm getting an annoying error when trying to do prepared statments with db_postgres: ERROR: bind message supplies 3 parameters, but prepared statement "" requires 0
22:02:38*enamex_ joined #nim
22:02:40Xespecified prepared statements like "SELECT * FROM Users WHERE uuid='?' LIMIT 1"
22:04:56*Enamex quit (Ping timeout: 265 seconds)
22:07:54*enamex_ is now known as Enamex
22:13:24*Jehan` quit (Read error: Connection reset by peer)
22:16:42*Jehan` joined #nim
22:17:02*Trustable quit (Remote host closed the connection)
22:26:19AraqXe: sorry, cannot help you with postgres
22:31:38*rollo joined #nim
22:34:37*Pisuke quit (Ping timeout: 268 seconds)
22:54:03*yglukhov joined #nim
22:58:08*yglukhov quit (Ping timeout: 240 seconds)
23:01:57*boop is now known as boopisaway
23:08:27*Matthias247 quit (Read error: Connection reset by peer)
23:17:50*Jehan` quit (Quit: Leaving)
23:24:01*umurgdk joined #nim
23:28:59*gokr quit (Quit: Leaving.)
23:52:30*renesac quit (Ping timeout: 240 seconds)