<< 17-10-2025 >>

00:48:31*rockcavera joined #nim
01:06:48*rockcavera quit (Remote host closed the connection)
01:15:53*rockcavera joined #nim
01:18:39*yeti quit (Ping timeout: 252 seconds)
01:30:37*yeti joined #nim
01:52:40*rockcavera quit (Remote host closed the connection)
05:07:46*SchweinDeBurg quit (Quit: WeeChat 4.8.0-dev)
05:08:17*SchweinDeBurg joined #nim
06:02:34FromDiscord<ieltan> In reply to @jm_sts "Why half a decade?": Either there's room to improve it's design or no one bother to stabilize it. It works fine without any bugs afaik
06:03:14FromDiscord<ieltan> I do think there's probably room for improvement, would love a `Callable` or `Routine` concept for example...
06:05:09FromDiscord<ieltan> That would be great, like you implement `call` for `T: Callable` and `Callable` implements `()`
06:08:24FromDiscord<ieltan> The elephant in the room or course is how you represent `varargs` in the type system...
06:09:03FromDiscord<ieltan> I think rust has a magic `Tuple` Trait for that
07:48:17FromDiscord<Robyn [She/Her]> In reply to @ieltan "I do think there's": Could use a concept
07:49:03FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=CWuUhPze
07:49:23FromDiscord<Robyn [She/Her]> In reply to @ieltan "The elephant in the": `varargs` are just `openArray` with sugar
07:57:01FromDiscord<ieltan> In reply to @battery.acid.bubblegum "`varargs` are just `openArray`": `varargs[T]` and `openArray[T]` doesn't model a tuple such as `(int, float, string, etc)` though.`varargs[untyped]` comes closer to that but is only supported by `template`... maybe i should try to make it
07:58:18FromDiscord<ieltan> sent a code paste, see https://play.nim-lang.org/#pasty=lOZCCpmn
08:07:03FromDiscord<ieltan> sent a code paste, see https://play.nim-lang.org/#pasty=XhdfRuVn
08:12:07*kenran joined #nim
08:14:22FromDiscord<kiloneie> sent a code paste, see https://play.nim-lang.org/#pasty=WCsMKQDm
08:14:38FromDiscord<kiloneie> sent a code paste, see https://play.nim-lang.org/#pasty=NHEUlXzR
08:15:02FromDiscord<kiloneie> sent a code paste, see https://play.nim-lang.org/#pasty=xtRljykz
08:15:19FromDiscord<kiloneie> (sorry, didn't wanna pasteWebsite.com)
08:17:39FromDiscord<ieltan> ineligible on discord but have you tried `template loadEntityImage(entity: Entity) {.dirty.} =`
08:18:31FromDiscord<ieltan> or just `proc (entity: var Entity)`...
08:19:46FromDiscord<ieltan> from the looks of it theres no reason this should be a `template`you should just use a proc and pass a `var Entity` to initialise it @kiloneie
08:20:12FromDiscord<kiloneie> I am trying to reduce parameters.
08:20:58FromDiscord<ieltan> sorry i dont get it
08:21:16FromDiscord<ieltan> hows this big template going to help with tis
08:21:20FromDiscord<kiloneie> I don't want to supply app.renderer every single time the routine is called
08:21:40FromDiscord<kiloneie> i will use a different routine to change the renderer, if needed.
08:21:48*kenran quit (Remote host closed the connection)
08:23:53FromDiscord<kiloneie> Neither suggestion works.
08:24:19FromDiscord<kiloneie> In reply to @ieltan "ineligible on discord but": What is ineligible on Discord ?
08:27:12FromDiscord<ieltan> i mean unreadable
08:27:22FromDiscord<ieltan> this means a different thing in french lol my bad
08:27:39FromDiscord<ieltan> In reply to @kiloneie "Neither suggestion works.": rip
08:28:04FromDiscord<kiloneie> dirty -> loadTexture undeclared... it's from sdl... that's impossible.
08:28:47FromDiscord<kiloneie> In reply to @ieltan "i mean unreadable": Are not code blocks better, than url to code ?
08:30:24FromDiscord<ieltan> In reply to @kiloneie "dirty -> loadTexture undeclared...": how bout `template loadEntityImage(entity: Entity): untyped =`
08:30:39FromDiscord<ieltan> this should work... dunno why i said dirty
08:32:29FromDiscord<ieltan> In reply to @kiloneie "Are not code blocks": well the two part function and the body and function visually being the same indent trips me up
08:35:12FromDiscord<kiloneie> I forgot about the return... i removed it...
08:46:31FromDiscord<kiloneie> I suck at resolving template errors, especially returns <.<.
08:50:11FromDiscord<kiloneie> Maybe workout, lunch and nap will get me to figure it out... https://media.discordapp.net/attachments/371759389889003532/1428666390222475264/Screenshot_2025-10-17_10-49-41.png?ex=68f354c2&is=68f20342&hm=3e615b416b341f81c810a9ea9db7d3e0497488a982978f0e0999275b2a047852&
08:54:57FromDiscord<lainlaylie> you have an unused expression (`false`) sitting in the middle of a statement list
09:37:31FromDiscord<nnsee> you also have a bunch of `true`s
09:37:36FromDiscord<nnsee> what exactly are you trying to do here?
09:37:46FromDiscord<nnsee> what are those freestanding `false` and `true` statements supposed to do?
10:03:55FromDiscord<Robyn [She/Her]> In reply to @ieltan "also you're mixing new": Am I?
10:04:08FromDiscord<Robyn [She/Her]> i don't use concepts tbh
10:04:44*CypherCat quit (Changing host)
10:04:44*CypherCat joined #nim
10:08:08FromDiscord<lainlaylie> i suspect they are trying to write a template that evaluates to a bool value
10:30:46FromDiscord<kiloneie> It doesn't work with the true/false statemets i any combo, or without them... i barely got other templates to return bool D:...
10:30:59FromDiscord<kiloneie> IS there some documentation i am missing ?
10:31:39FromDiscord<kiloneie> I don't understand where to return exactly, all i know is https://media.discordapp.net/attachments/371759389889003532/1428691925095022632/Screenshot_2025-10-17_12-31-31.png?ex=68f36c8a&is=68f21b0a&hm=3d375fd83cd3861e5f40773f101a5af15cfb8b0cf99c97df5230aca175b7be13&
10:31:51FromDiscord<kiloneie> Past that idk...
10:33:21FromDiscord<ieltan> In reply to @kiloneie "I don't understand where": 0 reason to not use `proc` there
10:33:44FromDiscord<ieltan> unless i am missing something
10:34:45FromDiscord<xx_the_gamer_xx_oxxo2615> ๐Ÿ’‹๐—ง๐—ฒ๐—ฒ๐—ป & ๐—ข๐—ป๐—น๐˜†๐—™๐—ฎ๐—ป๐˜€ ๐—Ÿ๐—ฒ๐—ฎ๐—ธ๐˜€ ๐—๐—ผ๐—ถ๐—ป:โ†ต# https://spoo.me/zIfbpn @everyone
10:35:10FromDiscord<ieltan>
10:35:11FromDiscord<Robyn [She/Her]> uhh
10:35:15FromDiscord<Robyn [She/Her]> <@&371760044473319454>
11:02:38FromDiscord<lainlaylie> templates dont have `result` but you can just declare your own, write to it using whatever control flow you want, and end your template with it
11:02:51FromDiscord<lainlaylie> the template body is then an expression with the desired value
11:07:38FromDiscord<pmunch> sent a long message, see https://pasty.ee/fMlMyAnu
11:15:29FromDiscord<pmunch> sent a code paste, see https://play.nim-lang.org/#pasty=ToSLXeyE
11:19:29FromDiscord<pmunch> sent a long message, see https://pasty.ee/dqHPLCvV
11:25:24FromDiscord<pmunch> sent a code paste, see https://play.nim-lang.org/#pasty=XxXAZCxb
11:28:10FromDiscord<pmunch> Maybe I should update my article..
11:42:21*vsantana joined #nim
11:42:25*vsantana quit (Client Quit)
11:43:14*vsantana joined #nim
11:43:19*vsantana quit (Client Quit)
11:43:37*vsantana joined #nim
12:18:51FromDiscord<mitranim> sent a code paste, see https://play.nim-lang.org/#pasty=fFIUaILU
12:22:37FromDiscord<lainlaylie> in this case wrapping it in parentheses is enough
12:23:40FromDiscord<mitranim> Whoah I'm too stupid for this
12:38:46*beholders_eye joined #nim
14:21:21*hygo quit (Quit: WeeChat 4.6.3)
15:09:09FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=fXdYzmcP
15:10:37FromDiscord<heysokam> (edit) "https://play.nim-lang.org/#pasty=ItRwdPvu" => "https://play.nim-lang.org/#pasty=MoqxJwmh"
15:17:25*vsantana quit (Ping timeout: 256 seconds)
15:22:40FromDiscord<kiloneie> In reply to @pmunch "You seem to have": @pmunch (correct one ?) You are 9 days late for my birthday, but thank you! I do wish this was in the manual/docs, i can live with no docs for routines in the Standard Library, but templates and the like, could use a bit more. It's possible that this is explained in the manual, but it's not, or just mentioned in the Template section...
15:25:19FromDiscord<pmunch> Yes this is a weird hole in the docs I think
15:25:36FromDiscord<pmunch> Which is unfortunate..
15:25:50FromDiscord<pmunch> And happy birthday @kiloneie !
15:27:11FromDiscord<kiloneie> I swear i read the templates part like 5 times this month D:...
15:29:00FromDiscord<jm_sts> In reply to @ieltan "0 reason to not": In my mind this is the most quintessential โ€œNim dev feedbackโ€ you can ever receive. Or if itโ€™s a macro โ€œno reason not to use a template here.โ€ I have anxiety over this ๐Ÿคฃ
15:30:54FromDiscord<jm_sts> Happy birthday Kiloneie
15:32:21FromDiscord<ieltan> Happy b-day kilo
15:32:26FromDiscord<kiloneie> In reply to @jm_sts "In my mind this": I follow Nim's guides as much as possible, but if i want to make something easier and simpler for me, i will do so. I will be minding the cost though.
15:32:54FromDiscord<ieltan> In reply to @jm_sts "In my mind this": I actually don't know his code and still don't know the intent with that template lol
15:33:19FromDiscord<ieltan> So I might be wrong and template is a solution
15:34:47FromDiscord<ieltan> In reply to @kiloneie "I follow Nim's guides": Like PMunch mentioned you could just go with proc to save yourself the troubles and use template for the convenience facilities on top of it
15:35:01FromDiscord<ieltan> (edit) "for" => "to wrap it and add"
15:35:49FromDiscord<kiloneie> In reply to @ieltan "Like PMunch mentioned you": That's the goal now. I do think of efficiency when i can.
15:36:11FromDiscord<jm_sts> I feel that, and when you use templates/ macros you need to ask yourself โ€œdo i really understand what Iโ€™m trying to do and the language, or can I make this simpler?โ€
15:36:41FromDiscord<jm_sts> The anxiety I feel sometimes is not knowing if I need templates macros or if I just dont understand enough of Nim yet
15:37:02FromDiscord<kiloneie> Before i knew i can just do a wrapper, it would of been inefficient(hoping for IC). This will be much better.
15:37:22FromDiscord<kiloneie> I try to avoid Macros as much as possible, they are projects in itself...
15:37:35FromDiscord<kiloneie> Cannot wait for how Nimony changes that!
15:37:49FromDiscord<kiloneie> I only saw a glimpse so far, but i loved it.
15:40:15FromDiscord<ieltan> In reply to @jm_sts "I feel that, and": This is a good mindset but in practice you can never 100% understand what the actual implementation of a proc does 100% of the time, and trying to do so might just waste your time. Just reading the "documentation" is enough... However you must know if any side-effects happens
15:46:16FromDiscord<ieltan> sent a long message, see https://pasty.ee/RPNpGtPR
15:47:42FromDiscord<ieltan> (edit) "https://pasty.ee/tVnEmCQi" => "https://pasty.ee/DVOoIGdO"
15:49:47FromDiscord<jm_sts> In reply to @ieltan "For myself what works": Iโ€™m adding this to my personal notes for future considerations
15:50:01FromDiscord<jm_sts> Wow I sound like an LLM โ€œmemory savedโ€
15:52:00FromDiscord<ieltan> Bahahaha reminds me that I actually used that one mcp memory bank once and disabled it as I noticed it wasn't doing anything and still consumed tokens anyways ๐Ÿ˜—
15:52:34FromDiscord<heysokam> In reply to @ieltan "For myself what works": `proc` > `template` > `macro` simply due to the amount of complexity added by macros, imo
15:53:46FromDiscord<ieltan> Yeah that's what I learned when I began nim
15:55:19FromDiscord<ieltan> `macro` is too useful and more stable than `template` ime for dealing with the type system which I happen to have done quite a lot these days
15:56:15FromDiscord<ieltan> With template I saw that one wrong move in a dark corner of the compiler and it's gone, lol.
15:56:52FromDiscord<ieltan> Well that's more the type system fault really as I then used macros to circumvent the bug in question
16:10:56FromDiscord<kiloneie> sent a long message, see https://pasty.ee/wCtKoIsV
16:19:13*vsantana joined #nim
16:20:20*vsantana quit (Client Quit)
16:21:47FromDiscord<lainlaylie> sent a code paste, see https://play.nim-lang.org/#pasty=CQKwOyfl
16:25:52*przmk quit (Ping timeout: 244 seconds)
16:26:42FromDiscord<kiloneie> This took me a bit too long to format from discord <.<... Need a freaking ruler. https://media.discordapp.net/attachments/371759389889003532/1428781273828036670/Screenshot_2025-10-17_18-26-11.png?ex=68f3bfc1&is=68f26e41&hm=b11443aca4efbbc6fb5e3a9c4e70f84339ecaad6b9d100101a11fd0ce044651d&
16:28:53*przmk joined #nim
16:36:04FromDiscord<kiloneie> Does your blog have a grid view ? This timeline/journal way is... @pmunch
16:36:59FromDiscord<pmunch> A grid view?
16:37:18FromDiscord<pmunch> I mean it has RSS, feel free to read it however you like I guess ๐Ÿคทโ€โ™‚๏ธ
16:38:57FromDiscord<pmunch> In reply to @kiloneie "I didn't think of": That's actually a pretty good idea! And by the way, since loadEntityImage already returns a bool you don't need the if/else there
16:51:00FromDiscord<nocturn9x> In reply to @Amun-Ra "let's say I need": SO
16:51:06FromDiscord<nocturn9x> oops, caps lock
16:51:19FromDiscord<nocturn9x> so I'm trying with just clang because I can't get a gcc cross compiler to work
16:52:12FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=LZCKWvbS
16:53:19FromDiscord<nocturn9x> full error:
16:53:21FromDiscord<nocturn9x> https://media.discordapp.net/attachments/371759389889003532/1428787982932115528/message.txt?ex=68f3c600&is=68f27480&hm=c7850a42227a465a9336151a5b79795bf6bf1543ce1dc4c0170c954a6190f832&
16:54:52FromDiscord<nocturn9x> is it using the wrong headers? how do I make it use the right ones?
17:14:21FromDiscord<nocturn9x> ehh I got it to work with docker I think
22:13:02*joast quit (Ping timeout: 260 seconds)
22:14:20*joast joined #nim
22:50:36*joast quit (Quit: Leaving.)
22:56:05*xet7 quit (Quit: Leaving)
23:12:19FromDiscord<heysokam> Does someone know where to find the source code of `$` for `BiggestInt`?
23:12:40FromDiscord<heysokam> My LSP doesn't work, so I can't just "go to definition" ๐Ÿ™
23:41:25*bcksl quit (Ping timeout: 265 seconds)
23:41:54*end quit (Ping timeout: 265 seconds)