<< 28-08-2018 >>

00:06:45*Jesin quit (Quit: Leaving)
00:09:45*asisocon joined #nim
00:24:56*abm quit (Quit: Leaving)
00:25:46*Jesin joined #nim
00:25:58*dddddd quit (Ping timeout: 272 seconds)
00:32:39*zachcart1r joined #nim
00:35:00*zachcarter quit (Ping timeout: 252 seconds)
00:37:36*asisocon left #nim (#nim)
00:38:31*dddddd joined #nim
01:08:25*endragor joined #nim
01:12:57*endragor quit (Ping timeout: 252 seconds)
02:02:34FromGitter<gogolxdong> @Tanger, agreed, seems like only a global ptr is viable.
02:07:43FromGitter<kayabaNerve> I have this Nimscript config file.
02:07:44FromGitter<kayabaNerve> https://github.com/EmberCrypto/Ember/blob/master/src/main.nims
02:07:58FromGitter<kayabaNerve> Removing opt-size causes a 50% slow down
02:08:09FromGitter<kayabaNerve> (70s to 100s)
02:17:51FromGitter<kayabaNerve> I know this is a GCC thing, but does anyone have any idea why?
02:36:31*kapil___ joined #nim
02:44:15*leorize quit (Ping timeout: 252 seconds)
02:50:46*endragor joined #nim
02:56:00*leorize joined #nim
03:03:27*krux02 quit (Remote host closed the connection)
03:05:54*leorize quit (Ping timeout: 264 seconds)
03:18:08*dddddd quit (Remote host closed the connection)
03:37:06*SenasOzys quit (Ping timeout: 264 seconds)
03:51:50*zachcarter joined #nim
03:54:59*zachcart1r quit (Ping timeout: 272 seconds)
03:55:45*captainkraft quit (Ping timeout: 252 seconds)
03:56:14*captainkraft joined #nim
04:14:24FromGitter<gogolxdong> Is it possible to use epoll to build mysql connection pool?
04:34:13*leorize joined #nim
04:42:50*kapil___ quit (Quit: Connection closed for inactivity)
04:53:29*rockcavera quit (Remote host closed the connection)
05:03:04*rockcavera joined #nim
05:07:05*nsf joined #nim
05:15:42FromGitter<wsdjeg> hello, SpaceVim author here, and we just add nim support in SpaceVim, feel free to have a try ⏎ https://spacevim.org/layers/lang/nim/
05:16:37FromGitter<wsdjeg> if you have any question about it, you can @ me on our community.
05:51:36shashlickzachcarter: you needed some help with nimgen? just saw in logs several days ago 😄
05:53:05shashlickany nimgen related discussions are welcome at https://gitter.im/nimgen/Lobby
06:03:13TangerAwesome wsdjeg! Thanks!
06:08:45FromGitter<timotheecour> how do I use `friendModules` ?
06:17:30FromGitter<gogolxdong> which is the custom configuration file?
06:22:15*tiorock joined #nim
06:22:15*rockcavera quit (Killed (tolkien.freenode.net (Nickname regained by services)))
06:22:15*tiorock is now known as rockcavera
06:22:15*rockcavera quit (Changing host)
06:22:15*rockcavera joined #nim
06:32:54*xet7 joined #nim
06:35:48*leorize quit (Ping timeout: 252 seconds)
06:52:03*Vladar joined #nim
07:32:39*leorize joined #nim
07:41:18*PMunch joined #nim
08:03:49*gmpreussner joined #nim
08:04:07*gmpreussner_ quit (Ping timeout: 244 seconds)
08:11:46FromGitter<xmonader> I'm trying to get nim days published by `nostarch`, but they have some questions regarding the version 1.0 and the compatibility with 0.18 is there any assuring answer, preferably somewhere on the nim-lang site?
08:20:06shashlickthere's already a bunch of changes that break 0.18 - removal of string/seq nils for example
08:21:12*fredrik92 is now known as couven92
08:27:06FromGitter<GULPF> there are tons of breaking changes between 0.18 and 0.19, but it should be better between 0.19 and 1.0 I think
08:53:15FromGitter<gogolxdong> first hints some pulgins updating failed, then cpu usage comes to 100% @wsdjeg
08:54:34FromGitter<wsdjeg> @gogolxdong do you have a try with neovim or vim 8?
08:54:43FromGitter<gogolxdong> Error detected while processing function <SNR>102_on_install_exit: ⏎ line 7: ⏎ E716: Key not present in Dictionary: 1 ⏎ Press ENTER or type command to continue [https://gitter.im/nim-lang/Nim?at=5b850dd3f5402f32aaa1377f]
08:55:06FromGitter<wsdjeg> this is known issue, SpaceVim current only support vim8 and neovim
08:55:29FromGitter<wsdjeg> but we also want to support vim7.4, we have added this into todo list
08:56:34FromGitter<gogolxdong> neovim is fine, but the color schema is wired.
08:57:14FromGitter<gogolxdong> the number of line also moves along with cursor.
09:00:23FromGitter<gogolxdong> gd cannot jump to defination.
09:00:54FromGitter<wsdjeg> that si relativenumber
09:01:31FromGitter<wsdjeg> you can disable it via `set norelativenumber`
09:02:04FromGitter<wsdjeg> or in SpaceVim config: ⏎ ⏎ ```[options] ⏎ relativenumber = false``` [https://gitter.im/nim-lang/Nim?at=5b850f8ce5b40332ab0c1fe3]
09:02:06FromGitter<gogolxdong> it's fine since it's relative.
09:02:34FromGitter<gogolxdong> can it jump to definition in another file?
09:02:35FromGitter<wsdjeg> I think relativenumber is better, because I can use `10j` to jump to the line I want
09:02:46FromGitter<wsdjeg> nim file?
09:03:10FromGitter<gogolxdong> yeah
09:03:47FromGitter<wsdjeg> we are useing this function for gd ⏎ ⏎ ```function! s:go_to_def() abort ⏎ NimDefinition ⏎ endfunction``` [https://gitter.im/nim-lang/Nim?at=5b850ff2c53ee54c18b395dd]
09:04:18FromGitter<wsdjeg> I think you can read `:h NimDefinition`, BTW do you enable `lang#nim` layer?
09:04:37FromGitter<wsdjeg> SpaceVim do not enable any language layer by default.
09:09:32FromGitter<gogolxdong> how
09:09:48FromGitter<gogolxdong> there is a Spacevim.d in nim-example
09:10:20FromGitter<gogolxdong> do I have to place a such hidden custom configuration file under nim project?
09:18:36FromGitter<wsdjeg> no, SpaceVim support global config, and project config.
09:18:49FromGitter<wsdjeg> you can enable layer in project, or in global config.
09:19:34FromGitter<wsdjeg> https://spacevim.org/ here is the website, you can read the quick start guide
09:20:23FromGitter<wsdjeg> also, you can join our community, English or Chinese
09:21:23*seni joined #nim
09:39:05*kapil___ joined #nim
09:40:15*abm joined #nim
10:06:57FromGitter<admin0day> when upload the .csv file passby the nginx's proxy to the server just came out this message in /var/log/nginx/error.log
10:07:01FromGitter<gogolxdong> It changes default behavior of vim, like I'm deploying SpaceVim, other operators complain, how come vim becomes this ? suggest keeping vim simple by default. Plugins installation in another action.
10:07:17FromGitter<admin0day> upstream prematurely closed connection while reading response header from upstream, client:xxxxxxx
10:15:55*dddddd joined #nim
11:11:13*SenasOzys joined #nim
11:24:38*floppydh quit (Remote host closed the connection)
11:25:22*floppydh joined #nim
11:26:30*krux02 joined #nim
11:37:32*zachcarter quit (Ping timeout: 268 seconds)
11:55:04*captainkraft quit (Ping timeout: 244 seconds)
11:55:41*captainkraft joined #nim
12:02:01*birdspider joined #nim
12:37:18*endragor quit (Remote host closed the connection)
12:47:26*SenasOzys quit (Ping timeout: 276 seconds)
12:51:50*endragor joined #nim
12:55:04*SenasOzys joined #nim
12:56:54*endragor quit (Ping timeout: 264 seconds)
13:00:14dom96https://news.ycombinator.com/item?id=17858108
13:00:15dom96Ouch
13:00:22dom96People shouldn't be reaching this conclusion
13:03:33*noonien joined #nim
13:05:26PMunchHmm, is that true?
13:05:43PMunchI would think with Araq using Windows that the Windows support OOTB would be pretty good
13:08:02dom96I replied
13:08:07dom96We might wish to improve that install page
13:11:04dom96Although I have a feeling that this person wanted to find reasons to hate it
13:11:28PMunchRemove it?
13:11:32dom96We shouldn't give people excuses though :)
13:11:50PMunchShouldn't it rather be improved?
13:14:07euantorNo mention of choosenim either? Compare the install page to Rust's for example - they mention Rustup front and center as the recommended install method: https://www.rust-lang.org/en-US/install.html
13:15:40euantorIt would be nice to have an easy one stop .exe installer again, I might look at creating a WiX package if I get time. It would be good to get the Chocolatey package up to date too - I'm not sure how you can go about taking control of that... https://chocolatey.org/packages/nim
13:18:39FromGitter<mratsim> https://github.com/fragcolor-xyz/nimtorch nice!
13:18:43dom96https://github.com/dom96/choosenim/issues?q=is%3Aopen+is%3Aissue+milestone%3A%22Araq%27s+wishlist%22
13:18:52dom96Need this for Choosenim to be allowed on the Windows install page
13:20:35euantorI was looking at cross compiling Windows versions for x32 and x64 inside Docker, but linking with OpenSSL was causing problems. The builds might be able to be performed by AppVeyor though and that would cross off https://github.com/dom96/choosenim/issues/16
13:22:08euantorhttps://www.appveyor.com/docs/deployment/github/ - AppVeyor can push a GitHub release, so it could build the Windows versions and save a bit of effort
13:26:25dom96Yeah, that would be nice
13:29:03*xet7 quit (Ping timeout: 276 seconds)
13:29:24euantorCould do the same for Mac and Linux too with Travis CI or Circle CI too and publish a release with binary files by simply pushing a tag to the repository
13:33:19FromGitter<mratsim> so we could have a nightly channel?
13:35:32dom96I'll happily accept PRs for that
13:35:53dom96It would be nice to store artefacts for Nim too
13:36:03dom96and get choosenim to use them
13:41:54*brainpro1 quit (Ping timeout: 264 seconds)
13:43:40*nsf quit (Quit: WeeChat 2.2)
13:45:38*xet7 joined #nim
13:47:30*brainpro1 joined #nim
14:20:09euantorI'll have a look at getting it set up today or tomorrow then
14:20:47*gibril joined #nim
14:44:27FromGitter<tim-st> is it expected: `import hashes; doAssert hash([0,0,0,0]) == hash([0])`?
14:44:49FromGitter<tim-st> In my own hashing function I added the length of the container
14:51:34shashlickdom96: my choosenim PR fixes some of those wish list issues
14:52:31shashlickI also fixed some issues in finish.exe but it's yet to be posted since we haven't made a new nim release yet
15:34:09*thor77 quit (Quit: ZNC 1.7.1 - https://znc.in)
15:34:41*thor77 joined #nim
15:35:14FromGitter<kaushalmodi> Araq: Thank you for the epic fix of https://github.com/nim-lang/Nim/issues/6818. Spaces and quotes are now handled well by `parseopt`! 👍
15:52:11*PMunch quit (Quit: Leaving)
15:56:34*birdspider quit (Remote host closed the connection)
16:05:16FromGitter<admin0day> hi guys,why uwsgi so popular in so much lang
16:05:52FromGitter<admin0day> do we need it in nim-lang too?
16:14:43*abm quit (Quit: Leaving)
16:22:36*norok2 quit (Quit: Gone hunting.)
16:36:10federico3https://uwsgi-docs.readthedocs.io/en/latest/FAQ.html
16:44:12dorelixHi, don't know if this topic was raised before but I'm thinking of migrating some expect scripts to nim. They're not super complex. Basically, the expect scripts spawn telnet or ssh, send some commands to check some settings on some switches and routers and also perform backups to files, maybe a database in the future, don't know yet.
17:02:11*nsf joined #nim
17:41:03*Trustable joined #nim
17:50:56*thomasross joined #nim
17:51:13*thomasross quit (Remote host closed the connection)
17:51:21*thomasross_ quit (Quit: Leaving)
17:51:39*thomasross_ joined #nim
17:52:15*thomasross_ is now known as thomasross
17:52:48FromGitter<ephja> @tim-st should be unlikely with a decent algorithm
17:53:24FromGitter<ephja> in any case, collisions are unavoidable and so should be dealt with
17:53:45*jamtoast left #nim (#nim)
17:55:14FromGitter<ephja> trying to define an XML schema interface. I will always suck at recursive data structures :-)
17:55:25FromGitter<ephja> genetics, man
18:06:31*heinrich5991 quit (Quit: quit.)
18:08:14FromGitter<tim-st> @ephja I saw it's the same for `@[0,0,...,0]` where it's more dangerous because here the type is the same independent of the length, but somehow table uses a different hash, so it seems no problem there
18:08:43*heinrich5991 joined #nim
18:15:19FromGitter<ephja> are you sure? because table structures usually rely on some form of collision resolution
18:15:42FromGitter<ephja> unless you're referring to the performance rather than the semantics of the table structure
18:16:41FromGitter<ephja> if collision resolution is used then a bad hashing scheme will simply result in degraded performance
18:18:06FromGitter<data-man> @tim-st: There are https://github.com/nim-lang/Nim/issues/6136 and https://github.com/nim-lang/Nim/pull/6740 (does not work at compile time)
18:22:43FromGitter<ephja> is there something like getStackTraceEntries that doesn't rely on an exception instance? maybe I can rely on dummy exceptions or parsing of getStackTrace() to collect N traces
18:30:01FromGitter<ephja> let's sea https://github.com/nim-lang/Nim/blob/35e37fd8ec721f8588b88fd72c16e36916573908/lib/system/excpt.nim#L168
18:33:09*Xe quit (*.net *.split)
18:36:07*abm joined #nim
18:38:30*Xe joined #nim
18:40:41FromGitter<anarchyrucks> how do I set queries to nimsuggest using sockets?
18:40:57FromGitter<anarchyrucks> doesn't seem to be mentioned in the guide
18:41:40FromGitter<anarchyrucks> do I send post query or url params? what's the pattern?
18:42:21*SenasOzys quit (Ping timeout: 276 seconds)
18:48:27*SenasOzys joined #nim
19:02:18*Yardanico quit (Quit: Quitting)
19:05:45*Jesin quit (Quit: Leaving)
19:06:54*Yardanico joined #nim
19:11:00FromGitter<tim-st> @data-man thanks, that exactly the thing I noticed
19:14:18FromGitter<tim-st> this looks good: https://github.com/nim-lang/Nim/pull/6600
19:14:24*Xe quit (*.net *.split)
19:16:05*Xe joined #nim
19:19:10*Jesin joined #nim
19:22:53FromGitter<data-man> There is benchmarks, metrohash vs xxhash: https://github.com/data-man/benchHashes.nim (nimbench is broken now)
19:25:13FromGitter<tim-st> what uses nim currently? FNV?
19:25:30FromGitter<tim-st> this looks quite promising: https://github.com/Cyan4973/xxHash
19:26:44FromGitter<tim-st> ok, I think it was rust that uses fnv
19:28:32FromGitter<data-man> xxHash is BSD licensed.
19:28:54FromGitter<tim-st> this is bad I assume?
19:57:02*smt quit (Ping timeout: 268 seconds)
20:03:08*noonien quit (Quit: Connection closed for inactivity)
20:07:13FromGitter<rayman22201> kind of a stupid nimble question... how do you pass flags to the nim compiler from a nimble file? other than creating a custom task, It's not obvious from the readme.
20:09:51FromGitter<dom96> Use a nim.cfg file
20:11:39FromGitter<bung87> will nim.cfg publish with package?
20:13:53FromGitter<rayman22201> thanks @dom96 is nim.cfg still in vogue? I remember something about being replaced by .nims?
20:14:50FromGitter<rayman22201> there should have been a period there. lol. Thanks @dom96 "period", other unrelated questions.
20:16:27*hendi quit (Remote host closed the connection)
20:16:46*hendi joined #nim
20:18:18*Vladar quit (Remote host closed the connection)
20:30:17*Trustable quit (Remote host closed the connection)
20:31:06FromGitter<kaushalmodi> How do I parse JSON from an endpoint?
20:31:16FromGitter<kaushalmodi> like from the GitHub API
20:31:52FromGitter<kaushalmodi> I searched for "url" in https://nim-lang.org/docs/json.html but didn't find anything.
20:37:35*smt joined #nim
20:40:50FromGitter<Vindaar> you mean something like this? (I'm a web noob though :P) ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b85b35260f9ee7aa4a50361]
20:42:34FromGitter<kaushalmodi> exactly! Thanks @Vindaar!
20:43:32FromGitter<Vindaar> ah, cool. glad to help :)
20:48:09*kapil___ quit (Quit: Connection closed for inactivity)
21:01:26*nsf quit (Quit: WeeChat 2.2)
21:16:09dom96rayman22201: both will continue to work
21:16:23dom96and when I say .nim.cfg I mean "use the Nim config"
21:16:33dom96config.nims is fine too
21:19:09FromGitter<kaushalmodi> @Vindaar I just learned about `getContent` from `httpclient`; using it like this: https://ptpb.pw/PMrF/nim
21:24:40FromGitter<kaushalmodi> Ignore that... `getContent` without an "http client" (no idea what that means) as in your example is deprecated.
21:24:49FromGitter<kaushalmodi> So what you posted is the right way to go, I guess
21:33:31FromGitter<Vindaar> yep, I saw that one too. However, there's also `getContent` using a `HttpClient`. Then you don't have the indirection with `body` at least.
21:36:47FromGitter<kaushalmodi> I was trying to make this work.. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b85c06eff44515616500a64]
21:37:04FromGitter<kaushalmodi> but I get this error: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b85c080f5402f32aaa59363]
21:37:48FromGitter<kaushalmodi> OK, the error makes sense once I posted here..
21:38:07*seni quit (Quit: Leaving)
21:38:40FromGitter<kaushalmodi> I was supposed to use `isNone` instead of `none`
21:39:39FromGitter<Vindaar> yep. But then your `get` call should still fail, no? Unless you wrote a `get` taking an `Option[HttpClient]`?
21:40:28FromGitter<kaushalmodi> no, it works
21:40:39FromGitter<Vindaar> ahh!
21:40:44FromGitter<kaushalmodi> full code: https://ptpb.pw/CwPr/nim
21:40:53FromGitter<Vindaar> I confused `Option` get with `HttpClient` get, hehe
21:41:20FromGitter<Vindaar> nice
21:42:01FromGitter<kaushalmodi> It started out as "I wonder how I can download the latest release of any github project"
21:42:45FromGitter<kaushalmodi> now with that built (with `-d:ssl`), I can run `git_api -p ox-hugo` to get the latest tag for that project of mine
21:44:15FromGitter<data-man> @kaushalmodi: there is https://github.com/watzon/github-api-nim Maybe useful for you.
21:45:05FromGitter<kaushalmodi> hehe thanks! This, though was a good 101 learning experience with httpclient and json :)
21:45:17FromGitter<kaushalmodi> I think I will use that github-api-nim proj
21:50:03AlexMaxoof
21:50:35AlexMaxoh nvm, cases work for me
21:52:19AlexMaxit'd be nice if it had 'fallthrough' through an explicit keyword, but it's not a huge deal when you get exhaustiveness checking in return
22:03:30FromGitter<rayman22201> @dom96 roger that. thanks again :-)
22:04:04AlexMaxhrm, so SDL2 allows you to access what specific kind of event you have through a union
22:04:13AlexMaxhttps://github.com/spurious/SDL-mirror/blob/master/include/SDL_events.h#L557
22:05:02AlexMaxbut the nim definition is missing the union
22:05:27AlexMaxhttps://paste.ee/p/6eAyg
22:05:34AlexMaxAre you supposed to just do an unsafe cast or something?
22:07:21AlexMaxOh snap
22:07:31AlexMaxthe union members are procs
22:07:49AlexMaxevent.key is a proc
22:08:00AlexMaxthat's clever as hell
22:16:32FromGitter<ephja> still quite difficult to use :p
22:21:58AlexMaxI'm still not entirely sure what is happening in the template
22:24:48AlexMaxhttps://paste.ee/p/nT9vB
22:27:19FromGitter<Vindaar> AlexMan: It's a template to allow to create 2 procs with a single line of code. You can see the lines after it all calling the template with all those event types
22:28:57FromGitter<Vindaar> the template receives `untyped` arguments, meaning they're not type checked (because that happens later in compilation). You can see the backticks on the name procs. That's the syntax to replace the arguments by the identifier given to the template
22:29:37FromGitter<Vindaar> After all those `evConv`calls you end up with two of these procs for each given event
22:31:28FromGitter<Vindaar> You can `import macros` in the code and use `expandMacros` to see what the template does
22:31:52FromGitter<Vindaar> as in like so ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b85cd57f86b741b05d8217d]
22:31:59FromGitter<Vindaar> which upon compilation will output
22:32:23FromGitter<Vindaar> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b85cd777649b9063e1a356b]
22:32:32FromGitter<Vindaar> or rather during compilation
22:45:17*zachcarter joined #nim
22:53:27*zachcarter quit (Ping timeout: 240 seconds)
22:55:31*zachcarter joined #nim
22:59:47*zachcarter quit (Ping timeout: 240 seconds)
23:08:34*krux02 quit (Remote host closed the connection)
23:10:57*shodan45 quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
23:11:42*krux02 joined #nim
23:23:17*xet7 quit (Quit: Leaving)
23:52:47*shodan45 joined #nim