00:00:15 | FromGitter | <bung87> the files may live in requesy.files or other field name |
00:00:38 | FromGitter | <bung87> like mostly http lib in other language |
00:01:20 | FromGitter | <DanielSokil> Does `asynchttpserver` support `request.files`? I don't see it in docs. |
00:01:27 | FromGitter | <bung87> I have not use http lib in nim |
00:02:13 | FromGitter | <bung87> but you can follow the suggestion |
00:03:22 | FromGitter | <DanielSokil> > generally request.body is pain text of http body ⏎ ⏎ `request.body` is a mixture of HTML form data and files together, I'm trying to filter the files out. |
00:09:01 | * | rnrwashere joined #nim |
00:11:59 | FromGitter | <bung87> maybe its in another lib,weird of parsing http body by self |
00:29:06 | * | nsf quit (Quit: WeeChat 2.2) |
00:41:56 | * | rnrwashere quit () |
00:46:35 | FromGitter | <alehander42> @krux02 I know, I already have a prototype locally |
00:47:41 | FromGitter | <alehander42> (about query syntax with a dsl), the issue was more about dsl design in general |
00:48:29 | * | Guest29236 quit (Remote host closed the connection) |
00:48:44 | * | Guest29236 joined #nim |
00:49:03 | FromGitter | <alehander42> @krux02 I also don't use vim/emacs, I use sublime |
00:50:39 | FromGitter | <alehander42> I just can't see editing speed as a bottleneck, and I am already used to my shortcuts, but if I started from scratch, I'd start with vim's modal editing and then use it in a better editor (or maybe neovim) |
00:54:06 | FromDiscord_ | <deech> If I have a tuple `var t = ("hello", "world")` how do I pass it to a function that accepts a reference to a tuple, eg. `proc foo(x : ref tuple[string,string])`? |
00:54:40 | * | krux02 quit (Remote host closed the connection) |
00:55:03 | FromGitter | <kayabaNerve> deech: You can't create a ref at runtime |
00:55:40 | FromGitter | <kayabaNerve> ```var t: ref tuple[string, string] ⏎ t[] = ("hello", "world") ⏎ ⏎ foo(t)``` [https://gitter.im/nim-lang/Nim?at=5bb8080c5331811c2e57ad6a] |
00:55:56 | FromGitter | <kayabaNerve> Define the ref. Set the value, not the address. Call the function. |
00:58:43 | FromDiscord_ | <deech> I actually don't really need `ref` semantics, I just want to mutate the tuple in place, I tried `proc foo(x : var tuple[string,string])` but the compiler complained that `var t = ("hello" , "world") ; foo t` was ambiguous. |
01:01:35 | FromDiscord_ | <deech> That was my mistake, you can actually do that. |
01:03:20 | FromGitter | <gogolxdong> Anyone used SDL2 IME ? |
01:05:28 | * | darithorn joined #nim |
01:09:36 | * | Guest29236 quit (Ping timeout: 252 seconds) |
01:13:08 | * | vivus quit (Remote host closed the connection) |
01:27:26 | * | mgoelzertf joined #nim |
01:33:00 | * | mgoelzertf quit (Remote host closed the connection) |
01:33:21 | FromGitter | <zacharycarter> nope :/ do any of the SDl2 bindings support that API? |
01:34:42 | FromGitter | <gogolxdong> /** ⏎ ⏎ 1) \brief Start accepting Unicode text input events. ⏎ 2) This function will show the on-screen keyboard if supported. ⏎ * ... [https://gitter.im/nim-lang/Nim?at=5bb81131435c2a518e5b0aee] |
01:37:38 | FromGitter | <gogolxdong> hasScreenKeyboardSupport returns false. |
01:40:03 | FromGitter | <zacharycarter> hrm |
01:40:16 | FromGitter | <zacharycarter> well are using an android or ios device? |
01:40:25 | FromGitter | <zacharycarter> I have a feeling that's the only places an on screen keyboard would be available |
01:42:42 | FromGitter | <gogolxdong> on Windows now, will try Android. |
01:44:22 | FromGitter | <zacharycarter> 👍 |
01:45:05 | * | tiorock joined #nim |
01:45:05 | * | tiorock quit (Changing host) |
01:45:05 | * | tiorock joined #nim |
01:45:05 | * | rockcavera is now known as Guest83816 |
01:45:05 | * | Guest83816 quit (Killed (tolkien.freenode.net (Nickname regained by services))) |
01:45:05 | * | tiorock is now known as rockcavera |
01:50:01 | FromGitter | <zacharycarter> I want to find something to use - https://github.com/jnz/q3vm for |
01:55:26 | FromGitter | <gogolxdong> for your game dev? |
01:57:08 | FromGitter | <gogolxdong> better add build-in chinese input method :) |
01:59:21 | FromGitter | <gogolxdong> I played World of Warcraft and love it, nothing else. |
01:59:54 | FromGitter | <zacharycarter> haha - well I'm not sure what I'd use it for |
02:00:13 | FromGitter | <zacharycarter> I need to get going on my engine again - I plan to do some live streaming tomorrow morning |
02:02:01 | FromGitter | <gogolxdong> I missed last time. |
02:02:59 | FromGitter | <gogolxdong> What's the time of you? |
02:03:12 | FromGitter | <zacharycarter> it's 10:03 PM right now |
02:03:26 | FromGitter | <zacharycarter> I'm in EST - I think like UTC - 5 |
02:04:55 | FromGitter | <gogolxdong> we are at the reverse timezone. |
02:05:21 | FromGitter | <gogolxdong> UTC+8 |
02:06:12 | FromGitter | <gogolxdong> the same time , but a.m. |
02:06:13 | FromGitter | <zacharycarter> ah yeah - well - I'm going to try to start it a bit later than I did last time - probably around 10 AM my time |
02:06:16 | FromGitter | <zacharycarter> gotcha |
02:16:48 | FromGitter | <bung87> https://nim-lang.org/docs/manual.html#distinct-type-modelling-currencies ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ `multiplicative(typ, base)` give the hint ... [https://gitter.im/nim-lang/Nim?at=5bb81b0f1e23486b9395bb56] |
02:20:53 | * | kayrustl joined #nim |
02:26:13 | * | kayrustl quit (Remote host closed the connection) |
02:48:50 | * | jjardonlM joined #nim |
02:49:23 | * | technicallyagd joined #nim |
02:50:21 | * | technicallyagd quit (Client Quit) |
02:54:06 | * | jjardonlM quit (Remote host closed the connection) |
03:28:05 | * | PrimHelios quit (Quit: Leaving) |
03:30:34 | * | dddddd quit (Remote host closed the connection) |
03:34:23 | * | Forty-Bot joined #nim |
03:40:34 | * | Forty-Bot quit (Remote host closed the connection) |
03:43:22 | * | tefter quit (Remote host closed the connection) |
03:43:48 | * | chemist69 quit (Ping timeout: 252 seconds) |
03:45:57 | * | chemist69 joined #nim |
03:47:57 | * | tefter joined #nim |
03:49:19 | * | vlad1777d quit (Ping timeout: 268 seconds) |
03:57:50 | * | hsaliak_ joined #nim |
04:00:46 | * | d2sAZ joined #nim |
04:03:41 | * | hsaliak_ quit (Remote host closed the connection) |
04:04:59 | * | d2sAZ quit (Remote host closed the connection) |
04:10:34 | FromGitter | <bung87> https://nim-lang.org/docs/manual.html#generics-concept-refinement ⏎ `IncidendeGraph = concept g of Graph` must add g to pass the compiling. |
04:29:48 | * | skelett quit (Ping timeout: 252 seconds) |
05:47:46 | * | wildlander quit (Quit: Konversation terminated!) |
06:04:51 | * | XyleJs joined #nim |
06:08:32 | * | narimiran joined #nim |
06:11:27 | * | XyleJs quit (K-Lined) |
07:00:53 | * | narimiran quit (Ping timeout: 245 seconds) |
07:01:07 | * | narimiran joined #nim |
07:05:06 | * | darithorn quit () |
07:24:48 | * | vlad1777d joined #nim |
07:39:07 | * | shpx joined #nim |
07:39:54 | * | Vladar joined #nim |
07:57:52 | * | banc joined #nim |
08:03:47 | * | gmpreussner_ joined #nim |
08:05:14 | * | gmpreussner quit (Ping timeout: 268 seconds) |
08:16:51 | * | TheLemonMan joined #nim |
08:18:33 | TheLemonMan | shashlick, what about adopting the naming convention used by rust for your bindings? you name them `libname`-sys so that one can write an idiomatic wrapper and publish it as just `libname` |
08:20:32 | TheLemonMan | arnetheduck, wrt #9206 should we care about the output pointer being possibly unaligned? |
08:47:11 | * | vlad1777d quit (Ping timeout: 260 seconds) |
09:05:53 | FromGitter | <tim-st> what does `{.inject.}` mean? |
09:06:15 | TheLemonMan | do not rename the variable |
09:06:33 | FromGitter | <tim-st> in the generated c code? |
09:07:15 | narimiran | @tim-st in templates? |
09:07:22 | TheLemonMan | in the generated nim code |
09:07:48 | narimiran | in templates it is used to inject the local name to 'body' |
09:07:51 | TheLemonMan | the templates are hygienic by default so every variable defined insided their body is renamed |
09:08:11 | FromGitter | <tim-st> ok, thanks |
09:31:15 | * | kapil____ joined #nim |
10:04:24 | * | tdc joined #nim |
10:39:23 | * | SenasOzys joined #nim |
10:39:57 | * | dddddd joined #nim |
10:43:42 | * | kalipso joined #nim |
10:44:24 | * | tdc quit (Ping timeout: 244 seconds) |
10:45:36 | * | elrood joined #nim |
10:46:24 | * | kalipso quit (Remote host closed the connection) |
10:49:47 | * | MyMind joined #nim |
10:50:24 | * | Sembei quit (Ping timeout: 252 seconds) |
10:58:25 | FromGitter | <bung87> any example of object <=> json ? |
11:00:20 | * | tdc joined #nim |
11:03:56 | FromGitter | <mratsim> in the `marshal` module |
11:09:40 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
11:10:23 | * | mitsuhikoAS joined #nim |
11:13:31 | FromGitter | <bung87> ` ⏎ proc `$$`T (x: T): string ⏎ returns a string representation of x. ⏎ ⏎ Note: to serialize x to JSON use $(%x) from the json module ... [https://gitter.im/nim-lang/Nim?at=5bb898dbc7bf7c3662c4c6fe] |
11:15:48 | FromGitter | <bung87> dont know why this proc have no example |
11:15:55 | * | mitsuhikoAS quit (Remote host closed the connection) |
11:18:31 | FromGitter | <bung87> I think it should mentioned as `%*`,`parseJson ` does. |
11:37:02 | * | shpx quit (Read error: Connection reset by peer) |
11:41:00 | FromGitter | <gogolxdong> %*{"a":"b"} = json -> object |
11:41:31 | FromGitter | <gogolxdong> parseJson(string) = json -> object |
11:47:04 | FromGitter | <bung87> both not I need |
11:47:52 | FromGitter | <bung87> first is array of tuple to js |
11:49:13 | FromGitter | <bung87> second is string to json |
12:11:32 | * | jjido joined #nim |
12:36:32 | * | Vladar quit (Remote host closed the connection) |
12:38:13 | FromGitter | <gogolxdong> read json and packedjson again. |
12:57:45 | * | SenasOzys quit (Read error: Connection reset by peer) |
13:21:37 | * | modulitos joined #nim |
13:25:00 | * | xet7 quit (Quit: Leaving) |
13:25:00 | * | modulitos quit (Killed (Sigyn (Spam is off topic on freenode.))) |
13:26:38 | * | xet7 joined #nim |
13:47:27 | * | tiorock joined #nim |
13:47:27 | * | tiorock quit (Changing host) |
13:47:27 | * | tiorock joined #nim |
13:47:27 | * | rockcavera is now known as Guest31945 |
13:47:27 | * | tiorock is now known as rockcavera |
13:50:34 | * | Guest31945 quit (Ping timeout: 268 seconds) |
14:06:42 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:22:18 | * | Kipe_lV joined #nim |
14:25:21 | * | Kipe_lV quit (Remote host closed the connection) |
14:28:45 | * | druonysus quit (Ping timeout: 252 seconds) |
14:28:55 | * | druonysus joined #nim |
14:35:08 | FromDiscord_ | <smitop> how do addr/ptr get treated in JavaScript? |
14:37:06 | FromDiscord_ | <smitop> Also is this discord gateway sending to IRC? |
14:37:12 | narimiran | it is |
14:37:43 | * | TheLemonMan joined #nim |
14:39:55 | * | tiorock joined #nim |
14:39:55 | * | tiorock quit (Changing host) |
14:39:55 | * | tiorock joined #nim |
14:39:55 | * | rockcavera is now known as Guest87278 |
14:39:55 | * | tiorock is now known as rockcavera |
14:42:22 | * | Guest87278 quit (Ping timeout: 268 seconds) |
14:42:42 | TheLemonMan | smitop, pointers are treated as tuples (addr + displacement) |
14:48:23 | * | vlad1777d joined #nim |
14:48:24 | FromDiscord_ | <smitop> what does the {.magic.} pragma do? i see it in the docs, without explanation |
14:48:31 | FromGitter | <arnetheduck> @TheLemonMan yeah, I'd say. same story, you might be outputting to some misaligned binary format |
14:49:33 | TheLemonMan | smitop, lets the compiler do magic stuff for the given symbol |
14:51:13 | * | zurs joined #nim |
15:02:34 | * | wonchul joined #nim |
15:03:05 | * | Guest24985 joined #nim |
15:04:06 | * | Guest24985 quit (Remote host closed the connection) |
15:04:11 | FromGitter | <arnetheduck> @TheLemonMan but.. but I'm also thinking that the easier way to solve this conundrum might be to offer a `T littelEndian(T)` function instead / as well - that's guaranteed to do the right thing without too much hassle, in both directions |
15:05:19 | * | wonchul quit (K-Lined) |
15:05:26 | TheLemonMan | arnetheduck, where T is {uint16,uint32,uint64} or a ptr version of them? |
15:05:47 | FromGitter | <arnetheduck> `uint16` et |
15:05:59 | FromGitter | <arnetheduck> like the builtins |
15:06:46 | FromGitter | <arnetheduck> I'd maybe offer it for bytes as well just to simplify generic code, but of course, it doesn't make much sense |
15:07:31 | TheLemonMan | so you want to drop the pointer-based versions (and solve the alighment problem) ? |
15:11:51 | * | PrimHelios joined #nim |
15:25:57 | * | tdc quit (Ping timeout: 252 seconds) |
15:33:20 | * | zurs quit (Ping timeout: 252 seconds) |
15:34:51 | FromGitter | <Bennyelg> ```code paste, see link``` ⏎ ⏎ excluding the fact that this code is not intent to do sh1t:) this is what functional programming referring ⏎ to ? [https://gitter.im/nim-lang/Nim?at=5bb8d61bc08b8b3067e0d838] |
15:53:48 | * | redlegion_ joined #nim |
15:59:14 | FromGitter | <arnetheduck> @TheLemonMan well, the pointer-based ones can ostensibly remain and be implemented with the non-pointer versions |
16:00:04 | FromGitter | <arnetheduck> @TheLemonMan generally I also find the names a bit awkward.. the stuff is already in the endian module so why repeat endian all over again? |
16:00:27 | TheLemonMan | redundancy |
16:01:42 | FromGitter | <kdheepak> @TheLemonMan I've made more changes to the PR. |
16:01:55 | FromGitter | <kdheepak> Thanks for being so incredibly patient with me. |
16:02:47 | FromGitter | <kdheepak> Commenting this line in parseTry helped ⏎ ⏎ ``` # if b.kind == nkFinally: break``` [https://gitter.im/nim-lang/Nim?at=5bb8dca764cfc273f9a5d434] |
16:03:18 | FromGitter | <Bennyelg> can I do something like ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bb8dcc6600c5f642362c1f0] |
16:03:36 | TheLemonMan | Thank _you_ for putting up with all my comments heh I hope you enjoyed the compiler internals |
16:05:30 | FromGitter | <kdheepak> It's really interesting! |
16:05:39 | FromGitter | <kdheepak> The fact that it's all in |
16:05:45 | FromGitter | <kdheepak> Nim is amazing. |
16:09:13 | TheLemonMan | kdheepak, gah I misremembered what that PR was about, you need to separate each case in its test file |
16:09:28 | TheLemonMan | sorry about that, I shouldn't really do this many things at once |
16:10:05 | TheLemonMan | (you still have a comment referencing countFinally ;) |
16:10:35 | TheLemonMan | arnetheduck, they're definitely much better than their C counterparts :P |
16:16:46 | FromGitter | <arnetheduck> @TheLemonMan ideal api for me, I think: `proc to(x: uint16, endian: Endian): uint16` - the latter would be called as `42.to(endLittle)` - any optimizing compiler will remove the conditional when it can, and leaves the option to use it dynamically if ever needed (ie in a gui that compares encodings) |
16:16:49 | FromGitter | <kdheepak> Good catch! I didn't have smartcase on but thought I did when I searched for `countFinally`. |
16:19:00 | FromGitter | <bung87> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bb8e074bbdc0b2505f6bcb6] |
16:19:35 | FromGitter | <bung87> is it possible to do this ? it hints me `object constructor needs an object type ⏎ ` |
16:20:18 | FromGitter | <bung87> `Request[T] = concept o,type M` |
16:23:16 | * | redlegion_ quit (Quit: leaving) |
16:29:32 | narimiran | i have a brain-fart: is there an easy way to (deep)copy ref object with all of its current values? |
16:31:18 | FromGitter | <bung87> there’s https://nim-lang.org/docs/system.html#deepCopy%2CT%2CT |
16:33:05 | narimiran | thanks @bung87 |
16:34:18 | * | Trustable joined #nim |
16:37:35 | * | kaivaiKM joined #nim |
16:44:16 | * | kaivaiKM quit (Remote host closed the connection) |
16:50:54 | * | stefanos82 joined #nim |
16:58:00 | * | rockcavera quit (Remote host closed the connection) |
17:02:13 | FromGitter | <malkomalko> Reading Nim in Action and ran into an error while playing with asyncdispatch.runForever: https://gist.github.com/malkomalko/ceb9b3f34db2b28c9b891a3462da2028 anybody seen this before or know what's going on? |
17:06:07 | * | rockcavera joined #nim |
17:08:09 | * | NimBot joined #nim |
17:09:11 | * | darithorn joined #nim |
17:09:56 | Zevv | yes |
17:10:03 | Zevv | you have not timers or handles registered in the dispatcher :) |
17:10:50 | Zevv | this bit me as well - asyncfile is not really async I believe. |
17:11:07 | Zevv | no, nevermind that |
17:11:42 | Zevv | when your file is done reading, there is no longer any handle to read from in the event loop |
17:11:55 | Zevv | and with no handles and no timers, there is nothing that could ever put something back in |
17:13:44 | Zevv | if asyncdispatch.hasPendingOperations: asyncdispatch.poll() |
17:14:07 | * | zurs joined #nim |
17:18:41 | * | SenasOzys joined #nim |
17:19:36 | * | SenasOzys quit (Remote host closed the connection) |
17:20:00 | * | SenasOzys joined #nim |
17:26:13 | TheLemonMan | kdheepak, you should also change parser.nim in order to have the compiler show your error |
17:26:42 | FromGitter | <kdheepak> @TheLemonMan should I commit my parser.nim changes? |
17:27:03 | TheLemonMan | yes, otherwise the check you've just introduced is useless :) |
17:27:09 | FromGitter | <kdheepak> Got it! |
17:28:12 | TheLemonMan | and: 1) one errormsg per test 2) you have to quote the message (use single quotes) otherwise it'll pick the first word only (as you can see for the failed test case) |
17:32:44 | * | tefter quit (Remote host closed the connection) |
17:36:35 | * | tefter joined #nim |
17:36:49 | FromGitter | <kdheepak> I had to use double quotes to get it to work locally. |
17:37:28 | FromGitter | <kdheepak> I've pushed the relevant changes. I haven't run the full test suite locally yet. I'll wait to see travis results. |
17:37:47 | FromGitter | <kdheepak> I have to step out (biking for an hour or so), I'll check on it again in a few hours. |
17:38:23 | FromGitter | <kdheepak> Then, I'll start looking at the rst parser :) (cc @kaushalmodi). |
17:40:42 | * | xet7 quit (Remote host closed the connection) |
17:51:30 | * | dddddd quit (Remote host closed the connection) |
17:55:19 | * | rockcavera quit (Ping timeout: 246 seconds) |
17:57:24 | * | zurs quit (Ping timeout: 252 seconds) |
17:59:09 | * | rockcavera joined #nim |
17:59:09 | * | rockcavera quit (Changing host) |
17:59:09 | * | rockcavera joined #nim |
18:01:25 | * | hzx joined #nim |
18:01:56 | * | zurs joined #nim |
18:07:06 | * | cori quit (Ping timeout: 268 seconds) |
18:14:25 | * | xet7 joined #nim |
18:37:37 | * | nsf joined #nim |
18:49:46 | * | zurs quit (Ping timeout: 260 seconds) |
18:51:45 | FromGitter | <malkomalko> It looks like adding fmReadWrite to openAsync -> `openAsync("/some/file", fmReadWrite)` causes the file contents to be wiped out. Is that standard behavior or should I file that as a bug? |
18:53:57 | FromDiscord_ | <treeform> Any one here use DigitalOcean? I am creating an API for DigitalOcean: https://github.com/treeform/digitalocean What would you like to see in an API like this? |
18:55:10 | FromDiscord_ | <smitop> Is there a way to check what language something is being compiled for? |
18:55:22 | TheLemonMan | malkomalko, fmReadWriteExisting |
18:59:19 | FromGitter | <malkomalko> ah ok, so `fmReadWrite` is suppose to clear out contents for writing where `fmReadWriteExisting` is meant for appending new content? |
19:00:16 | TheLemonMan | pretty much, the latter makes sure a new file is created if it doesn't yet exist |
19:00:36 | FromGitter | <malkomalko> Thank you |
19:00:56 | FromGitter | <malkomalko> sorry, just trying a bunch of code snippets going through Nim in Action and noting things that appear to be different. Much appreciated! |
19:06:11 | FromGitter | <7sDream> (https://files.gitter.im/nim-lang/Nim/BRDk/1538852583834.jpg) |
19:06:23 | FromGitter | <7sDream> Maybe I meet a very strange bug of doc generator… |
19:32:15 | Calinou | what's the difference between the re and nre (regex) modules? I forgot |
19:32:36 | Calinou | and which one should be used today (if one wishes to stick to official modules)? |
19:33:08 | * | zurs joined #nim |
19:33:30 | TheLemonMan | good question, there's also https://github.com/nitely/nim-regex |
19:34:13 | FromGitter | <kaushalmodi> Calinou: nre is deprecated |
19:34:18 | FromGitter | <kaushalmodi> re is impure lib |
19:34:33 | Calinou | right |
19:34:35 | * | nsf quit (Quit: WeeChat 2.2) |
19:34:40 | Calinou | yeah, I heard of the pure Nim implementation |
19:34:57 | FromGitter | <kaushalmodi> Calinou: nre is deprecated |
19:35:23 | FromGitter | <kaushalmodi> (hmm, strange gitter bug.. seems like it sent duplicate messages) |
19:35:32 | Calinou | yeah, it sent a duplicate message |
19:36:15 | TheLemonMan | ah, nre is deprecated, gotta change this code I've just written then :( |
19:36:59 | Calinou | docopt uses nre too :( |
19:37:00 | * | Pisuke joined #nim |
19:37:09 | Calinou | so I have to ship the PCRE DLL with my Windows releases, which is kind of ugly |
19:37:45 | * | MyMind quit (Ping timeout: 268 seconds) |
19:37:46 | Calinou | what's weird is its README claims to use re, but the main file imports nre |
19:38:17 | TheLemonMan | Calinou, https://github.com/docopt/docopt.nim/pull/42 |
19:38:31 | FromGitter | <kaushalmodi> https://scripter.co/notes/nim/#regex |
19:38:45 | TheLemonMan | there's also https://github.com/c-blake/cligen if you aren't sold on docopt |
19:38:57 | FromGitter | <kaushalmodi> cligen ++++ |
19:39:12 | FromGitter | <kaushalmodi> docopt dev isn't actively using Nim |
19:39:16 | FromGitter | <kaushalmodi> but it helps maintain it |
19:39:27 | FromGitter | <kaushalmodi> s/it/he |
19:39:39 | TheLemonMan | it helps mantain he? |
19:39:45 | FromGitter | <kaushalmodi> hehe |
19:40:04 | Calinou | cligen looks… strange to me |
19:40:16 | Calinou | it seems quite bare-bones still |
19:40:20 | FromGitter | <kaushalmodi> what part is strange? |
19:40:30 | Calinou | I mean, I'm used to clap and wish there was something similar in Nim |
19:40:55 | FromGitter | <kaushalmodi> cligen supports sub commands, switches, non-switch args, everything |
19:41:01 | FromGitter | <kaushalmodi> and even autogenerates docs for you |
19:41:20 | FromGitter | <kaushalmodi> by docs, I mean the `--help` output |
19:41:37 | FromGitter | <kaushalmodi> at minimum you use may be 3 lines related to cligen and you are done |
19:41:44 | Calinou | hmm |
19:41:55 | FromGitter | <kaushalmodi> see the cligen tests |
19:42:08 | Calinou | oh, it's possible to make it generate Bash/zsh completion too |
19:42:10 | * | Sembei joined #nim |
19:42:23 | FromGitter | <kaushalmodi> hmm, I wouldn't know about that |
19:42:34 | Calinou | does it have argument validation/command suggestion in case of typos? |
19:42:46 | FromGitter | <kaushalmodi> not that I know of |
19:42:57 | FromGitter | <kaushalmodi> you can request the feature on that repo's issue manager |
19:43:06 | Calinou | clap has those, it really helps in having a more solid CLI experience |
19:43:16 | FromGitter | <kaushalmodi> the dev c-blake is very helpfuul |
19:43:55 | * | Pisuke quit (Ping timeout: 268 seconds) |
19:46:01 | Calinou | I could look at migrating to cligen (from docopt) |
19:46:10 | Calinou | I picked docopt because it's the first option I saw :P |
19:50:28 | Calinou | why are these marked as deprecated? https://github.com/nim-lang/Nim/blame/devel/lib/impure/re.nim#L560-L583 |
19:51:31 | TheLemonMan | they're not that useful |
19:53:16 | Calinou | I wanted to send a PR to improve the URL/email ones :P |
19:54:13 | TheLemonMan | the clap API looks quite nice (the builder pattern not-so-much) |
19:56:03 | * | urzdsBj joined #nim |
20:00:35 | Calinou | I use the cli.yml option here :) |
20:00:44 | Calinou | it adds a dependency, but it's much easier to read/write |
20:01:43 | TheLemonMan | in Nim-land you'd just use a macro and write a nice DSL for it :) |
20:02:35 | * | stefanos82 quit (Quit: Quitting for now...) |
20:02:46 | * | urzdsBj quit (Remote host closed the connection) |
20:20:13 | * | kapil____ quit (Quit: Connection closed for inactivity) |
20:25:26 | * | rockcavera quit (Ping timeout: 260 seconds) |
20:25:57 | * | dddddd joined #nim |
20:26:49 | * | rockcavera joined #nim |
20:26:49 | * | rockcavera quit (Changing host) |
20:26:49 | * | rockcavera joined #nim |
20:30:03 | * | tiorock joined #nim |
20:30:03 | * | tiorock quit (Changing host) |
20:30:03 | * | tiorock joined #nim |
20:30:03 | * | rockcavera quit (Killed (verne.freenode.net (Nickname regained by services))) |
20:30:03 | * | tiorock is now known as rockcavera |
20:33:45 | * | tiorock joined #nim |
20:33:45 | * | rockcavera is now known as Guest46086 |
20:33:45 | * | Guest46086 quit (Killed (barjavel.freenode.net (Nickname regained by services))) |
20:33:45 | * | tiorock is now known as rockcavera |
20:34:40 | * | jamierocksvk joined #nim |
20:35:56 | * | jamierocksvk quit (K-Lined) |
20:36:28 | * | zurs quit (Ping timeout: 272 seconds) |
20:41:34 | * | rockcavera quit (Ping timeout: 246 seconds) |
20:43:27 | * | zurs joined #nim |
20:48:01 | * | zurs quit (Client Quit) |
20:48:08 | * | hzx quit (Quit: Going offline, see ya! (www.adiirc.com)) |
21:07:30 | * | narimiran quit (Ping timeout: 272 seconds) |
21:14:49 | FromDiscord_ | <deech> Is there a way to get closer to sum type semantics in Nim? While variants look somewhat like sum types they are a runtime construct that can raise a `FieldError`. |
21:17:12 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
21:17:46 | * | mawell joined #nim |
21:18:44 | * | mawell left #nim (#nim) |
21:20:49 | * | Trustable quit (Remote host closed the connection) |
21:37:02 | FromDiscord_ | <deech> Ah, I see the closest way is how option types are implemented in `options.nim`. |
22:18:01 | * | druonysus quit (Ping timeout: 260 seconds) |
22:24:04 | * | elrood quit (Quit: Leaving) |
22:44:52 | * | Tortice joined #nim |
22:49:36 | * | SenasOzys quit (Remote host closed the connection) |
22:49:59 | * | SenasOzys joined #nim |
22:51:04 | * | SenasOzys quit (Remote host closed the connection) |
22:51:35 | * | SenasOzys joined #nim |
22:57:01 | * | SenasOzys quit (Ping timeout: 246 seconds) |