<< 14-03-2023 >>

00:02:21FromDiscord<Hourglass [She/Her]> Random math question: Why do people wanna know the exact value of pi?
00:03:02FromDiscord<Rika> because why the fuck not
00:03:02FromDiscord<Hourglass [She/Her]> Isn't there a point we've reached that we just don't have the precision to draw a 'perfect circle' (via mechanical needs or otherwise)?
00:03:07FromDiscord<Rika> yes
00:03:25FromDiscord<Hourglass [She/Her]> Like, 100 digits
00:03:39FromDiscord<Hourglass [She/Her]> We aren't using that in math
00:03:42FromDiscord<Rika> not even, a few digits is already enough for practical purposes
00:03:55FromDiscord<Hourglass [She/Her]> Yeah, 3.14 is what everyone is taught
00:04:14FromDiscord<Rika> not what i mean but sure close enough
00:04:43FromDiscord<Hourglass [She/Her]> What do you mean then?
00:05:03FromDiscord<Rika> a few digits like 3.141592 etc etc
00:06:03FromDiscord<Rika> side note i seem to remember the digits of pi better in japanese
00:06:52FromDiscord<Hourglass [She/Her]> Weird lmao, unless Japanese is your native language or a language you know better than English ig?
00:07:22FromDiscord<Rika> neither
00:11:51FromDiscord<Hourglass [She/Her]> Weird
00:21:48FromDiscord<Elegantbeef> I know quite a few digits, due to my insistence on seeing how long it'd take me to memorise a new digit 😄
00:21:49FromDiscord<Elegantbeef> 3.1415926535897932384626327951969 the last bit might be off, but alas
00:22:20FromDiscord<Elegantbeef> I think it's way off now 😄
00:23:39FromDiscord<Elegantbeef> Yea i missed 4338 and then went to hell
00:25:27FromDiscord<slime> cool, i only remember 3.1415926535😂🤣
00:25:53FromDiscord<[[ Array ]]> bruh i can only remember up to 3.14159
00:26:07FromDiscord<[[ Array ]]> must be an engineering thing
00:26:16FromDiscord<Elegantbeef> Nah engineers know it's 4
00:27:05FromDiscord<Yepoleb> how can i write a quote do macro for a property setter? when i try to do `quote("@")` with `\`@varName=\`\` it does not expand my variable
00:27:22FromDiscord<Yepoleb> dammit i tried to hard to not fuck up the formatting
00:28:04FromDiscord<Elegantbeef> Just use genast like it's 20223
00:28:07FromDiscord<Elegantbeef> 2023 even
00:28:37FromDiscord<Yepoleb> genast will solve all my problems?
00:28:49FromDiscord<Elegantbeef> It does not use backtick escaping
00:28:54FromDiscord<Elegantbeef> So it should
00:29:28*lumo_e quit (Quit: Quit)
00:31:36FromDiscord<Yepoleb> i followed this tutorial from a guy called beef331 and it did not mention genast ☹️
00:32:43FromDiscord<Elegantbeef> I can counter that argument by saying i linked to a bunch of my repos
00:32:49FromDiscord<Elegantbeef> I only use genast now, so.... checkmate
00:33:32FromDiscord<Yepoleb> sorry this is not a debate club actually
00:34:46FromDiscord<Yepoleb> you cannot checkmate me for failure
00:35:03FromDiscord<Elegantbeef> Oh shit if that's the case why do i have this debate team shirt on
00:36:54FromDiscord<Yepoleb> genast is 2 hard 4 me
00:37:24FromDiscord<Elegantbeef> It's so much better
00:37:57FromDiscord<Rika> git gud
00:38:17FromDiscord<Rika> <-- hasnt used nim in a very long while
00:38:28FromDiscord<Yepoleb> but it gives me dumb errors
00:38:38FromDiscord<[[ Array ]]> sent a long message, see http://ix.io/4qL9
00:39:05FromDiscord<Elegantbeef> Perhaps provide the code and the errors and someone that knows how to use the tools will tell you you're using the tool end as a handle
00:39:21FromDiscord<Rika> oof
00:39:44FromDiscord<Yepoleb> no let me struggly by myself for a while
00:40:08FromDiscord<Elegantbeef> Okay dokey
00:40:08FromDiscord<Yepoleb> it builds character
00:40:14FromDiscord<Yepoleb> and it makes me feel things
00:40:20FromDiscord<Elegantbeef> Well i've got generics sorta working with my ADT schtuffs
00:40:39FromDiscord<Rika> In reply to @Yepoleb "and it makes me": like suffering
00:40:39FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4qLb
00:40:54FromDiscord<Elegantbeef> At some point that's all you're capable of feeling
00:43:04FromDiscord<Yepoleb> if i use `genAst(varName)` will varName automatically become the ident inside the block or do i need to do something else?
00:44:07FromDiscord<Elegantbeef> You just use it
00:50:10FromDiscord<Yepoleb> sent a code paste, see https://play.nim-lang.org/#ix=4qLd
00:50:17FromDiscord<Yepoleb> i'm doing something like this
00:50:37FromDiscord<Yepoleb> and i get `Error: identifier expected, but found 'a'`
00:56:32FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=4qLe
00:56:40FromDiscord<Elegantbeef> you had a `stmtList`
00:56:46FromDiscord<Elegantbeef> also properties do not work at top level
00:56:57FromDiscord<Elegantbeef> you need something on the left of a `.`
00:57:26NimEventerNew Nimble package! minicoro - Lua-like asymmetric coroutine. Nim wrapper of minicoro in C, see https://git.envs.net/iacore/minicoro
01:03:14FromDiscord<Yepoleb> i tried to make a minimal example and added more errors
01:03:44FromDiscord<Elegantbeef> Well hopefully my code helps atleast 😄
01:07:21FromDiscord<Yepoleb> the error was something completely different, sorry
01:07:31FromDiscord<Yepoleb> but genAst is working now
01:07:52FromDiscord<Yepoleb> i tried to use it inside result.add()
01:08:20FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4qLh
01:09:04FromDiscord<Yepoleb> thank you ❤️
01:57:56hernanhi
01:58:53FromDiscord<huantian> hi
02:37:02*arkurious quit (Quit: Leaving)
02:47:50NimEventerNew thread by jasonfi: Advanced Compilers: Self-Guided Online Course, see https://forum.nim-lang.org/t/9993
03:02:53*Goodbye_Vincent6 joined #nim
03:04:55*Goodbye_Vincent quit (Ping timeout: 276 seconds)
03:04:55*Goodbye_Vincent6 is now known as Goodbye_Vincent
03:18:46*ltriant joined #nim
03:25:20*sagax joined #nim
03:25:20*sagax quit (Changing host)
03:25:20*sagax joined #nim
03:57:05*pbsds quit (Quit: The Lounge - https://thelounge.chat)
03:59:03*pbsds joined #nim
04:33:11*azimut quit (Ping timeout: 255 seconds)
04:46:32*azimut joined #nim
05:57:29*ltriant quit (Ping timeout: 268 seconds)
07:13:03*derpydoo quit (Quit: derpydoo)
07:15:47*derpydoo joined #nim
07:17:20*rockcavera quit (Remote host closed the connection)
08:27:56*jmdaemon joined #nim
08:35:01FromDiscord<I have 50GB of nothing on my PC> is it just me or is nimsaem breaking my vscode
08:35:35FromDiscord<Rika> @Saem I can’t believe you’ve been hacking into his IDE smh
08:35:54FromDiscord<Rika> In reply to @I have 50GB of nothing on my PC "is it just me": In seriousness what do you mean by breaking?
08:48:13*Notxor joined #nim
08:51:08FromDiscord<I have 50GB of nothing on my PC> vs seems to be crashing due to an extension (it doesn't want to tell me which one!), but the logs suggest it's that extension
08:51:21FromDiscord<I have 50GB of nothing on my PC> which is weird because it hasn't been updated in a while
08:51:37FromDiscord<I have 50GB of nothing on my PC> so I suspect some weird interaction between existing code and an update
08:51:43FromDiscord<I have 50GB of nothing on my PC> vscode update
09:01:41FromDiscord<Phil> Could it be nimsuggest burning through memory?
09:06:53*rmt joined #nim
09:08:18*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
09:09:35*jmdaemon joined #nim
09:14:28FromDiscord<jmgomez> In reply to @I have 50GB of nothing on my PC "vs seems to be": are you on win? Something similar happened to me in one project (the others work fine though). My workaround was to update to the vscode nightly/insiders build
09:15:26FromDiscord<I have 50GB of nothing on my PC> @jmgomez no, but that sounds like it could help
09:19:51*ltriant joined #nim
09:29:32FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4qMg
09:29:38*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
09:29:44FromDiscord<Elegantbeef> Hell no
09:29:50FromDiscord<4zv4l> why not ?
09:29:54FromDiscord<4zv4l> I think that's a great feature
09:29:55FromDiscord<Elegantbeef> A language is not a package manager or retriever
09:30:04FromDiscord<I have 50GB of nothing on my PC> id like that too
09:30:11FromDiscord<4zv4l> In reply to @I have 50GB of nothing on my PC "id like that too": yay !
09:30:15FromDiscord<4zv4l> In reply to @Elegantbeef "A language is not": well
09:30:20FromDiscord<4zv4l> that's arguable
09:30:26FromDiscord<Elegantbeef> It's really not
09:30:38FromDiscord<4zv4l> it helps when you wanna compile a program↵it can fetch the dependencies directly
09:30:43FromDiscord<Elegantbeef> Why does Nim need to have package resolution features built into it
09:30:45*jmdaemon joined #nim
09:31:11FromDiscord<4zv4l> you can have multiple libraries with the same name↵so being able to give the url↵and in the source code↵would be simple and easy
09:31:19FromDiscord<Elegantbeef> You can use installed nimble packages without having to have git embedded into the compiler
09:31:20FromDiscord<4zv4l> and when you compile it would automatically fetch the dependencies
09:31:42FromDiscord<Elegantbeef> What problem does this really solve?
09:31:43FromDiscord<4zv4l> is there a tool that create a dependencies files from nim source code ?
09:31:48FromDiscord<Elegantbeef> It's easy as to use and add packages to a Nim project
09:31:49FromDiscord<4zv4l> or you have to manually add them ?
09:32:28FromDiscord<Elegantbeef> Nimble does not have a feature to auto add imports 'PR's welcome'
09:32:45FromDiscord<Elegantbeef> If you're using a library you ostensibly want a specific version and pin to it
09:32:48FromDiscord<Elegantbeef> Explicitly
09:33:24FromDiscord<4zv4l> well could have an idea but again
09:33:38FromDiscord<4zv4l> imagine the best case scenario
09:34:11FromDiscord<I have 50GB of nothing on my PC> I would like the feature simply because I always have to write the library name both in .nimble an in my prelude.nim that I include
09:34:24FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4qMi
09:34:25FromDiscord<I have 50GB of nothing on my PC> would be cool to have just one place for both
09:34:28FromDiscord<4zv4l> maybe there are mutliple github repo with the same name
09:34:33FromDiscord<4zv4l> (edit) "mutliple" => "multiple"
09:34:44FromDiscord<dlesnoff> Which VSCode extension is the best ? nimsaem's or Konstantin Zaitsev's ?
09:34:45FromDiscord<I have 50GB of nothing on my PC> @4zv4l you can import `as` though
09:34:49FromDiscord<Elegantbeef> You do realise Nimble does allow git urls right?
09:34:58FromDiscord<I have 50GB of nothing on my PC> @dlesnoff nimsaem's is the only semi-updated one
09:35:04FromDiscord<4zv4l> you have to put them in the file yeah
09:35:11FromDiscord<4zv4l> in go you simply put the url and that's it
09:35:14FromDiscord<4zv4l> not external file to edit
09:35:29FromDiscord<Elegantbeef> How is that worse than your suggestion
09:35:35FromDiscord<4zv4l> In reply to @I have 50GB of nothing on my PC "would be cool to": yeah exactly
09:35:40FromDiscord<Elegantbeef> You now have to copy a git url to every module that uses a file
09:35:41FromDiscord<4zv4l> in Go you can have all in the source file
09:35:49FromDiscord<Elegantbeef> What's the benefit?
09:36:18FromDiscord<dlesnoff> It is much better to have a list of packages in an external file at the top of your module
09:36:18FromDiscord<4zv4l> well I personally find it annoying to edit a file an external file↵while I could simply precise in my code from where the lib comes from
09:36:27FromDiscord<Elegantbeef> The compiler now needs to support git, version management and be a package manager
09:36:36FromDiscord<4zv4l> like in Rust↵it is so annoying I have to add entries to `Cargo.tml` to be able to use a lib
09:36:45FromDiscord<4zv4l> In reply to @Elegantbeef "The compiler now needs": can use nimble for it
09:36:48FromDiscord<Elegantbeef> I do not follow how it's annoying
09:36:59FromDiscord<4zv4l> that's more work to do
09:37:11FromDiscord<Elegantbeef> It's literally the exact same amount of work
09:37:18FromDiscord<dlesnoff> That's the bread and butter of programming
09:37:20FromDiscord<Elegantbeef> `requires "myGitUrl"` hmph
09:37:22FromDiscord<4zv4l> that means at one moment you have to think↵> ok now let's write my config file instead on focusing on my code
09:37:30FromDiscord<dlesnoff> I always switch between config files and my code
09:37:38FromDiscord<Elegantbeef> It's the exact same amount of writing
09:37:41*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
09:37:44FromDiscord<Elegantbeef> Like.... what?
09:37:57FromDiscord<Elegantbeef> And actually your way is even more writing
09:38:04FromDiscord<Elegantbeef> Cause now every module needs the giturl
09:38:04FromDiscord<4zv4l> actually I got an example
09:38:16FromDiscord<4zv4l> in go you can use `go mod`↵and it will automatically fetch the dependencies
09:38:50*jmdaemon joined #nim
09:38:51FromDiscord<4zv4l> would be great that from an existing code you can do↵`nimble whatever`↵and it creates the config with the dependencies etc. ready to ship
09:39:01*jmdaemon quit (Remote host closed the connection)
09:39:20FromDiscord<Elegantbeef> To quote the Nim core 'PRs welcome'
09:39:23FromDiscord<Elegantbeef> But i'm still absolutely confused how you think that'd work
09:39:32FromDiscord<Elegantbeef> Which version should it fetch
09:39:44FromDiscord<Elegantbeef> I can understand if you have local version from nimble already installed
09:40:09FromDiscord<Rika> I don’t understand which problem this solves
09:40:10*jmdaemon joined #nim
09:40:29FromDiscord<4zv4l> basically having to write a config file↵and manually adds the url
09:40:54FromDiscord<Rika> And what difference is there to having to write the URL on each module file now?
09:41:05FromDiscord<jmgomez> you can always write a macro that does it for you
09:41:26FromDiscord<Elegantbeef> But with remotes, you just fetch the most recent?
09:41:36FromDiscord<4zv4l> In reply to @Elegantbeef "But with remotes, you": yeah like nimble
09:41:36FromDiscord<4zv4l> the head
09:43:03FromDiscord<4zv4l> ok really simple↵I'm gonna try making a simple library on my github and see how it works↵then I can actually say if that's really that annoying to do
09:43:05FromDiscord<ringabout> https://github.com/nim-lang/nimble/issues/80↵Anyway there are already discussions here
09:43:20FromDiscord<ElegantBeef> Matrix are dieded
09:44:01FromDiscord<ElegantBeef> The peak thing about go's package management is they ddos git hosts
09:45:53FromDiscord<jmgomez> @ringabout any idea of what's going on here? https://github.com/nim-lang/Nim/issues/21512 It seemed to work in the past
09:45:54FromDiscord<4zv4l> is it possible to install dependencies of a projet at the project location instead of ~/.nimble ?
09:45:57FromDiscord<4zv4l> (edit) "projet" => "project"
09:46:11FromDiscord<Rika> In reply to @4zv4l "is it possible to": Discussion mentioned by ring about
09:47:56FromDiscord<ringabout> In reply to @jmgomez "<@658563905425244160> any idea of": Do you mean it worked with 1.6.x?
09:47:56FromDiscord<ElegantBeef> Does this mean everytime you compiler a go program it makes a HTTP request to a giturl to see if the commit changed?
09:48:42FromDiscord<Elegantbeef> Generating a dependency list only makes sense if you're working locally with installed nimble files
09:48:42FromDiscord<Elegantbeef> So if a package has a sudden change in versioning whilst you're working it fails?
09:48:42FromDiscord<Elegantbeef> And i mean you technically can make a `importgit` macro if you really wanted to, but why would you want to
09:48:43FromDiscord<Elegantbeef> That i can get behind, but using git urls inside of Nim is awful, just make a proper package so everyone can easily see what you depend upon and have somewhat reproducible builds
09:48:53FromDiscord<ElegantBeef> Oh there is matrix
09:49:32FromDiscord<jmgomez> In reply to @ringabout "Do you mean it": No, but I think when pmunch wrote the articles on his web about them VM it worked because he was doing from/to json inside the vm
09:49:53FromDiscord<ringabout> I see, it does work with 1.6.10.
09:50:40FromDiscord<jmgomez> (edit) "them" => "the"
09:52:26FromDiscord<ElegantBeef> It works with nimscripter
09:52:41FromDiscord<jmgomez> In reply to @ElegantBeef "It works with nimscripter": really? so it's a config issue?
09:53:00FromDiscord<jmgomez> I mean, nimscripter builds on top of it, right?
09:53:12FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=4qMn
09:53:20FromDiscord<ElegantBeef> Yea nimscripter is ontop the compiler api
09:53:36FromDiscord<ElegantBeef> It's amazing how simple a single file is to load
09:54:00FromDiscord<ElegantBeef> Are you passing `--path:'$nim'`?
09:54:14FromDiscord<ElegantBeef> I know i had plenty of issues when i just did `requires "compiler"` in a nimble file
09:54:45FromDiscord<jmgomez> I think I am, but maybe not in the repro case, let me check (its in another computer)
09:57:00FromDiscord<ringabout> Isn't the problem is `onInterpreterError`?
09:57:08FromDiscord<ringabout> (edit) "Isn't ... the" added "that"
09:57:24FromDiscord<ElegantBeef> It is
09:57:32FromDiscord<ElegantBeef> It's raising an exception on every error type including hints
09:57:55FromDiscord<ringabout> yeah
09:57:58FromDiscord<ElegantBeef> https://github.com/beef331/nimscripter/blob/master/src/nimscripter.nim#L31 likely will solve the problem
09:58:21FromDiscord<ElegantBeef> I didnt even look at the error stack, i just tested the example with Nimscripter cause why not 😄
09:59:01FromDiscord<jmgomez> wow
09:59:15FromDiscord<jmgomez> that was it.. I saw that in the compiler example too
09:59:34FromDiscord<jmgomez> so it's elevating hints or what?
09:59:40FromDiscord<ElegantBeef> Be honest you just wanted to make yourself work for it
09:59:44FromDiscord<jmgomez> I mean, hints triggers the hook
09:59:56FromDiscord<ElegantBeef> I believe anything that uses the error path triggers it
10:00:08FromDiscord<ElegantBeef> Hints and Warnings both follow the error path
10:00:33FromDiscord<ElegantBeef> And with that it's late so i'm away
10:00:34FromDiscord<jmgomez> okay, I guess it makes sense
10:00:53FromDiscord<ringabout> In reply to @ElegantBeef "And with that it's": bye
10:00:57FromDiscord<ringabout> Yeah, there is a `severity : Severity`
10:01:14FromDiscord<jmgomez> bye and thanks! 😄
10:01:40FromDiscord<ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4qMr
10:01:43FromDiscord<jmgomez> thanks, will close the issue with a comment about it in case someone else encounters it
10:01:58FromDiscord<ringabout> Seems that there is a type mismatch, that's weird.
10:05:38FromDiscord<ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4qMs
10:11:38*derpydoo quit (Quit: derpydoo)
10:13:53*derpydoo joined #nim
10:22:40FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4qMC
10:40:36FromDiscord<sOkam!> oh it actually works when its not run on nimscript 🤔
10:41:20FromDiscord<sOkam!> (edit) "🤔" => "🤔↵note to self. test things compiled first ✍️"
10:43:46NimEventerNew thread by inv2004: Trying to understand: is it better if IndexDefect is CatchableError or not, see https://forum.nim-lang.org/t/9994
10:50:13FromDiscord<4zv4l> if I wanna make an addon to nimble that can scrap used dependencies↵how can I make the difference between `std/strutils` and a random guy making a lib named `strutils` ?
10:50:33FromDiscord<4zv4l> or it would only scrap them from nimble repo N
10:50:35FromDiscord<4zv4l> (edit) "N" => "?"
10:51:06FromDiscord<4zv4l> from here nimble.directory
10:52:02FromDiscord<ringabout> You can use `pkg/strutils ` to distinguish it from stdlibs.
11:03:18*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
11:04:25*jmdaemon joined #nim
11:40:44*PMunch joined #nim
11:43:36PMunchHmm, is there a good way to parse a JSON object from a stream and _not_ throw an exception if the stream has more data?
11:49:23*jmdaemon quit (Ping timeout: 264 seconds)
11:51:49FromDiscord<jtv> No, I had to write my own JSON parser specifically because even if you give yourself private access, it cannot be done.
11:51:59PMunchWell that's dumb..
11:52:26FromDiscord<jtv> 100%. But JSON parsing itself is easy enough that 🤷
11:53:35FromDiscord<jtv> But yeah, it's one of those little nicks where the basic libraries need to be more universal. I know why it's done; the JSON spec is explicit in saying "extraneous input is rejected". But JSON also isn't telling you how many bytes are in the JSON blob, it's done when it's done.
11:54:09PMunchExactly
11:54:26PMunchWhat I wanted to use it for was parsing Markdown with a JSON frontmatter, similar to Huga
11:54:27PMunchHugo*
11:54:50PMunchBasically if it starts with a valid JSON object then that's the frontmatter
11:55:13FromDiscord<inv> About it https://forum.nim-lang.org/t/9994↵I think that all my happiness from Nim was only because panics:off by default and I did not know about it
11:55:16*derpydoo quit (Ping timeout: 246 seconds)
11:55:19PMunchFor TOML and YAML frontmatters it uses delimiting +++ and --- respectively
11:55:34PMunchWhich of course makes it much easier
11:56:11PMunchI guess I will run parseJson over and over with subsequent find("}") calls to determine the end of the object..
11:57:19PMunch@inv, the thing with IndexError being a defect is that if you run with -d:danger then they are removed
11:57:42PMunchSo if you had code with a try/except around that then it wouldn't catch an error any longer
11:58:15PMunchI guess there is an argument to be made for making IndexError either inherit from Defects or from CatchableError depending on which mode you compile in
11:58:39PMunchThat way Nim would tell you when you enabled danger that IndexError wasn't catchable
11:58:50PMunchBut you could catch it with -d:release or -d:debug
11:59:51*derpydoo joined #nim
12:05:02PMunch@jtv, I tried to use parseJsonFragments and then just break after the first element. But lexbase buffers input..
12:05:23PMunchI was able to get the element, but I have no way of knowing how far into the data it ended
12:08:26FromDiscord<inv> @PMunch I know, but please some some benches - it is even slower with panics:on
12:09:19FromDiscord<inv> Even without it - I expect a lot of problems with danger, but I suppose that the problem affects too much code with the IndexDefect
12:10:21FromDiscord<jtv> I can give you my parsing code if you want, but I don't go to the same objects 🤷
12:10:29FromDiscord<inv> After I know that about the IndexDefect with panics:on I have a feeling that I write go-like code, not python-like like it was before
12:10:49FromDiscord<inv> (edit) "After I know that about the IndexDefect with panics:on I have a feeling that I write go-like code, not python-like like it was before ... " added "=> pretty annoying"
12:12:32FromDiscord<inv> I would say that at the moment I think that golang is more safe - I can try to catch the panic at least
12:13:40FromDiscord<inv> and I remember I did it in rust too
12:14:55PMunch@jtv, this "works": http://ix.io/4qMW
12:15:34PMunchI tried looking into how the JSON parser is implemented, and I think it would be very tricky to to this with the current implementation
12:15:47PMunchI was hoping there was a quickfix I could make
12:17:19PMunch@inv, the problem is that the panics:on switch doesn't create anything for you to catch any longer. The sole purpose of this flag is basically, if you do something which is a programmer error, abort immediately!
12:17:57PMunchIndex errors are seen as programmer errors, the exception they create are merely to give you better stack traces while debugging
12:19:05PMunchSo the correct way to write Nim is to check that indexes are within the ranges you expect them to be before trying to index something with them.
12:23:30FromDiscord<inv> @PMunch I undestand how panic work and that they can be disables, what is why I think IndexDefect is too dangerous, I met the problem about everywhere: asciigraph lib and many other. Also, I am not 100% sure in my code too - but to fail the app is much worse
12:24:21PMunchSorry, I'm having a bit of a hard time understanding you
12:24:28PMunchAnd I need to run to a meeting
12:29:34FromDiscord<inv> I am trying to undestand myself why I do not like it so a lot 🙂
12:29:47FromDiscord<inv> (edit) "a lot" => "much"
12:31:08FromDiscord<inv> `[](idx)` is so usual error, but it does not mean that program should always fail with it. I do not believe who says: my code always work and correct
12:32:44FromDiscord<inv> and it needs a lot of effort to work, for example with file-parsing: You have to check amount of lines, amount of words and etc. It is pretty complicates, split() returns at least @[""] which is safe, but splitWhitespaces can return @[]
12:33:22NimEventerNew Nimble package! nclip - A simple wrapper around the winapi to control the clipboard, see https://github.com/4zv4l/nclip
12:36:24*PMunch quit (Quit: leaving)
12:41:39*Notxor quit (Remote host closed the connection)
12:46:39FromDiscord<jtv> @PMunch Yeah, I'd once looked at doing a simple PR, and it can almost be done, but, not quite. It would be far less work to build something new than massage what's there.
12:50:48FromDiscord<4zv4l> In reply to @NimEventer "New Nimble package! nclip": oh jeez, why does it have to spread it like this xD
12:52:07FromDiscord<4zv4l> In reply to @ringabout "You can use `pkg/strutils": I mean I can but what about users ?↵they will do↵`import winim, strutils, tables, regex`↵can't know which one is from stdlib or not
13:06:21FromDiscord<dlesnoff> sent a code paste, see https://play.nim-lang.org/#ix=4qNc
13:23:14FromDiscord<4zv4l> `(0..<numPartitions).Natural`
13:23:15FromDiscord<4zv4l> I thinj
13:23:16FromDiscord<4zv4l> (edit) "thinj" => "think"
13:24:21FromDiscord<etra> In reply to @4zv4l "oh jeez, why does": nice! I was working on a lib to handle the clipboard as well but more focused on multiplatform, and heavily depending on arboard (<https://github.com/1Password/arboard>)
13:24:52FromDiscord<etra> mostly because arboard supports image handling on the three platforms
13:25:58FromDiscord<4zv4l> oh well mine is mostly something I had to do for work and I simply wanted to test posting it on my github to import it and test nimble↵↵I didn't mean to post it like that xD
13:26:42FromDiscord<4zv4l> mine isn't really to totally wrap the clipboard api↵I made it to help myself making a dll that monitor the clipboard content allowing only the data matching a specific regex
13:27:13FromDiscord<4zv4l> so it doesn't handle specific data type↵only text and file
13:43:13FromDiscord<etra> In reply to @4zv4l "oh well mine is": oh, nice, you're doing Nim at work?
13:43:19FromDiscord<etra> how is it working for you?
13:45:26FromDiscord<4zv4l> yeah I was working on a cyber security project and I proposed Nim and they accepted
13:45:39FromDiscord<4zv4l> going very well↵the code is super clean, easy to add new features
13:46:06FromDiscord<4zv4l> > the code is super clean↵I was more referring to the language rather than my way to code xD
13:47:00FromDiscord<sOkam!> nim tends towards clean, even in messy codebases, ime
13:47:31FromDiscord<sOkam!> C tends towards confusing no matter if you are clean, for example 😭
13:47:45FromDiscord<sOkam!> (edit) "C tends towards confusing ... no" added "mess"
14:06:33FromDiscord<Rika> Lol
14:15:43FromDiscord<Ayy Lmao> What's a good way to idiomatically represent something like `float outputs` in nim? `outputs` in this case is a two dimensional array of known length where you can edit the values.
14:16:14FromDiscord<Ayy Lmao> Like I can use UncheckedArray but I am wondering if there is a nicer way.
14:16:31FromDiscord<Ayy Lmao> (edit) "way." => "way since the length is known."
14:18:37*Notxor joined #nim
14:19:15FromDiscord<planetis> its `ptr UncheckedArray[ptr UncheckedArray[float32]]` for sure, but you can do an extra trick with distinct types and get bounds checking on the indices.
14:21:14FromDiscord<Ayy Lmao> In reply to @planetis "its `ptr UncheckedArray[ptr UncheckedArray[float32]": Can you go into more detail about that?
14:21:22FromDiscord<planetis> @Ayy Lmao see: https://github.com/planetis-m/naylib/blob/main/src/raylib.nim#L2498
14:21:35*PMunch joined #nim
14:22:47FromDiscord<planetis> you declare a `MyTypeOutput = distinct MyType` then a template that converts to it with the field name: `template outputs(x: Mytype): MyTypeOutputs` then have `[]` `[]=` procs for `MyTypeOutputs`
14:23:50FromDiscord<Ayy Lmao> Sounds very complicated but I will look into it.
14:24:19FromDiscord<Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=4qNH
14:24:28FromDiscord<planetis> you're interfacing with a C library right?
14:24:32FromDiscord<Ayy Lmao> Yeah
14:25:11FromDiscord<Ayy Lmao> or something like that
14:25:11FromDiscord<Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=4qNI
14:25:32FromDiscord<Ayy Lmao> with hopefully no overhead
14:25:47FromDiscord<planetis> it's not complicated, other languages would have to do `proc outputs(x: MyType; i. j: Natural)` and have an ugly api on it
14:27:09FromDiscord<planetis> wait you don't want to expose the values of output?
14:28:31FromDiscord<Ayy Lmao> I want to expose it in such a way that you can do something like `outputs[0][0] = 1.0` and it will edit it with bounds checking.
14:29:06FromDiscord<Ayy Lmao> And you can iterate over the channels and samples
14:29:24FromDiscord<planetis> right, so it's not even part of a structure right?
14:29:35FromDiscord<planetis> (edit) "right, so it's" => "So `outputs`"
14:30:05FromDiscord<Ayy Lmao> Yeah on the c side of things you are given `float ` and then separately given the lengths of each
14:30:38FromDiscord<planetis> then have a `AudioBuffer = distinct ptr UncheckedArray[ptr UncheckedArray[float32]]` and `[]`, `[]=` that operate on `AudioBuffer`
14:31:04FromDiscord<planetis> sorry my first solution is unnecessary, this is simpler
14:31:10FromDiscord<Rika> You’re gonna have to store the sizes somewhere though
14:31:11FromDiscord<Ayy Lmao> Is there a way to bake in the length of it though?
14:31:27FromDiscord<Ayy Lmao> I'd like to tie the length in with the object
14:31:41FromDiscord<Rika> Well make an object that stores the buffer and the sizes
14:31:47FromDiscord<planetis> In reply to @Ayy Lmao "Is there a way": good point!
14:32:30FromDiscord<planetis> so make `AudioBuffer` an object, with a data pointer and sizes fields
14:33:06FromDiscord<Ayy Lmao> I guess maybe I am being silly and thinking that approach has overhead.
14:33:33FromDiscord<Ayy Lmao> For some reason I was trying to avoid it
14:33:41*estiquelapice_ quit ()
14:33:51FromDiscord<planetis> what else can you do unless you know the sizes on compile time
14:34:04FromDiscord<Rika> Prolly just as much overhead as storing the lengths separately in some variable
14:34:22FromDiscord<planetis> (edit) "on" => "at"
14:34:38FromDiscord<Rika> Unless you’re trying for pretty high performance you’re not gonna hit any limitations with it
14:34:48FromDiscord<Ayy Lmao> In reply to @planetis "what else can you": Not sure but I was wondering if there was some voodoo magic templatized thing that could pass it to a function without making a separate object.
14:35:04FromDiscord<Ayy Lmao> So to the user it looks like an object but in the backend it isn't doing anything extra.
14:35:14FromDiscord<Rika> Sounds cursed
14:35:19FromDiscord<Ayy Lmao> Probably haha
14:35:46FromDiscord<Rika> And the backend is doing extra, if you need the size to be runtime then it’s going to be runtime no escaping that
14:37:36FromDiscord<Ayy Lmao> I didn't mean like I wanted to somehow escape the size being runtime. I meant like I didn't want to copy the pointers and sizes to a new object. But I guess they would probably get passed by value anyways right? I have a nasty habit of prematurely optimizing when I have no idea what I am doing.
14:38:45FromDiscord<Ayy Lmao> I guess I was thinking that passing pointers and sizes to a function directly is faster than making a new struct and then passing that struct.
14:40:14FromDiscord<Rika> Sounds premature yes
14:41:57FromDiscord<Ayy Lmao> Ok I will try to stop thinking about it then haha
14:44:04FromDiscord<4zv4l> sent a code paste, see https://paste.rs/jkU
14:49:08FromDiscord<4zv4l> what nim version does `nimble.directory` uses ?
14:49:22FromDiscord<4zv4l> it seems to be older than nim 1.6.12
14:59:09FromDiscord<caravaggio> Is it possible to ffi a rust program from nim?
14:59:26FromDiscord<caravaggio> Without weird builds
15:08:04PMunchDefine weird build
15:08:27PMunchIf you can FFI Rust with C then Nim can FFI with Rust via C
15:09:07FromDiscord<4zv4l> how to make the `doc build` on nimble.directory to work ?
15:09:28PMunchMaybe ask @federico3
15:33:25FromDiscord<4zv4l> https://nimble.directory/pkg/nclip
15:33:37FromDiscord<4zv4l> also the test is like running for 10 minutes
15:33:51FromDiscord<4zv4l> while it was alright on my computer
15:47:04FromDiscord<ringabout> You can open an issue on its source repo.
15:47:55FromDiscord<ringabout> https://github.com/FedericoCeratto/nim-package-directory
15:49:34NimEventerNew thread by SerjEpatoff: How to reproduce the release build of Nim?, see https://forum.nim-lang.org/t/9996
15:52:23NimEventerNew post on r/nim by AlbertShown88: Easly Use Any Web Browser as GUI in Nim, see https://reddit.com/r/nim/comments/11r9u7t/easly_use_any_web_browser_as_gui_in_nim/
16:02:20*Notxor quit (Quit: Leaving)
16:06:38*jmdaemon joined #nim
16:10:16*arkurious joined #nim
16:27:13*jmdaemon quit (Ping timeout: 246 seconds)
16:46:57FromDiscord<firasuke> how do you clean testing artifacts (resulting build files) when using Testament?
16:58:31Amun-RaI have a makefile rule for unitest builds
17:02:01*rockcavera joined #nim
17:06:42*jmdaemon joined #nim
17:45:11NimEventerNew thread by jj2299: Get equivalent code with expanded templates/macros, see https://forum.nim-lang.org/t/9997
18:03:21*rmt quit (Ping timeout: 265 seconds)
18:55:40FromDiscord<System64 ~ Flandre Scarlet> Hi, do I need to install Nim to use it? (on Windows
18:57:48*Notxor joined #nim
19:15:35FromDiscord<Hourglass [She/Her]> To program in Nim? Yeah
19:15:55FromDiscord<System64 ~ Flandre Scarlet> So I need Admin rights?
19:16:00FromDiscord<Hourglass [She/Her]> To run existing programs that have EXEs? Then no
19:16:14FromDiscord<Hourglass [She/Her]> In reply to @System64 "So I need Admin": I'm not sure about that, I'm not a Windows user
19:17:04FromDiscord<halc> stuff is weird, man, according to https://github.com/nim-lang/Nim/issues/18146, `--tlsEmulation:off` increases performance, but for me it's actually slower than `--tlsEmulation:on`, this is on Windows with minGW. But the funny part is that it works the opposite way if I compile with `--cc:vcc`
19:20:11FromDiscord<Phil> Compilers↵insert aliens meme image here
19:20:12FromDiscord<halc> I'll try running the same test as the issue and see what happens
19:30:18FromDiscord<System64 ~ Flandre Scarlet> In reply to @Hourglass, When the Hour Strikes "I'm not sure about": Just tested, seems it doesn't require admin rights
19:33:29FromDiscord<rakgew> @System64 ~ Flandre Scarlet - nope nim does not need admin rights to install on win.↵the binaries can be downloaded and extracted just like mingw for c-compilation. adding thier paths to user env vars helps with convenience.
19:35:43FromDiscord<System64 ~ Flandre Scarlet> Oh nice, this is interesting!↵Also, is it possible to download all Nim docs?
19:45:56FromDiscord<auxym> In reply to @System64 "Oh nice, this is": I'm not sure if they are hosted anywhere, but you can build PDF docs from nim source using `./koch pdf`
19:47:03FromDiscord<System64 ~ Flandre Scarlet> In reply to @auxym "I'm not sure if": What does it do? Does it compile or something?
19:48:40FromDiscord<auxym> it compiles all official nim docs into PDF files
19:48:50FromDiscord<System64 ~ Flandre Scarlet> Oh nice
19:49:13FromDiscord<System64 ~ Flandre Scarlet> and where should I execute this command?
19:50:26FromDiscord<auxym> clone (or dowload) the Nim repo and run it from the root: https://github.com/nim-lang/Nim
19:50:55FromDiscord<auxym> actually follow the instructions in the readme to bootstrap nim and build the koch tool
19:51:38FromDiscord<System64 ~ Flandre Scarlet> Alright, thanks!
19:54:22FromDiscord<System64 ~ Flandre Scarlet> In reply to @auxym "actually follow the instructions": so I need to do build_all.bat?
19:56:09NimEventerNew thread by elcritch: Export C library components when using `--app:lib`, see https://forum.nim-lang.org/t/9998
19:57:24*jmdaemon quit (Ping timeout: 268 seconds)
20:24:56*azimut quit (Ping timeout: 255 seconds)
20:32:44*kenran joined #nim
20:37:00FromDiscord<sOkam!> What tools/syntax should I use to guarantee a specific layout for an object when it reaches C land?
20:37:28FromDiscord<sOkam!> (edit) "What tools/syntax should I use to guarantee a specific ... layout" added "memory"
20:38:43*PMunch quit (Quit: leaving)
20:46:17FromDiscord<guttural666> when I type "return result" here, the compiler complains that the template has no type (no return type), is this possibly a compiler bug? I think "return result" is valid is it not? https://media.discordapp.net/attachments/371759389889003532/1085302904417681438/image.png
20:49:23FromDiscord<guttural666> okay, this gives me a runtime error, even if it compiles
20:52:52FromDiscord<Elegantbeef> What do you mean a specific layout?
20:54:01FromDiscord<Elegantbeef> guttural you do realise you do not need the result there?
20:54:11FromDiscord<Elegantbeef> Remove the return type on the template and it'll work
20:54:22FromDiscord<Elegantbeef> What's the runtime error
20:55:16FromDiscord<guttural666> Error: execution of an external program failed: '/home/al/Documents/code/Nim/meddl_test/src/meddl '
20:56:30FromDiscord<Elegantbeef> How are you running it?
20:57:06FromDiscord<guttural666> main is calling database, which is calling this: https://media.discordapp.net/attachments/371759389889003532/1085305625988317294/image.png
20:57:22FromDiscord<Elegantbeef> No i mean how are you compiling the code
20:57:49FromDiscord<guttural666> nim c -r -d:ssl
20:58:00FromDiscord<Elegantbeef> And that's the only error message??
20:58:06FromDiscord<Elegantbeef> Is just it failed
20:58:12FromDiscord<Elegantbeef> No exceptions raised, no defect, just "it dun failed"
20:58:45FromDiscord<guttural666> just the Error, when I call the proc that calls the proc that uses the template
20:59:23FromDiscord<guttural666> ohhh
20:59:27FromDiscord<guttural666> might have another problem here
20:59:40FromDiscord<guttural666> /home/al/Documents/code/Nim/meddl_test/src/api.nim(21) get_html_label↵/home/al/.choosenim/toolchains/nim-1.6.10/lib/system.nim(2565) []↵Error: execution of an external program failed: '/home/al/Documents/code/Nim/meddl_test/src/meddl '
20:59:47FromDiscord<Elegantbeef> Do you somewhere have a config that is making the build a release build?
20:59:50FromDiscord<guttural666> looks like an index failed
20:59:57FromDiscord<guttural666> index access maybe?
21:00:09FromDiscord<Elegantbeef> Yes it's a `[]` error
21:00:31FromDiscord<Dudugz> >.> And they say the exceptions are clear lol
21:00:40FromDiscord<Elegantbeef> They are clear
21:00:56*jmdaemon joined #nim
21:01:17FromDiscord<guttural666> In reply to @Elegantbeef "They are clear": yess, not a problem of the template it seems, dammit
21:01:26FromDiscord<Elegantbeef> The entire error log and config needs to be taken into account
21:01:39FromDiscord<guttural666> yeah, user error sorry 😄
21:01:48FromDiscord<Elegantbeef> If you run `-d:danger` or `-d:release` for developing you're going to get shitty error logs
21:01:55FromDiscord<Dudugz> They are not, they just show the message and the internal file of the language where the error occurred, this stack trace does not detail the error itself or how to get to the cause of it.
21:01:57FromDiscord<Elegantbeef> Not that i think they're using those flags here
21:02:13FromDiscord<Elegantbeef> Uhh
21:02:23FromDiscord<Elegantbeef> A proper defect/exception has a message to explain the error
21:02:57FromDiscord<Dudugz> ... so if there is an error on a random file all you get is "You did it wrong nice"
21:03:04FromDiscord<Elegantbeef> What?
21:03:31FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4qPz
21:03:45FromDiscord<Elegantbeef> We know that at line 3 we have an ivocation that causes an indexdefect
21:03:51FromDiscord<Dudugz> The message is not a problem, the problem is the stack trace that doesn't follow the message, you easily get lost where the error occurred and the possible cause
21:04:07FromDiscord<Elegantbeef> I do not follow
21:04:24FromDiscord<Dudugz> sent a code paste, see https://play.nim-lang.org/#ix=4qPA
21:04:29FromDiscord<guttural666> tbh, I still don't know what exactly the problem is, all I wanted to do here is to yeet the parsing out of the more general api call
21:04:41FromDiscord<Elegantbeef> Well demonstrate the problem error for me
21:05:03FromDiscord<Dudugz> In reply to @Elegantbeef "Well demonstrate the problem": Not at home now but i'll see if i can retrieve a log here
21:05:19FromDiscord<Elegantbeef> And no async errors do not count
21:06:11FromDiscord<Elegantbeef> Guttural i'd personally make an iterator for this
21:06:41FromDiscord<guttural666> In reply to @Elegantbeef "Guttural i'd personally make": to parse the json response you mean?
21:07:11FromDiscord<Elegantbeef> Well i'd just parse the json into an object
21:07:56FromDiscord<guttural666> that is what I ultimately do, I just take a string sequence from the json payload and pass that back to the database, that knows the concrete types
21:08:22FromDiscord<guttural666> that was my idea, to make the api stupid and simple and handle the details in a database.nim
21:09:35FromDiscord<Elegantbeef> So why do you not use `std/jsonutils`?
21:09:48FromDiscord<jmgomez> the generated cpp is platform independent? Seeing a crash on NimMain inside iOS it did work in past attempts so not sure if it's because iOS or something else
21:10:10FromDiscord<Elegantbeef> It should be, no clue if it is
21:10:14FromDiscord<Elegantbeef> I do not touch C++ cause i like sanity or something
21:10:16FromDiscord<guttural666> In reply to @Elegantbeef "So why do you": wasn't aware of that lib, gonna take a look at that
21:10:35FromDiscord<Elegantbeef> It allows you to define your own hooks for (de)serialisation
21:11:01FromDiscord<jmgomez> xD
21:12:33FromDiscord<Dudugz> In reply to @Elegantbeef "And no async errors": 🤔 why? It's a server, async becomes necessary.
21:13:04FromDiscord<Dudugz> I won't be able to pull the logs out of here anyway, when I get home I'll show you what I have to deal with
21:13:16FromDiscord<Elegantbeef> Cause async errors are already established to be bad, due to how the errors are generated and bubbled up
21:13:37FromDiscord<Dudugz> So it makes sense lol, that's why I'm having so much trouble
21:14:22FromDiscord<Elegantbeef> Normal Nim exceptions are generally helpful due to the fact they do not have to bubble around a dispatcher and the like
21:15:23FromDiscord<Dudugz> yes, so that confused me, because there were certain errors that really helped a lot but some were just ridiculous, a guessing game.
21:15:40FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/pull/21091
21:15:44FromDiscord<Elegantbeef> But with devel they're a bit better
21:16:05FromDiscord<Dudugz> Hm, sure i'll take a look, do they intend to fix this in the future?
21:16:56FromDiscord<Elegantbeef> Some people have put some time into it
21:17:00FromDiscord<Elegantbeef> You could do it aswell! 😛
21:17:21FromDiscord<Elegantbeef> I personally do not use async, so I'm not overly concerned about it's errors
21:18:12FromDiscord<Dudugz> Sure, well, personally I need asynchronous functions even more when dealing with servers, god knows hell what callback hell was in javascript.
21:23:54FromDiscord<guttural666> okay, it was a stupid logic error on my part
21:41:59FromDiscord<fabricio> sent a code paste, see https://play.nim-lang.org/#ix=4qPJ
21:42:10FromDiscord<fabricio> (edit) "https://play.nim-lang.org/#ix=4qPJ" => "https://play.nim-lang.org/#ix=4qPK"
21:42:29FromDiscord<fabricio> (edit) "https://play.nim-lang.org/#ix=4qPK" => "https://play.nim-lang.org/#ix=4qPL"
21:43:07FromDiscord<fabricio> (edit) "https://play.nim-lang.org/#ix=4qPL" => "https://play.nim-lang.org/#ix=4qPM"
21:45:35FromDiscord<Elegantbeef> Nope `tbl["foo"]` should be folded into the binary
21:45:56FromDiscord<Elegantbeef> If you want to check do `nim c -d:danger --nimcache=./somefolder` then look at the generated C
21:47:05FromDiscord<Maken James> sent a long message, see http://ix.io/4qPN
21:49:23FromDiscord<Nilts> Does anyone have a good tutorial on how to make a neural network/ai using arraymancer in nim?
21:55:10FromDiscord<dedraiaken> Is there a means to do pointer arithmetic in Nim for the purpose of interop with a C library? In this case, the underlying library wants a pointer to the beginning and the end of a cstring.
21:56:23FromDiscord<Elegantbeef> You can use `cast[ptr UncheckedArray[T]]` or use `ptr_math`
21:56:35FromDiscord<Elegantbeef> Nim doesnt define pointer arithmetic cause it's quite obnoxious
22:01:28*kenran quit (Remote host closed the connection)
22:13:41FromDiscord<guttural666> Is there a way to define the value of a variable at compile time by differing function calls, depending on a given type of a generic proc parameter?
22:16:06FromDiscord<Elegantbeef> The answer is yes but i do not know exactly what you're after
22:19:18FromDiscord<guttural666> something like:↵let myvar = if typeof(x) == api1: callfunc1() elif typeof(x) == api2: callfunc2() where the proc calls don't have to be compile time executable, I just want to kind of text replace the proc calls themselves at compile time?
22:20:35FromDiscord<guttural666> meaning the type of x is known at compile time and the proc call itselves are known, but not the values they procude?
22:20:43FromDiscord<guttural666> (edit) "procude?" => "produce?"
22:24:20FromDiscord<guttural666> probably just a text replace / template
22:26:30FromDiscord<guttural666> I solved this previously by just providing a differing proc pointer, depending on my types at the call site
22:26:47FromDiscord<Elegantbeef> `when` and `elif`
22:27:31FromDiscord<guttural666> okay, yeah that was one solution chatGPT gave me + it said static if typeof(x)
22:27:35FromDiscord<guttural666> will try thanks
22:28:27FromDiscord<Elegantbeef> Sorry i cannot be as useless as a predictive AI model
22:28:51FromDiscord<guttural666> hahaha
22:29:02FromDiscord<guttural666> heresy
22:29:26FromDiscord<guttural666> seems to do what I want, thanks 😛
22:33:36FromDiscord<guttural666> to clarify: this whole path here should be replaced at compile time by let url = make_band_url(query), since the type is known at compile time, I think I understood correctly, that when does a runtime type check https://media.discordapp.net/attachments/371759389889003532/1085329912119951481/image.png
22:33:55FromDiscord<Elegantbeef> `when query is BandQuery`
22:34:11FromDiscord<guttural666> sorry, yes
22:34:49FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4qQ2
22:35:26FromDiscord<guttural666> yeah, but I have a bigger let block
22:35:33FromDiscord<Elegantbeef> So what
22:35:43FromDiscord<guttural666> maybe nl the when yeah
22:36:16FromDiscord<guttural666> this https://media.discordapp.net/attachments/371759389889003532/1085330583133110345/image.png
22:36:43FromDiscord<Elegantbeef> I do not do single line expressions, so that's between you and your god
22:36:44FromDiscord<guttural666> nice
22:37:34FromDiscord<guttural666> if they're < 80 width it's all good, thus spoketh the lord
22:43:58FromDiscord<Elegantbeef> Your lord is the wrong lord
22:44:21FromDiscord<Takemichi Hanagaki> sent a code paste, see https://play.nim-lang.org/#ix=4qQ4
22:46:51FromDiscord<Takemichi Hanagaki> (Yes, I know, Case/Of), but I'm talking about match its internal values.
23:06:06*cyraxjoe quit (Ping timeout: 268 seconds)
23:08:06FromDiscord<demotomohiro> @Takemichi Hanagaki I think you need to write a macro to do such a pattern matching.
23:08:23*cyraxjoe joined #nim
23:09:19FromDiscord<Takemichi Hanagaki> In reply to @demotomohiro "<@890300313729400832> I think you": Alright! Thanks!
23:11:51*Notxor quit (Quit: Leaving)
23:20:54*jmdaemon quit (Ping timeout: 268 seconds)
23:32:12*jmdaemon joined #nim
23:40:30*lumo_e joined #nim
23:52:11*derpydoo quit (Quit: derpydoo)
23:54:50FromDiscord<Takemichi Hanagaki> In reply to @demotomohiro "<@890300313729400832> I think you": Btw, I found what I was looking for: https://nim-lang.github.io/fusion/src/fusion/matching.html
23:56:15FromDiscord<auxym> see also patty
23:58:54FromDiscord<Takemichi Hanagaki> In reply to @auxym "see also patty": Alright! Thanks for the suggestion! 🙂
23:59:45FromDiscord<Elegantbeef> Patty is for object variants though