02:05:28 | * | SchweinDeBurg quit (Quit: WeeChat 4.6.0-dev) |
02:22:22 | FromDiscord | <eightbit_dboy> Is there a way in Nim to reliably get a file's creation date and not just the date of last time it was modified? |
02:24:57 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/os.html#getCreationTime%2Cstring |
02:25:24 | FromDiscord | <eightbit_dboy> In reply to @Elegantbeef "https://nim-lang.org/docs/os.html#getCreationTime%2": > Note: Under POSIX OS's, the returned time may actually be the time at which the file's attribute's were last modified. See here for details. |
02:26:42 | FromDiscord | <Elegantbeef> Well time to wrap `statx` |
02:28:50 | FromDiscord | <eightbit_dboy> In reply to @Elegantbeef "Well time to wrap": fuck |
02:32:37 | * | SchweinDeBurg joined #nim |
02:38:16 | FromDiscord | <eightbit_dboy> And I don't want to use `glibc` |
02:38:22 | FromDiscord | <eightbit_dboy> 😢 |
02:38:34 | FromDiscord | <eightbit_dboy> guess I'll just use `getCreationTime` for now |
02:40:15 | FromDiscord | <explosiveend> i was looking at the design notes for nimony (<https://github.com/nim-lang/nimony>), but could someone explain what is meant by “typed generics” being added? |
02:40:48 | FromDiscord | <eightbit_dboy> I guess like they have a base type which can be subtyped? |
02:41:59 | FromDiscord | <explosiveend> In reply to @eightbit_dboy "I guess like they": not sure i get what this means 😭 |
02:42:09 | FromDiscord | <explosiveend> like an extended / child class or object |
02:42:14 | FromDiscord | <Elegantbeef> That makes no sense for what they are 😄 |
02:42:16 | FromDiscord | <explosiveend> (edit) "object" => "object?" |
02:42:42 | FromDiscord | <Elegantbeef> `type-checked generics` means that the type is checked at declaration using concepts |
02:42:49 | FromDiscord | <eightbit_dboy> In reply to @explosiveend "like an extended /": I was thinking something like `myLinkedList[subtype]` or something. |
02:53:58 | FromDiscord | <explosiveend> In reply to @Elegantbeef "`type-checked generics` means that": oh, so like verifying that the type being used meets certain criteria e.g. is numeric? |
02:54:21 | FromDiscord | <Elegantbeef> Moreso ensuring the generic compiles for all possible types |
02:55:21 | FromDiscord | <explosiveend> ah i see |
02:55:40 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=NZGiZZUr |
02:55:43 | FromDiscord | <explosiveend> currently there’s no guarantee that it will? |
02:56:07 | FromDiscord | <Elegantbeef> Correct plus you have to manually mixin |
03:00:11 | FromDiscord | <explosiveend> sent a code paste, see https://play.nim-lang.org/#pasty=myUgaBQJ |
03:00:41 | FromDiscord | <explosiveend> or is it like explicitly stating that the foo(int) proc will return Self (T)? |
03:03:43 | FromDiscord | <demotomohiro> In reply to @explosiveend "wait does the foo": The foo proc specified in the concept says any types matches to `HasFoo` concept has to have foo proc. |
03:04:51 | FromDiscord | <explosiveend> In reply to @demotomohiro "The foo proc specified": oh, so it’s like an interface? |
03:05:12 | FromDiscord | <explosiveend> (edit) "like" => "similar to" |
03:06:27 | FromDiscord | <Elegantbeef> Compile time yes |
03:08:38 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=CmKxhkWE |
03:10:10 | tokyovigilante | Is there any way to forward declare a type from one module so that it's available to another module without creating a circular dependency? ie I have an object with member functions declared in one module, that imports a separate module implementing a callback structure, and in those callbacks wants to refer back to (ie call functions from) the object defined in the first module? |
03:10:26 | FromDiscord | <Elegantbeef> delay imports |
03:11:31 | FromDiscord | <Elegantbeef> https://github.com/beef331/nimtrest/wiki/Code-snippets#delayed-imports |
03:11:57 | tokyovigilante | oh yup, also found https://forum.nim-lang.org/t/10438 |
03:12:09 | tokyovigilante | I don't love it but looks like it will work, thanks |
03:16:27 | * | SchweinDeBurg quit (Quit: WeeChat 4.6.0-dev) |
03:16:54 | * | SchweinDeBurg joined #nim |
04:17:32 | * | xet7 quit (Remote host closed the connection) |
04:38:09 | * | xet7 joined #nim |
05:10:24 | * | ntat joined #nim |
06:57:37 | * | derpydoo joined #nim |
07:44:57 | * | derpydoo quit (Quit: derpydoo) |
09:50:12 | * | ntat quit (Quit: leaving) |
09:54:59 | FromDiscord | <aintea> How good is Nim's capability to infer the right type when `auto` is written ? If it is really really good would it be possible to have something like gleam or ocaml and optionally not having to write the types (and Nim will auto infer the types based on the body of the function) ? |
10:01:10 | FromDiscord | <odexine> Auto doesn’t “infer” anything I would say? It’s essentially just an implicit version of the unbounded generic [T] |
10:30:16 | * | fallback quit (Ping timeout: 265 seconds) |
10:43:07 | * | ntat joined #nim |
10:54:46 | * | fallback joined #nim |
11:51:30 | * | daanb joined #nim |
11:52:04 | * | daanb quit (Client Quit) |
11:56:51 | * | daanb joined #nim |
12:05:35 | * | daanb left #nim (Leaving) |
12:11:27 | * | daanb joined #nim |
12:12:41 | * | daanb quit (Client Quit) |
12:18:28 | * | daanb joined #nim |
12:47:48 | * | daanb quit (Quit: Leaving) |
12:53:04 | * | ntat quit (Quit: leaving) |
14:13:50 | * | ntat joined #nim |
16:06:47 | * | ntat quit (Quit: leaving) |
16:09:44 | FromDiscord | <user2m> sent a long message, see https://pasty.ee/kdPeyLqe |
16:10:32 | FromDiscord | <user2m> sent a code paste, see https://play.nim-lang.org/#pasty=YlAKbpGK |
16:14:31 | FromDiscord | <threefour> Do we have some form of tagged unions? I've come to appreciate those in Zig. |
16:16:57 | FromDiscord | <Robyn [She/Her]> In reply to @threefour "Do we have some": do object variants serve as a replacement? |
16:20:48 | FromDiscord | <threefour> Aha! I knew I saw something like that in the manual at one point. That's what I was looking for, thanks. |
16:21:36 | FromDiscord | <Robyn [She/Her]> epic, no problem :) |
16:26:47 | * | ntat joined #nim |
18:07:12 | * | ntat quit (Quit: leaving) |
18:09:52 | FromDiscord | <mr.hemlock> Sorry to bother, but is there a particular place I should ask about issues with the `nimlangserver`? Although I'm unsure if it's an issue with the lsp itself or how it's used in Sublime. Issue is that when I start the lsp and it analyzes one or two files just fine. But shortly after it just stops analyzing new ones and I have to restart the lsp manually |
18:13:19 | FromDiscord | <pmunch> In reply to @mr.hemlock "Sorry to bother, but": The #tooling channel would be a good place to start. Or just post about it here of course |
18:13:25 | FromDiscord | <pmunch> Or even on issue |
18:13:31 | FromDiscord | <mr.hemlock> Fair |
18:13:47 | FromDiscord | <pmunch> Did you try nimlsp as well, or only nimlangserver? |
18:14:05 | FromDiscord | <mr.hemlock> On the latter since that's the one from the nim-lang org |
18:14:12 | FromDiscord | <mr.hemlock> (edit) "On the latter since that's the one from the nim-lang ... org" added "Github" |
18:14:38 | FromDiscord | <mr.hemlock> And I just now realize that you're the maintainer for nimlsp |
18:14:45 | FromDiscord | <mr.hemlock> I'll give it a shot |
18:15:32 | FromDiscord | <mr.hemlock> (edit) "realize" => "realized" |
18:17:14 | * | ntat joined #nim |
18:17:45 | FromDiscord | <pmunch> Nimlangserver is partially based on nimlsp, but they employ a slightly different architecture. Nimlsp uses nimsuggest as a library which means that if nimsuggest crashes then nimlsp will crash. This means that tools like Sublime can restart them or give you an error message at the time of the crash. Nimlangserver on the other hand runs nimsuggest as child processes, this means that the child processes can crash and it's up to nimlangserver |
18:18:18 | FromDiscord | <mr.hemlock> Gotcha. Neat |
18:25:58 | FromDiscord | <mr.hemlock> Muuuuuuuuch better. You're awesome |
18:27:31 | FromDiscord | <mr.hemlock> I need to stop having my kneejerk reaction when it comes to repos with less recent commits |
18:34:50 | * | ntat quit (Quit: leaving) |
18:35:37 | * | ntat joined #nim |
21:01:48 | * | rockcavera joined #nim |
21:14:01 | * | ntat quit (Quit: leaving) |
21:19:18 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
21:30:55 | * | Lord_Nightmare joined #nim |
21:37:54 | FromDiscord | <bubbly_avocado_86424> Hello People, did anyone ever use Nim to write an extenstion for Apache miNifi ? |
22:25:02 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
22:27:54 | * | Lord_Nightmare joined #nim |
23:23:57 | FromDiscord | <threefour> Okay I've been doing some research on different approaches to polymorphism. Does anyone know if there's a technical term for this approach to what are essentially pseudo-interfaces? Trying to find the search engine term to do more inquiring. This seems to be similar to what Zig does in its standard library from what I can tell. |
23:24:08 | FromDiscord | <threefour> sent a code paste, see https://play.nim-lang.org/#pasty=QAVUYqOG |
23:25:31 | FromDiscord | <leorize> it's called vtable |
23:25:32 | * | rez joined #nim |
23:25:51 | FromDiscord | <leorize> beef wrote a thing to automate it |
23:25:56 | FromDiscord | <Elegantbeef> Wait discard in an object body is valid?! |
23:25:58 | FromDiscord | <leorize> std/streams is an implementation of one |
23:26:03 | FromDiscord | <leorize> yea |
23:26:12 | FromDiscord | <Elegantbeef> What a silly language |
23:26:27 | FromDiscord | <threefour> > Wait discard in an object body is valid?!↵It's an ugly example but it gets the point across lol |
23:26:33 | FromDiscord | <Elegantbeef> Yea traitor is pretty rad |
23:26:44 | FromDiscord | <Elegantbeef> Hey you don't need the discard |
23:27:35 | FromDiscord | <heysokam> @mr.hemlock any repo by PMunch, treeform or beef you can treat as top of the top nim code and worth using even if "old" |
23:27:52 | FromDiscord | <Elegantbeef> Damn I'm included? |
23:28:19 | FromDiscord | <heysokam> why shouldn't? your code is gud 🙂 |
23:29:05 | FromDiscord | <Elegantbeef> I now need to add `code is gud - someone on discord` 😄 |
23:29:14 | FromDiscord | <Elegantbeef> In every single repo readme |
23:29:58 | FromDiscord | <heysokam> make it such that `git clone gud` should clone all of them 🙂 |
23:30:07 | FromDiscord | <heysokam> haha |
23:30:11 | FromDiscord | <Elegantbeef> Remember you can make git subcommands |
23:30:30 | FromDiscord | <Elegantbeef> `git gud` just pulls all my repos |
23:30:37 | FromDiscord | <heysokam> lol true |
23:30:53 | FromDiscord | <threefour> Sounds like vtable is my term, and traitor is beef's library? |
23:30:57 | FromDiscord | <Elegantbeef> Yes |
23:31:09 | FromDiscord | <threefour> Sweet. |
23:31:22 | FromDiscord | <Elegantbeef> Leo sorta lied cause it also ensures you implement procedures at compile time if you use `StaticTraitor[T]` |
23:31:51 | FromDiscord | <Elegantbeef> You get your choice of runtime, compile time, or both implementations of the 'interface' |
23:32:22 | FromDiscord | <threefour> Neat. I'll check it out. |
23:32:28 | FromDiscord | <leorize> maybe one day nim can do this \:p |
23:32:47 | FromDiscord | <Elegantbeef> Well Nimony has checked generics so it's got part of what one needs |
23:33:05 | FromDiscord | <Elegantbeef> Next is just taking a concept as a type parameter... oh wait this is why I used a tuple 😄 |
23:33:12 | FromDiscord | <heysokam> small nitpick, threefour,↵`decribe cow.asAnimal()` feels more natural language-wise |
23:33:28 | FromDiscord | <threefour> The URL on the project page has an expired domain btw |
23:33:32 | FromDiscord | <Elegantbeef> `Traitor[Concept]` will never be a valid type of a variable afaik |
23:33:41 | FromDiscord | <Elegantbeef> Oh right .ca it |
23:33:44 | FromDiscord | <Elegantbeef> I missed that one |
23:33:57 | FromDiscord | <leorize> first pr time? |
23:35:31 | FromDiscord | <Elegantbeef> Oh it was on the repo itself |
23:35:38 | FromDiscord | <threefour> In reply to @heysokam "small nitpick, threefour, `decribe": Yeah you're right. Luckily Nim lets me code ugly and it still works 😛 |
23:35:44 | FromDiscord | <Elegantbeef> I fixed the readme but forgot repos can have urls |
23:35:45 | FromDiscord | <Robyn [She/Her]> hey leorize, what's your thoughts on Nimony as a main contributor to Nimskull? Good changes but happened much later than it should've> |
23:35:50 | FromDiscord | <Robyn [She/Her]> (edit) "should've>" => "should've?" |
23:35:55 | FromDiscord | <threefour> In reply to @leorize "first pr time?": Don't think I can PR the project URL lol |
23:36:15 | FromDiscord | <leorize> as with all Araq's work, I'll believe it when it works↵(@Robyn [She/Her]) |
23:36:41 | FromDiscord | <Elegantbeef> Hey it's compiling stuff now 😛 |
23:36:52 | FromDiscord | <heysokam> very pragmatic |
23:37:06 | FromDiscord | <leorize> promising |
23:37:16 | FromDiscord | <Elegantbeef> Hey Araq promises the world, in fact I'm still waiting for view types in Nim 😛 |
23:37:58 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "as with all Araq's": Tbh fair |
23:39:27 | FromDiscord | <Elegantbeef> I will say it's nice to see at the very least openarray being implemented in usercode is nice |
23:40:16 | FromDiscord | <threefour> Is Nimony intended to be Nim 3.0? It says the focus is a "minimal" compiler, which makes me think it's only a subset. |
23:40:41 | FromDiscord | <threefour> Not that minimal is a bad goal. |
23:42:27 | FromDiscord | <leorize> fwiw I'm not that much of a main nimskull contributor anymore \:p |
23:42:28 | FromDiscord | <Elegantbeef> Minimal for early adopters then once it supersedes Nim replace it |
23:42:29 | FromDiscord | <leorize> haven't been really active in the scene due to life and such |
23:42:29 | FromDiscord | <Elegantbeef> It's supposed to be Nim3.0 afaict |
23:43:02 | FromDiscord | <Robyn [She/Her]> In reply to @threefour "Is Nimony intended to": I assume minimal means from the ground up, which also reduces the surface area for bugs to multiply bc Nim-lang/Nim has a looot of cruft |
23:43:33 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "haven't been really active": Ahh that's fair, I'm not even working and I'm alr starting to get so busy and the free time I do have, I don't wanna code 😭 |
23:43:44 | * | Ekho- is now known as Ekho |
23:44:27 | FromDiscord | <leorize> if you looked at my github heat map you'll know when my study terms started and ended lol |
23:46:05 | FromDiscord | <Robyn [She/Her]> from september activity has been low oof |
23:46:40 | FromDiscord | <Robyn [She/Her]> I'm all over the place but most of my commits is just me using Git to backup my work |
23:49:49 | FromDiscord | <threefour> In reply to @battery.acid.bubblegum "I assume minimal means": Yeah that makes sense |