00:02:28 | * | jn quit (Remote host closed the connection) |
00:10:56 | * | jn joined #nim |
00:10:56 | * | jn quit (Changing host) |
00:10:56 | * | jn joined #nim |
00:34:18 | * | rockcavera quit (Remote host closed the connection) |
01:08:11 | * | SchweinDeBurg quit (Quit: WeeChat 4.8.0-dev) |
01:26:45 | * | SchweinDeBurg joined #nim |
01:35:48 | * | amadaluzia quit (Quit: ZNC 1.10.1 - https://znc.in) |
01:50:13 | * | rockcavera joined #nim |
02:16:46 | * | rockcavera quit (Remote host closed the connection) |
02:29:36 | FromDiscord | <steamhacker_1837> please recommend me some nim native cross-platform GUI Library or Game library |
02:58:19 | FromDiscord | <albassort> In reply to @steamhacker_1837 "please recommend me some": vulkan |
03:00:02 | FromDiscord | <Elegantbeef> My framework is crossplatform windows/linux and has GUI but it's undocumented so not usable by anyone but the one typing this message |
03:33:18 | FromDiscord | <albassort> beef have you considered documenting it |
03:33:35 | FromDiscord | <Elegantbeef> No too busy using it |
03:33:59 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#pasty=iEZKbCkS |
03:34:10 | FromDiscord | <Elegantbeef> Shit really dawg |
03:34:19 | FromDiscord | <Elegantbeef> This entire time I was writing websites with a needle and a steady hand |
03:35:10 | FromDiscord | <albassort> i was writing the docs to my hhd bit by bit with a laser before i figured this out |
03:41:32 | FromDiscord | <Elegantbeef> But really documenting my framework involves actually wanting to support other using it, which is just more work |
05:55:06 | * | skippy8 joined #nim |
06:17:15 | FromDiscord | <jefferson099296> sent a long message, see https://pasty.ee/IDPMHjuq |
06:55:36 | FromDiscord | <albassort> how can i make a macro which takes in a type at compile time and instantiates it using new T so i can test it |
06:58:18 | FromDiscord | <Elegantbeef> What exactly are you after? |
06:58:27 | FromDiscord | <Elegantbeef> cause you can just have a proc take a typedesc and do `new T` |
06:59:02 | FromDiscord | <albassort> nah it must be a pragma! |
06:59:42 | FromDiscord | <albassort> well doesn't must be but i think thats the best way |
06:59:49 | FromDiscord | <Elegantbeef> so then make the macro do `newCall("new", T)` |
07:00:22 | FromDiscord | <albassort> ... i dont know what this means |
07:02:29 | FromDiscord | <Elegantbeef> `macro doThing(T: typedesc): untyped = newCall("new", T)` |
07:07:14 | * | andy-turner joined #nim |
07:15:29 | * | nils` quit (Ping timeout: 248 seconds) |
07:26:38 | FromDiscord | <blashyrk> In reply to @albassort "nah it must be": You can't automatically invoke pragmas as macros on types. If you set a custom pragma on a type definition, you can only check its presence by using a macro that operates on said type |
07:27:46 | FromDiscord | <Elegantbeef> You can make type section macros |
07:37:25 | FromDiscord | <albassort> >custom pragma on a type definition↵↵which is the point |
07:38:56 | FromDiscord | <albassort> i wanna automate my checks that makes sure the names of the object's attributes correlate with the string names of an enum |
07:39:00 | FromDiscord | <albassort> (edit) "an" => "a given" |
07:40:03 | FromDiscord | <blashyrk> In reply to @Elegantbeef "You can make type": You mean pragmas that automatically invoke a macro for the whole type section? TIL |
07:40:44 | FromDiscord | <blashyrk> sent a long message, see https://pasty.ee/RBaIOwFX |
07:44:47 | FromDiscord | <Elegantbeef> No if I meant that I wouldn't have mentioned it |
07:44:52 | FromDiscord | <Elegantbeef> `type Bleh {.myMacro.} = object` invokes `macro myMacro(typedecl: untyped)` |
07:48:46 | FromDiscord | <blashyrk> Oh nice, didn't know that |
07:49:45 | FromDiscord | <blashyrk> (edit) "that" => "that↵↵Edit: Ah I tried it before but it doesn't work when the macro arg is `typed` and a very bad error message appears instead `invalid expression: MyType {..} = object`, switching to `untyped` it just works huh" |
07:51:17 | FromDiscord | <blashyrk> Which makes sense but the error message is still super terrible |
08:05:40 | FromDiscord | <albassort> In reply to @Elegantbeef "`type Bleh {.myMacro.} =": yes |
09:10:08 | * | nils` joined #nim |
10:01:05 | * | xet7 joined #nim |
11:04:15 | FromDiscord | <spotlightkid> Thanks!↵(<@709044657232936960_ehmry=5b=49=52=43=5d>) |
11:21:33 | * | przmk quit (Remote host closed the connection) |
11:23:26 | * | przmk joined #nim |
11:28:13 | * | fallback quit (Quit: IRCNow and Forever!) |
11:31:08 | * | om3ga joined #nim |
12:01:02 | * | fallback joined #nim |
13:54:18 | * | andy-turner quit (Changing host) |
13:54:18 | * | andy-turner joined #nim |
14:02:03 | * | andy-turner quit (Read error: Connection reset by peer) |
14:02:23 | * | andy-turner joined #nim |
14:07:25 | * | andy-turner quit (Quit: Leaving) |
14:07:40 | * | andy-turner joined #nim |
14:22:35 | * | andy-turner quit (Quit: Leaving) |
14:22:49 | * | andy-turner joined #nim |
14:40:46 | * | SchweinD1 joined #nim |
14:41:38 | * | SchweinDeBurg quit (Ping timeout: 252 seconds) |
14:43:41 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=FIPJBWKo |
14:44:37 | FromDiscord | <leorize> you can't |
14:44:58 | FromDiscord | <leorize> you need to pick better operators if you want priority to be different |
14:45:36 | FromDiscord | <leorize> if priority is inconsistent parsing the language would have been impossible |
14:45:49 | * | SchweinD1 quit (Ping timeout: 260 seconds) |
14:47:01 | * | SchweinDeBurg joined #nim |
14:47:06 | FromDiscord | <heysokam> In reply to @aintea "Is there absolutely no": You can create a custom operator using characters that provide different priority↵but not change the existing priorities for specific characters |
14:48:23 | FromDiscord | <heysokam> for that example, make the operator `.@` or anything else with similar priority to `.` operators |
14:51:29 | * | SchweinDeBurg quit (Ping timeout: 244 seconds) |
14:51:53 | FromDiscord | <aintea> but isn't the dot operator the top ? |
14:52:02 | FromDiscord | <aintea> This is from the docs https://media.discordapp.net/attachments/371759389889003532/1402665527637184623/nl74VRS.png?ex=6894bd92&is=68936c12&hm=f72336369a764d206b0b30b4996b8f826421a0690ace3f1d9acc0c6dedfba14c& |
14:52:26 | FromDiscord | <aintea> yet `args%check.solved_nonogram` doesn't work but `(args%check).solved_nonogram` does |
14:53:58 | FromDiscord | <aintea> oh I see, it's parsed as `(% (args) (check.solved_nonogram)` and not `(. (args) (% (check) (solved_nonogram))` |
14:54:10 | FromDiscord | <aintea> (edit) "(check.solved_nonogram)`" => "(check.solved_nonogram))`" | "(solved_nonogram))`" => "(solved_nonogram)))`" |
14:54:41 | FromDiscord | <leorize> it's stronger, that's why it's bound first |
14:54:48 | FromDiscord | <aintea> (edit) removed "(args)" | "(solved_nonogram)))`" => "(solved_nonogram)) (args))`" |
14:55:06 | FromDiscord | <aintea> yes but it seems it's taking everything up until a new space I guess |
14:55:41 | FromDiscord | <leorize> also the dot operator in that table applies only to `..` |
14:56:08 | FromDiscord | <leorize> the singular `.` is not an operator but one of the basic syntax elements |
14:56:12 | FromDiscord | <leorize> it's stronger than pretty much everything |
14:56:14 | FromDiscord | <aintea> oooh I see |
14:56:18 | * | SchweinDeBurg joined #nim |
14:56:21 | FromDiscord | <aintea> that's why |
14:56:33 | FromDiscord | <aintea> what operator do you recommend as a field accessor then |
14:58:10 | FromDiscord | <leorize> I have no idea what you are trying to do to begin with |
14:58:21 | FromDiscord | <aintea> parsing cli arguments |
14:58:36 | FromDiscord | <aintea> a prettier and more complete `parseopt` if you will |
14:59:15 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=VoidGQEG |
14:59:41 | FromDiscord | <leorize> right, but what are you trying to express with your operators |
15:00:20 | FromDiscord | <aintea> `@` and `%` access a Command (or a subcommand which is a Command in a Command), and `.` for Flags and UnnamedArguments |
15:00:34 | FromDiscord | <aintea> so basically like field accessors since they contain values |
15:01:00 | FromDiscord | <leorize> I'll also shill nimskull here\: https://nim-works.github.io/nimskull/cmdline.html 😛 |
15:01:42 | FromDiscord | <aintea> looks cool but can I make easily a git remake ? |
15:01:50 | FromDiscord | <heysokam> In reply to @leorize "it's stronger than pretty": oh I didn't know |
15:02:01 | FromDiscord | <aintea> there are lots of subcommands like `git pull this url` or `git pull that <url>` |
15:02:53 | FromDiscord | <aintea> There is a lot of ways to make flags CLI apps but not so many for commands based (like `todo-app add taskname task-desc`) |
15:03:53 | FromDiscord | <leorize> I just sent you one \:p |
15:04:06 | FromDiscord | <leorize> anyways, I'm not sure why you can't just `.` all the way |
15:04:25 | FromDiscord | <aintea> In reply to @leorize "I just sent you": oh my bad |
15:04:37 | FromDiscord | <aintea> didn't go all the way through |
15:05:10 | FromDiscord | <aintea> In reply to @leorize "anyways, I'm not sure": because I also have 2 other operators, `?` to check if the command/flag/unnamed argument was given, and `!` to retrieve the value |
15:05:39 | FromDiscord | <aintea> wait |
15:05:44 | FromDiscord | <aintea> I'm stupid |
15:05:47 | FromDiscord | <aintea> that would work thanks |
15:06:10 | FromDiscord | <aintea> WAIT IT'S EVEN IN MY TODO LIST FOR THE PROJECT |
15:06:17 | FromDiscord | <aintea> thanks |
15:07:02 | FromDiscord | <leorize> in fact one of that library test includes a [git-like interface](https://github.com/nim-works/nimskull/blob/ec117c4ff7f2d73ce095fd9848b9acce12216839/tests/stdlib/experimental/tcmdline.nim#L187)↵(@aintea) |
15:07:18 | FromDiscord | <heysokam> gotta love those "I need to figure it out" moments, where you realize past yourself already figured it out for you and you forgot 😄 |
15:07:59 | FromDiscord | <aintea> In reply to @heysokam "gotta love those "I": completely agree |
15:45:46 | * | jailop joined #nim |
16:03:22 | * | Guest76 joined #nim |
16:04:42 | * | Guest76 quit (Client Quit) |
16:42:38 | * | jailop quit (Ping timeout: 252 seconds) |
17:33:28 | * | SchweinDeBurg quit (Ping timeout: 240 seconds) |
17:35:30 | * | SchweinDeBurg joined #nim |
17:55:51 | * | jailop joined #nim |
17:56:58 | * | xutaxkamay quit (Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in) |
18:01:50 | * | xutaxkamay joined #nim |
18:10:02 | * | jailop quit (Ping timeout: 265 seconds) |
18:10:16 | * | jailop joined #nim |
18:37:16 | * | jailop quit (Ping timeout: 244 seconds) |
18:37:29 | * | jailop joined #nim |
18:53:59 | * | jailop quit (Ping timeout: 240 seconds) |
18:54:24 | * | jailop joined #nim |
18:59:09 | * | jailop quit (Ping timeout: 276 seconds) |
18:59:28 | * | jailop joined #nim |
19:09:33 | * | jailop quit (Ping timeout: 276 seconds) |
19:09:46 | * | jailop joined #nim |
19:16:02 | FromDiscord | <ollicron_53732> The war between XLibre and Wayland |
19:16:08 | FromDiscord | <ollicron_53732> oooof very hot very hot |
19:16:51 | FromDiscord | <ollicron_53732> I honestly don't know who to side more with. I actually like wayland a lot I haven't had much problems with it. But at the same time I like XLibre and how it feels |
19:21:09 | * | jailop quit (Ping timeout: 260 seconds) |
19:21:21 | * | jailop joined #nim |
19:21:39 | FromDiscord | <leorize> that's a discussion for the offtopic channel |
19:29:33 | * | jailop quit (Ping timeout: 245 seconds) |
19:30:01 | * | jailop joined #nim |
20:04:01 | * | jailop quit (Ping timeout: 248 seconds) |
20:04:25 | * | jailop joined #nim |
20:11:57 | * | jailop quit (Ping timeout: 276 seconds) |
20:12:20 | * | jailop joined #nim |
20:14:57 | * | jailop quit (Read error: Connection reset by peer) |
20:15:16 | * | jailop joined #nim |
20:20:04 | * | jailop quit (Ping timeout: 260 seconds) |
20:20:17 | * | jailop joined #nim |
20:32:19 | * | zgasma quit (Quit: Lost terminal) |
20:54:44 | * | andy-turner quit (Quit: Leaving) |
20:55:12 | * | andy-turner joined #nim |
21:16:04 | * | jailop quit (Ping timeout: 260 seconds) |
21:16:31 | * | jailop joined #nim |
21:21:25 | * | jailop quit (Ping timeout: 276 seconds) |
21:21:33 | * | andy-turner quit (Quit: Leaving) |
21:21:38 | * | jailop joined #nim |
21:21:53 | * | andy-turner joined #nim |
21:29:21 | * | SchweinDeBurg quit (Ping timeout: 248 seconds) |
21:29:25 | * | andy-turner quit (Quit: Leaving) |
21:29:43 | * | andy-turner joined #nim |
21:31:23 | * | SchweinDeBurg joined #nim |
21:31:28 | * | andy-turner quit (Remote host closed the connection) |
21:34:30 | * | jailop quit (Ping timeout: 276 seconds) |
21:34:55 | * | jailop joined #nim |
21:39:59 | * | SchweinDeBurg quit (Ping timeout: 260 seconds) |
21:41:37 | * | SchweinDeBurg joined #nim |
21:53:02 | FromDiscord | <benjamin_45476> sent a long message, see https://pasty.ee/rfyHYRmV |
21:55:05 | FromDiscord | <DetermiedNim1> could a `concept` maybe work |
21:55:18 | * | jailop quit (Ping timeout: 276 seconds) |
21:55:26 | FromDiscord | <DetermiedNim1> I wouldn't be the best to take advice from tho cause im not super experienced in nim |
21:55:34 | * | jailop joined #nim |
21:56:38 | FromDiscord | <Elegantbeef> The first question would be why OOP over unions |
21:56:43 | FromDiscord | <Elegantbeef> or rather object variants |
21:57:42 | FromDiscord | <Elegantbeef> The second thing is instead of using a method use a pointer proc that way you can generate one when you call a defined constructor for your type |
22:00:14 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=dwxfGCFo |
22:00:31 | * | rockcavera joined #nim |
22:01:21 | FromDiscord | <benjamin_45476> Thank you—I don't believe I need OOP, just probably gravitated toward it naturally, but I will look into both of these ideas |
22:23:13 | * | jailop quit (Ping timeout: 248 seconds) |
22:23:35 | * | jailop joined #nim |
22:33:39 | * | jailop quit (Ping timeout: 276 seconds) |
22:38:23 | * | jailop joined #nim |
22:41:52 | * | jailop quit (Remote host closed the connection) |
23:27:26 | * | skippy8 quit (Quit: WeeChat 4.6.3) |
23:37:57 | * | SchweinDeBurg quit (Ping timeout: 248 seconds) |
23:39:56 | * | SchweinDeBurg joined #nim |
23:44:49 | * | SchweinDeBurg quit (Ping timeout: 260 seconds) |
23:46:09 | * | SchweinDeBurg joined #nim |
23:50:41 | * | SchweinDeBurg quit (Ping timeout: 248 seconds) |
23:52:22 | * | SchweinDeBurg joined #nim |