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:19 | FromGitter | <gogolxdong> anyone used websocket? ⏎ `socket went away, close code: 1002, reason: Masked frame from server` |
03:16:08 | FromGitter | <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:24 | FromGitter | <gogolxdong> It's the problem of chrome. Firefox is fine. |
03:22:23 | FromGitter | <gogolxdong> ah ,there is a trigger websocketUnmaskedByDefault. |
03:25:37 | * | banc joined #nim |
03:47:33 | * | NimBot joined #nim |
04:02:04 | kinkinkijkin | alright, I'm gonna do a fixed-depth tree solution that is going to be very painful to look at |
04:02:23 | kinkinkijkin | but I think it fits this project the best at my current level of knowledge |
04:08:56 | kinkinkijkin | var tree = newSeq[tuple[dlev:uint16,chns:seq[tuple[chan:uint16,lins:seq[string]]]]](0) |
04:09:12 | kinkinkijkin | this is not actually as bad as I thought it would be |
04:12:45 | * | nsf joined #nim |
04:25:09 | FromGitter | <Varriount> Anyone here know anything about Codeship? |
04:33:32 | kinkinkijkin | holy 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:37 | leorize | Araq: 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:46 | Araq | leorize, reJoined is not a test failure, it means the test is covered by the "megatest" category |
07:00:57 | leorize | then maybe it should not be written as FAIL in testresults.html |
07:01:19 | Araq | oh, most people only look at the console output |
07:01:36 | Araq | I probably forgot to update the logic in testresults.html, good point |
07:02:23 | leorize | and I think the `--targets` switch is broken |
07:02:47 | leorize | I 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:45 | Araq | leorize, 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:27 | FromGitter | <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:10 | Araq | no, it's good |
13:37:55 | FromGitter | <yglukhov> cool |
13:38:24 | PMunch | +1 |
13:48:25 | PMunch | Araq, how does Nim find the `lib` folder? |
13:54:07 | FromGitter | <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:15 | leorize | PMunch: ../lib relative to the Nim binary folder |
14:01:56 | PMunch | Hmm, 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:13 | PMunch | IIRC the nim binary there is just a proxy to the actual Nim file |
14:03:25 | PMunch | I 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:25 | leorize | it follows symlink |
14:03:31 | PMunch | No it doesn't |
14:03:48 | leorize | it does, because that's how I packaged Nim for Haiku? |
14:03:53 | * | nsf quit (Quit: WeeChat 2.3) |
14:04:08 | PMunch | `which nim` points me to a binary file |
14:04:09 | leorize | oh, unless you mean `which` doesn't follow symlink :P |
14:05:52 | PMunch | The file /home/peter/.nimble/bin/nim is not a symlink |
14:06:10 | PMunch | http://ix.io/1wi3/ |
14:06:26 | PMunch | `wtf` is an alias for which, type, and file by the way |
14:08:03 | leorize | guess it's far more complicated than I anticipated |
14:08:21 | FromGitter | <SolitudeSF> choosenim generates a proxy which launches nim |
14:08:21 | leorize | there's `findNimStdLib()` in compiler/nimeval, but I suspect it's not used |
14:10:04 | PMunch | Yeah, but that does pretty much the same as you suggested |
14:10:13 | PMunch | Find the `nim` binary and go up a folder |
14:10:20 | PMunch | It returns "" for me |
14:10:43 | PMunch | http://ix.io/1wi4/Nim |
14:10:53 | PMunch | That prints an empty string |
14:11:19 | leorize | https://github.com/nim-lang/Nim/blob/a87be403397e9be86395c76fdcdf49269898fdb4/compiler/options.nim#L538 |
14:14:14 | Zevv | Given 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:25 | Zevv | well, 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:28 | PMunch | http://ix.io/1wi8/Nim |
14:31:49 | PMunch | This fails with: |
14:31:50 | PMunch | test.nim(10, 28) template/generic instantiation from here |
14:31:50 | PMunch | ../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:07 | PMunch | Why isn't it able to propagate M properly over as bits? |
14:36:03 | * | Vladar quit (Remote host closed the connection) |
14:42:35 | PMunch | If I hard-code it to 128 it works fine |
14:48:30 | FromGitter | <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:47 | FromGitter | <xmonader> Publicity wise too ^ |
14:51:18 | PMunch | Well you would need to dig up a lot of information |
14:52:51 | PMunch | Well 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:18 | PMunch | Oh, 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:14 | FromGitter | <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:26 | leorize | will version 0.19.2 ever be released? |
16:04:07 | * | kungtotte quit (Read error: Connection reset by peer) |
16:08:42 | l1x | is 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:45 | leorize | l1x: no, threads + cancellation is your best bet |
16:16:19 | leorize | seems like async pipes isn't really popular |
16:20:50 | l1x | woo, really? |
16:21:17 | l1x | you can defer things with channels at the very least right? |
16:28:48 | * | theelous3__ quit (Ping timeout: 245 seconds) |
16:29:40 | FromGitter | <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:39 | FromGitter | <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:58 | FromGitter | <Vindaar> It's probably a bad idea for some reason I haven't thought about :) |
18:03:02 | FromGitter | <alehander42> sounds good to me, as `js{..}` already does that iirc |
18:08:07 | FromGitter | <Vindaar> which `js{}` do you mean? |
18:09:40 | FromGitter | <alehander42> from jsffi, it constructs a JSObject for the Javasript backend |
18:11:00 | * | plushie joined #nim |
18:16:09 | FromGitter | <Vindaar> oh, I see. indeed |
18:21:10 | FromGitter | <jivank> is anyone familiar with the async file streams? how do you go about not reading everything into memory? |
18:21:38 | FromGitter | <jivank> jester uses readToStream, https://github.com/dom96/jester/blob/master/jester.nim#L203 |
18:22:35 | FromGitter | <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:56 | FromGitter | <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:16 | FromGitter | <Vindaar> https://github.com/nim-lang/Nim/pull/10037 here we go |
18:50:46 | FromGitter | <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:54 | FromGitter | <Vindaar> @mratsim oh, nice! :D |
18:56:04 | FromGitter | <mratsim> debugging probabilities is hell though. |
19:24:58 | * | kapil____ quit (Quit: Connection closed for inactivity) |
19:33:12 | Araq | somebody please help this person: https://forum.nim-lang.org/t/4484 |
19:33:49 | Zevv | keeps coming up, the SIGPIPE |
19:34:53 | FromGitter | <alehander42> @mratsim nice, I just wanted to generate stuff based on sitcom scripts these days |
19:35:23 | FromGitter | <mratsim> basically what is missing is a way to save the model and some CLI commands |
19:35:37 | FromGitter | <mratsim> then we can run it on the Nim repo, and generate Nim code :P |
19:56:48 | FromGitter | <xmonader> @mratsim congrats! currently i'm doing machine learning courses hopefully I can get the inners of your code someday :) |
19:57:14 | FromGitter | <xmonader> @leorize did I read that correctly? you're building Nim on Haiku-os? |
19:57:30 | leorize | yep |
19:58:01 | FromGitter | <xmonader> I had that idea yesterday! and I didn't bother because it's not posix, correct? |
19:58:23 | Araq | it's posix'ish |
19:58:33 | Araq | and posix is an illusion anyway |
19:59:03 | Araq | in 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:35 | FromGitter | <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:23 | Araq | osproc works, Nim uses it extensively and can bootstrap on Haiku |
20:00:36 | leorize | xmonader: only selectors got some APIs missing |
20:00:55 | leorize | everything else works |
20:01:05 | FromGitter | <xmonader> @Araq @leorize that's great news |
20:01:21 | FromGitter | <xmonader> Also is there a specific reason investing on Haiku? is it an official effort? |
20:01:44 | leorize | because I ported it :P I'm a HaikuPorts maintainer :) |
20:02:08 | Xe | off topic, but is haiku capability based? |
20:02:13 | FromGitter | <xmonader> Oh! great job leorize! I've it on a VM maybe i tinker a bit later |
20:02:50 | leorize | Xe: not yet, that is, if they decide to move in that direction |
20:02:57 | Araq | fwiw I ported Nim to Haiku before leorize took over |
20:03:03 | Araq | so in this sense it's "official" |
20:05:02 | FromGitter | <xmonader> @Araq not until a link available on the download pages on nim website :P |
20:07:08 | Araq | wow somebody on HN agrees with me https://news.ycombinator.com/item?id=17441773 |
20:07:45 | Araq | I 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:16 | FromGitter | <xmonader> @Araq wow is that the first time people agree with you? |
20:08:38 | FromGitter | <xmonader> I'm totally against system-wide package managers (nixos/guix ftw!) |
20:09:10 | Araq | xmonader: it's the first time I read a post like that |
20:09:15 | ldlework | Araq: you're gonna love Nix once you get a chance to take a deep look |
20:09:20 | ldlework | I'm sure of it |
20:09:21 | Araq | but disclaimer: I usually don't read HN |
20:09:43 | FromGitter | <xmonader> https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/nim/default.nix interesting they have 0.18 there |
20:10:02 | ldlework | even if it isn't, Nim is easy to compile |
20:10:55 | Araq | > What happens when one library, used by 6 of your installed applications, has a security flaw? You need to update all 6. |
20:11:02 | FromGitter | <xmonader> actually automated bundler with AppImage for nim binaries can be a good project |
20:11:18 | Araq | yeah, that process is called "automization" and computers are good at it. jezz... |
20:11:27 | Araq | er |
20:11:34 | Araq | I think in English it's "automation" |
20:11:38 | Araq | but you get the idea ;-) |
20:11:41 | ldlework | someone should write a buildNimApplication and buildNimLibrary helpers for nixpkgs |
20:11:51 | ldlework | to help adoption of Nim within the Nix community |
20:12:02 | leorize | xmonader: Haiku's package manager can install both in home prefix and system prefix ;) |
20:12:04 | ldlework | I don't think anyone has done it. |
20:13:59 | FromGitter | <xmonader> actually i'm not sure, because maybe they use the same package if the app not pinned against specific library? |
20:15:07 | FromGitter | <xmonader> @leorize do you use it as your daily driver? |
20:15:13 | Araq | bbs |
20:17:06 | leorize | xmonader: not yet, it doesn't have a tiling window manager :P |
20:18:42 | * | rayman22201 joined #nim |
20:19:22 | FromGitter | <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:24 | leorize | you can write a replacement decorator |
20:22:39 | FromGitter | <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:37 | Zevv | I couldn't grasp Haskell to properly configure my Xmonad. |
20:43:43 | FromGitter | <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:42 | PrimHelios | is 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:37 | FromGitter | <zacharycarter> PrimHelios: use a generic |
22:51:41 | FromGitter | <zacharycarter> or concepts |
22:52:01 | FromGitter | <zacharycarter> or an object variant |
22:52:08 | FromGitter | <zacharycarter> there are multiple ways to do this |
22:52:30 | PrimHelios | zacharycarter: I don't think generics would work here as the return type wouldn't be known at compile time |
22:52:54 | FromGitter | <zacharycarter> oh only an int or bool - okay |
22:53:24 | PrimHelios | not necessarily, sorry. The return type would either be Future[T] or Future[bool] |
22:53:25 | FromGitter | <zacharycarter> actually I'm not sure a concept would work either |
22:54:50 | FromGitter | <alehander42> PrimHelios on what does it depend? are the args different types? |
22:55:56 | PrimHelios | alehander42: 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:16 | FromGitter | <rayman22201> @PrimHelios why not just use the Option type? https://nim-lang.org/docs/options.html |
22:58:51 | PrimHelios | rayman22201: Because I didn't realize that existed :P That' |
22:58:58 | PrimHelios | That'll work perfectly, thank you! |
23:01:49 | FromGitter | <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 |