00:56:34 | FromDiscord | <la_wea> what https://media.discordapp.net/attachments/371759389889003532/1161104954723930112/image.png?ex=65371641&is=6524a141&hm=8415a2a726a03e79524f0b5b6d2cfebf4964db1fef0fd4d2f233af7d83980245& |
00:56:58 | FromDiscord | <la_wea> But it reaturns an object. https://media.discordapp.net/attachments/371759389889003532/1161105052312809573/image.png?ex=65371658&is=6524a158&hm=080190e257dd87be382d211b2404f9e69e257028ebb90a368ed878f8fb6586ad& |
00:57:42 | FromDiscord | <la_wea> Also I noticed that Nim doesn't like recursive imports. |
00:59:11 | FromDiscord | <odexine> In reply to @la_wea "what": Object constructors use : as parameter name separators, use = instead for prove |
00:59:16 | FromDiscord | <odexine> (edit) "prove" => "procedures" |
00:59:39 | FromDiscord | <odexine> In reply to @la_wea "Also I noticed that": There’s a certain way to perform circular imports |
01:00:14 | * | om3ga joined #nim |
01:01:39 | FromDiscord | <la_wea> In reply to @odexine "There’s a certain way": Will you explain that to me? |
01:02:08 | FromDiscord | <la_wea> Because I kind of don't like having `Status` mixed with `Player`. |
01:05:06 | * | om3ga quit (Ping timeout: 260 seconds) |
01:06:11 | FromDiscord | <odexine> sent a long message, see http://ix.io/4IDs |
01:08:32 | FromDiscord | <la_wea> Thisis the thing: https://media.discordapp.net/attachments/371759389889003532/1161107963667304499/image.png?ex=6537190e&is=6524a40e&hm=98c31a69c00d8647281e00d21594982f762bd4dafeb4956c6cd4f14805f91486& |
01:08:34 | FromDiscord | <Elegantbeef> https://github.com/beef331/nimtrest/wiki/Code-snippets#delayed-imports |
01:08:36 | FromDiscord | <la_wea> (edit) "Thisis" => "This is" |
01:09:15 | FromDiscord | <Elegantbeef> You have a cyclical type there is no way of separating them |
01:09:41 | FromDiscord | <Elegantbeef> You can technically make Player generic and use generic instantiation as a form of dependency injection |
01:09:41 | FromDiscord | <Elegantbeef> But that's bleh |
01:09:43 | FromDiscord | <odexine> Many Nim programmers put types in one module |
01:09:56 | FromDiscord | <la_wea> Hmm... |
01:09:58 | FromDiscord | <la_wea> Interesting. |
01:10:20 | FromDiscord | <la_wea> So I should have some sort of ".hpp" for all types but Nim-ish. |
01:13:55 | FromDiscord | <Elegantbeef> Also don't use string imports |
01:14:02 | FromDiscord | <Elegantbeef> also don't call a proc that returns a value type `newT` |
01:14:42 | FromDiscord | <Elegantbeef> The later is of course a convention, but when in rome |
01:42:04 | FromDiscord | <la_wea> Ok, I'll try to do that. |
02:01:01 | FromDiscord | <user2m> anyone ever use this library? https://mantielero.github.io/VapourSynth.nim/docs/getting-started/intro/ |
02:01:27 | FromDiscord | <user2m> https://github.com/mantielero/VapourSynth.nim |
02:07:08 | FromDiscord | <la_wea> No. |
02:59:42 | * | om3ga joined #nim |
03:04:41 | * | om3ga quit (Ping timeout: 255 seconds) |
03:31:30 | FromDiscord | <wick3dr0se> Is it possible to convert PNG to RGBA? |
03:31:46 | FromDiscord | <Elegantbeef> Of course |
03:32:32 | FromDiscord | <wick3dr0se> In reply to @Elegantbeef "Of course": Could you help point me in the right direction? |
03:32:44 | FromDiscord | <Elegantbeef> Pixie would work |
03:33:09 | FromDiscord | <wick3dr0se> Ok thanks! |
03:54:50 | NimEventer | New thread by JustinWayland: Having trouble initializing my parser, see https://forum.nim-lang.org/t/10541 |
04:06:13 | * | derpydoo quit (Read error: Connection reset by peer) |
04:17:17 | NimEventer | New Nimble package! webidl2nim - webidl to Nim bindings generator, see https://github.com/ASVIEST/webidl2nim |
04:19:48 | * | adium quit (Ping timeout: 240 seconds) |
05:26:39 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
05:30:03 | * | rockcavera quit (Remote host closed the connection) |
05:58:45 | * | azimut quit (Remote host closed the connection) |
05:59:08 | * | azimut joined #nim |
06:34:50 | * | advesperacit joined #nim |
06:59:42 | NimEventer | New post on r/nim by TheOnChainGeek: Hot Code Reload compiler problems, see https://reddit.com/r/nim/comments/174etrb/hot_code_reload_compiler_problems/ |
07:35:33 | FromDiscord | <JJ> what might be the idiomatic way to transform an iterator into a seq, in order to map on it? |
07:38:21 | FromDiscord | <Chronos [She/Her]> `toSeq`, no? |
07:42:34 | FromDiscord | <JJ> ah, right, of course. forgot it was a template, ty |
07:43:21 | FromDiscord | <Chronos [She/Her]> No worries aba |
07:43:27 | FromDiscord | <Chronos [She/Her]> Aha |
08:21:33 | FromDiscord | <Chronos [She/Her]> I just realised sysrand is obviously blocking IO but my ULID library allows for asynchronous IO reading, not too sure if I should do anything about that or not |
08:21:44 | FromDiscord | <Chronos [She/Her]> Asynchronous ULID generation not async IO reading |
08:27:13 | * | azimut quit (Ping timeout: 252 seconds) |
08:48:34 | FromDiscord | <ricky._.spanish> is there any nim nfs server library? |
09:04:39 | FromDiscord | <ringabout> It's super confusing to me. Is there someone who is familiar with `gh` and `hub` to upload releases can help me with this PR? https://github.com/nim-lang/nightlies/pull/74/files ↵Is this right to migrate from hub to gh? |
09:19:23 | FromDiscord | <Chronos [She/Her]> I've just PRed what should hopefully be the last PR of mine to the packages repo for Nimble, added the docs into all my libs :) |
09:57:46 | Amun-Ra | can I hide a module from appearing in html? |
09:59:12 | Amun-Ra | I mean I'd like an internal single file module not to appear in html documentation |
10:50:48 | NimEventer | New thread by ploxotnuj1: Помогите пожалуйста с ошибкой!, see https://forum.nim-lang.org/t/10542 |
10:52:49 | NimEventer | New thread by ploxotnuj1: help fix the error please, see https://forum.nim-lang.org/t/10543 |
12:10:15 | FromDiscord | <mratsim> In reply to @chronos.vitaqua "I just realised sysrand": mmmmh, it's not though? it should use the non-blocking char device |
12:11:19 | FromDiscord | <mratsim> also on Windows/MacOS/Linux there is no reason to open a file / character device like dev/urandom for using the OS CSPRNG (https://github.com/mratsim/constantine/blob/master/constantine/csprngs/sysrand.nim ) |
12:13:24 | FromDiscord | <Chronos [She/Her]> Oh wait yeah I'm so dumb |
12:13:47 | FromDiscord | <Chronos [She/Her]> Not dumb, just tired but yeah |
12:13:47 | FromDiscord | <mratsim> usually disclaimer: not audited, may eat your puppies, etc |
12:13:49 | FromDiscord | <Chronos [She/Her]> Thanks aha |
12:13:51 | FromDiscord | <Chronos [She/Her]> Pfff |
12:30:25 | FromDiscord | <user2m> sent a code paste, see https://play.nim-lang.org/#ix=4IFa |
12:39:09 | * | derpydoo joined #nim |
12:42:37 | FromDiscord | <Phil> In reply to @user2m "hey guys I don't": I mean, that seems possible, though I'd use templates more for what python calls context-handlers |
12:43:50 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4IFe |
12:44:29 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=4IFe" => "https://play.nim-lang.org/#ix=4IFf" |
12:46:40 | FromDiscord | <Phil> sent a long message, see http://ix.io/4IFh |
12:49:56 | Amun-Ra | is it possible to add documentation comment to nnkTypeDef in macro? |
12:51:50 | FromDiscord | <Phil> Hmmm I'd check the dumpTree of a typedef where one adds a doc-comment to a field |
12:53:02 | FromDiscord | <user2m> ok but etmplates still have to be synattcically correct? |
12:53:04 | FromDiscord | <user2m> https://media.discordapp.net/attachments/371759389889003532/1161285267697717338/image.png?ex=6537be2f&is=6525492f&hm=8dd4784ce2d7e6ae79dd0ac116b17f3cb244b3cdbe325fb5d33482b5caa03dd3& |
12:53:32 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4IFi |
12:56:29 | FromDiscord | <Phil> In reply to @user2m "": Yep |
12:56:58 | FromDiscord | <Phil> Didn't think about that because I never use them in that context but yeah, templates are a mild step above procs in that regard but they are still beholden to syntactical sanity |
12:57:10 | FromDiscord | <user2m> so whats the point of templates? aren't they just procs |
12:57:31 | FromDiscord | <Phil> No, they start becoming more relevant once you need to be more... flexible with a type system |
13:00:01 | FromDiscord | <Phil> sent a long message, see http://ix.io/4IFk |
13:00:26 | FromDiscord | <Phil> (edit) "http://ix.io/4IFk" => "https://paste.rs/AVKWU" |
13:01:01 | FromDiscord | <Phil> There's more scenarios where they come in handy where the same premise holds: You need to generate some code in a generic manner but generics have some limitation that cause you to stumble |
13:09:41 | FromDiscord | <user2m> hmm ok so then I would use macros to paste code snippets that don't have to be syntactically correct? |
13:10:18 | FromDiscord | <Phil> Yeah.↵Macros are basically what you start using once you want to write your own language in a sense.↵Or completely transform a given piece of syntax beyond the limited ways template allows |
13:11:52 | FromDiscord | <Phil> However, note that Macros are basically completely new Syntax.↵Like, that thing separates every individual word into its own node |
13:12:30 | FromDiscord | <Phil> https://discord.com/channels/371759389889003530/371759389889003532/1161285356797317172↵This is an example representation of what a type-definition looks like in "NimNodes" aka individual pieces that you can mold as you desire |
13:13:16 | FromDiscord | <Phil> Basically writing macros is something that is supremely useful for the usecases that warrant them but if you can avoid them you should, it's basically a second language on top of the first and thus really hard to maintain |
13:43:52 | Amun-Ra | Phil: dumpTree does not show any comments :/ |
13:44:23 | FromDiscord | <Phil> In reply to @Amun-Ra "<@180601887916163073>: dumpTree does not": Yeh, that made me sad as well.↵Though there might still be chance as stated: Try to add a user-defined pragma to "annotate" one of the fields and see if that shows up in dumptree |
13:44:42 | FromDiscord | <Phil> If it does you could add such "comment-pragmas" |
13:44:54 | FromDiscord | <Phil> Though I will admit that sounds hacky as fuck |
13:49:00 | Amun-Ra | mhm |
13:49:07 | FromDiscord | <Chronos [She/Her]> Doc comments work |
13:49:15 | FromDiscord | <Chronos [She/Her]> Not typical comments |
13:49:23 | Amun-Ra | nope, they don't show |
13:49:26 | FromDiscord | <Chronos [She/Her]> Tho if you really wanted to, could find the parser and hack that in |
13:49:30 | FromDiscord | <Chronos [She/Her]> They... don't? Damn |
13:49:39 | Amun-Ra | I can see doc comments only on top level |
13:49:48 | FromDiscord | <Chronos [She/Her]> Weird |
13:50:42 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "If it does you": Even hackier: Comments via identifiers that get parsed in the macro |
13:51:05 | Amun-Ra | https://play.nim-lang.org/#ix=4IFB |
13:51:13 | FromDiscord | <Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4IFC |
13:52:26 | Amun-Ra | I have something like this and I wanted to annotate exported object with doc comment: https://play.nim-lang.org/#ix=4IFD |
13:52:27 | FromDiscord | <Chronos [She/Her]> In reply to @Amun-Ra "https://play.nim-lang.org/#ix=4IFB": Very weird, the compiler AST preserves comments, wonder why they decided to strip them in macros |
13:58:47 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4IFE |
13:59:19 | FromDiscord | <Phil> Because you can't really insert it into the typedef.↵You could maybe experiment if you can insert a NimNode of `CommentStmt` into a `TypeSection` node or if that blows up the compiler |
13:59:39 | Amun-Ra | hmm |
14:45:02 | * | azimut joined #nim |
14:56:17 | * | om3ga joined #nim |
15:00:55 | * | om3ga quit (Ping timeout: 255 seconds) |
15:12:44 | * | junaid_ joined #nim |
15:35:58 | FromDiscord | <Chronos [She/Her]> Honestly I think Nimble should have an `optionalRequires` thing tbh |
15:36:56 | FromDiscord | <Chronos [She/Her]> Then pass `--define:<libname>` and maybe the sem ver |
15:41:15 | * | junaid_ quit (Remote host closed the connection) |
16:07:32 | NimEventer | New thread by jmgomez: NimConf 2023, see https://forum.nim-lang.org/t/10544 |
16:15:04 | FromDiscord | <Phil> I kinda wanna have a proc that just fires every second and increments or decrements a value |
16:15:45 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "I kinda wanna have": Can't use async for that? |
16:16:18 | FromDiscord | <Phil> I honestly just never wrote such a thing.↵I wrote "Execute X after N ms", never "Execute X every N ms" |
16:17:18 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "I honestly just never": Should be fairly easy to do, I can google it rq |
16:17:46 | FromDiscord | <Chronos [She/Her]> https://stackoverflow.com/a/63802568 yep |
16:21:29 | FromDiscord | <Chronos [She/Her]> Sigh I need to actually bring some order into my program's code |
16:22:12 | * | beholders_eye joined #nim |
16:22:48 | FromDiscord | <mratsim> In reply to @isofruit "I kinda wanna have": use async with a timer. |
17:04:58 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4IGv |
17:05:33 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "I may just be": Could do it on another thread, maybe? |
17:06:03 | FromDiscord | <Phil> maaaaaaybe, I mean that is kinda basically throwing memory safety out the window so I'm semi certain nim will throw hurdles my way as this is 2 threads acting on the same memory |
17:06:28 | FromDiscord | <Phil> So 50 cent says it'll just copy the value of fraction and increment a copy |
17:06:32 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "maaaaaaybe, I mean that": Locks |
17:06:37 | FromDiscord | <Phil> (edit) "cent says" => "cents say" |
17:07:45 | FromDiscord | <Chronos [She/Her]> Take this! It's dangerous to go alone!↵https://play.nim-lang.org/#ix=4IGw |
17:08:01 | FromDiscord | <Chronos [She/Her]> Untested code obviously, just for associating an object with a lock |
17:08:35 | FromDiscord | <Chronos [She/Her]> Also proxies the fields of the object...so use at your own risk |
17:10:29 | FromDiscord | <Chronos [She/Her]> Also should be easy to swap out with rlocks too |
17:20:25 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4IGy |
17:54:27 | * | rockcavera joined #nim |
18:01:55 | FromDiscord | <Chronos [She/Her]> Lord, I cannot fuck with game dev |
18:02:07 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "That might just overcomplicate": Fair rip |
18:02:17 | FromDiscord | <Chronos [She/Her]> Isn't the thread stuff also pretty simple? |
18:26:53 | FromDiscord | <can.l> In reply to @isofruit "I may just be": Async & owlkettle don't really work together. You probably want something like [this](https://github.com/can-lehmann/owlkettle/blob/main/examples/misc/timeout_event.nim) instead. |
18:31:10 | FromDiscord | <can.l> In reply to @chronos.vitaqua "Isn't the thread stuff": https://github.com/can-lehmann/owlkettle/blob/main/examples/misc/threading.nim |
18:31:26 | FromDiscord | <can.l> (edit) "In reply to @chronos.vitaqua "Isn't the thread stuff": ... https://github.com/can-lehmann/owlkettle/blob/main/examples/misc/threading.nim" added "Yes, kind of (?):" |
18:31:40 | FromDiscord | <Phil> In reply to @can.l "Async & owlkettle don't": Sweet!↵Also, how do I get the GtkWidget from a Widget 😄 ?↵Currently working on SearchEntry which eats a GtkWidget for capture keys from |
18:32:29 | FromDiscord | <can.l> Thats only possible from `WidgetState` using `WidgetState.unwrapInternalWidget()` |
18:33:06 | FromDiscord | <Phil> Hmmmmmmmm in that case SearchEntry might not be the easy win I thought it might be because I'm not quite sure how to hand it a GtkWidget then |
18:34:18 | FromDiscord | <can.l> Yeah, we might need something like React's refs for that. Though I've been trying to avoid adding something like them, because it would go against the "delarative" nature of owlkettle. |
18:34:32 | FromDiscord | <can.l> (edit) ""delarative"" => ""declarative"" |
18:35:48 | FromDiscord | <Phil> I'll mark it in the discussion as "not easy to do" and abandon it the same way I abandoned SpinRow 😮💨 |
18:36:30 | FromDiscord | <Phil> ~~That god damn Widget has no right to be as finnicky as it is~~ |
18:36:47 | FromDiscord | <taperfade> heyy |
18:36:51 | FromDiscord | <taperfade> how do i display stuff |
18:36:55 | FromDiscord | <taperfade> like uhh |
18:36:59 | FromDiscord | <can.l> In reply to @isofruit "I'll mark it in": Might have a look at that when I find the time. |
18:37:01 | FromDiscord | <taperfade> i wanna make snake in nim bcs im bored |
18:37:17 | FromDiscord | <can.l> (edit) "that" => "your implementation" |
18:38:03 | FromDiscord | <can.l> In reply to @taperfade "i wanna make snake": You probably want to use [SDL2](https://github.com/nim-lang/sdl2) |
18:41:54 | FromDiscord | <Phil> In reply to @can.l "Yeah, we might need": Actually, we might be able to provide a "neutered" Search Entry, it's not like the widget without this "capture" thingy is useless |
18:42:34 | FromDiscord | <Phil> https://media.discordapp.net/attachments/371759389889003532/1161373223041110086/Screencast_from_2023-10-10_20-42-04.webm?ex=65381019&is=65259b19&hm=5a05caa0343620d6687b044eb84b884b20ba69039c51e9fa2fa2cc299de3f702& |
18:42:38 | FromDiscord | <can.l> In reply to @isofruit "Actually, we might be": You mean just leaving out that field? |
18:43:12 | FromDiscord | <Phil> In reply to @can.l "You mean just leaving": Yeah, keeping it commented out for the most part for whence we maybe implement it providing that with a comment as to why it is commented out |
18:43:25 | FromDiscord | <can.l> In reply to @isofruit "Yeah, keeping it commented": Sure, sounds good. |
18:43:45 | FromDiscord | <Phil> This train ride may just be my most productive owlkettle contribution time yet xD |
18:58:58 | FromDiscord | <Chronos [She/Her]> In reply to @taperfade "i wanna make snake": Nim JS backend or Nim C backend? |
18:59:29 | FromDiscord | <Chronos [She/Her]> If Nim C, SDL2 as can.l said, otherwise, you'll wanna use the canvas with std/dom (iirc) @taperfade |
19:03:33 | FromDiscord | <taperfade> wdym |
19:03:42 | FromDiscord | <taperfade> i just wanna make pixels go white or black |
19:04:58 | FromDiscord | <taperfade> u guys are so smart |
19:05:03 | FromDiscord | <taperfade> ong i wish i was as smart |
19:05:15 | FromDiscord | <taperfade> sobs |
19:05:43 | FromDiscord | <Phil> In reply to @taperfade "u guys are so": Less smart, more that we have spent more time overall coding.↵It really is just a matter of sitting down and slamming your had against the coding wall over hours and days and weeks and months and years |
19:06:19 | FromDiscord | <Phil> Start small, work your way up. Coding is one of those "Once you can do a small thing, you can very quickly scale that up to do a big thing" areas |
19:07:37 | FromDiscord | <Phil> In reply to @can.l "You mean just leaving": Without the capture thing (I actually don't know what that's good for) It's basically a normal Entry field with icons and that throws events when users hit certain keybindings.↵Not earth shattering, but I think for implementing a search and automatically getting some hotkey support it could be useful.↵Basically comes with CTRL+G/CTRL+Shift+G/ESC/Enter support out of the box |
19:07:59 | FromDiscord | <Phil> Still no clue when search starts ever gets thrown but the rest works, I'll clean it up and make that PR number 4 |
19:10:42 | FromDiscord | <taperfade> In reply to @isofruit "Start small, work your": yeah |
19:10:48 | FromDiscord | <taperfade> i have nothing to work on tho |
19:11:02 | FromDiscord | <taperfade> im thinking of expanding my silly little file browser |
19:11:07 | FromDiscord | <taperfade> like making files |
19:11:12 | FromDiscord | <taperfade> reading the contents |
19:11:24 | FromDiscord | <taperfade> not just listing the contents of a folder |
19:11:30 | FromDiscord | <Phil> Could always start playing around with making apps with owlkettle 😛 |
19:11:38 | FromDiscord | <taperfade> whats owlkettle |
19:11:49 | FromDiscord | <Phil> That is actually fairly complicated but I mean if you stick to simple things that should be doable |
19:12:18 | FromDiscord | <Phil> A way to make native applications using the GTK GUI framework.↵Fairly prominent on Linux as one of its larger desktop environments (Gnome) is entirely based on it |
19:12:39 | FromDiscord | <jviega> Hey, if my Nim code is not threaded, but called from a single thread of a multi-threaded C app built on pthreads, Nim doesn't care, right? Or is it going to pick up some state that will cause issues? Running into a strange issue and trying to rule out options. |
19:12:41 | FromDiscord | <Phil> Owlkettle is a wrapper around that which tries to make it easier to build your own |
19:12:58 | FromDiscord | <taperfade> hmm coo |
19:14:10 | FromDiscord | <Chronos [She/Her]> You may be better off making a small discord bot as a beginner project tbh |
19:14:13 | FromDiscord | <Chronos [She/Her]> That's how I started at least |
19:15:05 | FromDiscord | <Phil> Yeah, fair, I just try to recruit people 😛 |
19:15:50 | FromDiscord | <taperfade> hmm |
19:15:57 | FromDiscord | <taperfade> my ultimate goal is to make a rat builder |
19:16:01 | FromDiscord | <taperfade> something like quasar |
19:16:03 | FromDiscord | <taperfade> its so impressive |
19:16:14 | FromDiscord | <taperfade> its also what made me kinda start to learn coding |
19:16:21 | FromDiscord | <taperfade> i used it and was like |
19:16:28 | FromDiscord | <taperfade> i wanna make somehting llike that wow |
19:16:43 | FromDiscord | <taperfade> its rlly impressive to me |
19:16:49 | FromDiscord | <taperfade> or |
19:16:52 | FromDiscord | <taperfade> idk |
19:17:07 | FromDiscord | <taperfade> learning coding for some money and to flex would be cool too |
19:17:21 | FromDiscord | <taperfade> but idk if i can get jobs with nim |
19:19:32 | FromDiscord | <Chronos [She/Her]> #jobs :p |
19:20:49 | FromDiscord | <taperfade> holy shit https://media.discordapp.net/attachments/371759389889003532/1161382848079593652/image.png?ex=65381910&is=6525a410&hm=872e9563b181562c8435af8bee5e6a272563258fa784a47919f5a77bc3d3561b& |
19:20:50 | FromDiscord | <taperfade> 2k |
19:20:51 | FromDiscord | <taperfade> WHAT |
19:22:57 | FromDiscord | <Phil> Eh, likely somebody planning to make money with a game that was mostly written, wanted to port and got stopped by this dependency. |
19:23:03 | FromDiscord | <Phil> Which is pretty slick |
19:23:11 | FromDiscord | <Phil> (edit) "Which is pretty slick ... " added "that this got improvements that way" |
19:25:29 | FromDiscord | <Phil> Okay, stopped in my wrapping frenzy by needing to change trains, but I should have time for one or two more on the train after |
19:26:15 | FromDiscord | <taperfade> hmm |
19:26:18 | FromDiscord | <taperfade> what are yall working on |
19:26:22 | FromDiscord | <Chronos [She/Her]> Wonder if there's a way for me to make my GitHub Action (which was essentially treeform's but modified slightly) better |
19:27:18 | FromDiscord | <Chronos [She/Her]> In reply to @taperfade "what are yall working": 3 projects I'm switching between:↵- Specification for a chat platform (which will be written in Nim)↵- Rogue-like/RPG using Raylib↵- Unofficial Nim Java compiler backend |
19:28:06 | FromDiscord | <Chronos [She/Her]> But I am p experienced and switch between projects like it's lit dynamite so |
19:28:22 | FromDiscord | <Chronos [She/Her]> (Also even with experience, trial and error lol) |
19:28:37 | FromDiscord | <taperfade> thats so impressiv |
19:29:33 | FromDiscord | <Chronos [She/Her]> Ehhh, say that to me when I actually complete one xD |
19:29:47 | FromDiscord | <Chronos [She/Her]> I've never completed a project because of how much I switch projects |
19:30:15 | FromDiscord | <Chronos [She/Her]> I have made a library for manual parsing of packets for MC Java Edition servers tbf |
19:31:18 | FromDiscord | <Phil> In reply to @taperfade "what are yall working": Currently trying to polish up owlkettle as much as humanly possible.↵That means adding more widgets that it currently doesn't wrap, fixing memory leaks if I encounter any, improving the documentation to make using it and contributing to it as easy as possible etc |
19:31:54 | FromDiscord | <Phil> It's pretty educational for me so far, particularly in learning how to deal with bindings |
19:32:09 | FromDiscord | <TӨMΛ ☠> sent a long message, see http://ix.io/4IH4 |
19:32:46 | FromDiscord | <TӨMΛ ☠> (edit) "https://paste.rs/2UwBv" => "http://ix.io/4IH6" |
19:32:46 | FromDiscord | <TӨMΛ ☠> (edit) "http://ix.io/4IH6" => "http://ix.io/4IH7" |
19:33:03 | FromDiscord | <TӨMΛ ☠> (edit) "http://ix.io/4IH7" => "http://ix.io/4IH8" |
19:38:06 | FromDiscord | <can.l> In reply to @chronos.vitaqua "3 projects I'm switching": "Nim Java compiler backend" sounds interesting. Whats the state of that so far? Is there a GH repo or something? |
19:39:51 | FromDiscord | <Phil> Generally it tends to be pretty useful to take something that exists and just polish the crap out of it so that it would make other Devs have fun working with it |
19:40:46 | FromDiscord | <Phil> Particularly in the Nim ecosystem.↵That polish can of course also come in the form of docs. In fact that's one of the more common ways you can improve something |
19:41:41 | FromDiscord | <Phil> ~~it also has the benefit that somebody else does the maintenance and you get a code reviewer for free, everybody wins~~ 😄 |
19:42:40 | FromDiscord | <Phil> (edit) "~~it also has the benefit that somebody else does the maintenance and you get a code reviewer for free, ... everybody" added "which is something whose value I can not understate," |
19:43:47 | FromDiscord | <Phil> Also teaches you about more views on structuring code and code style which I'd also deem valuable experience based on which your own style can emerge |
19:44:13 | FromDiscord | <can.l> In reply to @isofruit "~~it also has the": On the other hand, if you work on a personal project, you don't have to deal with code reviewers & their opinions 😅 |
19:45:01 | FromDiscord | <Phil> In reply to @can.l "On the other hand,": Sure but if you have little to no experience in the space that's basically getting taught for free if we're honest 😄 |
19:46:02 | FromDiscord | <taperfade> i wanna work on something too |
19:46:08 | FromDiscord | <taperfade> but im too inexperienced |
19:46:11 | FromDiscord | <taperfade> to help anyone |
19:46:15 | FromDiscord | <taperfade> hmm i have an idea |
19:46:26 | FromDiscord | <Chronos [She/Her]> In reply to @can.l ""Nim Java compiler backend"": I did have a version I made a year ago available, right now I'm just trying to figure out how to glue it together to another library now (that I made specifically for codegen) |
19:46:27 | FromDiscord | <taperfade> could yall take a look at my nim stuff and help me improve |
19:46:28 | FromDiscord | <taperfade> like |
19:46:33 | FromDiscord | <taperfade> uhh |
19:46:40 | FromDiscord | <can.l> In reply to @isofruit "Sure but if you": Sure, it definitely depends on how opinionated you are yourself... 😄 |
19:46:40 | FromDiscord | <taperfade> tell me what i should and shouldnt do |
19:46:50 | FromDiscord | <taperfade> i want some feedback ig |
19:47:02 | FromDiscord | <Chronos [She/Her]> https://github.com/Yu-Vitaqua-fer-Chronos/Nimpiler↵↵It outputted Jasmin rather than Java tho |
19:48:16 | FromDiscord | <taperfade> https://github.com/senzur :3 |
19:49:55 | FromDiscord | <Phil> In reply to @can.l "Sure, it definitely depends": Eh, I do have my opinions and preferences but I can adapt easily enough.↵And it's useful to just see structural decisions and their pros and cons, allows you to either steal those concepts when you write code yourself or learn to avoid them |
19:50:14 | FromDiscord | <Phil> (edit) "In reply to @can.l "Sure, it definitely depends": Eh, I do have my opinions and preferences but I can adapt easily enough.↵And it's useful to just see structural decisions and their pros and cons, allows you to either steal those concepts when you write code ... yourself" added "for" |
19:51:11 | FromDiscord | <can.l> In reply to @chronos.vitaqua "https://github.com/Yu-Vitaqua-fer-Chronos/Nimpiler ": Oh nice! Excited to see how this develops. |
19:52:40 | FromDiscord | <Chronos [She/Her]> In reply to @can.l "Oh nice! Excited to": Thanks! The code is completely different now since I restarted bc that was a year ago I was working on it :p |
19:52:56 | FromDiscord | <jviega> Jasmin's still around?? |
19:53:35 | FromDiscord | <Phil> It's barely on its way out a afaik |
19:53:50 | FromDiscord | <Chronos [She/Her]> In reply to @jviega "Jasmin's still around??": Why wouldn't it still be around? |
19:54:05 | FromDiscord | <jviega> Wow, I remember when Jon Meyer did that, it was like 1996. I didn't actually think it took off |
19:54:23 | FromDiscord | <jviega> I figured people were just emitting jvm code directly |
19:54:29 | FromDiscord | <Chronos [She/Her]> https://jasmin.sourceforge.net/ |
19:54:47 | FromDiscord | <Chronos [She/Her]> In reply to @jviega "I figured people were": Not all of us are privilleged enough to be able to use JVM libraries! :p |
19:54:48 | FromDiscord | <taperfade> for how long have yall been programming :o |
19:55:01 | FromDiscord | <Chronos [She/Her]> In reply to @taperfade "for how long have": Since I was 13, I'm 18 now |
19:55:10 | FromDiscord | <jviega> Ah someone picked it up a long time ago |
19:55:27 | FromDiscord | <Chronos [She/Her]> Tho at 15 I was moreso messing with the concepts until actively getting into it |
19:55:28 | FromDiscord | <jviega> Jon's dropped off the planet, I've tried to find him a few times since I moved to NY |
19:55:34 | FromDiscord | <Chronos [She/Her]> Ah fair |
19:56:57 | FromDiscord | <jviega> Which was like 15 years ago. But I almost went to work w/ him in 1996, spent a bunch of time w/ him for a while |
19:57:04 | FromDiscord | <jviega> He was at NYU then |
19:57:24 | FromDiscord | <jviega> Haven't seen a post-NYU peep |
19:57:27 | FromDiscord | <can.l> You mentioned a new codegen library you wrote for the backend. Am I correct in assuming that that replaces Jasmin? Or is it built on top of that? |
19:57:37 | FromDiscord | <Phil> Coding for 6 or 7 years by now, though only like 3 of that professionally and I didn't code at all or barely for 2 of those years |
19:58:29 | FromDiscord | <Phil> (edit) "Coding for 6 or 7 years by now, though only like 3 of that professionally and I didn't code at all or barely for 2 of those years ... " added "6 to 7 years" |
19:58:47 | FromDiscord | <Chronos [She/Her]> sent a long message, see http://ix.io/4IHf |
20:04:04 | FromDiscord | <TӨMΛ ☠> In reply to @taperfade "for how long have": More-less five years if we don't count my WML days, but actively it was more of a three years I'd say, I had long break in 2019-2021 |
20:04:54 | FromDiscord | <can.l> In reply to @chronos.vitaqua "Ah it's directly just": Ah, I see. Its somewhere in between a proper AST and using strings for codegen, in that it preserves some high level structure, but falls back onto `JavaCodeEmission` when there is no AST node? |
20:05:02 | FromDiscord | <jviega> You lot make me feel so old, wow 🙂 |
20:05:43 | FromDiscord | <Chronos [She/Her]> In reply to @can.l "Ah, I see. Its": Yeah exactly! Ideally I'll wrap more (and fix) Java code/statements aha |
20:05:52 | FromDiscord | <Chronos [She/Her]> In reply to @jviega "You lot make me": Whatever gramps haha |
20:06:12 | FromDiscord | <jviega> 🧓 |
20:06:56 | FromDiscord | <Phil> Uphill both ways! |
20:07:06 | FromDiscord | <jviega> In the snow, too |
20:07:09 | FromDiscord | <taperfade> In reply to @jviega "Which was like 15": oh wow |
20:07:22 | FromDiscord | <taperfade> uve started coding when i was born |
20:07:35 | FromDiscord | <taperfade> 😧 |
20:07:47 | FromDiscord | <jviega> I'd assume well before that. |
20:08:03 | FromDiscord | <taperfade> damn |
20:08:08 | * | krux02 joined #nim |
20:08:21 | FromDiscord | <Elegantbeef> Jvg remembers when you had to type in your code 1 bit at a time |
20:08:48 | FromDiscord | <jviega> TYPE? Luxury |
20:08:58 | FromDiscord | <jviega> You punched holes in a piece of damn paper, my man! |
20:09:02 | FromDiscord | <Chronos [She/Her]> Oh wow is a lot of AST I need to handle and parse |
20:09:07 | FromDiscord | <Phil> He also remembers when people managed to write other people's name correctly 😛 |
20:09:07 | FromDiscord | <Chronos [She/Her]> There is |
20:09:27 | FromDiscord | <jviega> Tho I never used punch cards. I saw them, but mostly before my time |
20:10:19 | FromDiscord | <Elegantbeef> Punching a card is typing |
20:10:36 | FromDiscord | <Elegantbeef> Fight me |
20:11:01 | FromDiscord | <Elegantbeef> A holepunch is a keyboard |
20:11:44 | FromDiscord | <jviega> Hole punch??? LUXURY |
20:13:05 | FromDiscord | <Elegantbeef> Right you probably invented the abacus |
20:13:34 | FromDiscord | <jviega> Too poor for that! |
20:16:01 | FromDiscord | <Chronos [She/Her]> If only Nim compile timeswere faster |
20:16:41 | FromDiscord | <Phil> Looking forward to the new AMD motherboard partially because of that |
20:16:50 | FromDiscord | <Phil> (edit) "Looking forward to the new AMD motherboard ... partially" added "for my laptop" |
20:17:03 | FromDiscord | <Elegantbeef> The abacus feature? |
20:17:26 | FromDiscord | <Phil> Yes beef, because AMD finally implemented the Abacus that jtv's richer rival invented five thousand years ago |
20:17:31 | FromDiscord | <jmgomez> The faster hardware I have ever seen for Nim is the Mx series from Apple |
20:17:45 | * | FromDiscord quit (Remote host closed the connection) |
20:17:58 | * | FromDiscord joined #nim |
20:18:26 | FromDiscord | <jviega> It's shocking how slow the same program is on my linux laptop vs. my mac |
20:18:45 | FromDiscord | <jviega> It's well over 5x all other things equal |
20:18:50 | FromDiscord | <Elegantbeef> What C compiler are you using for linux? |
20:19:17 | FromDiscord | <Phil> ~~The one for holy C of course, who doesn't?~~ |
20:19:39 | FromDiscord | <Elegantbeef> Holy C isnt a C compiler |
20:19:39 | FromDiscord | <Elegantbeef> Get owned |
20:20:07 | FromDiscord | <Phil> I said the one for holy C |
20:20:22 | FromDiscord | <jviega> Well, gcc, but I've written tons of C in both places, and tend to still use gcc on Linux; performance difference is never this vast |
20:20:22 | FromDiscord | <Phil> Reading comprehension and so on xP |
20:20:39 | FromDiscord | <Elegantbeef> But that's not a C compiler |
20:20:40 | FromDiscord | <Elegantbeef> That's like saying "I use the GO compiler" |
20:20:51 | FromDiscord | <Elegantbeef> Clang generally is more optimised ime |
20:21:10 | FromDiscord | <jmgomez> I have a windows pc with a intel 13900k the compiler takes 20+ secs on the M1Max it takes 7seconds |
20:21:22 | FromDiscord | <jviega> Sure, tho that's fairly recent where it's been consistent, and def not 5x |
20:22:34 | FromDiscord | <Elegantbeef> Really though `-d:danger -d:lto --cc:clang` probably should be the shipped nim compiler |
20:23:24 | FromDiscord | <Chronos [She/Her]> I am achieving something |
20:24:10 | FromDiscord | <Elegantbeef> Like a 10% performance boost or so |
20:25:06 | FromDiscord | <Chronos [She/Her]> In reply to @Elegantbeef "What C compiler are": Do you mean me? Or |
20:25:33 | FromDiscord | <jviega> I always turn on -d:lto anyway. How much is -d:danger really going to make a difference? It's not like performance is a huge problem anyway |
20:26:11 | FromDiscord | <Elegantbeef> For the compiler |
20:26:11 | FromDiscord | <Elegantbeef> lto + danger atleast the last i checked got like 10-20% faster |
20:26:28 | FromDiscord | <taperfade> |
20:26:37 | FromDiscord | <Chronos [She/Her]> In reply to @jviega "I always turn on": When compiling the compiler it is :p |
20:27:52 | FromDiscord | <jviega> Oh yeah I don't care quite as much about compile times |
20:29:31 | FromDiscord | <Chronos [She/Her]> Major issue for me since I need to be able to check what equals what, what's true... etc |
20:31:35 | * | dtomato quit (Quit: The Lounge - https://thelounge.chat) |
20:32:16 | FromDiscord | <Elegantbeef> @jmgomez damn the windows compiler is slow |
20:32:17 | FromDiscord | <Elegantbeef> I'm on a 5600x and it's \~12s |
20:32:49 | FromDiscord | <Elegantbeef> That's the gcc non lto'd release |
20:33:47 | FromDiscord | <Elegantbeef> `--cc:clang -d:danger -d:lto` is about 1s faster |
20:34:52 | FromDiscord | <Elegantbeef> Using `--cc:clang` on the actual build with the optimised compile it's down to 7 seconds |
20:35:05 | FromDiscord | <Elegantbeef> Who needs a mac |
20:35:48 | FromDiscord | <Phil> How do I instantiate a type and get a pointer to it, basically have it very explicitly not managed by nim's GC? |
20:35:54 | FromDiscord | <Elegantbeef> So yea i'd suggest trying a clang boot and setting clang as your default Compiler |
20:35:59 | FromDiscord | <Phil> Like, I know I can heap allocate with new |
20:36:00 | FromDiscord | <jviega> Types aren't runtime things |
20:36:08 | FromDiscord | <jviega> Oh |
20:36:10 | FromDiscord | <jviega> I see |
20:36:14 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4IHq |
20:36:36 | FromDiscord | <jviega> Unless you need it on the heap? |
20:36:40 | FromDiscord | <Chronos [She/Her]> How do I check what compiler Nim is using? |
20:36:56 | FromDiscord | <Phil> It's basically me allocating memory for GTK as far as I'm aware I think |
20:37:00 | FromDiscord | <Chronos [She/Her]> `CC` is set to `clang` but iirc that's for Make/CMake |
20:37:24 | FromDiscord | <Chronos [She/Her]> Also Beef, thoughts on https://github.com/rui314/mold ? |
20:37:31 | FromDiscord | <Elegantbeef> There you go you now manually manage references |
20:37:32 | FromDiscord | <Elegantbeef> On linux it uses `gcc` by default |
20:37:32 | FromDiscord | <Elegantbeef> On mac it uses clang |
20:37:32 | FromDiscord | <Elegantbeef> On windows it use mingw |
20:37:34 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4IHr |
20:37:43 | FromDiscord | <Elegantbeef> Doesnt help Nim whatsoever |
20:38:11 | FromDiscord | <Chronos [She/Her]> In reply to @Elegantbeef "On linux it uses": Ah, so I have to change the config then f |
20:38:24 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4IHt |
20:38:29 | FromDiscord | <demotomohiro> In reply to @chronos.vitaqua "How *do* I check": Run Nim with `--listcmd`. I shows how backend compiler called. |
20:38:34 | FromDiscord | <Chronos [She/Her]> In reply to @Elegantbeef "Doesnt help Nim whatsoever": Why wouldn't it? I thought C files got compiled to .o files then linked together? |
20:39:00 | FromDiscord | <Elegantbeef> `defined(gcc)` works if you want to check in code |
20:39:00 | FromDiscord | <Elegantbeef> GcRef increments the ref count |
20:39:01 | FromDiscord | <Elegantbeef> Sure but Nim's slow down is not the linking |
20:39:09 | FromDiscord | <Elegantbeef> You then later do `GcUnref` when you want to destroy the ref |
20:39:14 | FromDiscord | <Chronos [She/Her]> INim ftw |
20:39:18 | FromDiscord | <Chronos [She/Her]> Yeah it's using gcc rn |
20:39:28 | FromDiscord | <Chronos [She/Her]> In reply to @Elegantbeef "Sure but Nim's slow": Fair enough |
20:40:43 | FromDiscord | <Elegantbeef> I did test using mold briefly and it does make a difference but it's like only 20ms |
20:41:20 | FromDiscord | <Elegantbeef> Atleast on the nim compiler |
20:41:20 | FromDiscord | <Elegantbeef> But that also is margin of error when the entire compiler depends on your IO being happy |
20:41:42 | FromDiscord | <Chronos [She/Her]> In reply to @Elegantbeef "I did test using": Ah fair enough then |
20:42:04 | FromDiscord | <jmgomez> In reply to @Elegantbeef "`--cc:clang -d:danger -d:lto` is": hmm will give it a shot tomorrow and see. I also saw that it's way slower in NUE although there vcc is used on Win |
20:42:18 | FromDiscord | <jviega> I have seen reference that templates invoking templates invoking temlates causes slow-down |
20:42:31 | FromDiscord | <Phil> In reply to @can.l "Ah, I see. Its": Flipping praise be for the gvalue constructors you added, I have no idea how they exactly work but I want to set a string property from a widget that has no explicit setter for that field and without the g_object_set_property thingy which requires GValue I'd be boned |
20:43:18 | FromDiscord | <Elegantbeef> Yea code substitution is awful for compile times |
20:43:19 | FromDiscord | <Elegantbeef> You have to insert the code then resem the entire tree |
20:43:19 | FromDiscord | <Elegantbeef> So recursive templates are just bad |
20:43:19 | FromDiscord | <Elegantbeef> Better to use a macro when possible |
20:47:24 | FromDiscord | <jviega> Yup all makes good sense. |
20:50:05 | FromDiscord | <Elegantbeef> Oh @Phil how'd you solve the form stuff? |
20:50:49 | FromDiscord | <Phil> In reply to @Elegantbeef "Oh <@180601887916163073> how'd you": It's not solved yet in the sense that currently the ugly solution is implemented.↵The solution will be to do the heretical thing and fetch pointers from AppState |
20:50:54 | FromDiscord | <Phil> (edit) "In reply to @Elegantbeef "Oh <@180601887916163073> how'd you": It's not solved yet in the sense that currently the ugly solution is implemented.↵The solution will be to do the heretical thing and fetch pointers from ... AppState" added "the fields on" |
20:51:02 | FromDiscord | <Phil> Basically use `.addr` |
20:51:25 | FromDiscord | <Phil> And capture that in the event-handler procs of owlkettle for the various fields |
20:51:31 | FromDiscord | <Phil> (edit) "that" => "those pointers" |
20:52:52 | FromDiscord | <Phil> I'm currently on a train ride and wrapping low-hanging fruit widgets, for the addr thingy I'd like to have the video widget first off my conscience before I tackle it.↵And I'd also like to not be tired AF and on an 8h trip into faraway lands |
20:53:39 | FromDiscord | <Phil> On the bright side, Owlkettle now is 2 and soon 3 widgets richer due to that trip.↵And I'm working on number 4 atm |
20:53:42 | FromDiscord | <Chronos [She/Her]> github.com/Yu-Vitaqua-fer-Chronos/Nava |
20:55:08 | * | dtomato joined #nim |
21:08:34 | * | LuxuryMode joined #nim |
21:11:00 | FromDiscord | <Phil> In reply to @can.l "Ah, I see. Its": Have you had to deal with MenuModel yet?↵I don't think it's procs are in the bindings so far and I'd love to add them, but for the most part right now I'm struggling with finding how to instantiate one even |
21:12:56 | FromDiscord | <Phil> Oh son of a \\\\ that's just an interface |
21:13:05 | FromDiscord | <Phil> No wonder I'm not finding a constructor |
21:15:45 | FromDiscord | <can.l> In reply to @isofruit "Have you had to": Oh you are doing GMenu stuff? People would be quite happy about that... ([citation 1](https://github.com/can-lehmann/owlkettle/issues/16)) |
21:16:08 | FromDiscord | <Phil> In reply to @can.l "Oh you are doing": I'm wrapping that because PasswordEntry for some reason has a field related to that |
21:16:13 | FromDiscord | <can.l> (edit) "In reply to @isofruit "Have you had to": Oh you are doing GMenu stuff? People would be quite happy about that... ([citation 1](https://github.com/can-lehmann/owlkettle/issues/16)) ... " added "(I tried finding some other examples, but those seem to be deleted)" |
21:16:26 | FromDiscord | <System64 ~ Flandre Scarlet> If only I could make Owlkettle working :/ |
21:17:03 | FromDiscord | <Phil> can.l literally is in chat 😛↵Other than that, looked at : https://github.com/can-lehmann/owlkettle/discussions/53 ? |
21:17:18 | FromDiscord | <Phil> If it's gtk installation related though best we can do is point to the gtk docs on how to install on windows |
21:17:57 | FromDiscord | <System64 ~ Flandre Scarlet> I think it's GTK problem↵But it should work on Windows too |
21:18:42 | FromDiscord | <can.l> Does it compile? If so, whats the compiler output? |
21:18:52 | FromDiscord | <can.l> (edit) "whats" => "what is" |
21:18:54 | FromDiscord | <System64 ~ Flandre Scarlet> lemme find the test project again |
21:19:51 | FromDiscord | <can.l> In reply to @isofruit "I'm wrapping that because": Oh, weird... If you manage to create a proper wrapper for `GMenuModel`, support for traditional menus is actually not that far off... |
21:20:16 | FromDiscord | <can.l> On the other hand: that seems like a lot of work. |
21:20:17 | FromDiscord | <Phil> I mean what I'm seeing so far it doens't seem too crazy |
21:20:44 | FromDiscord | <Phil> Got GMenu and GMenuItems, couple procs related to creating and adding those, should be doable for that to translate to nim seqs or sth |
21:20:56 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @can.l "Does it compile? If": https://media.discordapp.net/attachments/371759389889003532/1161413074285248632/message.txt?ex=65383536&is=6525c036&hm=22d963287a627c5c10c956cd22a558666872e5dd2722984550e67d0fdef49533& |
21:23:05 | FromDiscord | <can.l> In reply to @sys64 "": weird, it indeed seems to be GTK issue. Since some people had success installing GTK on msys2, I wonder if the version is updated? |
21:23:21 | FromDiscord | <can.l> (edit) "In reply to @sys64 "": weird, it indeed seems to be GTK ... issue." added "version" |
21:27:43 | FromDiscord | <can.l> In reply to @isofruit "Got GMenu and GMenuItems,": The issue is that you also need to connect events to the menu items. At least from looking at it briefly, they do not emit signals however. So you need to go through GTK's action system. Additionally menus can have submenus, so you need to perform tree diffing. Theoretically owlkettles existing API could be used here, however it is currently only designed for widgets, which `MenuItem` is |
21:28:32 | FromDiscord | <Phil> That I haven't yet slammed into face-first. That might actually be a major PITA that is very much the opposite of "Low hanging fruit" |
21:28:38 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @can.l "weird, it indeed seems": This message is very, very sus https://media.discordapp.net/attachments/371759389889003532/1161415016050856036/message.txt?ex=65383705&is=6525c205&hm=d925031c45e6bd21d3e1ab19576e2f217535d85807f44c53ab863ee747f47600& |
21:29:21 | FromDiscord | <can.l> In reply to @sys64 "This message is very,": Is gio even installed at all? |
21:29:35 | FromDiscord | <can.l> (edit) "In reply to @sys64 "This message is very,": Is gio ... even" added "(= a GTK dependency)" |
21:29:47 | FromDiscord | <System64 ~ Flandre Scarlet> like...↵Trying to find files/dirs called Package, dependency, requirement, >= and so on...↵It shouldn't looks for such directory names |
21:29:58 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @can.l "Is gio (= a": so I need to install it in MinGW? |
21:32:49 | FromDiscord | <can.l> Ah, I think I know whats happening. Internally owlkettle uses `pkg-config` to find the correct linker parameters. If gio is not installed, it will output something like `Package dependency requirement 'gio-2.0 >= 2.76.0' could not be satisfied`, so that just gets passed to the linker. |
21:33:48 | FromDiscord | <can.l> In reply to @sys64 "so I need to": So the hypothesis that gio is not installed would make sense. While you theoretically should not need to install it separately, there might have been some issue with the package manager, so it might be worth a try to just install it manually. |
21:34:38 | FromDiscord | <Phil> In reply to @can.l "The issue is that": Mind if I provide the PasswordEntry sans GMenuModel thingy first and shift the entire wrapping of GMenuModel to another day and a different PR? |
21:34:39 | FromDiscord | <bostonboston> To get owlkettle working on windows I not only had to go through the msys2 install and mingw install but add a couple folders to my path |
21:35:28 | FromDiscord | <bostonboston> And also make sure they were high enough in my path |
21:36:24 | FromDiscord | <can.l> In reply to @bostonboston "To get owlkettle working": Could you find out which ones? As I don't have a windows install, I usually just rely on the users on windows to provide install instructions. |
21:37:23 | FromDiscord | <System64 ~ Flandre Scarlet> IT FCKING WORKS! https://media.discordapp.net/attachments/371759389889003532/1161417213274767370/image.png?ex=65383911&is=6525c411&hm=d1a9c870ca5d9da199094539ca6bcb2bd247dd1f6145d9c205a346b9bde3742f& |
21:37:59 | FromDiscord | <can.l> In reply to @sys64 "IT F*CKING WORKS!": Same question: What did you do to make it work? (so I can add it to the install instructions) |
21:38:01 | FromDiscord | <Phil> In reply to @sys64 "IT F*CKING WORKS!": Sweet!↵Now you can play around with it!↵Pro tip, adwaita has a lot of things that combine multiple base gtk widgets into larger more useful units, it's kind of like an equivalent to a component library |
21:38:02 | FromDiscord | <bostonboston> In reply to @can.l "Could you find out": Bin lib and include for mingw32/64 |
21:38:37 | FromDiscord | <Phil> Also the Box widget is basically the equivalent to HTML div |
21:38:52 | FromDiscord | <System64 ~ Flandre Scarlet> ``pacman -S mingw-w64-x86_64-glib2`` |
21:39:01 | FromDiscord | <System64 ~ Flandre Scarlet> don't forget to install GTK too |
21:39:43 | FromDiscord | <System64 ~ Flandre Scarlet> Wow the aero snap... |
21:39:49 | FromDiscord | <System64 ~ Flandre Scarlet> It looks sussy |
21:40:06 | FromDiscord | <can.l> In reply to @bostonboston "Bin lib and include": I assume like this: https://stackoverflow.com/questions/71731080/how-to-add-mingw-to-path |
21:40:19 | FromDiscord | <can.l> (edit) "this:" => "this?" |
21:42:14 | FromDiscord | <bostonboston> It's called System Properties and not computer but yes |
21:42:26 | * | advesperacit quit () |
21:43:40 | FromDiscord | <can.l> In reply to @bostonboston "It's called System Properties": Thanks! This will probably be added to the troubleshooting section of the installation docs. |
21:45:12 | FromDiscord | <bostonboston> As an additional note, the gcc compiler a windows user installs with msys is in addition to the one they would install with the nim compiler, I believe for my owlkettle project I needed to change my gcc.path to point to the msys2 install of gcc |
21:45:13 | FromDiscord | <System64 ~ Flandre Scarlet> @can.l why is my Owlkettle app taking ages to open? A simple counter |
21:45:48 | FromDiscord | <bostonboston> (edit) "msys2" => "msys" |
21:47:34 | FromDiscord | <can.l> In reply to @sys64 "<@893965307171979326> why is my": If you added an application ID, its to be expected. If its just the `counter` example, I have no idea why. How long does it take? |
21:48:02 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @can.l "If you added an": Like 10 seconds or something to open the app |
21:49:14 | FromDiscord | <can.l> In reply to @sys64 "Like 10 seconds or": Without compilation time? |
21:52:50 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @can.l "Without compilation time?": Yeah |
21:53:00 | FromDiscord | <System64 ~ Flandre Scarlet> between 5 and 10 seconds |
21:54:25 | FromDiscord | <System64 ~ Flandre Scarlet> And I have very weird stuff in the task bar |
21:55:30 | FromDiscord | <can.l> In reply to @sys64 "And I have very": as in multiple icons for one app? or just a weird icon? |
21:58:21 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @can.l "as in multiple icons": https://media.discordapp.net/attachments/371759389889003532/1161422494767513730/2023-10-10_23-57-28.mp4?ex=65383dfc&is=6525c8fc&hm=7a80486cba9b1254382ee3f9f2ec732dc85f3d12380916dafbd36a3b44799128& |
22:01:03 | * | alphacentauri quit (Quit: WeeChat 4.0.5) |
22:03:39 | FromDiscord | <Schelz> sent a code paste, see https://play.nim-lang.org/#ix=4IHJ |
22:07:25 | FromDiscord | <can.l> In reply to @sys64 "": I am sadly unable to find anything about this online, but my hypothesis is that GTK is probably trying to connect to some kind of background services which it is unable to find/start. That might explain the flashing icons. Do you get any debug output? |
22:08:22 | FromDiscord | <sOkam! 🫐> In reply to @Schelz "hi, quick question how": https://github.com/DanielBelmes/vulkan |
22:08:41 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @can.l "I am sadly unable": Nothing on console |
22:11:03 | FromDiscord | <Schelz> In reply to @heysokam "https://github.com/DanielBelmes/vulkan": its not what i want, its not really based on vulkan but on how to return typdef void ptr |
22:11:39 | FromDiscord | <Elegantbeef> `pointer` in Nim is equivlent to `void` |
22:11:47 | FromDiscord | <sOkam! 🫐> In reply to @Schelz "its not what i": C's `void` == Nim's `pointer` |
22:12:25 | FromDiscord | <Elegantbeef> Though given Nim has generics you rarely need `pointer` |
22:17:28 | FromDiscord | <can.l> In reply to @sys64 "Nothing on console": Hmm, I don't think I can of much help then sadly. Given that I also did not find anything about this online, debugging this seems pretty hard... |
22:17:59 | FromDiscord | <System64 ~ Flandre Scarlet> Also tried with -d:danger, slow at start too |
22:18:35 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4IHM |
22:18:43 | FromDiscord | <can.l> Yeah, its probably a GTK issue then. I guess you could try uninstalling and reinstalling GTK 😄 |
22:19:03 | FromDiscord | <can.l> (edit) "In reply to @sys64 "Nothing on console": Hmm, I don't think I can ... of" added "be" |
22:19:46 | FromDiscord | <System64 ~ Flandre Scarlet> It uses GTK3 right? |
22:19:52 | FromDiscord | <can.l> GTK4 |
22:20:02 | FromDiscord | <Elegantbeef> And if that fails you can install a linux distro 😛 |
22:20:14 | * | alphacentauri joined #nim |
22:20:23 | FromDiscord | <can.l> You need to `pacman -S mingw-w64-x86_64-gtk4 mingw-w64-x86_64-libadwaita` |
22:20:40 | FromDiscord | <can.l> (edit) "You need to `pacman -S mingw-w64-x86_64-gtk4 mingw-w64-x86_64-libadwaita` ... " added "to install." |
22:21:58 | FromDiscord | <System64 ~ Flandre Scarlet> Humm still slow at startup, quite weird |
22:23:18 | FromDiscord | <System64 ~ Flandre Scarlet> Btw is it possible to have dark theme? |
22:23:43 | FromDiscord | <can.l> darkTheme=true |
22:24:05 | FromDiscord | <can.l> (edit) "darkTheme=true" => "`brew(..., darkTheme=true)`" |
22:26:14 | FromDiscord | <can.l> or for libadwaita `adw.brew(..., colorScheme=ColorSchemePreferDark)` / `adw.brew(..., colorScheme=ColorSchemeForceDark)` |
22:26:34 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @can.l "`brew(..., darkTheme=true)`": It works, thanks!↵And to change the general theme? |
22:26:57 | FromDiscord | <can.l> if you want to switch to libadwaita theming, see the readme. |
22:27:30 | FromDiscord | <can.l> otherwise you can use CSS for theming: https://github.com/can-lehmann/owlkettle/blob/main/examples/misc/css.nim |
22:28:37 | FromDiscord | <System64 ~ Flandre Scarlet> wait CSS?!↵So is there HTML stuff behind? |
22:29:00 | FromDiscord | <can.l> No. |
22:29:37 | FromDiscord | <can.l> GTK just uses CSS for theming because its convenient. |
22:29:55 | FromDiscord | <can.l> (edit) "No." => "No, no HTML." |
22:29:59 | FromDiscord | <Elegantbeef> I'd say "cause so many people know it" but not a soul knows CSS |
22:30:43 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @can.l "GTK just uses CSS": Oh alright↵And is it more performant than stuff like Dear ImGUI? |
22:33:21 | FromDiscord | <can.l> In reply to @sys64 "Oh alright And is": I have not performed measurements, so I don't know. However the two have pretty different use cases. GTK (and therefore owlkettle) is a complete GUI framework for building desktop apps, while Dear ImGUI is targeted at building quick UIs for game development. GTK is definitely fast enough to build a desktop environment (GNOME), so it should not be much of an issue. |
22:33:59 | FromDiscord | <can.l> I wouldn't use it in a game though. |
22:34:29 | FromDiscord | <System64 ~ Flandre Scarlet> Might be useful for tooling and apps |
22:34:52 | FromDiscord | <bostonboston> Btw distributing a gtk app for Windows is supposedly hell |
22:34:56 | FromDiscord | <bostonboston> It can be done |
22:36:10 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @bostonboston "Btw distributing a gtk": wdym? |
22:36:36 | FromDiscord | <bostonboston> I don't know exactly, but I read that experience in more than one place |
22:36:49 | FromDiscord | <bostonboston> So it's just something to be aware of, unless I'm completely wrong |
22:37:15 | FromDiscord | <tsoj> Is there a way to print a Nim object in such a way, that it would be a legal way oif writing to initiate such an object in Nim? |
22:37:29 | FromDiscord | <System64 ~ Flandre Scarlet> as long as I give the DLLs with, shouldn't have problem |
22:37:34 | FromDiscord | <can.l> https://github.com/can-lehmann/owlkettle/discussions/57 |
22:38:05 | FromDiscord | <System64 ~ Flandre Scarlet> okay GTK4 is LGPL so I'm safe |
22:38:23 | FromDiscord | <System64 ~ Flandre Scarlet> same for LibAdwaita |
22:42:09 | FromDiscord | <Elegantbeef> @tsoj this is close https://github.com/treeform/print |
22:50:06 | FromDiscord | <System64 ~ Flandre Scarlet> Oh, I should use this |
23:21:46 | * | krux02 quit (Remote host closed the connection) |
23:27:21 | * | alphacentauri quit (Quit: WeeChat 4.0.5) |
23:30:07 | * | alphacentauri joined #nim |
23:31:23 | * | arkanoid quit (Ping timeout: 255 seconds) |
23:33:09 | * | arkanoid joined #nim |