<< 15-01-2017 >>

00:17:43*chemist69 quit (Ping timeout: 245 seconds)
00:20:14*chemist69 joined #nim
00:20:21*bjz joined #nim
00:22:16*pregress_ joined #nim
00:22:23*pregressive quit (Read error: Connection reset by peer)
00:27:25*stisa joined #nim
00:32:10*allan0 quit (Ping timeout: 248 seconds)
00:46:33*Matthias247 quit (Read error: Connection reset by peer)
00:48:15*Kingsquee joined #nim
00:56:37*yglukhov quit (Remote host closed the connection)
01:03:08*nsf quit (Quit: WeeChat 1.6)
01:07:03*Guest15939 joined #nim
01:13:37*space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:14:52*space-wizard joined #nim
01:15:10*space-wizard quit (Client Quit)
01:15:38*space-wizard joined #nim
01:15:58*space-wizard quit (Client Quit)
01:16:27*space-wizard joined #nim
01:16:46*space-wizard quit (Client Quit)
01:17:16*space-wizard joined #nim
01:17:34*space-wizard quit (Client Quit)
01:18:04*space-wizard joined #nim
01:18:22*space-wizard quit (Client Quit)
01:18:51*space-wizard joined #nim
01:19:10*space-wizard quit (Client Quit)
01:19:38*space-wizard joined #nim
01:19:58*space-wizard quit (Client Quit)
01:20:21*pregress_ quit (Remote host closed the connection)
01:20:54*pregressive joined #nim
01:25:35*pregressive quit (Ping timeout: 248 seconds)
01:31:56*Guest15939 quit (Ping timeout: 240 seconds)
01:32:36*devted joined #nim
01:36:17*dddddd quit (Quit: Hasta otra..)
01:57:09*yglukhov joined #nim
01:58:45*bjz_ joined #nim
01:59:11*bjz quit (Ping timeout: 240 seconds)
02:01:41*yglukhov quit (Ping timeout: 240 seconds)
02:17:41*bjz joined #nim
02:17:49*bjz_ quit (Ping timeout: 260 seconds)
02:18:38*devted quit (Quit: Sleeping.)
02:30:35*rupil quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
02:45:11*chemist69 quit (Ping timeout: 240 seconds)
02:59:05*chemist69 joined #nim
03:02:10*allan0 joined #nim
03:14:05*celsosouza joined #nim
03:59:16*yglukhov joined #nim
04:03:27*yglukhov quit (Ping timeout: 248 seconds)
04:22:22*celsosouza quit (Remote host closed the connection)
04:22:42*pregressive joined #nim
04:23:29*pregressive quit (Read error: Connection reset by peer)
04:24:04*pregressive joined #nim
04:28:30*pregressive quit (Ping timeout: 248 seconds)
04:43:56subsetparkAre folks interested in `secret` bug reports, or is it too secret?
04:50:12*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
04:50:16subsetparkcrashers, that is
05:02:30Araqhmm?
05:02:48Araqonce reported, it's hard to keep it a secret
05:02:59Araqwe're interested in bug reports.
05:04:49subsetparkOh i just meant, I've always taken 'secret' as a synonym for 'unsupported'...
05:05:09subsetparkAnyway, I'll open an issue
05:05:26Araqwhat "unsupported" feature do you use? now you made me curious
05:05:37Araqoh you mean "nim secret"?
05:08:21subsetparkyeah :)
05:08:30subsetparkoh sorry, i can see how that was confusing
05:09:17Araqnah, in retrospect it was pretty obvious
05:09:43AraqI know it doesn't work on windows.
05:17:12subsetparkThis one's slightly more interesting than that: https://github.com/nim-lang/Nim/issues/5221
05:27:13Araqthanks
05:34:05def-pri-pubnight guys.
05:34:06*def-pri-pub quit (Quit: leaving)
05:41:58*allan0 quit (Ping timeout: 260 seconds)
06:02:19*yglukhov joined #nim
06:06:28*yglukhov quit (Ping timeout: 245 seconds)
06:08:05*eizua joined #nim
06:24:23*bjz joined #nim
06:48:29*bjz_ joined #nim
06:49:17*bjz quit (Ping timeout: 255 seconds)
06:57:18*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
07:19:09*stisa quit (Remote host closed the connection)
07:24:44*bjz_ quit (Ping timeout: 258 seconds)
07:25:32*bjz joined #nim
07:40:42*eizua quit (Remote host closed the connection)
08:04:17*yglukhov joined #nim
08:08:41*yglukhov quit (Ping timeout: 240 seconds)
08:11:48awalhi. when trying to send an https request, I get "SSL support is not available". How do I fix this?
08:13:02awaloh nvm, just need to add -d:ssl
08:30:17*Guest15939 joined #nim
08:47:54*vegai_ joined #nim
08:48:04*vegai_ left #nim (#nim)
09:02:38awalHow do I build an xmlnode (http://nim-lang.org/docs/xmltree.html#XmlNode) from raw xml string?
09:03:16*allan0 joined #nim
09:03:41awalhttp://nim-lang.org/docs/parsexml.html#XmlParser this just creates an event based xml parser - I'd like to parse the entire thing in a tree
09:06:35*rokups joined #nim
09:11:32awalhttps://github.com/achesak/nim-rss/blob/master/rss.nim#L83 found this as an example, but if I do the same, I get an error saying parsexml is not defined :|
09:13:53awalhttps://github.com/nim-lang/Nim/blob/master/lib/pure/xmlparser.nim#L103 it is even present here, why'd I get that error :(
09:15:42*pie_ joined #nim
09:22:10*nsf joined #nim
09:27:10dom96awal: did you import xmlparser?
09:27:17awaldom96: I did
09:27:23awallemme gist the entire code, sec
09:28:44awaldom96: https://gist.github.com/awalgarg/aaaaa84e7e38d928935988948ec8ccd6
09:31:14dom96You're not importing xmlparser
09:32:11dom96you don't need to import parsexml
09:32:17awaldom96: Err, I am in my code, still same error
09:32:37dom96import httpclient, os, streams, xmltree, parsexml
09:32:39dom96Where?
09:32:41awalupdated gist
09:33:07dom96I get `Error: value of type 'seq[XmlNode]' has to be discarded` now
09:33:37awal:(
09:35:27dom96are you getting the same error?
09:36:07awalNope, I am still getting the original error
09:37:02awalDoes version matter? I am on 0.15 and I see that the latest version is 0.16
09:38:02dom96it shouldn't
09:38:21dom96This compiles for me: https://gist.github.com/dom96/ff253e793639b40e8f281267d1db6927
09:38:41dom96But it fails at runtime for some reason
09:40:05dom96try `cat`ing the file to make sure the contents are correct
09:40:13awaldom96: uhh, that works for me too, but it doesn't fail at runtime for me!
09:40:45dom96huh, maybe it's a recent xml parsing bug in 0.16.0 heh
09:41:57*allan0 quit (Ping timeout: 258 seconds)
09:42:59dom96I reported it in any case
09:45:19awalnoted
09:46:47*yglukhov joined #nim
09:47:14awaldom96: I switched to the nightly nim compiler and still no error at compile time here, and the reference error from my original code went away too
09:47:24awalnightly as in, compiled from github
09:47:53dom96you mean at runtime?
09:48:23awaldom96: yes
09:48:59dom96hrm
09:49:09dom96getContent is returning odd data
09:50:28*yglukhov quit (Remote host closed the connection)
09:50:46dom96well that's even weirder, now it suddenly started returning correct data
09:50:47*yglukhov joined #nim
09:52:09awalheisenbug day for nim? :)
09:55:13dom96very very weird
09:57:06*allan0 joined #nim
09:59:02*Matthias247 joined #nim
10:05:27*yglukhov quit (Remote host closed the connection)
10:35:17awalIs there a stdlib function to convert an items iterator to a pairs iterator with the keys as 0 based indices?
10:36:10awali.e,, convert an iterator over, say, "foo", "bar", "baz" to iterator over (0, "foo"), (1, "bar"), (2, "baz")
10:41:59dom96I don't think so. In that case you would usually just use: for i in 0 .. <len(collection): echo(i, collection[i])
10:44:25awalhmm, okay. Also, what is the type signature for an iterator of any type? iterator[T]? (and how do I check the type signatures for other types?)
10:46:06*yglukhov joined #nim
10:48:22*yglukhov quit (Remote host closed the connection)
10:50:15*yglukhov joined #nim
11:16:36*yglukhov quit (Remote host closed the connection)
11:17:49*yglukhov joined #nim
11:17:56dom96awal: Perhaps `iterator (x: T): Y` but I never had a need for that so I'm not sure if it will work
11:21:03*yglukhov quit (Remote host closed the connection)
11:22:24awaldom96: that does indeed work - thanks! how'd you arrive at that guess?
11:22:35*yglukhov joined #nim
11:23:02dom96heh, cool. I know that procedure types are written like this: proc (x: MyType): MyReturnType
11:23:10dom96so I guessed that iterators would be the same
11:23:31awalahh
11:23:35awalcool
11:34:22*yglukhov quit (Remote host closed the connection)
11:38:10*yglukhov joined #nim
11:43:55*yglukhov quit (Remote host closed the connection)
11:52:36*yglukhov joined #nim
12:03:06*Snircle joined #nim
12:14:32*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
12:25:37Guest15939https://github.com/nim-lang/Nim/blob/master/lib/pure/nativesockets.nim#L551, the description says that this select() procedure will "will return the number of
12:25:37Guest15939 ## sockets that are ready to be read from, written to, or which have errors."
12:25:55*Guest15939 is now known as GustavoLapasta
12:26:25GustavoLapastabut the implementation shows that it will return only the count of the read-able sockets
12:27:17GustavoLapastaAlso, the next function in the sources is selectWrite(), which returns the number if write-able sockets.
12:27:43GustavoLapastaSounds like select() should be called "selectRead()", and its comments corrected.
12:29:44*yglukhov quit (Remote host closed the connection)
12:29:58dom96true. You should use the selectors module instead anyway though
12:30:26dom96But please create a PR/issue for this
12:31:59GustavoLapastaI don't feel comfortable doing a PR renaming the select() function, isn't it used somewhere by someonelse?
12:32:33GustavoLapastaI'll create an issue
12:33:05dom96yes, you should deprecate it and create an exact copy called selectRead
12:33:31GustavoLapastaright
12:43:41awalnim says "All or openArray[string] is not a concrete type" in "type Rule = tuple[site: string, tags: All | openArray[string]]". what does this mean?
13:02:47*jinshil quit (Quit: client terminated!)
13:10:12GustavoLapastaThe selectors module seems useful, but is there some other usage example other than the asyncdispatch module? I'm having a hard time figuring things out
13:25:33*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
13:37:12*couven92 joined #nim
13:37:15dom96GustavoLapasta: This is a good example http://goran.krampe.se/2014/10/25/nim-socketserver/
13:40:36GustavoLapastaawesome, thanks dom96
13:49:20federico3any packet crafting tutorial or library around?
13:50:02*dddddd joined #nim
14:18:51*Trustable joined #nim
15:17:59*Vladar joined #nim
15:29:37*yglukhov joined #nim
15:30:39*yglukhov quit (Remote host closed the connection)
15:51:10*byte512 joined #nim
15:56:19subsetparkawal: I believe that generic typedescs like All and openArray are not available for concrete type declarations. Those are for metaprogramming and argument types
15:56:48subsetparkI don't think there's any way to declare an ML-style ADT as a concrete type that you can attach to a value
16:26:55*Sembei quit (Read error: Connection reset by peer)
16:28:02*Sembei joined #nim
16:38:20chemist69Vladar: I tried your ng2planetoids example for your nimgame2 lib on Kubuntu 16.10 and get the following error: `could not import: SDL_CreateRGBSurfaceWithFormat`
16:38:26chemist69SDL2 is installed.
16:39:02chemist69Do you have any idea what could be the issue?
16:41:54*arnetheduck quit (Ping timeout: 245 seconds)
16:47:57Vladarchemist69, could you check the SDL2 version installed?
16:49:50*Trustable quit (Remote host closed the connection)
16:52:59*yglukhov joined #nim
16:53:11chemist69according to packages.ubuntu, it is libSDL2-2.0.so.0.4.0
16:54:19Vladaryou'll need a latest stable which is 2.0.5
16:54:45chemist69ahh, ok. Thanks.
16:54:46*rupil joined #nim
16:55:34Vladarnp, let me know how it goes with the up to date lib
17:00:21*GustavoLapasta quit (Quit: Leaving)
17:05:04awalsubsetpark: ah, I see
17:05:13*rupil quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
17:05:44chemist69unfortunately, I don't see an easy way to install the required version (no ppa available), but it will be in the next Ubuntu release (17.04). I guess I'll try again, then. Thanks for your efforts with nimgame!
17:07:58Vladarchemist69, thank you for your interest in my project
17:14:48*irrequietus joined #nim
17:18:53Araqchemist69: maybe use a distro with rolling releases?
17:20:48chemist69yeah, I used to use Arch Linux which I really like. But my work notebook is running Ubutntu and therefore I switched my private notebook to Ubuntu, as well. Otherwise I would still be running Arch Linux.
17:28:14*rupil joined #nim
17:34:52*yglukhov quit (Remote host closed the connection)
17:36:05smtjust curious cause I know it's pretty easy to get around, but is there a reason why there's a removeSuffix but not a removePrefix in strutils?
17:42:02AraqremoveSuffix shouldn't exist either. who uses it?
17:48:46*Jesin quit (Quit: Leaving)
17:51:10*Jesin joined #nim
17:51:37awaldom96: I can reproduce the issue you described on an ubuntu server where I am trying to run this nim app
17:51:48awalit works on Arch Linux here, but not on ubuntu :|
18:01:27*space-wizard joined #nim
18:02:51*yglukhov joined #nim
18:12:08*eizua joined #nim
18:12:51*space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:15:02*Jesin quit (Quit: Leaving)
18:19:45*libman joined #nim
18:22:04*eizua quit (Quit: Leaving)
18:25:20*rupil quit (Remote host closed the connection)
18:30:38*rupil joined #nim
18:32:27*yglukhov quit (Remote host closed the connection)
18:38:31*irrequietus quit ()
19:05:35*nsf quit (Quit: WeeChat 1.6)
19:11:07dom96awal: try compiling with --gc:boehm
19:11:21dom96(you'll need to install whatever package boehm is in)
19:12:05awaldom96: Okay, but what does that do?
19:12:37dom96Uses the boehm GC instead of Nim's default GC for your application
19:12:44awalo.O
19:15:07*confundus joined #nim
19:15:57awaldom96: I see. Does http://www.hboehm.info/gc/ refer to the same?
19:16:01Araqhmm?
19:16:10Araqgc crash?
19:16:29awalAraq: https://github.com/nim-lang/Nim/issues/5222
19:16:30dom96no, but maybe the corruption will go away with a different GC
19:17:47awalhmm, very difficult to reproduce the issue :|
19:18:08Araqdid you guys look at the raw output the website submits?
19:18:41dom96Araq: I doubt the website would return \0 and a bunch of other random-looking bytes
19:18:58Araqand yeah, we have --gc:markAndSweep and --gc:boehm to detect these issues.
19:19:35dom96Using the old httpclient.getContent may be a workaround. Perhaps this is some bug related to my use of {.multisync.}
19:20:20*space-wizard joined #nim
19:20:23Araqdont perhaps. collect more data.
19:21:34awalcan't reproduce with --gc:boehm so far
19:22:51awalAraq: the website doesn't matter, I get the same issue with a local file which doesn't change
19:23:26Araqcool, can you attach the file to the bug report?
19:23:36Araqalso: which OS?
19:25:25awalI am on Arch Linux, where the issue reproduces like 1 in 1000 times, but on ubuntu it happens 1 in 2 times. Attaching file to the issue
19:26:29*yglukhov joined #nim
19:28:35awaldone
19:28:52Araqsame problem with --gc:markAndSweep ?
19:29:19awaldidn't try, and just reproduced with --gc:boehm too on ubuntu
19:30:02awalchecking with markAndSweep
19:32:05awalcan't reproduce so far...
19:33:00Araqreproduced with boehm? that pretty much means it's not a GC issue.
19:33:16awalyes, reproduced with boehm
19:34:13awalhttps://github.com/awalgarg/hot-stack-questions/blob/master/hnq.nim#L117-L119 this is the running code, btw (again, same issue with local file stream as well)
19:35:03dom96awal: huh, so with the local file stream you're not even using httpclient?
19:35:06*PMunch joined #nim
19:35:15awaldom96: correct
19:35:22dom96this must be a pretty bad corruption then
19:35:44awalIs there any other way I can provide more info? memory dumps or something?
19:36:24awal(but I guess since you can reproduce sometimes as well, it won't be of much help?)
19:37:21Araqtons of options.
19:37:31Araq-d:useGcAssert -d:useSysAssert
19:37:42Araq--memTracker:on
19:38:11Araqlet key = try: qsplit[0]
19:38:11Araq except IndexError: ""
19:38:11Araq let val = try: qsplit[1]
19:38:13Araq except IndexError: ""
19:38:26Araqthis is wrong Nim code btw
19:38:46Araqwon't produce IndexError in release mode
19:39:02awalAraq: oh, ouch. what should be done instead?
19:39:11*byte512 quit (Ping timeout: 240 seconds)
19:39:17awalI was looking for a way to provide default value
19:40:49Araqtemplate def(x, i): untyped = (if i < x.len: x[i] else: "")
19:41:01Araqlet key = def(qsplit, 0)
19:41:18Araqfor example.
19:41:41awalahh okay, thanks, will update
19:43:55awalAraq: reproduced with markAndSweep
19:50:45Araqawal: do you use -d:release?
19:51:21*bjz joined #nim
19:51:41awalnope
19:52:04*rokups quit (Quit: Connection closed for inactivity)
19:53:38awalAraq: what should --memTracker:on do? I don't get any logs with it :|
19:53:50awalnot on stdout/stderr atleast
19:54:10Araqit fills a sqlite db that tracks every memory write
19:54:26Araqa stdout log would be crap.
19:54:30awalwhere is that db located
19:54:57Araqcwd
19:55:35awalIt doesn't seem to be here :|
19:56:09Araqit can take ages to complete
19:58:08awalIt seems if I leave the server running for more over 3 minutes, I can consistently reproduce the issue
20:12:50*confundus quit (Quit: confundus)
20:13:13*confundus joined #nim
20:13:31*yglukhov quit (Remote host closed the connection)
20:14:03*yglukhov joined #nim
20:16:19*yglukhov quit (Remote host closed the connection)
20:16:35*yglukhov joined #nim
20:19:50*rupil quit (Remote host closed the connection)
20:20:58*rupil joined #nim
20:29:27*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
20:33:20*rupil quit (Remote host closed the connection)
20:34:53*yglukhov quit (Remote host closed the connection)
20:37:51*irrequietus joined #nim
20:41:20*yglukhov joined #nim
20:43:06*nsf joined #nim
20:43:37*Ven joined #nim
20:54:48*bjz joined #nim
21:00:55*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:06:27*confundus quit (Quit: leaving)
21:12:21*couven92 quit (Read error: Connection reset by peer)
21:12:24*vlad1777d joined #nim
21:13:08*Trustable joined #nim
21:15:45*vlad1777d quit (Remote host closed the connection)
21:17:03*irrequietus quit ()
21:18:10*vlad1777d joined #nim
21:21:09*yglukhov quit (Remote host closed the connection)
21:22:00dom96https://www.reddit.com/r/nim/comments/5o6ehp/released_my_first_tiny_project_written_in_nim/
21:22:32dom96Is this yours smt?
21:22:36dom96looks nice
21:26:18*vlad1777d quit (Quit: Leaving)
21:29:41smthaha yeah, its just pretty simple
21:29:50smtbut was a nice first thing to make with nim
21:30:50*PMunch quit (Quit: leaving)
21:32:43*PMunch joined #nim
21:34:08*vlad1777d joined #nim
21:35:27dom96Glad to see that my IRC package still works :)
21:37:27smthaha yeah it worked fine, was easier to use than I expected to be honest
21:38:40dom96awesome :D
21:39:33smtstill not totally sure if im doing stuff like the colors and all the stuff with strings properly but it seems to work fine for just a toy project so
21:41:46*PMunch quit (Quit: leaving)
21:47:05dom96You might be able to remove your colorPrint proc and use styledWriteLine http://nim-lang.org/docs/terminal.html#16
21:47:08dom96But that's up to you
21:48:09dom96Also, I would probably use "$1 $2 - [INFO] ...." % [curtime, event.origin] instead of the `&`
21:48:54smtah, I'm sure that kinda thing existed but I guess I didn't try too hard looking for it
21:49:21smtor I was sure*
21:55:05*chemist69 quit (Ping timeout: 256 seconds)
21:57:04*Jesin joined #nim
21:57:28smtthat makes these strings so much easier, thanks lol
22:00:02*chemist69 joined #nim
22:06:16dom96np
22:06:18dom96good night
22:21:56*yglukhov joined #nim
22:26:11*yglukhov quit (Ping timeout: 240 seconds)
22:45:10*Trustable quit (Remote host closed the connection)
22:52:16*Vladar quit (Quit: Leaving)
22:53:30*pie_ quit (Ping timeout: 240 seconds)
23:11:40*couven92 joined #nim
23:30:33*space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:31:49*space-wizard joined #nim
23:32:06*space-wizard quit (Client Quit)
23:32:37*space-wizard joined #nim
23:32:37*ftsf_ joined #nim
23:32:54*space-wizard quit (Client Quit)
23:33:25*space-wizard joined #nim
23:33:42*space-wizard quit (Client Quit)
23:34:11*space-wizard joined #nim
23:34:30*space-wizard quit (Client Quit)
23:35:02*space-wizard joined #nim
23:35:18*space-wizard quit (Client Quit)
23:35:50*space-wizard joined #nim
23:36:06*space-wizard quit (Client Quit)
23:36:33*space-wizard joined #nim
23:36:54*space-wizard quit (Client Quit)
23:41:51*nsf quit (Quit: WeeChat 1.6)
23:46:02*pregressive joined #nim
23:51:50*Matthias247 quit (Read error: Connection reset by peer)