00:10:56 | * | beholders_eye quit (Ping timeout: 255 seconds) |
01:51:43 | * | rockcavera quit (Remote host closed the connection) |
02:06:45 | * | rockcavera joined #nim |
03:39:08 | * | rockcavera quit (Remote host closed the connection) |
05:01:07 | * | ntat joined #nim |
05:49:43 | * | pbsds30 joined #nim |
05:50:57 | * | pbsds3 quit (Ping timeout: 276 seconds) |
05:50:57 | * | pbsds30 is now known as pbsds3 |
07:27:53 | * | coldfeet joined #nim |
07:47:01 | FromDiscord | <TFed> The if statement can be written in one line of code? |
07:47:05 | FromDiscord | <TFed> sent a code paste, see https://play.nim-lang.org/#pasty=OZBhBQLc |
07:48:15 | FromDiscord | <TFed> i want to declare default name, in case if name is empty |
07:48:33 | FromDiscord | <TFed> i want to declare default name, in case name's empty |
07:48:40 | FromDiscord | <TFed> i want to declare default name, in case of name's empty |
07:48:47 | FromDiscord | <TFed> i want to declare default name, in case when name's empty |
07:48:55 | Amun-Ra | that's the python if syntax |
07:49:07 | Amun-Ra | nim one is: if something: foo else: bar |
07:49:22 | FromDiscord | <TFed> thanks |
07:49:47 | Amun-Ra | if that if is a part of larger compound statement often you'll need to put the whole if inside () |
07:50:47 | FromDiscord | <TFed> yeah, i love it, the fact that i can return cases, if statements, try statements or whatever is crazy đâ”(<@709044657232936960_=41mun-=52a=5b=49=52=43=5d>) |
07:51:11 | Amun-Ra | yes, because the last value is being returned :> |
07:53:56 | * | ntat quit (Quit: Leaving) |
09:02:38 | * | PMunch joined #nim |
09:10:40 | * | Guest84 joined #nim |
09:26:03 | FromDiscord | <alehander92> is there a way to disable warnings/hints just for third party code? |
09:27:38 | FromDiscord | <alehander92> for certain libraries? |
09:27:48 | FromDiscord | <alehander92> (edit) "libraries?" => "libraries without changing their code?" |
09:28:25 | * | Guest84 quit (Quit: Client closed) |
09:31:43 | Amun-Ra | hmm, I wonder whether push + import + pop will work |
10:01:33 | * | jjido joined #nim |
10:15:56 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzzâŠ) |
10:18:10 | * | beholders_eye joined #nim |
11:22:00 | FromDiscord | <alehander92> hmm |
11:22:03 | FromDiscord | <alehander92> interesting idea |
11:27:09 | FromDiscord | <alehander92> it doesnt seem to work `{.push warnings:off.} .. import .. {.pop.}` ? |
11:28:38 | * | xet7 quit (Quit: Leaving) |
11:29:08 | Amun-Ra | hmm |
11:58:38 | FromDiscord | <alehander92> i can wrap the compiler and filter them out |
11:58:50 | FromDiscord | <alehander92> but i guess that would be a bit too heavyhanded |
11:58:59 | FromDiscord | <alehander92> (edit) "i can wrap the compiler ... and" added "command" |
12:04:10 | PMunch | There's not a whole lot of things I miss from C in Nim, but the nested object instantiation is arguable better |
12:04:20 | PMunch | Since you don't have to specify the type of sub-objects |
12:08:38 | FromDiscord | <alehander92> has anyone used branch coverage for nim? |
12:09:08 | FromDiscord | <alehander92> or line coverage is usually the available with the c/system tooling |
12:09:13 | FromDiscord | <alehander92> (edit) "or ... line" added "is" | removed "is" |
12:09:29 | FromDiscord | <alehander92> In reply to @PMunch "There's not a whole": makes sense maybe |
12:09:58 | FromDiscord | <alehander92> you can use converters from tuples |
12:10:01 | FromDiscord | <alehander92> but seems hacky |
12:20:40 | * | PMunch_ joined #nim |
12:20:57 | * | PMunch quit (Killed (NickServ (GHOST command used by PMunch_))) |
12:21:03 | * | PMunch_ is now known as PMunch |
12:40:02 | * | krux02 quit (Remote host closed the connection) |
12:48:19 | * | beholders_eye quit (Ping timeout: 245 seconds) |
13:11:21 | * | beholders_eye joined #nim |
13:37:18 | * | coldfeet quit (Remote host closed the connection) |
13:47:59 | * | beholders_eye quit (Ping timeout: 260 seconds) |
13:58:03 | * | HER is now known as hernan |
13:58:18 | * | hernan is now known as HER |
14:06:08 | * | PMunch quit (Quit: Leaving) |
14:13:44 | * | lucasta joined #nim |
14:23:30 | * | beholders_eye joined #nim |
14:32:06 | * | ntat joined #nim |
15:39:19 | FromDiscord | <blashyrk> sent a code paste, see https://play.nim-lang.org/#pasty=IFOTPmrW |
15:42:51 | FromDiscord | <xtrayambak> In reply to @blashyrk "Is there any way": Have you tried `myProc[string]()`? |
15:43:01 | FromDiscord | <xtrayambak> That should work |
15:46:37 | FromDiscord | <blashyrk> I tried but it doesn't :/ â”It only works if I explicitly pass the typedesc to the template/proc, which is what I want to avoid |
15:46:39 | FromDiscord | <alehander92> @arnetheduck do you know why results/json-serialization fails |
15:47:04 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=HGNFEMIQ |
15:47:36 | FromDiscord | <xtrayambak> In reply to @blashyrk "I tried but it": Works for me, weird |
15:47:43 | FromDiscord | <xtrayambak> What Nim version are you on? |
15:47:54 | FromDiscord | <alehander92> with decode on nim 2.0.2? it seems this bug should be fixed |
15:48:04 | FromDiscord | <alehander92> (edit) "fails" => "failsâ”â”with decode on nim 2.0.2? it seems this bug should be fixed" |
15:49:41 | FromDiscord | <blashyrk> In reply to @xtrayambak "Have you tried `myProc[string]()`?": Nim 2.0.8 |
15:50:25 | FromDiscord | <xtrayambak> sent a code paste, see https://play.nim-lang.org/#pasty=EOEEVRTd |
15:51:03 | FromDiscord | <blashyrk> Yeah that works but my proc has params and I call it via `firstParam.proc(secondParam)` and in that scenario I cannot pass it the generic explicitly for some reason |
15:51:07 | FromDiscord | <xtrayambak> ah |
15:51:25 | FromDiscord | <odexine> `firstParam.proc[:Type](secondParam)` |
15:51:28 | FromDiscord | <xtrayambak> sent a code paste, see https://play.nim-lang.org/#pasty=sqVZlBKd |
15:51:29 | FromDiscord | <xtrayambak> try this |
15:51:47 | FromDiscord | <odexine> please try what i proposed first |
15:52:14 | FromDiscord | <demotomohiro> In reply to @blashyrk "Yeah that works but": https://nim-lang.org/docs/manual.html#templates-limitations-of-the-method-call-syntax |
15:52:45 | FromDiscord | <demotomohiro> In reply to @blashyrk "Yeah that works but": Sorry, please read this one:https://nim-lang.org/docs/manual.html#procedures-method-call-syntax |
15:53:16 | FromDiscord | <blashyrk> Oh I see, thanks |
15:53:49 | FromDiscord | <alehander92> @arnetheduck that's a hard decision https://github.com/status-im/nim-serialization/pull/59 : if we have many variant objects, is there any way to prevent boilerplate? suddenly one needs to write a ton of code for json support, is there any way to just hint the order without need of full custom readValue? |
15:56:48 | FromDiscord | <blashyrk> Still I suppose there's no way to infer this from just the `let` binding's type? |
15:57:52 | FromDiscord | <demotomohiro> yes |
15:58:39 | FromDiscord | <blashyrk> đŠâ”â”Thanks in any case! |
16:00:37 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=GKJhqDcP |
16:07:07 | FromDiscord | <blashyrk> Does anyone know what the `as` keyword compiles to? Is it just a shorthand for `cast[T]` ? I can't find anything about it in the manual |
16:11:04 | FromDiscord | <demotomohiro> `as` keyword used in import statement?â”https://nim-lang.org/docs/manual.html#modules-module-names-in-imports |
16:12:16 | FromDiscord | <blashyrk> No, like `let a = someVar as SomeType` |
16:13:22 | FromDiscord | <blashyrk> Oh nvm lol it is defined in the codebase I'm working in đ€Šââïž , disregard pls |
16:14:36 | FromDiscord | <xtrayambak> In reply to @blashyrk "~~Does anyone know what": No, it's used for import keywords |
16:14:43 | FromDiscord | <xtrayambak> you might be getting it mixed with Rust's `as` keyword |
16:15:03 | FromDiscord | <blashyrk> Yeah there's also a template defined in this codebase but I got syntax highlighting as it is also a keyword lol |
16:15:06 | FromDiscord | <blashyrk> So I thought it was built-in |
16:15:37 | FromDiscord | <xtrayambak> haha, templates and macros are deceiving :^) |
16:16:36 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/manual.html#lexical-analysis-operatorsâ”It seems `as` can be used as an operator. |
16:17:49 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=FdENJeev |
16:18:00 | FromDiscord | <xtrayambak> that's just stropping... |
16:18:04 | FromDiscord | <xtrayambak> (edit) "stropping..." => "stropping combined with UFCS..." |
16:18:17 | FromDiscord | <demotomohiro> It compiles without error. |
16:21:14 | FromDiscord | <xtrayambak> Yes, it should |
16:23:13 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=eAFHszIQ |
16:39:05 | * | lucasta quit (Quit: Leaving) |
16:51:37 | * | coldfeet joined #nim |
18:04:29 | * | ursa-major_ joined #nim |
18:10:30 | * | ursa-major quit (*.net *.split) |
18:10:30 | * | end quit (*.net *.split) |
18:10:31 | * | dza quit (*.net *.split) |
18:10:32 | * | tanami quit (*.net *.split) |
18:10:32 | * | lucerne quit (*.net *.split) |
18:10:39 | * | ursa-major_ is now known as ursa-major |
18:11:12 | * | end joined #nim |
18:11:12 | * | dza joined #nim |
18:11:12 | * | tanami joined #nim |
18:11:12 | * | lucerne joined #nim |
18:11:36 | FromDiscord | <leorize> nim has a lot of word operators and all of them can be binary |
18:11:37 | FromDiscord | <leorize> except `not` |
18:45:53 | * | ntat quit (Quit: Leaving) |
18:52:35 | * | derpydoo joined #nim |
19:06:37 | * | derpydoo quit (Quit: derpydoo) |
19:26:34 | * | xet7 joined #nim |
19:39:25 | * | coldfeet quit (Quit: leaving) |
19:54:14 | FromDiscord | <rakgew> sent a code paste, see https://play.nim-lang.org/#pasty=gePpqVQZ |
19:56:23 | FromDiscord | <rakgew> nvm found a way via mapit \:-D |
20:01:13 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=GesKUaxI |
20:01:48 | FromDiscord | <Elegantbeef> `Outlet.low.ord..Outlet.high.ord` whoops |
20:36:32 | FromDiscord | <srmordred> importing `chronos` on my project adds like 4 seconds to its compile time. it is expected ? |
20:36:51 | FromDiscord | <Elegantbeef> Probably |
21:19:06 | * | rockcavera joined #nim |