<< 18-12-2018 >>

00:18:58*theelous3 quit (Ping timeout: 250 seconds)
00:55:30*theelous3 joined #nim
01:17:34*zachk quit (Quit: Leaving)
01:50:24*theelous3 quit (Ping timeout: 250 seconds)
02:01:21*Tyresc quit (Quit: WeeChat 2.3-dev)
02:33:02*smitop quit (Quit: Connection closed for inactivity)
03:08:49*banc quit (Quit: Bye)
03:10:19FromGitter<gogolxdong> anyone used websocket? ⏎ `socket went away, close code: 1002, reason: Masked frame from server`
03:16:08FromGitter<gogolxdong> > You cannot just "echo" the buffer you received. The RFC says, that frames from client to server must be masked. It doesn't say that messages from server to client must not, but at least for Chrome it shouldn't. Hence, if you want to echo data, you have to decode (unmask) the frame and construct a new one. The payload needs to be XOR'ed byte-by-byte with the mask key.
03:17:24FromGitter<gogolxdong> It's the problem of chrome. Firefox is fine.
03:22:23FromGitter<gogolxdong> ah ,there is a trigger websocketUnmaskedByDefault.
03:25:37*banc joined #nim
03:47:33*NimBot joined #nim
04:02:04kinkinkijkinalright, I'm gonna do a fixed-depth tree solution that is going to be very painful to look at
04:02:23kinkinkijkinbut I think it fits this project the best at my current level of knowledge
04:08:56kinkinkijkinvar tree = newSeq[tuple[dlev:uint16,chns:seq[tuple[chan:uint16,lins:seq[string]]]]](0)
04:09:12kinkinkijkinthis is not actually as bad as I thought it would be
04:12:45*nsf joined #nim
04:25:09FromGitter<Varriount> Anyone here know anything about Codeship?
04:33:32kinkinkijkinholy crap that monster actually compiles
05:29:30*PrimHelios joined #nim
05:35:44*dddddd quit (Remote host closed the connection)
05:41:44*kapil____ joined #nim
05:48:30*PrimHelios quit (Remote host closed the connection)
06:32:37leorizeAraq: I'm running the test suite on Haiku and seeing a lot of test failed with the code reJoined, but they run fine if I just use `tester c`, is this a bug?
06:52:30*azuri5 joined #nim
06:54:04*azuri5 quit (Client Quit)
06:54:50*krux02 joined #nim
06:59:46Araqleorize, reJoined is not a test failure, it means the test is covered by the "megatest" category
07:00:57leorizethen maybe it should not be written as FAIL in testresults.html
07:01:19Araqoh, most people only look at the console output
07:01:36AraqI probably forgot to update the logic in testresults.html, good point
07:02:23leorizeand I think the `--targets` switch is broken
07:02:47leorizeI use `tester --targets:'c c++' all` and JS tests still attempted to run
07:04:54*lritter joined #nim
07:09:02*azuri5 joined #nim
07:17:01*azuri5 quit (Quit: azuri5)
07:33:31*azuri5 joined #nim
07:34:12*def- quit (Quit: -)
07:35:54*def- joined #nim
07:45:57*nograve joined #nim
07:57:40*azuri5 quit (Quit: azuri5)
08:00:35*azuri5 joined #nim
08:12:46*azuri5 quit (Quit: azuri5)
08:18:45Araqleorize, ok, possible regression
08:49:21*ftsf joined #nim
08:50:34*Vladar joined #nim
09:05:43*stefanos82 joined #nim
09:06:39*floppydh joined #nim
09:06:43*lritter quit (Ping timeout: 245 seconds)
09:14:08*Cthalupa quit (Ping timeout: 250 seconds)
09:14:23*Cthalupa joined #nim
09:35:47*PMunch joined #nim
09:47:10*azuri5 joined #nim
10:01:26*azuri5 quit (Quit: azuri5)
10:06:20*azuri5 joined #nim
10:06:28*azuri5 quit (Client Quit)
10:13:44*abm joined #nim
10:17:28*theelous3 joined #nim
10:28:31*endragor joined #nim
11:09:07*theelous3 quit (Remote host closed the connection)
11:09:30*theelous3 joined #nim
11:14:29*ftsf quit (Ping timeout: 246 seconds)
11:15:09*ftsf joined #nim
11:19:52*craigger quit (Quit: bye)
11:20:13*craigger joined #nim
11:35:35*azuri5 joined #nim
11:37:46*azuri5 quit (Client Quit)
11:45:10*nograve quit (Read error: Connection reset by peer)
11:54:08*theelous3 quit (Remote host closed the connection)
11:55:19*theelous3 joined #nim
11:56:53*azuri5 joined #nim
11:57:47*lritter joined #nim
11:57:50*theelous3_ joined #nim
12:01:56*kapil____ quit (Quit: Connection closed for inactivity)
12:05:05*Tyresc joined #nim
12:18:28*kapil____ joined #nim
12:21:46*ftsf quit (Ping timeout: 250 seconds)
12:24:05*theelous3_ quit (Remote host closed the connection)
12:24:08*theelous3 quit (Remote host closed the connection)
12:36:53*dddddd joined #nim
12:41:34*theelous3 joined #nim
12:41:55*theelous3_ joined #nim
12:52:38*azuri5 quit (Quit: azuri5)
12:56:59*theelous3__ joined #nim
13:06:44*Vladar quit (Remote host closed the connection)
13:10:53*Vladar joined #nim
13:11:39*ftsf joined #nim
13:11:45*clyybber joined #nim
13:14:00*clyybber quit (Client Quit)
13:19:57*craigger quit (Remote host closed the connection)
13:20:08*craigger joined #nim
13:34:27FromGitter<yglukhov> Araq: thinking about adding `nimsuggest` to `installDirs` in `compiler.nimble` to allow using nimsuggest as a nimble-installed library (e.g. in nimlsp). Any objections?
13:37:10Araqno, it's good
13:37:55FromGitter<yglukhov> cool
13:38:24PMunch+1
13:48:25PMunchAraq, how does Nim find the `lib` folder?
13:54:07FromGitter<Clyybber> Araq: Is it intended that stuff like this fails: ```const a = [] ⏎ ⏎ for e in a: ⏎ echo e ⏎ ... [https://gitter.im/nim-lang/Nim?at=5c18fbff34c6c32cc8344692]
13:54:53*vlad1777d joined #nim
14:00:15leorizePMunch: ../lib relative to the Nim binary folder
14:01:56PMunchHmm, when you use choosenim though "which nim" results in "/home/peter/.nimble/bin/nim" while lib is at "/home/peter/.choosenim/toolchains/nim-0.19.0/lib"
14:02:13PMunchIIRC the nim binary there is just a proxy to the actual Nim file
14:03:25PMunchI guess it could try to parse the output of "choosenim show", and if choosenim isn't installed the default to "`which nim`/../lib"
14:03:25leorizeit follows symlink
14:03:31PMunchNo it doesn't
14:03:48leorizeit does, because that's how I packaged Nim for Haiku?
14:03:53*nsf quit (Quit: WeeChat 2.3)
14:04:08PMunch`which nim` points me to a binary file
14:04:09leorizeoh, unless you mean `which` doesn't follow symlink :P
14:05:52PMunchThe file /home/peter/.nimble/bin/nim is not a symlink
14:06:10PMunchhttp://ix.io/1wi3/
14:06:26PMunch`wtf` is an alias for which, type, and file by the way
14:08:03leorizeguess it's far more complicated than I anticipated
14:08:21FromGitter<SolitudeSF> choosenim generates a proxy which launches nim
14:08:21leorizethere's `findNimStdLib()` in compiler/nimeval, but I suspect it's not used
14:10:04PMunchYeah, but that does pretty much the same as you suggested
14:10:13PMunchFind the `nim` binary and go up a folder
14:10:20PMunchIt returns "" for me
14:10:43PMunchhttp://ix.io/1wi4/Nim
14:10:53PMunchThat prints an empty string
14:11:19leorizehttps://github.com/nim-lang/Nim/blob/a87be403397e9be86395c76fdcdf49269898fdb4/compiler/options.nim#L538
14:14:14ZevvGiven an 'downcasted' object in a class hierarchy, how can I find the original object type without explicitly testing all cases with 'thing of SomeClass'?
14:15:25Zevvwell, nevermind that, sorry
14:15:28*endragor quit (Remote host closed the connection)
14:15:56*endragor joined #nim
14:20:56*endragor quit (Ping timeout: 272 seconds)
14:27:37*endragor joined #nim
14:30:54*lritter quit (Ping timeout: 250 seconds)
14:31:28PMunchhttp://ix.io/1wi8/Nim
14:31:49PMunchThis fails with:
14:31:50PMunchtest.nim(10, 28) template/generic instantiation from here
14:31:50PMunch../home/peter/.nimble/pkgs/stint-0.0.1/stint/private/datatypes.nim(167, 20) Error: undeclared identifier: 'bits'
14:31:53*endragor quit (Ping timeout: 246 seconds)
14:32:07PMunchWhy isn't it able to propagate M properly over as bits?
14:36:03*Vladar quit (Remote host closed the connection)
14:42:35PMunchIf I hard-code it to 128 it works fine
14:48:30FromGitter<xmonader> I think it'd be really nice if we can have post like this http://www.stephendiehl.com/posts/haskell_2018.html for this year (I'm sure loads happened) this year for nim
14:48:47FromGitter<xmonader> Publicity wise too ^
14:51:18PMunchWell you would need to dig up a lot of information
14:52:51PMunchWell I guess looking through this: nim-lang.org/blog.html and possibly checking out the list of nimble packages that have been added would be a good start
14:53:18PMunchOh, there even was a recap post for 2017: nim-lang.org/blog/2017/12/28/nim-in-2017-a-short-recap.html
14:56:19*theelous3_ quit (Remote host closed the connection)
14:57:14FromGitter<xmonader> @PMunch yeah exactly like the 2017 one (y) thank you
15:00:20*nsf joined #nim
15:21:56*kapil____ quit (Quit: Connection closed for inactivity)
15:35:27*ftsf quit (Ping timeout: 240 seconds)
15:48:28*vlad1777d quit (Ping timeout: 250 seconds)
15:58:59*narimiran joined #nim
16:00:26leorizewill version 0.19.2 ever be released?
16:04:07*kungtotte quit (Read error: Connection reset by peer)
16:08:42l1xis there a way to use osproc for a long running process and poll stdout for more content regularly until the process finishes?
16:08:56*kungtotte joined #nim
16:12:43*azuri5 joined #nim
16:15:45leorizel1x: no, threads + cancellation is your best bet
16:16:19leorizeseems like async pipes isn't really popular
16:20:50l1xwoo, really?
16:21:17l1xyou can defer things with channels at the very least right?
16:28:48*theelous3__ quit (Ping timeout: 245 seconds)
16:29:40FromGitter<kaushalmodi> leorize: I need to fix the Nim nightlies repo Travis before 0.19.2 can be released
16:29:41*theelous3 quit (Ping timeout: 250 seconds)
16:29:46*Trustable joined #nim
16:50:37*PMunch quit (Remote host closed the connection)
16:51:40*azuri5 quit (Quit: azuri5)
16:59:20*azuri5 joined #nim
17:01:36*kapil____ joined #nim
17:02:56*azuri5 quit (Client Quit)
17:11:28*narimiran quit (Remote host closed the connection)
17:39:48*azuri5 joined #nim
17:49:28*azuri5 quit (Quit: azuri5)
17:58:47*narimiran joined #nim
18:01:39FromGitter<Vindaar> I've been thinking about the json `%*` macro. Since `JObject` keys are strings anyways, wouldn't it be nice if one could leave out the `"` around the keys (as long as the key is a valid ident of course)?
18:01:58FromGitter<Vindaar> It's probably a bad idea for some reason I haven't thought about :)
18:03:02FromGitter<alehander42> sounds good to me, as `js{..}` already does that iirc
18:08:07FromGitter<Vindaar> which `js{}` do you mean?
18:09:40FromGitter<alehander42> from jsffi, it constructs a JSObject for the Javasript backend
18:11:00*plushie joined #nim
18:16:09FromGitter<Vindaar> oh, I see. indeed
18:21:10FromGitter<jivank> is anyone familiar with the async file streams? how do you go about not reading everything into memory?
18:21:38FromGitter<jivank> jester uses readToStream, https://github.com/dom96/jester/blob/master/jester.nim#L203
18:22:35FromGitter<jivank> and it appears that readToStream, reads everything at once https://github.com/nim-lang/Nim/blob/master/lib/pure/asyncfile.nim#L522
18:22:56FromGitter<jivank> unless the stream is being consumed as its being written
18:26:26*azuri5 joined #nim
18:26:29*azuri5 quit (Client Quit)
18:27:18*crem quit (Ping timeout: 268 seconds)
18:28:41*crem joined #nim
18:47:16FromGitter<Vindaar> https://github.com/nim-lang/Nim/pull/10037 here we go
18:50:46FromGitter<mratsim> After 20 months of hard work, I am proud to present to you the first Shakespeare text generator written in pure Nim. https://github.com/mratsim/Arraymancer/blob/master/examples/ex06_shakespeare_generator.nim#L519-L654 ⏎ ⏎ It can learn anything based printable ASCII text including code, LaTeX, Reddit headlines and politician speeches :P. It takes about 30 min to get something sensible on my slow laptop.
18:54:54FromGitter<Vindaar> @mratsim oh, nice! :D
18:56:04FromGitter<mratsim> debugging probabilities is hell though.
19:24:58*kapil____ quit (Quit: Connection closed for inactivity)
19:33:12Araqsomebody please help this person: https://forum.nim-lang.org/t/4484
19:33:49Zevvkeeps coming up, the SIGPIPE
19:34:53FromGitter<alehander42> @mratsim nice, I just wanted to generate stuff based on sitcom scripts these days
19:35:23FromGitter<mratsim> basically what is missing is a way to save the model and some CLI commands
19:35:37FromGitter<mratsim> then we can run it on the Nim repo, and generate Nim code :P
19:56:48FromGitter<xmonader> @mratsim congrats! currently i'm doing machine learning courses hopefully I can get the inners of your code someday :)
19:57:14FromGitter<xmonader> @leorize did I read that correctly? you're building Nim on Haiku-os?
19:57:30leorizeyep
19:58:01FromGitter<xmonader> I had that idea yesterday! and I didn't bother because it's not posix, correct?
19:58:23Araqit's posix'ish
19:58:33Araqand posix is an illusion anyway
19:59:03Araqin reality there is a bunch of unixes that and posix is the half-assed C specific common subset of these
19:59:07*nsf quit (Quit: WeeChat 2.3)
19:59:35FromGitter<xmonader> @Araq it's a single user system (afaik) so i won't be surprised if there lots of APIs (e.g osproc) not available no? (to compile nim for linux targets at least)
19:59:58*floppydh quit (Quit: WeeChat 2.3)
20:00:23Araqosproc works, Nim uses it extensively and can bootstrap on Haiku
20:00:36leorizexmonader: only selectors got some APIs missing
20:00:55leorizeeverything else works
20:01:05FromGitter<xmonader> @Araq @leorize that's great news
20:01:21FromGitter<xmonader> Also is there a specific reason investing on Haiku? is it an official effort?
20:01:44leorizebecause I ported it :P I'm a HaikuPorts maintainer :)
20:02:08Xeoff topic, but is haiku capability based?
20:02:13FromGitter<xmonader> Oh! great job leorize! I've it on a VM maybe i tinker a bit later
20:02:50leorizeXe: not yet, that is, if they decide to move in that direction
20:02:57Araqfwiw I ported Nim to Haiku before leorize took over
20:03:03Araqso in this sense it's "official"
20:05:02FromGitter<xmonader> @Araq not until a link available on the download pages on nim website :P
20:07:08Araqwow somebody on HN agrees with me https://news.ycombinator.com/item?id=17441773
20:07:45AraqI know you don't wanna hear it but Haiku should avoid "package management" and /usr/bin crap and then I'll reconsider using it
20:08:16FromGitter<xmonader> @Araq wow is that the first time people agree with you?
20:08:38FromGitter<xmonader> I'm totally against system-wide package managers (nixos/guix ftw!)
20:09:10Araqxmonader: it's the first time I read a post like that
20:09:15ldleworkAraq: you're gonna love Nix once you get a chance to take a deep look
20:09:20ldleworkI'm sure of it
20:09:21Araqbut disclaimer: I usually don't read HN
20:09:43FromGitter<xmonader> https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/nim/default.nix interesting they have 0.18 there
20:10:02ldleworkeven if it isn't, Nim is easy to compile
20:10:55Araq> What happens when one library, used by 6 of your installed applications, has a security flaw? You need to update all 6.
20:11:02FromGitter<xmonader> actually automated bundler with AppImage for nim binaries can be a good project
20:11:18Araqyeah, that process is called "automization" and computers are good at it. jezz...
20:11:27Araqer
20:11:34AraqI think in English it's "automation"
20:11:38Araqbut you get the idea ;-)
20:11:41ldleworksomeone should write a buildNimApplication and buildNimLibrary helpers for nixpkgs
20:11:51ldleworkto help adoption of Nim within the Nix community
20:12:02leorizexmonader: Haiku's package manager can install both in home prefix and system prefix ;)
20:12:04ldleworkI don't think anyone has done it.
20:13:59FromGitter<xmonader> actually i'm not sure, because maybe they use the same package if the app not pinned against specific library?
20:15:07FromGitter<xmonader> @leorize do you use it as your daily driver?
20:15:13Araqbbs
20:17:06leorizexmonader: not yet, it doesn't have a tiling window manager :P
20:18:42*rayman22201 joined #nim
20:19:22FromGitter<xmonader> ah I can't use anything but I3. :S but that's not going to happen the UI is deeply integrated can't be swapped right?
20:20:24leorizeyou can write a replacement decorator
20:22:39FromGitter<xmonader> i couldn't grasp the x11 book concepts to write my own window manager no thanks :(
20:24:29*Trustable quit (Remote host closed the connection)
20:30:58*theelous3__ joined #nim
20:31:17*ldlework quit (Changing host)
20:31:17*ldlework joined #nim
20:38:50*narimiran quit (Remote host closed the connection)
20:42:37ZevvI couldn't grasp Haskell to properly configure my Xmonad.
20:43:43FromGitter<xmonader> xmonad doesn't work with the whole wayland updates no? or does it?
20:54:35*gsingh93 quit (Excess Flood)
20:54:45*gsingh93 joined #nim
21:07:09*kapil____ joined #nim
21:19:20*kinkinkijkin quit (Quit: Leaving)
21:27:21*PMunch joined #nim
22:03:10*kinkinkijkin joined #nim
22:08:24*PMunch quit (Remote host closed the connection)
22:26:00*nif quit (Ping timeout: 244 seconds)
22:30:34*zachk joined #nim
22:31:27*zachk quit (Read error: Connection reset by peer)
22:31:50*zachk joined #nim
22:32:46*zachk quit (Changing host)
22:32:46*zachk joined #nim
22:38:42*stefanos82 quit (Remote host closed the connection)
22:40:58*PrimHelios joined #nim
22:47:58*druonysus quit (Ping timeout: 246 seconds)
22:49:42PrimHeliosis there a way to create a proc that returns one of two types, ie int or bool?
22:50:05*kinkinkijkin quit (Ping timeout: 268 seconds)
22:51:37FromGitter<zacharycarter> PrimHelios: use a generic
22:51:41FromGitter<zacharycarter> or concepts
22:52:01FromGitter<zacharycarter> or an object variant
22:52:08FromGitter<zacharycarter> there are multiple ways to do this
22:52:30PrimHelioszacharycarter: I don't think generics would work here as the return type wouldn't be known at compile time
22:52:54FromGitter<zacharycarter> oh only an int or bool - okay
22:53:24PrimHeliosnot necessarily, sorry. The return type would either be Future[T] or Future[bool]
22:53:25FromGitter<zacharycarter> actually I'm not sure a concept would work either
22:54:50FromGitter<alehander42> PrimHelios on what does it depend? are the args different types?
22:55:56PrimHeliosalehander42: I'm trying to make a generic version of asyncdispatch.withTimeout. The return type is either the type of the first argument, or `false`
22:58:16FromGitter<rayman22201> @PrimHelios why not just use the Option type? https://nim-lang.org/docs/options.html
22:58:51PrimHeliosrayman22201: Because I didn't realize that existed :P That'
22:58:58PrimHeliosThat'll work perfectly, thank you!
23:01:49FromGitter<rayman22201> lol. cool
23:16:00*kapil____ quit (Quit: Connection closed for inactivity)
23:20:04*druonysus joined #nim
23:20:04*druonysus quit (Changing host)
23:20:04*druonysus joined #nim
23:43:37*rockcavera quit (Remote host closed the connection)
23:44:57*fthe joined #nim