<< 16-03-2025 >>

00:18:51*minimi quit ()
00:21:07FromDiscord<gabrielcapilla> Forgive me if this is not the right place, but I have used the forum for the first time and got banned for asking about a VS Code extension here `How to start working with Nim in 2025?`. Hopefully this misunderstanding can be fixed. It's true that I usually check the forum without logging in, but for once I'm commenting something… Anyway. Good night.
00:37:07FromDiscord<aintea> how much of a pain is it to make recursive macros ?
00:49:25FromDiscord<Elegantbeef> You don't
00:54:26FromDiscord<leorize> you can just spin your own macro into a proc, then you can recursively call it as you wish
00:56:02FromDiscord<leorize> if you want macro that expands everything inside then call itself again, you can do that with typed macros, though it'll be very painful
00:56:03FromDiscord<Elegantbeef> Seems like they just want to use the builder pattern
00:56:08FromDiscord<Elegantbeef> So no need for a macro
00:58:57*beholders_eye quit (Ping timeout: 248 seconds)
01:05:42FromDiscord<aintea> In reply to @Elegantbeef "You don't": I need to, I'm making something that returns a tree like structure
01:05:48FromDiscord<aintea> and it's a pain to setup so I'm making a macro
01:05:54FromDiscord<aintea> or at least I'm trying
01:05:57FromDiscord<aintea> and crying
01:06:27FromDiscord<Elegantbeef> Just use a builder pattern and thank me
01:07:17FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=EzLslODv
01:18:00FromDiscord<aintea> I can't do that unfortunately
01:18:27FromDiscord<aintea> because I can only do a list like this
01:18:36FromDiscord<aintea> I require depth
01:19:14FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#pasty=ARGbpVFy
01:19:53FromDiscord<aintea> (edit) "https://play.nim-lang.org/#pasty=RfmsCQKr" => "https://play.nim-lang.org/#pasty=sZaqJwDn"
01:19:57*disso-peach quit (Quit: Leaving)
01:20:07FromDiscord<aintea> In reply to @graveflo "this looks odd though.": I resolved the problem, no idea how though
01:20:17FromDiscord<aintea> I just removed stuff bits by bits
01:20:23FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=UVgOMmwh
01:21:50FromDiscord<aintea> no idea if I can
01:21:51FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=oWhQVruG
01:21:55FromDiscord<aintea> I'm too tired today
01:21:56FromDiscord<Elegantbeef> Or there abouts
01:22:05FromDiscord<Elegantbeef> Builder all the way down
01:22:34FromDiscord<aintea> oh this one is a good idea
01:22:52FromDiscord<aintea> I'll implement it until I can make the macro work
01:23:00FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=nOigiPUB
01:23:02FromDiscord<aintea> I cannot run run away forever from nim macros
01:23:24FromDiscord<aintea> I want to build something with my bare hands
01:23:26FromDiscord<Robyn [She/Her]> Using the chain library
01:23:49FromDiscord<aintea> thank you very much, but if I don't use macros I will maybe use the technique elegant gave me
01:23:58FromDiscord<Robyn [She/Her]> fair
01:24:05FromDiscord<aintea> what's the point of having something that looks like a macro if I didn't suffer
01:24:16FromDiscord<Elegantbeef> It's easier to extend
01:24:21FromDiscord<Robyn [She/Her]> :P
01:24:24FromDiscord<Robyn [She/Her]> What beef said
01:24:35FromDiscord<Elegantbeef> Want a new feature add some new procs
01:24:54FromDiscord<aintea> I won't need anything else as far as I'm aware of
01:24:55FromDiscord<Elegantbeef> Want to remove a feature remove a few procs πŸ˜„
01:24:56FromDiscord<Robyn [She/Her]> Imo macros are great but if you can avoid them without making readability worse, then avoid them
01:25:09FromDiscord<aintea> In reply to @battery.acid.bubblegum "Imo macros are great": That's the problem, I can't
01:25:13FromDiscord<Elegantbeef> Well then why use macros other than self harm
01:25:17FromDiscord<aintea> the readability will be the bets with a macro
01:25:28FromDiscord<Elegantbeef> It's about the same
01:25:31FromDiscord<aintea> what
01:25:38FromDiscord<Robyn [She/Her]> In reply to @aintea "the readability will be": How so?
01:25:49FromDiscord<aintea> cleaner with no extras
01:26:05FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#pasty=IkqAdQvx
01:26:06FromDiscord<aintea> (edit) "https://play.nim-lang.org/#pasty=crqCCYfC" => "https://play.nim-lang.org/#pasty=SyREGIuT"
01:26:17FromDiscord<Robyn [She/Her]> Yes but then you now have to main a hellish macro
01:26:23FromDiscord<aintea> and I will
01:26:29FromDiscord<aintea> or I will die trying
01:26:29FromDiscord<Elegantbeef> How do you explain to the user your DSL with all it's features and edge cases πŸ˜„
01:26:42FromDiscord<aintea> fair
01:26:49FromDiscord<aintea> (edit) "fair ... " added "enough"
01:27:12FromDiscord<Robyn [She/Her]> In reply to @aintea "how do I explain": For the best readable result and for the sanity of the author, `kkchen/chain` is used since the syntax is elegant and does what a macro would've done
01:27:31FromDiscord<Robyn [She/Her]> :p
01:27:32FromDiscord<Elegantbeef> But it's not bespoke! πŸ˜›
01:27:57FromDiscord<Robyn [She/Her]> then fuck you, how about that πŸ˜› πŸ™ƒ
01:28:06FromDiscord<aintea> that sounds nice
01:28:23FromDiscord<Robyn [She/Her]> what does?
01:28:26FromDiscord<Elegantbeef> Jeez so toxic
01:28:43FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Jeez so toxic": My username is Battery Acid first and foremost :)
01:28:46FromDiscord<aintea> In reply to @battery.acid.bubblegum "what does?": fucking myself, I'll just go to sleep instead
01:28:50FromDiscord<Robyn [She/Her]> Lmfao
01:28:56FromDiscord<aintea> get some sleep too, people
01:28:58FromDiscord<Robyn [She/Her]> Have a good sleep, AinTea o7
01:29:00FromDiscord<aintea> sleep is important
01:29:02FromDiscord<aintea> o7
01:51:39*andreas_ quit (Ping timeout: 245 seconds)
01:51:58*andreas_ joined #nim
02:28:13*andreas_ quit (Ping timeout: 244 seconds)
02:30:04*andreas_ joined #nim
02:54:32FromDiscord<n0bra1n3r.nim> Hey guys, I'm trying to invoke nimscript from nim, is there a way to pass parameter names to `callRoutine` defined in https://github.com/nim-lang/Nim/blob/devel/compiler/nimeval.nim#L59 ? I know I can create an `nkExprEqExpr` PNode, but I can't figure out how to create the `nkIdent` PNode child for it.
02:55:35FromDiscord<n0bra1n3r.nim> (edit) "Hey guys, I'm trying to invoke nimscript from nim, is there a way to pass parameter names to ... `callRoutine`" added "the invoked script proc via"
03:00:49FromDiscord<Elegantbeef> Might be able to just do `newNode`
03:03:47FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/blob/2b699bca530317873d0b3bf2ee2e59ef221010f0/compiler/ast.nim#L1284 actually this one
03:17:06FromDiscord<n0bra1n3r.nim> Ya I was looking at how to create PIdent, but `getIdent` requires an IdentCache
03:17:19FromDiscord<n0bra1n3r.nim> (edit) "PIdent," => "PIdent which is the param to newNode,"
03:17:40FromDiscord<n0bra1n3r.nim> (edit) "Ya I was looking at how to create PIdent which is the param to newNode, but `getIdent` requires an ... IdentCachefrom" added "IdentCache. Couldn't find how to get an" | "IdentCache. Couldn't find how to get anIdentCache ... " added "from Interpreter"
03:18:02FromDiscord<n0bra1n3r.nim> (edit) "newNode," => "newIdentNode,"
03:18:37FromDiscord<Elegantbeef> The context I think
03:21:23FromDiscord<n0bra1n3r.nim> Awesome, thanks! nimeval.nim https://media.discordapp.net/attachments/371759389889003532/1350670251964235846/image.png?ex=67d79532&is=67d643b2&hm=2bea92a84bef161508a2676a7f8caa11018836588ce98d22f985cb37af67e76a&
03:35:33FromDiscord<n0bra1n3r.nim> Hmmm, but `graph` is not an exported field...
03:46:27FromDiscord<Elegantbeef> Could use `std/importutils` if you hate sensible code πŸ˜„
03:53:50FromDiscord<n0bra1n3r.nim> hmmm...so I'm switching tacs by trying to get the index of a parameter given its name. I have a PSym returned from `selectRoutine` so I'm hoping to be able to iterate through parameter names
04:47:04*alexdaguy joined #nim
05:41:58*derpydoo joined #nim
06:26:07*derpydoo quit (Quit: derpydoo)
07:28:56*minimi joined #nim
07:49:00*ntat joined #nim
08:15:05*ntat quit (Quit: leaving)
09:32:26*ntat joined #nim
09:57:35*minimi quit ()
10:00:51*minimi joined #nim
10:07:27*minimi quit (Ping timeout: 276 seconds)
10:16:47*ntat quit (Quit: leaving)
10:29:24*derpydoo joined #nim
10:35:47*beholders_eye joined #nim
11:05:36*derpydoo quit (Quit: derpydoo)
11:15:13*beholders_eye quit (Ping timeout: 244 seconds)
11:42:18FromDiscord<aethrvmn> has the url for nimble changed? nimbke.directory returns the default nginx page
11:43:10FromDiscord<aethrvmn> (edit) "nimbke.directory" => "nimble.directory"
11:45:30FromDiscord<aethrvmn> Huh, on my laptop it returns the proper page but on my smartphone it returns the nginx page https://media.discordapp.net/attachments/371759389889003532/1350797118461444096/Screenshot_20250316-124353.png?ex=67d80b59&is=67d6b9d9&hm=074f1a13b2943cc0c60de16849395c5ef2ca0959d2367a2d20a5c95a41609b9d&
11:49:07*minimi joined #nim
12:14:41FromDiscord<aintea> type https:// in front of the url
12:14:48FromDiscord<aintea> for some reason it does that sometimes
12:35:04FromDiscord<aethrvmn> Doesnt certbot add a redirect automatically?
12:35:08FromDiscord<aethrvmn> Weird
12:42:19FromDiscord<aintea> where can we make suggestions about functions to add into the standard library ?
13:12:26*alexdaguy quit (Quit: w)
13:16:34FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#pasty=KUhcXela
13:16:58FromDiscord<aintea> (and yes I know `tuple[a, b: int]` exist but that's not what I want)
13:36:44*minimi quit (Ping timeout: 252 seconds)
14:38:48FromDiscord<madonuko> @arnetheduck I looked into the codebase for a while now but what's the procedure for generating the qt bindings? I kinda want to try to generate parts of the kf6 bindings (because I fancy `<KShortcutWidget>` in my usecase)
15:02:22FromDiscord<arnetheduck> In reply to @madonuko "<@449019668296892420> I looked into": add it to https://github.com/seaqt/seaqt-gen/blob/master/cmd/genbindings/config-libraries.go then run `make`
15:02:23*beholders_eye joined #nim
15:27:21FromDiscord<madonuko> thanks
15:40:36*ntat joined #nim
16:00:43*pbsds35 quit (Quit: The Lounge - https://thelounge.chat)
16:01:31*pbsds35 joined #nim
16:29:14*ntat quit (Quit: leaving)
16:33:52*ntat joined #nim
16:34:49*ntat quit (Client Quit)
16:37:05*ntat joined #nim
16:59:36*ntat quit (Quit: leaving)
17:00:05*ntat joined #nim
17:00:12*GnuYawk quit (Quit: The Lounge - https://thelounge.chat)
17:00:32*GnuYawk joined #nim
17:00:40FromDiscord<System64 ~ Flandre Scarlet> ``nim -d:useLuajit -passL:-Llibs -passL:-lluajit-linux c testLua.nim``↡Hi! Is it normal it says ``command line(1, 2) Error: argument for command line option expected: '-p'``
17:06:40strogon14it's --passL, not -passL (two dashes)
17:12:08FromDiscord<System64 ~ Flandre Scarlet> In reply to @strogon14 "it's --passL, not -passL": Noticed it, thanks
17:22:59*minimi joined #nim
18:05:44FromDiscord<Elegantbeef> @aintea how does one even call the add procedure?
18:06:07FromDiscord<aintea> add((1, 2))
18:06:14FromDiscord<aintea> but it's meant to be used in chaining
18:06:18FromDiscord<aintea> I have this chunk of code
18:06:35FromDiscord<Elegantbeef> Right so you want tuple unpacking which will probably never be a thing
18:06:45FromDiscord<Elegantbeef> You can use macros to achieve it but that's it
18:07:43FromDiscord<Elegantbeef> https://github.com/beef331/micros/blob/master/src/micros/introspection.nim#L23-L27 make this an operator instead then you can do `(1, 2) -> add -> bleh -> meh`
18:07:44FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#pasty=EmDUdZUF
18:08:34FromDiscord<Elegantbeef> I don't exactly see how the tuple unpacking really helps there
18:23:04FromDiscord<user2m> when using `--gc : boehm` should I also use `--mm : boehm` ?
18:23:57FromDiscord<Elegantbeef> No you should just use mm
18:24:07Amun-Ragc is obsolete
18:24:22FromDiscord<Elegantbeef> Tell Java and C# that!
18:24:35Amun-Ra:D
18:26:36FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#pasty=TwmUtHLj
18:26:58FromDiscord<user2m> (edit) "https://play.nim-lang.org/#pasty=srAfIHJC" => "https://play.nim-lang.org/#pasty=AlnPXgML"
18:27:07FromDiscord<Elegantbeef> Yes `gc` is an alias for `mm` now
18:32:59*minimi left #nim (#nim)
18:34:50FromDiscord<user2m> what does `--define:lto` mean?
18:35:04FromDiscord<Elegantbeef> It enables link time optimizations
18:38:42FromDiscord<aintea> In reply to @Elegantbeef "I don't exactly see": in the use, instead of having a tuple as an argument and having to do `arg[0]`, it's more explicit
18:39:28FromDiscord<Elegantbeef> Ah right you have to manually unpack right now
18:39:55FromDiscord<Elegantbeef> Probably not worth it but `let (a, b) = data` does work inside the body for unpacking
19:00:15FromDiscord<prestosilver> is there a way to get a ref Exception to the main thread, I have a crash handler that only works on the draw thread, and I want it to handle unhandled exceptions in threads
19:06:36FromDiscord<leorize> I don't think boehm backend is very well maintained. Did the sanitizers rat out the leak issue for you?↡(@user2m)
19:22:18FromDiscord<user2m> In reply to @leorize "I don't think boehm": No sorry I haven't tried that yet I wanted to try a simple config change first. My issue is my web app is like a social music app so to really test it I need to either 1. Test in prod (not great) or 2. Create a full test suite with something like loadster.app and have a bunch bots take similar actions as users to really simulate app usage.
19:29:35FromDiscord<nitely_> In reply to @user2m "No sorry I haven't": What's your Nim version?
19:32:30FromDiscord<user2m> In reply to @nitely_ "What's your Nim version?": Currently 2.0.0 but Im pretty sure I switched to the latest before and was having the same issue. Actually I'll try and update now why not
19:37:16FromDiscord<nitely_> In reply to @user2m "Currently 2.0.0 but Im": Have you tried using refc? --mm:refc
19:38:15FromDiscord<user2m> In reply to @nitely_ "Have you tried using": Not yet I can def give that a go here shortly. Just pushed the 2.2.2 version and I'm watching the ram usage rn to see if it ever climbs down
19:39:47FromDiscord<nitely_> In reply to @user2m "Not yet I can": async+orc does leak in my case, but refc seems fine.
20:31:06*ntat quit (Quit: leaving)
20:46:57*ntat joined #nim
22:25:27*ntat quit (Quit: leaving)
22:32:44*waleee joined #nim
23:06:12FromDiscord<Robyn [She/Her]> In reply to @aintea "And will stuff like": why not do `a, b: (int, int)`?
23:06:49FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Right so you want": Ooooh
23:06:53FromDiscord<aintea> yes
23:06:58FromDiscord<Robyn [She/Her]> the syntax used for a demonstration was confusing
23:07:06FromDiscord<aintea> yeah sorry
23:07:25FromDiscord<aintea> What I was searching for is tuple unpacking inside of function parameter
23:07:34FromDiscord<Robyn [She/Her]> No sweat
23:07:45FromDiscord<aintea> Also if I want to refer to a proc/func should I say a "procedure" or "function" ?
23:08:39FromDiscord<Robyn [She/Her]> Ehh don't think the difference matters to most people, but if you're specifically using function to mean `func` with no side-effects, you should just write `func`
23:08:45FromDiscord<Elegantbeef> Procedure
23:08:57FromDiscord<aintea> ok thanks
23:09:15FromDiscord<aintea> btw Elegant, what software are you using to interact with discord
23:09:17FromDiscord<aintea> (edit) "btw Elegant, what software are you using to interact with discord ... " added "?"
23:09:22FromDiscord<aintea> and does it have vim motions
23:09:26FromDiscord<Elegantbeef> Matrix
23:09:49FromDiscord<Elegantbeef> Nope just using element's electon desktop client
23:10:01FromDiscord<aintea> ok
23:15:33FromDiscord<leorize> there are clients with vim motions if you want
23:16:46FromDiscord<Elegantbeef> Leo on the matrix evangelism train
23:17:37FromDiscord<leorize> everyone should use matrix, yes