00:18:51 | * | minimi quit () |
00:21:07 | FromDiscord | <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:07 | FromDiscord | <aintea> how much of a pain is it to make recursive macros ? |
00:49:25 | FromDiscord | <Elegantbeef> You don't |
00:54:26 | FromDiscord | <leorize> you can just spin your own macro into a proc, then you can recursively call it as you wish |
00:56:02 | FromDiscord | <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:03 | FromDiscord | <Elegantbeef> Seems like they just want to use the builder pattern |
00:56:08 | FromDiscord | <Elegantbeef> So no need for a macro |
00:58:57 | * | beholders_eye quit (Ping timeout: 248 seconds) |
01:05:42 | FromDiscord | <aintea> In reply to @Elegantbeef "You don't": I need to, I'm making something that returns a tree like structure |
01:05:48 | FromDiscord | <aintea> and it's a pain to setup so I'm making a macro |
01:05:54 | FromDiscord | <aintea> or at least I'm trying |
01:05:57 | FromDiscord | <aintea> and crying |
01:06:27 | FromDiscord | <Elegantbeef> Just use a builder pattern and thank me |
01:07:17 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=EzLslODv |
01:18:00 | FromDiscord | <aintea> I can't do that unfortunately |
01:18:27 | FromDiscord | <aintea> because I can only do a list like this |
01:18:36 | FromDiscord | <aintea> I require depth |
01:19:14 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=ARGbpVFy |
01:19:53 | FromDiscord | <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:07 | FromDiscord | <aintea> In reply to @graveflo "this looks odd though.": I resolved the problem, no idea how though |
01:20:17 | FromDiscord | <aintea> I just removed stuff bits by bits |
01:20:23 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=UVgOMmwh |
01:21:50 | FromDiscord | <aintea> no idea if I can |
01:21:51 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=oWhQVruG |
01:21:55 | FromDiscord | <aintea> I'm too tired today |
01:21:56 | FromDiscord | <Elegantbeef> Or there abouts |
01:22:05 | FromDiscord | <Elegantbeef> Builder all the way down |
01:22:34 | FromDiscord | <aintea> oh this one is a good idea |
01:22:52 | FromDiscord | <aintea> I'll implement it until I can make the macro work |
01:23:00 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=nOigiPUB |
01:23:02 | FromDiscord | <aintea> I cannot run run away forever from nim macros |
01:23:24 | FromDiscord | <aintea> I want to build something with my bare hands |
01:23:26 | FromDiscord | <Robyn [She/Her]> Using the chain library |
01:23:49 | FromDiscord | <aintea> thank you very much, but if I don't use macros I will maybe use the technique elegant gave me |
01:23:58 | FromDiscord | <Robyn [She/Her]> fair |
01:24:05 | FromDiscord | <aintea> what's the point of having something that looks like a macro if I didn't suffer |
01:24:16 | FromDiscord | <Elegantbeef> It's easier to extend |
01:24:21 | FromDiscord | <Robyn [She/Her]> :P |
01:24:24 | FromDiscord | <Robyn [She/Her]> What beef said |
01:24:35 | FromDiscord | <Elegantbeef> Want a new feature add some new procs |
01:24:54 | FromDiscord | <aintea> I won't need anything else as far as I'm aware of |
01:24:55 | FromDiscord | <Elegantbeef> Want to remove a feature remove a few procs π |
01:24:56 | FromDiscord | <Robyn [She/Her]> Imo macros are great but if you can avoid them without making readability worse, then avoid them |
01:25:09 | FromDiscord | <aintea> In reply to @battery.acid.bubblegum "Imo macros are great": That's the problem, I can't |
01:25:13 | FromDiscord | <Elegantbeef> Well then why use macros other than self harm |
01:25:17 | FromDiscord | <aintea> the readability will be the bets with a macro |
01:25:28 | FromDiscord | <Elegantbeef> It's about the same |
01:25:31 | FromDiscord | <aintea> what |
01:25:38 | FromDiscord | <Robyn [She/Her]> In reply to @aintea "the readability will be": How so? |
01:25:49 | FromDiscord | <aintea> cleaner with no extras |
01:26:05 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=IkqAdQvx |
01:26:06 | FromDiscord | <aintea> (edit) "https://play.nim-lang.org/#pasty=crqCCYfC" => "https://play.nim-lang.org/#pasty=SyREGIuT" |
01:26:17 | FromDiscord | <Robyn [She/Her]> Yes but then you now have to main a hellish macro |
01:26:23 | FromDiscord | <aintea> and I will |
01:26:29 | FromDiscord | <aintea> or I will die trying |
01:26:29 | FromDiscord | <Elegantbeef> How do you explain to the user your DSL with all it's features and edge cases π |
01:26:42 | FromDiscord | <aintea> fair |
01:26:49 | FromDiscord | <aintea> (edit) "fair ... " added "enough" |
01:27:12 | FromDiscord | <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:31 | FromDiscord | <Robyn [She/Her]> :p |
01:27:32 | FromDiscord | <Elegantbeef> But it's not bespoke! π |
01:27:57 | FromDiscord | <Robyn [She/Her]> then fuck you, how about that π π |
01:28:06 | FromDiscord | <aintea> that sounds nice |
01:28:23 | FromDiscord | <Robyn [She/Her]> what does? |
01:28:26 | FromDiscord | <Elegantbeef> Jeez so toxic |
01:28:43 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Jeez so toxic": My username is Battery Acid first and foremost :) |
01:28:46 | FromDiscord | <aintea> In reply to @battery.acid.bubblegum "what does?": fucking myself, I'll just go to sleep instead |
01:28:50 | FromDiscord | <Robyn [She/Her]> Lmfao |
01:28:56 | FromDiscord | <aintea> get some sleep too, people |
01:28:58 | FromDiscord | <Robyn [She/Her]> Have a good sleep, AinTea o7 |
01:29:00 | FromDiscord | <aintea> sleep is important |
01:29:02 | FromDiscord | <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:32 | FromDiscord | <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:35 | FromDiscord | <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:49 | FromDiscord | <Elegantbeef> Might be able to just do `newNode` |
03:03:47 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/blob/2b699bca530317873d0b3bf2ee2e59ef221010f0/compiler/ast.nim#L1284 actually this one |
03:17:06 | FromDiscord | <n0bra1n3r.nim> Ya I was looking at how to create PIdent, but `getIdent` requires an IdentCache |
03:17:19 | FromDiscord | <n0bra1n3r.nim> (edit) "PIdent," => "PIdent which is the param to newNode," |
03:17:40 | FromDiscord | <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:02 | FromDiscord | <n0bra1n3r.nim> (edit) "newNode," => "newIdentNode," |
03:18:37 | FromDiscord | <Elegantbeef> The context I think |
03:21:23 | FromDiscord | <n0bra1n3r.nim> Awesome, thanks! nimeval.nim https://media.discordapp.net/attachments/371759389889003532/1350670251964235846/image.png?ex=67d79532&is=67d643b2&hm=2bea92a84bef161508a2676a7f8caa11018836588ce98d22f985cb37af67e76a& |
03:35:33 | FromDiscord | <n0bra1n3r.nim> Hmmm, but `graph` is not an exported field... |
03:46:27 | FromDiscord | <Elegantbeef> Could use `std/importutils` if you hate sensible code π |
03:53:50 | FromDiscord | <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:18 | FromDiscord | <aethrvmn> has the url for nimble changed? nimbke.directory returns the default nginx page |
11:43:10 | FromDiscord | <aethrvmn> (edit) "nimbke.directory" => "nimble.directory" |
11:45:30 | FromDiscord | <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:41 | FromDiscord | <aintea> type https:// in front of the url |
12:14:48 | FromDiscord | <aintea> for some reason it does that sometimes |
12:35:04 | FromDiscord | <aethrvmn> Doesnt certbot add a redirect automatically? |
12:35:08 | FromDiscord | <aethrvmn> Weird |
12:42:19 | FromDiscord | <aintea> where can we make suggestions about functions to add into the standard library ? |
13:12:26 | * | alexdaguy quit (Quit: w) |
13:16:34 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=KUhcXela |
13:16:58 | FromDiscord | <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:48 | FromDiscord | <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:22 | FromDiscord | <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:21 | FromDiscord | <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:40 | FromDiscord | <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:40 | strogon14 | it's --passL, not -passL (two dashes) |
17:12:08 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @strogon14 "it's --passL, not -passL": Noticed it, thanks |
17:22:59 | * | minimi joined #nim |
18:05:44 | FromDiscord | <Elegantbeef> @aintea how does one even call the add procedure? |
18:06:07 | FromDiscord | <aintea> add((1, 2)) |
18:06:14 | FromDiscord | <aintea> but it's meant to be used in chaining |
18:06:18 | FromDiscord | <aintea> I have this chunk of code |
18:06:35 | FromDiscord | <Elegantbeef> Right so you want tuple unpacking which will probably never be a thing |
18:06:45 | FromDiscord | <Elegantbeef> You can use macros to achieve it but that's it |
18:07:43 | FromDiscord | <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:44 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=EmDUdZUF |
18:08:34 | FromDiscord | <Elegantbeef> I don't exactly see how the tuple unpacking really helps there |
18:23:04 | FromDiscord | <user2m> when using `--gc : boehm` should I also use `--mm : boehm` ? |
18:23:57 | FromDiscord | <Elegantbeef> No you should just use mm |
18:24:07 | Amun-Ra | gc is obsolete |
18:24:22 | FromDiscord | <Elegantbeef> Tell Java and C# that! |
18:24:35 | Amun-Ra | :D |
18:26:36 | FromDiscord | <user2m> sent a code paste, see https://play.nim-lang.org/#pasty=TwmUtHLj |
18:26:58 | FromDiscord | <user2m> (edit) "https://play.nim-lang.org/#pasty=srAfIHJC" => "https://play.nim-lang.org/#pasty=AlnPXgML" |
18:27:07 | FromDiscord | <Elegantbeef> Yes `gc` is an alias for `mm` now |
18:32:59 | * | minimi left #nim (#nim) |
18:34:50 | FromDiscord | <user2m> what does `--define:lto` mean? |
18:35:04 | FromDiscord | <Elegantbeef> It enables link time optimizations |
18:38:42 | FromDiscord | <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:28 | FromDiscord | <Elegantbeef> Ah right you have to manually unpack right now |
18:39:55 | FromDiscord | <Elegantbeef> Probably not worth it but `let (a, b) = data` does work inside the body for unpacking |
19:00:15 | FromDiscord | <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:36 | FromDiscord | <leorize> I don't think boehm backend is very well maintained. Did the sanitizers rat out the leak issue for you?β΅(@user2m) |
19:22:18 | FromDiscord | <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:35 | FromDiscord | <nitely_> In reply to @user2m "No sorry I haven't": What's your Nim version? |
19:32:30 | FromDiscord | <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:16 | FromDiscord | <nitely_> In reply to @user2m "Currently 2.0.0 but Im": Have you tried using refc? --mm:refc |
19:38:15 | FromDiscord | <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:47 | FromDiscord | <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:12 | FromDiscord | <Robyn [She/Her]> In reply to @aintea "And will stuff like": why not do `a, b: (int, int)`? |
23:06:49 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Right so you want": Ooooh |
23:06:53 | FromDiscord | <aintea> yes |
23:06:58 | FromDiscord | <Robyn [She/Her]> the syntax used for a demonstration was confusing |
23:07:06 | FromDiscord | <aintea> yeah sorry |
23:07:25 | FromDiscord | <aintea> What I was searching for is tuple unpacking inside of function parameter |
23:07:34 | FromDiscord | <Robyn [She/Her]> No sweat |
23:07:45 | FromDiscord | <aintea> Also if I want to refer to a proc/func should I say a "procedure" or "function" ? |
23:08:39 | FromDiscord | <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:45 | FromDiscord | <Elegantbeef> Procedure |
23:08:57 | FromDiscord | <aintea> ok thanks |
23:09:15 | FromDiscord | <aintea> btw Elegant, what software are you using to interact with discord |
23:09:17 | FromDiscord | <aintea> (edit) "btw Elegant, what software are you using to interact with discord ... " added "?" |
23:09:22 | FromDiscord | <aintea> and does it have vim motions |
23:09:26 | FromDiscord | <Elegantbeef> Matrix |
23:09:49 | FromDiscord | <Elegantbeef> Nope just using element's electon desktop client |
23:10:01 | FromDiscord | <aintea> ok |
23:15:33 | FromDiscord | <leorize> there are clients with vim motions if you want |
23:16:46 | FromDiscord | <Elegantbeef> Leo on the matrix evangelism train |
23:17:37 | FromDiscord | <leorize> everyone should use matrix, yes |