00:00:03 | * | neceve quit (Quit: ZNC - https://znc.in) |
00:03:40 | * | wallabra quit (Ping timeout: 272 seconds) |
00:06:12 | * | nick2 joined #nim |
00:06:47 | * | azimut quit (Ping timeout: 255 seconds) |
00:35:29 | * | dom96 quit (Quit: Nim is King) |
01:01:36 | * | nick2 quit (Quit: WeeChat 3.7.1) |
01:08:10 | NimEventer | New thread by Akito: Async Socket with SSL Context throws "error:1420C114:SSL routines:ssl_write_internal:uninitialized", see https://forum.nim-lang.org/t/9783 |
03:07:01 | FromDiscord | <_ 🎄> I defined my ast as a bunch of nested objects but idk if this is necessarily the best way |
03:07:48 | FromDiscord | <_ 🎄> I may need to refactor |
03:40:50 | FromDiscord | <jos> how can i read a list returned from a c ffi |
03:41:04 | FromDiscord | <jos> like the normal `Element firstElm; int numElms;` type thing |
04:07:08 | FromDiscord | <Elegantbeef> `ptr UncheckedArray[T]` |
04:12:16 | FromDiscord | <jos> thanks! |
04:12:18 | FromDiscord | <jos> it's working |
04:14:25 | * | arkurious quit (Quit: Leaving) |
04:20:04 | * | Batzy quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
04:20:32 | * | Batzy joined #nim |
04:20:52 | * | Batzy quit (Client Quit) |
04:21:15 | * | Batzy joined #nim |
04:30:09 | * | azimut joined #nim |
04:36:50 | FromDiscord | <that_dude> Is end actually used for anything? I don't remember it being used https://media.discordapp.net/attachments/371759389889003532/1058604621536444518/image.png |
04:37:39 | FromDiscord | <that_dude> I did find a forum post talking about source code filters, but given it's the first time I'm hearing about it, is it commonly used? |
04:40:48 | FromDiscord | <Bung> identifier preserved aren't checked everywhere. |
04:58:00 | FromDiscord | <jos> i have a weird issue with a variable captured in a closure |
04:58:10 | FromDiscord | <jos> sent a code paste, see https://play.nim-lang.org/#ix=4k0Y |
04:58:39 | FromDiscord | <jos> accessing any captured var in `requestAdapaterCallback` gives me an `EXC_BAD_ACCESS` |
04:59:02 | FromDiscord | <jos> i'm sure it's not off the stack-- `wgpuInstanceRequestAdapter` invokes the callback before it exits |
04:59:26 | FromDiscord | <jos> does this have to do with the c ffi or something, because i can't replicate with a trivial case |
05:49:32 | FromDiscord | <Elegantbeef> `requestAdtaperCallback` should be probably `cdecl` or similar @jos |
05:53:32 | * | azimut quit (Remote host closed the connection) |
05:54:18 | * | azimut joined #nim |
06:02:55 | FromDiscord | <jos> https://forum.nim-lang.org/t/1488 |
06:03:00 | FromDiscord | <jos> i found this which is pretty cool |
06:03:10 | FromDiscord | <jos> In reply to @Elegantbeef "`requestAdtaperCallback` should be probably": i did exportc |
06:03:48 | FromDiscord | <jos> i think its a limitation of the language impl, the link above explains i think |
06:04:49 | FromDiscord | <Elegantbeef> exportC isnt a calling convention |
06:05:01 | FromDiscord | <Elegantbeef> is `test` global or local? |
06:06:17 | FromDiscord | <jos> local |
06:06:25 | FromDiscord | <jos> i just realized that was unclear, sorry |
06:07:10 | FromDiscord | <Elegantbeef> what's the typedefinition for the parameter you're passing that to? |
06:07:15 | FromDiscord | <jos> yeah setting it to cdecl doesn't even allow the capture to happen, which makes sense |
06:07:21 | FromDiscord | <jos> i can pass it in via userdata instead |
06:07:26 | FromDiscord | <Elegantbeef> I have a feeling it's supposed to be `cdecl` or `nodecl` |
06:07:34 | FromDiscord | <jos> i was writing my own ffi, i changed it to cdecl |
06:07:45 | FromDiscord | <Elegantbeef> Ah yea that seems right |
06:07:45 | FromDiscord | <jos> it's working now, without the capture (which makes sense)-- really appreciate the help |
06:08:18 | FromDiscord | <Elegantbeef> I assume you resolved it before i tried to help, so i guess cheers 😛 |
06:22:25 | FromDiscord | <jos> i was narrowing it down 🙂 i didn't know the name cdecl yet but i was close |
06:52:25 | FromDiscord | <brendo-m> sent a code paste, see https://paste.rs/HMQ |
06:53:43 | FromDiscord | <Elegantbeef> I dont think so |
06:54:35 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4k1h |
06:57:02 | FromDiscord | <brendo-m> unfortunately I can't because the call site is inside the `json.%` macro https://github.com/nim-lang/Nim/blob/devel/lib/pure/json.nim#LL436C8-L436C10 |
06:57:17 | FromDiscord | <Elegantbeef> I'm uncertain your issue |
06:57:46 | FromDiscord | <Bung> can you constrain your generic type to your custom types ? |
06:57:48 | FromDiscord | <brendo-m> sent a code paste, see https://paste.rs/tSr |
06:58:12 | FromDiscord | <Elegantbeef> Use `std/jsonutils` instead |
06:59:06 | FromDiscord | <Bung> it's truely ambiguous to me |
07:00:29 | FromDiscord | <Elegantbeef> Yea you have two procedures with the exact same definition, you have to manually export all the procedures you want to except the one you override |
07:01:00 | FromDiscord | <Elegantbeef> Though i dont think you can |
07:01:21 | FromDiscord | <spetum> I'm kind of new to nim-- What am I doing wrong here?↵`var history = array[16, array[127, int]]`↵`Error: invalid type: 'typedesc[array[0..15, array[0..127, int]]]' for var` |
07:01:29 | FromDiscord | <Elegantbeef> Really i dont get why this module exports `json` |
07:01:37 | FromDiscord | <Elegantbeef> `var history: array[16, array[127, int]]` |
07:01:50 | FromDiscord | <spetum> :facepalm: |
07:01:51 | FromDiscord | <spetum> thank you |
07:02:43 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4k1j |
07:02:50 | FromDiscord | <brendo-m> it exports json just for convenience. it doesn't matter if I don't though |
07:03:14 | FromDiscord | <Elegantbeef> It does matter if you dont, cause you can just import json directly and then dont have this ambiguity since both `%` are not from the same module |
07:03:33 | FromDiscord | <Elegantbeef> There is a language design issue that there is no way to select a procedure from a root module |
07:04:16 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4k1k |
07:04:22 | FromDiscord | <Elegantbeef> A macro could be used to resolve this, but that feels just as dirty |
07:06:00 | FromDiscord | <brendo-m> ``echo `%`(Foo(bar: 42))`` - this is my ultimate goal. this macro doesn't know about module `b` |
07:06:27 | FromDiscord | <Elegantbeef> Are you trying to override the `%` for types? |
07:06:29 | FromDiscord | <brendo-m> basically I'm trying to replicate https://github.com/nim-lang/Nim/pull/11416/files |
07:07:01 | FromDiscord | <Elegantbeef> Use `std/jsonutils` and then export your `toJsonHook` and `fromJsonHook` |
07:07:15 | FromDiscord | <Elegantbeef> You dont need `json`/`jsonutils` inside the consume module |
07:07:17 | FromDiscord | <Elegantbeef> consuming\ |
07:08:22 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4k1l |
07:08:46 | FromDiscord | <brendo-m> I tried that but it excludes all of the `%` procs |
07:08:58 | FromDiscord | <brendo-m> there aren't that many, so I could just copy paste them all |
07:09:08 | FromDiscord | <brendo-m> `jsonutils` looks promising though |
07:09:20 | FromDiscord | <Elegantbeef> Depends what you're after i guess |
07:09:25 | FromDiscord | <Elegantbeef> I personally never use `%` |
07:12:23 | FromDiscord | <Elegantbeef> I do have a semi dumb solution |
07:14:39 | FromDiscord | <brendo-m> I love semi dumb solutions |
07:15:23 | FromDiscord | <Elegantbeef> Shit nevermind |
07:15:31 | FromDiscord | <Elegantbeef> a generic typeclass and a concept typeclass are equal |
07:16:14 | FromDiscord | <Elegantbeef> Thought a concept was higher |
07:18:35 | FromDiscord | <Elegantbeef> This is where I say "use patchfile" |
07:22:11 | FromDiscord | <Elegantbeef> Though this might be a good issue since there is literally not way to disambiguate |
07:30:20 | * | derpydoo joined #nim |
07:52:53 | * | pro joined #nim |
09:05:16 | * | rockcavera quit (Remote host closed the connection) |
09:21:11 | * | azimut quit (Ping timeout: 255 seconds) |
09:22:32 | * | pro quit (Quit: pro) |
09:22:40 | * | azimut joined #nim |
09:43:06 | * | Batzy quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
09:44:21 | * | Batzy joined #nim |
10:16:59 | * | azimut quit (Ping timeout: 255 seconds) |
10:17:03 | * | azimut_ joined #nim |
10:27:41 | * | jmdaemon quit (Ping timeout: 246 seconds) |
10:48:32 | * | azimut_ quit (Remote host closed the connection) |
10:49:01 | * | azimut joined #nim |
10:57:57 | FromDiscord | <voidwalker> https://media.discordapp.net/attachments/371759389889003532/1058700532849582130/image.png |
10:58:16 | FromDiscord | <voidwalker> https://media.discordapp.net/attachments/371759389889003532/1058700612558135406/image.png |
11:10:07 | FromDiscord | <lignus> sent a code paste, see https://paste.rs/REJ |
11:10:33 | FromDiscord | <lignus> (edit) "https://play.nim-lang.org/#ix=4k1W" => "https://play.nim-lang.org/#ix=4k1V" |
11:22:28 | FromDiscord | <planetis> there is no interface, how the api looks, depends on the allocator you implemented. |
11:30:53 | FromDiscord | <lignus> sent a long message, see https://paste.rs/HNt |
11:35:28 | FromDiscord | <planetis> > I see some people casting from ptr T to ref T↵that pbl wouldn't work. There is a header before what the ref pointer points to, that contains a refcounter, rti for object inheritance, a destructor pointer, etc, you can read the code to confirm this. |
11:36:07 | NimEventer | New thread by jasonfi: -d:useMalloc fixes memory leak, but I don't know why, see https://forum.nim-lang.org/t/9784 |
11:36:30 | FromDiscord | <planetis> there is an example pools allocator https://github.com/nim-lang/fusion/blob/master/src/fusion/pools.nim |
11:37:28 | FromDiscord | <lignus> Thank you, that was exactly what I was looking for! I think I was confused because I found someone monkey patching the standard library implementation.↵↵<https://github.com/vitreo12/nim_arc_custom_alloc/blob/master/custom_malloc.nim> |
11:38:14 | FromDiscord | <planetis> You can attach destructors https://nim-lang.github.io/Nim/destructors.html to the types you allocate |
11:39:25 | FromDiscord | <lignus> Why would I attach a destructor? |
11:39:33 | FromDiscord | <planetis> oh you want to write an allocator that replaces the std one, better see how it's done in https://github.com/Yardanico/mimalloc_nim |
11:40:17 | FromDiscord | <lignus> no |
11:40:56 | FromDiscord | <planetis> But for std containers the is no way to replace the allocator they use |
11:40:58 | FromDiscord | <lignus> I'm actually writing an arena allocator. I was confused becuase the allocator I looked at had a different goal (replacing std) than mine (a secondary allocator). |
11:42:03 | FromDiscord | <planetis> Yeah, you might end up handrolling your own container types that use that allocator and have destructors for RAII style memory management |
11:42:39 | FromDiscord | <lignus> Ah, okay! All allocations done within an arena are freed when the arena is deallocated, though. |
11:43:14 | FromDiscord | <planetis> for refs you might need types like https://github.com/nim-lang/threading/blob/master/threading/smartptrs.nim |
11:43:40 | FromDiscord | <planetis> (edit) "for refs you might need types like https://github.com/nim-lang/threading/blob/master/threading/smartptrs.nim ... " added "to replace them" |
11:44:01 | FromDiscord | <planetis> In reply to @lignus "Ah, okay! All allocations": so just like the fusion pools allocator |
11:45:48 | FromDiscord | <lignus> Maybe, I haven't read through it yet. Thanks for the great examples! |
11:46:00 | FromDiscord | <planetis> you're welcome! |
11:53:04 | * | pro joined #nim |
12:01:53 | FromDiscord | <Phil> Without fully getting the context, new should ideally always return ref types |
12:02:01 | FromDiscord | <Phil> And man my discord is slow |
12:02:39 | FromDiscord | <Phil> There I go, reading through the messages, see a question about return type of "new", think it's the most current one, I type and BAM discord loads like 50 new messages since then |
12:03:50 | FromDiscord | <Phil> In reply to @Elegantbeef "Shit nevermind": You still around? I tinkered a bit further since then and got stuck with a NimNode that's a proc being demanded by the macro to be the proc-type and I'm not sure what to do there |
12:03:57 | FromDiscord | <Phil> (edit) "around?" => "around or already gone?" |
12:04:19 | FromDiscord | <Phil> (edit) "then" => "our last exchange" |
12:04:42 | * | pro quit (Quit: pro) |
12:06:03 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4k2a |
12:06:53 | FromDiscord | <Phil> I'm.... reasonably sure that the proc within the NimNode is exactly that kind of proc, I'm mostly not sure what the "proper" way to extract it is |
12:07:11 | FromDiscord | <Phil> (edit) "I'm.... reasonably sure that the proc within the NimNode ... isis." added " `copyProc`" | "is" => "is." |
12:49:09 | FromDiscord | <Bung> I think you can check the async pragma implmentation. |
13:04:46 | * | pro joined #nim |
13:18:06 | FromDiscord | <Phil> In reply to @Bung "I think you can": This? https://github.com/nim-lang/Nim/blob/8c0f2f01527dbeba071c6478d6d38c9cf841ba71/lib/pure/asyncmacro.nim#L253 |
13:19:18 | FromDiscord | <Bung> yes, as I remenber it also do copy body and replace proc things. |
13:20:20 | FromDiscord | <Phil> It's got a 120 line proc `asyncSingleProc` for the most part |
13:54:23 | NimEventer | New thread by jerous: Nimqt - bindings to Qt, see https://forum.nim-lang.org/t/9785 |
14:04:45 | FromDiscord | <ShalokShalom> @Phil Oh, that is a binding to qt-widgets, the other Qt toolkit |
14:05:04 | FromDiscord | <ShalokShalom> Its more the traditional style of an UI toolkit. |
14:05:23 | FromDiscord | <Phil> Wait a sec, there are ways that you can do debugging like jvm debugging, with stopping code while executing, seeing variables and their current values and stuff? |
14:06:15 | FromDiscord | <ShalokShalom> You mean something likr Dtrace? |
14:06:34 | FromDiscord | <Phil> I have no idea of anything I've only ever seen that style of debugging experience in Java based IDEs |
14:07:03 | FromDiscord | <Phil> Correction: IDEs while using java |
14:07:14 | FromDiscord | <Phil> And python... and while in the browser also JS |
14:07:18 | FromDiscord | <ShalokShalom> Well, Bryan Cantrill kinda brought this kind of advanced debugging to C |
14:07:25 | FromDiscord | <ShalokShalom> And generally to non VM languages. |
14:07:40 | FromDiscord | <ShalokShalom> His videos are worth watching, he is a hilarious genius. |
14:07:57 | FromDiscord | <ShalokShalom> In reply to @Isofruit "Correction: IDEs while using": That actually comes from Smalltalk 😛 |
14:08:07 | FromDiscord | <ShalokShalom> As the whole IDE/VM stuff in general. |
14:08:24 | FromDiscord | <ShalokShalom> Idk if Dtrace would make much sense on Nim. I kinda doubt |
14:08:31 | * | xet7 quit (Quit: Leaving) |
14:08:47 | FromDiscord | <ShalokShalom> Since you cant see, where an issue arised anymore. The compilation is already too advanced. I assume. |
14:08:55 | FromDiscord | <enthus1ast> dtrace is the solaris thing right? |
14:09:23 | FromDiscord | <ShalokShalom> Yes |
14:09:53 | FromDiscord | <jtv> If you’re talking about things like ebpf that isn’t stopping a program or anything and is mainly used for observability |
14:09:58 | FromDiscord | <ShalokShalom> It kinda brought other projects into rolling |
14:09:59 | FromDiscord | <Phil> In reply to @ShalokShalom "His videos are worth": That may be true, but I'd mostly be looking for ways that I could just plug this kind of stuff into nim for a similar blessed experience. Though I still only read here and there that it has support on some level but never see anyone actually ever doing it |
14:10:32 | FromDiscord | <ShalokShalom> You would need to ask the devs |
14:10:50 | FromDiscord | <ShalokShalom> Idk, if that is still traceable after compilation |
14:11:18 | FromDiscord | <enthus1ast> maybe the nim embedded debugger is worth some love |
14:11:20 | FromDiscord | <Phil> I stumble over this kind of stuff from time to time when I read that C has a bunch of tooling on that level |
14:11:24 | FromDiscord | <jtv> But debuggers have long used breakpoints to allow you to stop execution and observe the program. Nim does allow you to use debuggers commonly used in C like gdb |
14:11:44 | FromDiscord | <jtv> Most languages do, even Python has pdb |
14:12:02 | FromDiscord | <jtv> 100% worth your time to learn |
14:12:05 | FromDiscord | <enthus1ast> and python has IPython.embed() |
14:12:11 | FromDiscord | <ShalokShalom> Afaik, thats a different kind of breed |
14:12:15 | FromDiscord | <ShalokShalom> And not really comparable |
14:12:19 | FromDiscord | <ShalokShalom> I forgot why :0 |
14:12:25 | FromDiscord | <ShalokShalom> (edit) ":0" => "😛" |
14:13:23 | FromDiscord | <ShalokShalom> Ah yeaz |
14:13:26 | FromDiscord | <ShalokShalom> Trace runs on a different thread thus it does not impact the main code thread.There is also a fundamental difference in thinking when we want to use trace and when want to debug. Tracing is a process about getting information regarding program's execution. On the other hand debugging is about finding errors in the code. |
14:13:30 | FromDiscord | <ShalokShalom> (edit) "yeaz" => "yeah" |
14:13:38 | FromDiscord | <ShalokShalom> (edit) "Trace" => ""Trace" | "code." => "code."" |
14:14:11 | FromDiscord | <enthus1ast> ah me have not read the whole conversation but just talked random stuff \:) |
14:14:37 | FromDiscord | <ShalokShalom> That's me, usually |
14:14:46 | FromDiscord | <<She>Horizon</Her>> Anyone know if there's any existing WebKit bindings for C (or Nim, Nim is preferable) |
14:15:10 | FromDiscord | <jtv> Right he was asking about debuggers, trace (which is obsolete) dtrace (which isn’t) and ebpf are observability tools, not really used for debugging. |
14:15:28 | FromDiscord | <ShalokShalom> In reply to @Isofruit "I stumble over this": I think, this is likely to be one of the cases, at which compiling to horribly unreadable C code does kill the fun. |
14:15:59 | FromDiscord | <jtv> What do you mean?? |
14:16:09 | FromDiscord | <ShalokShalom> In reply to @jtv "Right he was asking": Well, they argubly make common debugging tools superfluous |
14:16:22 | FromDiscord | <ShalokShalom> In reply to @jtv "What do you mean??": Using Dtrace for Nim |
14:16:29 | FromDiscord | <jtv> Super false. |
14:16:36 | FromDiscord | <ShalokShalom> I would wonder, if that would be working. |
14:17:02 | FromDiscord | <ShalokShalom> In reply to @Event Horizon "Anyone know if there's": There is one for C++ |
14:17:07 | FromDiscord | <jtv> Have you ever tried to set a uprobe in a containerized environment? They don’t work well even and it’s not an easy thing to do |
14:17:12 | FromDiscord | <ShalokShalom> Qt has it, called Qt WebKit |
14:17:32 | FromDiscord | <<She>Horizon</Her>> In reply to @ShalokShalom "There is one for": That's fine for me |
14:17:41 | FromDiscord | <ShalokShalom> In reply to @jtv "Have you ever tried": I meant effectively, not technically |
14:17:41 | FromDiscord | <jtv> And dtrace only gives you access at the system call level and below |
14:18:02 | FromDiscord | <ShalokShalom> In reply to @Event Horizon "That's fine for me": Oh, and there are also Webkit based C browsers |
14:18:07 | FromDiscord | <ShalokShalom> Those for Gnome |
14:18:24 | FromDiscord | <<She>Horizon</Her>> In reply to @ShalokShalom "Oh, and there are": Oh? That's probably more useful for me, I'd prefer to just keep my code at C |
14:19:12 | FromDiscord | <ShalokShalom> Although idk how much they depend on gtk |
14:19:23 | FromDiscord | <ShalokShalom> And I might just confuse something 😅 |
14:19:30 | FromDiscord | <ShalokShalom> What do you want to do? |
14:19:41 | FromDiscord | <ShalokShalom> In reply to @jtv "And dtrace only gives": I see |
14:19:49 | FromDiscord | <ShalokShalom> Do you think, we can use it for Nim? |
14:20:07 | FromDiscord | <jtv> In reply to @ShalokShalom "I meant effectively, not": What does that even mean? I have used debuggers and tracing tools both for 30 years and built a very successful product around ebpf and don’t understand. |
14:21:16 | FromDiscord | <ShalokShalom> I assumed they would cover similar use cases |
14:21:40 | FromDiscord | <ShalokShalom> Since tracing is still used to understand your program, in case you encounter an issue |
14:22:07 | FromDiscord | <ShalokShalom> May be performance related, may be related to memory issues or something else |
14:22:22 | FromDiscord | <ShalokShalom> But I always assumed, they cover kinda the same space |
14:22:45 | FromDiscord | <Bung> In reply to @Event Horizon "Anyone know if there's": there's https://github.com/juancarlospaco/webgui |
14:22:50 | FromDiscord | <<She>Horizon</Her>> In reply to @ShalokShalom "What do you want": I want to use WebKit as the driving force behind a basic/crappy TUI browser |
14:23:38 | FromDiscord | <jtv> I mean, a debugger makes it a lot easier to understand what’s going on inside a program but is much more heavyweight, as it’s basically rewriting your code. It isn’t suitable for production at scale |
14:24:02 | FromDiscord | <<She>Horizon</Her>> In reply to @Bung "there's https://github.com/juancarlospaco/webgui": Oh? |
14:24:44 | FromDiscord | <jtv> But still it’s generally going to be used to get metrics data out, they’re hard to use for debugging |
14:25:20 | FromDiscord | <ShalokShalom> And do you think we could use dtrace for Nim? |
14:25:51 | FromDiscord | <jtv> Dtrace is language independent |
14:26:03 | FromDiscord | <jtv> It’s more a system-level tool |
14:26:28 | FromDiscord | <ShalokShalom> Nice :R |
14:26:34 | FromDiscord | <ShalokShalom> (edit) ":R" => "😄" |
14:28:23 | FromDiscord | <jtv> Your program uses system calls under the hood, you can see those get invoked, the data that gets past to it, etc. but those tools aren’t meant for app debugging |
14:30:19 | FromDiscord | <Phil> sent a long message, see http://ix.io/4k2H |
14:30:50 | FromDiscord | <jtv> Nim program compile w that flag by default |
14:31:05 | FromDiscord | <jtv> And it’s much simpler than the ebpf and dtrace debugging |
14:32:20 | FromDiscord | <Phil> I have no experience with those either so I can't compare to those.↵My baseline I'm comparing to is pretty much the java dev workflow:↵Click round button next to line of code to set a breakpoint there, click shiny play button to run program, see loc highlighted where you're currently at and all available variables and their values |
14:32:20 | FromDiscord | <jtv> With ebpf, if your program already compiles directly to an elf file, you can get flame graphs easily. Doing real state inspection dynamically? Nope |
14:32:38 | FromDiscord | <jtv> You need to pre-build and hook your probes |
14:32:50 | FromDiscord | <jtv> Yeah gdb does that |
14:33:53 | FromDiscord | <Phil> Then this is likely me not having gdb experience and not knowing how to properly use it in nim |
14:34:01 | FromDiscord | <jtv> Things like VSCode wrap more UI around it all. |
14:34:47 | FromDiscord | <jtv> I’m an old command line guy so I tend to use my debuggers directly but I’d assume the vscode experience is similar to what you’d see in Java environments |
14:47:39 | * | pro quit (Quit: pro) |
14:48:24 | * | derpydoo quit (Ping timeout: 260 seconds) |
14:49:12 | * | derpydoo joined #nim |
14:58:23 | * | nick1 joined #nim |
14:58:35 | * | azimut quit (Remote host closed the connection) |
14:59:23 | * | azimut joined #nim |
15:02:34 | NimEventer | New thread by archnim: A serious documentation for Nim, see https://forum.nim-lang.org/t/9786 |
15:04:55 | FromDiscord | <jtv> Someone on my team who is a VSCode user says he uses the CodeLLDB extension for debugging on compiled languages, @Phil. |
15:08:08 | FromDiscord | <ezquerra> The debugger is another example of nim’s tooling being subpar compare to the language itself |
15:09:13 | FromDiscord | <ezquerra> Ideally, you should just be able to click on a line in VS Code, launch the debugger, and when the line is hit view the state of all the local variables and al start stepping through the code |
15:10:02 | * | arkurious joined #nim |
15:12:45 | FromDiscord | <jtv> You can |
15:13:43 | FromDiscord | <jtv> It's a compiled language. The CodeLLDB extension works just as well for Nim as it does for C. |
15:15:08 | FromDiscord | <jtv> I don't know about when you're targeting the JS backend, but I'd assume even there you'd have full traceability back to the source. |
15:23:44 | FromDiscord | <Piqueiras> if I have both an iterable and an enum with 10 elements, is there a way I can work out a pairs iterator for those |
15:25:13 | FromDiscord | <Phil> In reply to @Piqueiras "if I have both": Without having tried this myself, have you looked into `std/sequtils.zip` yet? |
15:25:41 | FromDiscord | <Piqueiras> tbh no lol |
15:26:21 | FromDiscord | <Piqueiras> i just found it kinda weird cause enums should be known at compile time (as far as i know) but I want to iterate over a seq |
15:33:22 | * | derpydoo quit (Ping timeout: 268 seconds) |
15:33:29 | FromDiscord | <sOkam!> In a manual memory situation, how do you access a specific location of a ptr uint8 or pointer? |
15:34:03 | FromDiscord | <jtv> I would assume you cast it to a ptr array |
15:34:06 | FromDiscord | <sOkam!> I'm trying:↵https://www.gingerbill.org/article/2019/02/08/memory-allocation-strategies-002/↵But stuck at the `void ptr = &arena_buffer[arena_offset];` part |
15:34:08 | FromDiscord | <willm> sent a code paste, see https://play.nim-lang.org/#ix=4k34 |
15:34:41 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4k35 |
15:34:48 | FromDiscord | <willm> sent a code paste, see https://play.nim-lang.org/#ix=4k36 |
15:34:54 | FromDiscord | <willm> (edit) "https://play.nim-lang.org/#ix=4k36" => "https://play.nim-lang.org/#ix=4k37" |
15:38:18 | FromDiscord | <Phil> Not one of the guys that uses nimlsp myself. PMunch is fairly active here though, he likely knows more.↵What OS are you installing from? |
15:38:25 | FromDiscord | <willm> In reply to @Isofruit "Not one of the": NixOS |
15:38:46 | FromDiscord | <Phil> `nimble -v` output? |
15:39:01 | FromDiscord | <willm> it's the same, doesn't give any more clues |
15:39:20 | FromDiscord | <willm> https://media.discordapp.net/attachments/371759389889003532/1058771344759738450/screenshot-1672501143.jpg |
15:39:23 | FromDiscord | <willm> there's the full output |
15:39:27 | FromDiscord | <Phil> That's for getting the nimble version, not the nimble version |
15:39:32 | FromDiscord | <Phil> (edit) "nimble" => "nim" |
15:39:33 | FromDiscord | <willm> oh my bad |
15:39:47 | FromDiscord | <willm> sent a code paste, see https://play.nim-lang.org/#ix=4k39 |
15:41:35 | FromDiscord | <Phil> Hmm can't think of any further debugging information for when the guy arrives. I can only tell you it works on arch =/ |
15:42:07 | FromDiscord | <willm> yeah unfortunate that the output doesn't say anything more... thanks for the help |
15:42:47 | FromDiscord | <willm> In reply to @Isofruit "Hmm can't think of": can you think of another package that installs an executable? Testing to see if that works would narrow it down to either a nixos issue or nim issue |
15:43:38 | FromDiscord | <planetis> There are two ways, use ptr UncheckedArray and [] or declare a += on pointers and get the result. Example code does both |
15:44:18 | FromDiscord | <planetis> In reply to @sOkam! "In a manual memory": There are two ways, use ptr UncheckedArray and [] or declare a += on pointers and get the result. Example code does both |
15:45:14 | FromDiscord | <Piqueiras> and, is it me or i can use pair iterator on string.split(char) |
15:45:18 | FromDiscord | <Piqueiras> (edit) "can" => "cant" |
15:47:01 | FromDiscord | <Piqueiras> no, it wont let me |
15:50:31 | FromDiscord | <Bung> oh it compiled before I was born .. |
15:52:02 | FromDiscord | <planetis> In reply to @planetis "There are two ways,": my bad it's usually `+!` https://github.com/nim-lang/Nim/blob/devel/lib/std/private/dragonbox.nim#L1047 |
15:57:55 | FromDiscord | <Piqueiras> oh, so i cant iterate pairs on split unless i save it on a variable |
15:59:39 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4k3d |
16:00:51 | FromDiscord | <sOkam!> oh, i might have forgotten to init the arena. whoppsss 🙈 |
16:07:36 | FromDiscord | <ezquerra> In reply to @jtv "It's a compiled language.": What I’d like is that the out of the box debugger experience worked well in all OS supported by nim |
16:08:32 | * | jvinet joined #nim |
16:21:23 | FromDiscord | <planetis> In reply to @sOkam! "I might not be": your translation is correct, but I wonder why it uses the pointer to a pointer |
16:28:51 | FromDiscord | <ambient> In reply to @jtv "I don't know about": Do these also work in Windows? I've found Nim doesn't seem to generate debug info that many tools are able to read |
16:28:58 | FromDiscord | <haxscramper> documentation |
16:29:24 | FromDiscord | <haxscramper> In reply to @NimEventer "New thread by archnim:": @archnim are you here? |
16:29:47 | FromDiscord | <ambient> for example i have not successfully generated suitable labels for Nim programs for Superluminal sampling profiler |
16:30:18 | FromDiscord | <ambient> all function names are just some hex values |
16:32:12 | * | rockcavera joined #nim |
16:54:24 | FromDiscord | <ShalokShalom> https://github.com/google/rune/issues/38 |
16:54:35 | FromDiscord | <ShalokShalom> Google loves Nim |
16:54:39 | FromDiscord | <ShalokShalom> Its official |
16:54:59 | FromDiscord | <archnim> I'm here @haxscramper |
16:56:35 | FromDiscord | <haxscramper> Ok, so I wanted to elaborate a bit on the forum post - while the idea to have a dedicated team for the docs is ok, generally speaking it must be built on some.kind of foundation of processes which are hardly present here |
16:57:37 | FromDiscord | <haxscramper> And considering the attitude (trying to push 62$ book as the first sentence) of the core devs ... basically the docs would be improved incrementally and this is the only solution I've seen work over the years |
16:58:33 | FromDiscord | <haxscramper> So I was speaking more from my experience and directly applicable actions rather than more abstract general view of the problem with documentation |
16:59:29 | FromDiscord | <archnim> I understand. |
17:00:50 | FromDiscord | <archnim> Concerning the core devs, I understand them too, I know they are not selfish, the just need to live too. And they do a lot of sacrifice to Nim. |
17:01:35 | FromDiscord | <haxscramper> Araq is paid full-time |
17:02:58 | FromDiscord | <haxscramper> The content on books is ok, but I still can't understand why not put it in docs |
17:04:34 | FromDiscord | <Phil> I think actionable statements could be that exported symbol should have docs and exported procs runnable examples. Those often exist, but not always and could be a measurable metric |
17:05:24 | FromDiscord | <haxscramper> This is a tooling question but yes, some boilerplate requirements can move things into a better direction |
17:05:54 | FromDiscord | <Phil> That includes docs at the start of libs/modules including concepts or larger examples |
17:06:18 | FromDiscord | <ringabout> I don't know whether a new book is needed. I would be in favor of the improvement of the current documentation. `runnableExamples` additions or perhaps a specific or some handy documentation on specific topics. |
17:07:31 | FromDiscord | <haxscramper> Someone writing module docs should write a piece of code that uses every proc/type in this module |
17:07:39 | FromDiscord | <haxscramper> And then explain why everything is used this way |
17:07:49 | FromDiscord | <Phil> I agree with favouring module/symbol docs over a new book |
17:08:05 | FromDiscord | <haxscramper> Wrote an "except" somewhere? Why code can raise? Is it important? |
17:08:27 | FromDiscord | <haxscramper> Called something? What does it do? Can I get this from docs? |
17:09:08 | FromDiscord | <haxscramper> What was the original task for this piece of code? Take examples that people write on the the forum |
17:09:22 | FromDiscord | <haxscramper> That's exactly what must be in docs |
17:09:50 | FromDiscord | <haxscramper> People go elsewhere to ask questions and then they are satisfied with things they get on forum |
17:10:18 | FromDiscord | <haxscramper> Therefore documentation implementers should look very closely on forums |
17:11:37 | FromDiscord | <ringabout> As to the multilingual version of Nim documentation, If only we could set a workflow for it, I will definitely contribute to it. I tried, but I couldn' figure out how to work with https://weblate.org/ See also https://github.com/nim-lang/Nim/issues/18821 |
17:11:48 | FromDiscord | <Vindaar> as an aside: whenever ideas for docs come up, let me plug the Clojure docs again https://clojuredocs.org/clojure.core/map user addable examples, which can be voted on is imo a great idea (generally the structure is also pretty nice imo) |
17:11:58 | FromDiscord | <ringabout> (edit) "couldn'" => "couldn't" |
17:16:16 | FromDiscord | <haxscramper> haxe docs can be commented on using github, this might also be useful |
17:16:27 | FromDiscord | <haxscramper> right, there is no shortage of technical things that can be implemented |
17:20:51 | FromDiscord | <haxscramper> https://forum.nim-lang.org/t/3766#23446 but with things like these |
17:21:53 | FromDiscord | <haxscramper> https://forum.nim-lang.org/t/4331#26963 |
17:22:16 | FromDiscord | <haxscramper> https://forum.nim-lang.org/t/3308#20858 |
17:25:55 | FromDiscord | <ShalokShalom> Yeah, I actually love that you can comment on Haxe docs on the website |
17:30:40 | FromDiscord | <haxscramper> In reply to @haxscramper "And considering the attitude": > User archnim2 shows up a couple of months later and complains our docs are bad, including every written book about Nim, even those freely available for the poor people who are happy to pay for everything else in their lives. |
17:31:32 | FromDiscord | <haxscramper> In reply to @ShalokShalom "Yeah, I actually love": as you can see the goal is to just dodge complaints |
17:32:02 | FromDiscord | <willyboar> In reply to @haxscramper "haxe docs can be": You can use utterances to do that |
17:36:21 | FromDiscord | <archnim> I just published a post on the forum thread to describe in details how I think the docs could be remastered. |
17:40:03 | FromDiscord | <jtv> In reply to @ambient "Do these also work": Not sure, I'm not a Windows person unfortunately. But I'd be surprised... the default flow is that Nim produces C or C++ that gets compiled. And there, it's easy to add #line pragmas to get the line info back. If the debugger expects C++, maybe make sure the backend is generating C++ in case it's a name mangling issue or somesuch? |
17:40:45 | FromDiscord | <Gumbercules> In reply to @haxscramper "The content on books": The book literally reads like the manual |
17:41:31 | FromDiscord | <jtv> Yeah, neither nim book really helps much vs the online docs, and the online docs aren't awesome |
17:41:59 | FromDiscord | <Gumbercules> Stefans book actually tries |
17:42:46 | FromDiscord | <haxscramper> In reply to @Gumbercules "The book literally reads": the "mastering nim" one? |
17:43:01 | FromDiscord | <haxscramper> well, looking at TOC that is 1:1 with nim manual this is not surprising |
17:43:40 | FromDiscord | <haxscramper> IIRC technically MIT license allows you to take community-contributed content and sell it |
17:43:43 | FromDiscord | <haxscramper> or something like that |
17:45:32 | * | derpydoo joined #nim |
17:46:58 | FromDiscord | <willyboar> Cool! |
17:48:09 | FromDiscord | <jtv> There's a bit more depth on macros and such, but a lot of it is basically the language reference |
17:50:29 | FromDiscord | <Phil> In reply to @haxscramper "IIRC technically MIT license": MIT allows you everything except for suing the person writing the code if it was bad code is the short version that I think of when it comes up |
17:52:01 | FromDiscord | <haxscramper> whether it is an ok thing to do or not is another question |
17:52:46 | FromDiscord | <haxscramper> but since not a lot of people have this book anyway it is hard to judge how similar is it anyway |
18:02:53 | FromDiscord | <Bung> speaking of documentation, first idea coming to my mind is split the official site "Documentation" to 3 parts "Documentation" , "References" and "Learn", I dont want "Getting started with Nim" every time. |
18:07:27 | FromDiscord | <ambient> In reply to @Isofruit "MIT allows you everything": MIT requires that you also disclose where the code is from, license (MIT) and who wrote it. People often completely ignore this part. |
18:10:50 | FromDiscord | <answer> sent a code paste, see https://play.nim-lang.org/#ix=4k3J |
18:12:56 | FromDiscord | <haxscramper> Not sure if you can use concepts as direct fields, IIRC they are meant to be used as type constraints, so `T: Contains` or something similar |
18:13:40 | FromDiscord | <Gumbercules> In reply to @haxscramper "well, looking at TOC": Which is annoying because if I had known this was the case I would have never ordered it. I've already thrown more than enough $ at Nim. |
18:15:51 | FromDiscord | <haxscramper> maybe that's just TOC, I can't really see what's inside for obvious reasons |
18:16:10 | FromDiscord | <haxscramper> are there any text pieces that also come directly from the manual? |
18:20:03 | FromDiscord | <Gumbercules> I'll have a look later today |
18:20:20 | FromDiscord | <Gumbercules> I'm fairly certain the answer is yes, but I'll verify |
18:23:16 | FromDiscord | <jtv> @answer concepts aren't concrete types, they're saying what a concrete type must have to be considered "Contains" at compile time |
18:23:32 | FromDiscord | <jtv> You still need a concrete type in order to be able to instantiate |
18:23:47 | FromDiscord | <jtv> Even if it's just an object ref you cast to |
18:26:41 | FromDiscord | <answer> trying to figure out if there's some other way to describe it since i see some other code use concepts as constraints but maybe it's a little ambitious... um looking at https://github.com/mratsim/weave right now and seeing how they use concepts and how they contain things with concepts |
18:26:44 | FromDiscord | <Gumbercules> https://media.discordapp.net/attachments/371759389889003532/1058813474123284591/rn_image_picker_lib_temp_04e08726-c649-4230-9a84-5b85c1cd1729.jpg |
18:27:08 | FromDiscord | <Gumbercules> https://nim-lang.org/docs/manual.html#lexical-analysis-identifiers-amp-keywords |
18:27:30 | FromDiscord | <jtv> One sec |
18:27:56 | FromDiscord | <haxscramper> https://media.discordapp.net/attachments/371759389889003532/1058813774225743942/image.png |
18:27:58 | FromDiscord | <haxscramper> yeah xxxxd |
18:28:25 | FromDiscord | <Gumbercules> Most of the book (part two) is the spec, so it seems a copy paste of the manual probably with some additions / omissions |
18:29:39 | FromDiscord | <voidwalker> I got the book as well, I am pissed there is no pdf |
18:29:44 | FromDiscord | <voidwalker> you can't ctrl+f a book |
18:30:09 | FromDiscord | <Gumbercules> I mean, I'd just be happy with some more original content |
18:30:20 | FromDiscord | <Gumbercules> More than 40ish pages anyway |
18:30:27 | FromDiscord | <jtv> @answer are you just trying to keep run-time type info around, like a box type? |
18:30:35 | FromDiscord | <jtv> I have one, let me make it public for you, one second. |
18:31:07 | FromDiscord | <voidwalker> yeah the book is quite .. non homogenous. starts out like it would be a book for beginners, then copy pastes the manual, then some template/macros |
18:31:08 | FromDiscord | <answer> i have a friend exploring nim right now and they're trying to use concepts like traits |
18:31:12 | FromDiscord | <answer> (edit) "i have a friend exploring nim right now and they're trying to use concepts like traits ... " added "from rust" |
18:31:25 | FromDiscord | <answer> maybe there's a better equivalent for this? |
18:32:24 | FromDiscord | <jtv> I mean, give me more detail about what you're actually trying to do in the code snippet and I can help |
18:32:48 | FromDiscord | <jtv> For instance, check out box.nim in the repo I just made public: https://github.com/crashappsec/nimutils |
18:33:26 | FromDiscord | <jtv> It uses a concept to do what I think is what you're trying to do |
18:33:26 | FromDiscord | <answer> it isn't public btw |
18:34:33 | FromDiscord | <jtv> Whoops, try it now |
18:37:09 | FromDiscord | <jtv> So you can see the big difference is, you need a concrete type to instantiate, and I use Box as that type. |
18:37:16 | FromDiscord | <answer> ohh interesting |
18:38:01 | FromDiscord | <jtv> As long as you know the type at compile time, it's not going to need any runtime checking, but if you need to figure out the type at runtime, the info is there. |
18:41:16 | FromDiscord | <answer> this is neat but i assume they are looking for some compiletime way to do this like rust does with traits. this does do the job though |
18:43:02 | FromDiscord | <jtv> Well, if you don't want the runtime type info around, you don't need the recursion when boxing/unboxing. I did it that way b/c of my specific use case |
18:43:29 | FromDiscord | <jtv> And then everything is static, but you still need some container that is a concrete type |
18:43:48 | FromDiscord | <jtv> Whether it's RootObj, or... |
18:44:19 | FromDiscord | <jtv> A concept is nothing but an interface, it's not something you can instantiate, you can only instantiate things that implement the interface |
18:44:51 | FromDiscord | <jtv> So in order to instantiate your Pair type, you need to have something concrete at some point 🙂 |
18:44:56 | FromDiscord | <answer> yeah |
18:45:13 | FromDiscord | <jtv> Hope that helps |
18:46:40 | FromDiscord | <answer> i'll try playing around with it with that knowledge |
18:47:00 | FromDiscord | <jtv> Cool, lmk if you have any more questions |
18:48:02 | FromDiscord | <Gumbercules> In reply to @answer "i have a friend": C++ concepts |
18:48:20 | FromDiscord | <Gumbercules> https://en.cppreference.com/w/cpp/language/constraints |
19:28:58 | * | xet7 joined #nim |
19:32:36 | FromDiscord | <ShalokShalom> In reply to @Isofruit "MIT allows you everything": MIT also gives a waver to patents, I think |
19:32:56 | FromDiscord | <ShalokShalom> Since that is, what the CC 0 doesnt, and what makes Fedora reject it as a license |
19:33:13 | FromDiscord | <ambient> Public domain does not waver patents? |
19:33:29 | FromDiscord | <ShalokShalom> In reply to @haxscramper "as you can see": Oh, I know that so well |
19:33:51 | FromDiscord | <ShalokShalom> Not from this project (only) but this is generally how people react to critiqe |
19:34:00 | FromDiscord | <ShalokShalom> In reply to @ambient "Public domain does not": CC 0 doesnt |
19:34:30 | FromDiscord | <ShalokShalom> https://hackaday.com/2022/07/29/why-fedora-decided-to-give-cc0-licensed-code-the-boot/ |
19:48:46 | * | joast quit (Quit: Leaving.) |
19:55:00 | FromDiscord | <System64 ~ Flandre Scarlet> Hi, does Nim support QT? |
19:57:02 | FromDiscord | <ShalokShalom> Yes |
19:57:06 | FromDiscord | <ShalokShalom> Since today 😛 |
19:57:36 | FromDiscord | <ShalokShalom> The Nim Qt Widget library has actually been posted today |
19:58:15 | FromDiscord | <ShalokShalom> @System64 ~ Flandre Scarlet https://forum.nim-lang.org/t/9785 |
19:59:06 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @ShalokShalom "The Nim Qt Widget": Oh what a coincidence lol↵And does it support that? https://media.discordapp.net/attachments/371759389889003532/1058836716355584021/image.png |
19:59:17 | FromDiscord | <ShalokShalom> The Qt Quick binding is already in use for a couple while https://github.com/filcuc/NimQml |
19:59:56 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @ShalokShalom "The Qt Quick binding": Oh so I can quickly dev GUI apps with NimQml and NimQT? |
20:00:07 | FromDiscord | <ShalokShalom> @System64 ~ Flandre ScarletWell, I am not the right person to ask. Generally: Nim has some support in the Qt designer, for the language itself. Its a bit unmaintained, though. |
20:00:32 | FromDiscord | <ShalokShalom> In reply to @System64 "Oh so I can": You can. If you want to design the GUI in the visual designer, I think only QML is an option. |
20:00:54 | FromDiscord | <ShalokShalom> Since it produces own files. Qt widgets gets implemented in the Nim logic code. |
20:01:30 | FromDiscord | <ShalokShalom> You know the difference between Widgets and Quick in terms of use case and so on? |
20:03:18 | FromDiscord | <ShalokShalom> I actually like the API, that the new Qt Widget binding brings |
20:03:22 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @ShalokShalom "You know the difference": No↵I just want to create an UI like that↵https://editor.p5js.org/system64MC/sketches/k8vzhPDLZ↵But I like declarative syntax like XAML, FXML, etc and with an editor |
20:03:22 | FromDiscord | <ShalokShalom> And I might even use it |
20:04:05 | FromDiscord | <ShalokShalom> I would suggest, you look into both |
20:04:16 | FromDiscord | <ShalokShalom> QML offers hardware acceleration and mobile support |
20:04:57 | FromDiscord | <System64 ~ Flandre Scarlet> But does QML have event trigger when I click on a button, move my mouse and click on a canvas, etc? |
20:05:00 | FromDiscord | <ShalokShalom> Considering this one binding came out today, practice is basically not established with it |
20:05:11 | FromDiscord | <ShalokShalom> And talking purely theoretically is tricky. |
20:05:24 | FromDiscord | <ShalokShalom> In reply to @System64 "But does QML have": Yes |
20:05:37 | FromDiscord | <ShalokShalom> Its actually a superset of Javascript |
20:05:55 | FromDiscord | <System64 ~ Flandre Scarlet> Oh, I know JS quite well |
20:06:05 | FromDiscord | <ShalokShalom> You shouldnt overuse it |
20:06:22 | FromDiscord | <ShalokShalom> But a QML file is a fully fledged Javascript plus the QML parts |
20:06:45 | FromDiscord | <ShalokShalom> You can can combine UI element stuff with Javascript logic |
20:06:49 | FromDiscord | <ShalokShalom> To describe your UI |
20:07:19 | FromDiscord | <System64 ~ Flandre Scarlet> And can I set UI elements (slider values for exemple) from Nim backend? |
20:07:35 | FromDiscord | <ShalokShalom> And there is an equivalent to the Qt Designer, for Quick: https://www.qt.io/product/ui-design-tools |
20:07:42 | FromDiscord | <ShalokShalom> Qt Designer is for Qt Widgets |
20:07:52 | FromDiscord | <ShalokShalom> Qt Design Studio is for Qt Quick |
20:08:11 | FromDiscord | <System64 ~ Flandre Scarlet> I'm on Qt Designer |
20:08:17 | FromDiscord | <ShalokShalom> In reply to @System64 "And can I set": I did not ask with it yet. @Phil knows more. |
20:08:28 | FromDiscord | <System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/371759389889003532/1058839075395747970/image.png |
20:08:56 | FromDiscord | <ShalokShalom> In reply to @System64 "I'm on Qt Designer": Yeah, I see. They have it a bit weird. Design Studio used to be paid, and now its free and still closed source. And they have a weird way of distributing it |
20:09:00 | FromDiscord | <ShalokShalom> At least to Linux. |
20:09:23 | FromDiscord | <ShalokShalom> (edit) "ask" => "code" |
20:09:39 | FromDiscord | <System64 ~ Flandre Scarlet> Oh alright↵Qt is weird |
20:09:57 | FromDiscord | <ShalokShalom> The point is, with the Qt Design Studio could you export QML files |
20:10:07 | FromDiscord | <ShalokShalom> And then referencing them in your Nim backend |
20:10:37 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @ShalokShalom "The point is, with": is Design Studio still free, |
20:10:38 | FromDiscord | <System64 ~ Flandre Scarlet> (edit) "free," => "free?" |
20:10:43 | FromDiscord | <System64 ~ Flandre Scarlet> (edit) "free?" => "free for Windows?" |
20:10:47 | FromDiscord | <ShalokShalom> I think so |
20:10:48 | FromDiscord | <ShalokShalom> https://discord.com/channels/371759389889003530/371759607934353448/1046505560763269250 |
20:10:51 | * | kenran joined #nim |
20:10:51 | * | kenran quit (Remote host closed the connection) |
20:10:55 | FromDiscord | <ShalokShalom> This gives you a good idea |
20:11:31 | FromDiscord | <System64 ~ Flandre Scarlet> Seems interesting |
20:13:46 | * | jmdaemon joined #nim |
20:14:39 | FromDiscord | <System64 ~ Flandre Scarlet> And is there another alternative that uses a declarative syntax for UI design? (except HTML) |
20:15:06 | FromDiscord | <ShalokShalom> Yes |
20:15:51 | FromDiscord | <ShalokShalom> https://github.com/can-lehmann/owlkettle |
20:16:16 | FromDiscord | <ShalokShalom> Know, that GTK is mainly used for Linux |
20:16:27 | FromDiscord | <ShalokShalom> It does look not native on other platforms |
20:16:52 | FromDiscord | <ShalokShalom> And is generally horrible. This just happens to be a good implementation and abstraction, it seems. |
20:17:13 | FromDiscord | <ambient> GTK/Nim works pretty well on Windows too in my experience https://ssalewski.de/gtkprogramming.html |
20:18:15 | FromDiscord | <ambient> although I haven't tried shipping |
20:18:43 | FromDiscord | <ShalokShalom> Yeah, it works. |
20:18:49 | FromDiscord | <ShalokShalom> It just doesnt look native. |
20:19:01 | FromDiscord | <ShalokShalom> Qt looks on any platform like a native applications. |
20:19:06 | FromDiscord | <ShalokShalom> (edit) "applications." => "application." |
20:19:31 | FromDiscord | <System64 ~ Flandre Scarlet> Owlkettle seems good and easy to use↵And less hard to understand than QT |
20:19:38 | FromDiscord | <ambient> Windows apps don't have a real native look |
20:19:41 | FromDiscord | <ambient> anyways... |
20:20:02 | FromDiscord | <ambient> I use Windows 11 and the user interface is still a complete mess |
20:20:22 | FromDiscord | <ambient> They don't know if they want to be a desktop UI or a tablet UI |
20:20:30 | FromDiscord | <ShalokShalom> In reply to @System64 "Owlkettle seems good and": I like its API |
20:20:58 | FromDiscord | <ShalokShalom> @System64 ~ Flandre Scarlet You can find here a few options more |
20:20:58 | FromDiscord | <ShalokShalom> https://github.com/ringabout/awesome-nim#user-interface |
20:21:13 | FromDiscord | <ShalokShalom> And then there is Godot 😛 |
20:21:26 | FromDiscord | <ShalokShalom> Although I find it hard to get running, I havent really tried. |
20:21:50 | FromDiscord | <System64 ~ Flandre Scarlet> https://editor.p5js.org/system64MC/sketches/k8vzhPDLZ↵Can I do that easily with Owlkettle? |
20:21:55 | FromDiscord | <ShalokShalom> You might find this interesting: https://medium.com/swlh/what-makes-godot-engine-great-for-advance-gui-applications-b1cfb941df3bhttps://medium.com/swlh/what-makes-godot-engine-great-for-advance-gui-applications-b1cfb941df3b |
20:22:01 | FromDiscord | <ShalokShalom> (edit) "https://medium.com/swlh/what-makes-godot-engine-great-for-advance-gui-applications-b1cfb941df3bhttps://medium.com/swlh/what-makes-godot-engine-great-for-advance-gui-applications-b1cfb941df3b" => "https://medium.com/swlh/what-makes-godot-engine-great-for-advance-gui-applications-b1cfb941df3b" |
20:22:32 | FromDiscord | <ShalokShalom> In reply to @System64 "https://editor.p5js.org/system64MC/sketches/k8vzhPD": I have not used it. A power user from our community did and he was very happy with it. |
20:22:38 | FromDiscord | <ambient> I think there are OpenGL or SDL based UI libraries that are better than Godot, if you don't want to use GDscript |
20:22:43 | FromDiscord | <ShalokShalom> And I guess you can. 🙂 |
20:23:04 | FromDiscord | <ShalokShalom> In reply to @ambient "I think there are": You can use Nim with Godot. |
20:23:22 | FromDiscord | <ShalokShalom> And I would rather cut my foot of, before I use OpenGL or SDL instead of Godot. ^^ |
20:23:24 | FromDiscord | <ambient> In reply to @ShalokShalom "You can use Nim": Last I looked the bindings were not actively maintained |
20:23:40 | FromDiscord | <ShalokShalom> You mean those of Godot 4? |
20:23:52 | FromDiscord | <ambient> Well, either 3.5 or 4+ |
20:24:08 | FromDiscord | <ShalokShalom> The Godot 3 ones are a bit outdated, thats correct. And as said, I am not sure it was me and just the binding. |
20:24:12 | FromDiscord | <ambient> They changed how they do FFI in Godot 4 |
20:24:16 | FromDiscord | <ShalokShalom> Yep. |
20:25:26 | FromDiscord | <ShalokShalom> I maintain that repo. ↵https://github.com/Vivraan/godot-lang-support |
20:25:58 | FromDiscord | <ambient> In reply to @ShalokShalom "I maintain that repo.": That's cool of you |
20:26:22 | FromDiscord | <ShalokShalom> Its not much work |
20:26:27 | FromDiscord | <ShalokShalom> And I like documentation 😄 |
20:26:29 | FromDiscord | <ShalokShalom> https://github.com/pragmagic/godot-nim |
20:26:38 | FromDiscord | <ShalokShalom> Seems at somewhat maintained. |
20:26:50 | FromDiscord | <ShalokShalom> I guess at one point, you dont have much left to do |
20:27:05 | FromDiscord | <ShalokShalom> Particularly with a language like Nim. |
20:27:16 | FromDiscord | <ShalokShalom> Many languages tried to create bindings, same with Qt. |
20:27:26 | FromDiscord | <ShalokShalom> Both dont make it easy (Godot 4 does) |
20:27:45 | FromDiscord | <ShalokShalom> And Nim proved in both camps, that decent bindings could be created and maintained with it. |
20:27:55 | FromDiscord | <ShalokShalom> It definitely has an advantage there. 🙂 |
20:28:07 | FromDiscord | <ShalokShalom> I also maintain the list of Qt bindings 😄 |
20:31:24 | * | arik_ joined #nim |
20:33:45 | arik_ | Anyone using Mummy? |
20:40:40 | FromDiscord | <ShalokShalom> Its quite popular 😄 |
20:42:28 | FromDiscord | <arik> Indubitably |
20:43:05 | FromDiscord | <arik> I had a question about querying with Hoppscotch |
20:45:23 | FromDiscord | <spoon> bruh, windows defender really trying to block choosenim from downloading the nim installer because it's somehow android malware |
20:45:41 | FromDiscord | <spoon> already solved it but really |
20:45:56 | FromDiscord | <ShalokShalom> Nim got quite popular among malware peeps |
20:46:09 | FromDiscord | <arik> Probably still better than what McAfee would do |
20:46:09 | FromDiscord | <ShalokShalom> So Windows decided at one point, to flag all Nim programs |
20:46:24 | FromDiscord | <ShalokShalom> Since this is apparently the obvious thing to do ^^ |
20:47:16 | FromDiscord | <spoon> has anything ever happened with removing the symbols after compiling? |
21:12:15 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4k4p |
21:12:32 | FromDiscord | <! Nilts> (edit) |
21:37:35 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4k4s |
21:47:50 | FromDiscord | <huantian> Uh did you try doing a system update first? `sudo pacman -Syu` I’d assume |
21:48:53 | FromDiscord | <huantian> It looks an error caused by a partial upgrade |
21:53:18 | FromDiscord | <ShalokShalom> @System64 ~ Flandre Scarlet I actually have a small script for that to avoid. It updates, before I install anything, and does a couple of other neat tricks. |
21:54:35 | FromDiscord | <ShalokShalom> Its designed for Garuda, but I assume you could adjust it 😛 |
21:55:08 | FromDiscord | <ShalokShalom> https://codeberg.org/shalokshalom/add-and-friends |
22:06:13 | * | arik_ quit (Ping timeout: 256 seconds) |
22:07:10 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @ShalokShalom "<@380360389377916939> I actually have": I tried to update, doesn't work |
22:09:15 | FromDiscord | <huantian> In reply to @ShalokShalom "<@380360389377916939> I actually have": if you want to update before you isntall with pacman can't you just `pacman -Syu package-name` |
22:09:51 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @huantian "if you want to": Also tried, still have the errors |
22:10:42 | FromDiscord | <ShalokShalom> In reply to @huantian "if you want to": that would also install, if the update fails, as an example |
22:10:54 | FromDiscord | <ShalokShalom> there are many small details to respect 🙂 |
22:10:56 | FromDiscord | <huantian> are you sure? https://packages.msys2.org/package/mingw-w64-x86_64-gcc?repo=mingw64 says that `mingw-w64-x86_64-gcc` is on version 12 |
22:11:14 | FromDiscord | <ShalokShalom> In reply to @System64 "Also tried, still have": Do a -Syy |
22:11:22 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @ShalokShalom "Do a -Syy": I did -Syyu |
22:11:37 | FromDiscord | <ShalokShalom> I would go to the Arch channel and ask there |
22:11:54 | FromDiscord | <System64 ~ Flandre Scarlet> I'm not on Arch, I'm on MSys2 |
22:11:57 | FromDiscord | <System64 ~ Flandre Scarlet> on Windows |
22:13:05 | FromDiscord | <ShalokShalom> Then I would ask them 😄 |
22:54:42 | FromDiscord | <System64 ~ Flandre Scarlet> @ShalokShalom did they said something? |
23:06:47 | FromDiscord | <beans> does nim have a cross platform library for creating desktop notifications? |
23:06:57 | FromDiscord | <beans> or really just for windows, on linux I can just call notify-send |
23:12:20 | * | oprypin quit (Quit: Bye) |
23:12:29 | * | oprypin joined #nim |
23:42:44 | FromDiscord | <_ 🎄> does Nim have pattern matching? |
23:43:00 | FromDiscord | <_ 🎄> I really require it because this code is a mess without it as compared to the previous Ocaml code |
23:52:23 | * | azimut quit (Ping timeout: 255 seconds) |
23:56:41 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @_ 🎄 "does Nim have pattern": Regex? |
23:57:45 | FromDiscord | <amadan> In reply to @_ 🎄 "does Nim have pattern": Few libraries have implemented it like https://github.com/haxscramper/hmatching |