<< 18-03-2025 >>

02:05:28*SchweinDeBurg quit (Quit: WeeChat 4.6.0-dev)
02:22:22FromDiscord<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:57FromDiscord<Elegantbeef> https://nim-lang.org/docs/os.html#getCreationTime%2Cstring
02:25:24FromDiscord<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:42FromDiscord<Elegantbeef> Well time to wrap `statx`
02:28:50FromDiscord<eightbit_dboy> In reply to @Elegantbeef "Well time to wrap": fuck
02:32:37*SchweinDeBurg joined #nim
02:38:16FromDiscord<eightbit_dboy> And I don't want to use `glibc`
02:38:22FromDiscord<eightbit_dboy> 😢
02:38:34FromDiscord<eightbit_dboy> guess I'll just use `getCreationTime` for now
02:40:15FromDiscord<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:48FromDiscord<eightbit_dboy> I guess like they have a base type which can be subtyped?
02:41:59FromDiscord<explosiveend> In reply to @eightbit_dboy "I guess like they": not sure i get what this means 😭
02:42:09FromDiscord<explosiveend> like an extended / child class or object
02:42:14FromDiscord<Elegantbeef> That makes no sense for what they are 😄
02:42:16FromDiscord<explosiveend> (edit) "object" => "object?"
02:42:42FromDiscord<Elegantbeef> `type-checked generics` means that the type is checked at declaration using concepts
02:42:49FromDiscord<eightbit_dboy> In reply to @explosiveend "like an extended /": I was thinking something like `myLinkedList[subtype]` or something.
02:53:58FromDiscord<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:21FromDiscord<Elegantbeef> Moreso ensuring the generic compiles for all possible types
02:55:21FromDiscord<explosiveend> ah i see
02:55:40FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=NZGiZZUr
02:55:43FromDiscord<explosiveend> currently there’s no guarantee that it will?
02:56:07FromDiscord<Elegantbeef> Correct plus you have to manually mixin
03:00:11FromDiscord<explosiveend> sent a code paste, see https://play.nim-lang.org/#pasty=myUgaBQJ
03:00:41FromDiscord<explosiveend> or is it like explicitly stating that the foo(int) proc will return Self (T)?
03:03:43FromDiscord<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:51FromDiscord<explosiveend> In reply to @demotomohiro "The foo proc specified": oh, so it’s like an interface?
03:05:12FromDiscord<explosiveend> (edit) "like" => "similar to"
03:06:27FromDiscord<Elegantbeef> Compile time yes
03:08:38FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=CmKxhkWE
03:10:10tokyovigilanteIs 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:26FromDiscord<Elegantbeef> delay imports
03:11:31FromDiscord<Elegantbeef> https://github.com/beef331/nimtrest/wiki/Code-snippets#delayed-imports
03:11:57tokyovigilanteoh yup, also found https://forum.nim-lang.org/t/10438
03:12:09tokyovigilanteI 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:59FromDiscord<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:10FromDiscord<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:44FromDiscord<user2m> sent a long message, see https://pasty.ee/kdPeyLqe
16:10:32FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#pasty=YlAKbpGK
16:14:31FromDiscord<threefour> Do we have some form of tagged unions? I've come to appreciate those in Zig.
16:16:57FromDiscord<Robyn [She/Her]> In reply to @threefour "Do we have some": do object variants serve as a replacement?
16:20:48FromDiscord<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:36FromDiscord<Robyn [She/Her]> epic, no problem :)
16:26:47*ntat joined #nim
18:07:12*ntat quit (Quit: leaving)
18:09:52FromDiscord<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:19FromDiscord<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:25FromDiscord<pmunch> Or even on issue
18:13:31FromDiscord<mr.hemlock> Fair
18:13:47FromDiscord<pmunch> Did you try nimlsp as well, or only nimlangserver?
18:14:05FromDiscord<mr.hemlock> On the latter since that's the one from the nim-lang org
18:14:12FromDiscord<mr.hemlock> (edit) "On the latter since that's the one from the nim-lang ... org" added "Github"
18:14:38FromDiscord<mr.hemlock> And I just now realize that you're the maintainer for nimlsp
18:14:45FromDiscord<mr.hemlock> I'll give it a shot
18:15:32FromDiscord<mr.hemlock> (edit) "realize" => "realized"
18:17:14*ntat joined #nim
18:17:45FromDiscord<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:18FromDiscord<mr.hemlock> Gotcha. Neat
18:25:58FromDiscord<mr.hemlock> Muuuuuuuuch better. You're awesome
18:27:31FromDiscord<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:54FromDiscord<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:57FromDiscord<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:08FromDiscord<threefour> sent a code paste, see https://play.nim-lang.org/#pasty=QAVUYqOG
23:25:31FromDiscord<leorize> it's called vtable
23:25:32*rez joined #nim
23:25:51FromDiscord<leorize> beef wrote a thing to automate it
23:25:56FromDiscord<Elegantbeef> Wait discard in an object body is valid?!
23:25:58FromDiscord<leorize> std/streams is an implementation of one
23:26:03FromDiscord<leorize> yea
23:26:12FromDiscord<Elegantbeef> What a silly language
23:26:27FromDiscord<threefour> > Wait discard in an object body is valid?!↵It's an ugly example but it gets the point across lol
23:26:33FromDiscord<Elegantbeef> Yea traitor is pretty rad
23:26:44FromDiscord<Elegantbeef> Hey you don't need the discard
23:27:35FromDiscord<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:52FromDiscord<Elegantbeef> Damn I'm included?
23:28:19FromDiscord<heysokam> why shouldn't? your code is gud 🙂
23:29:05FromDiscord<Elegantbeef> I now need to add `code is gud - someone on discord` 😄
23:29:14FromDiscord<Elegantbeef> In every single repo readme
23:29:58FromDiscord<heysokam> make it such that `git clone gud` should clone all of them 🙂
23:30:07FromDiscord<heysokam> haha
23:30:11FromDiscord<Elegantbeef> Remember you can make git subcommands
23:30:30FromDiscord<Elegantbeef> `git gud` just pulls all my repos
23:30:37FromDiscord<heysokam> lol true
23:30:53FromDiscord<threefour> Sounds like vtable is my term, and traitor is beef's library?
23:30:57FromDiscord<Elegantbeef> Yes
23:31:09FromDiscord<threefour> Sweet.
23:31:22FromDiscord<Elegantbeef> Leo sorta lied cause it also ensures you implement procedures at compile time if you use `StaticTraitor[T]`
23:31:51FromDiscord<Elegantbeef> You get your choice of runtime, compile time, or both implementations of the 'interface'
23:32:22FromDiscord<threefour> Neat. I'll check it out.
23:32:28FromDiscord<leorize> maybe one day nim can do this \:p
23:32:47FromDiscord<Elegantbeef> Well Nimony has checked generics so it's got part of what one needs
23:33:05FromDiscord<Elegantbeef> Next is just taking a concept as a type parameter... oh wait this is why I used a tuple 😄
23:33:12FromDiscord<heysokam> small nitpick, threefour,↵`decribe cow.asAnimal()` feels more natural language-wise
23:33:28FromDiscord<threefour> The URL on the project page has an expired domain btw
23:33:32FromDiscord<Elegantbeef> `Traitor[Concept]` will never be a valid type of a variable afaik
23:33:41FromDiscord<Elegantbeef> Oh right .ca it
23:33:44FromDiscord<Elegantbeef> I missed that one
23:33:57FromDiscord<leorize> first pr time?
23:35:31FromDiscord<Elegantbeef> Oh it was on the repo itself
23:35:38FromDiscord<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:44FromDiscord<Elegantbeef> I fixed the readme but forgot repos can have urls
23:35:45FromDiscord<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:50FromDiscord<Robyn [She/Her]> (edit) "should've>" => "should've?"
23:35:55FromDiscord<threefour> In reply to @leorize "first pr time?": Don't think I can PR the project URL lol
23:36:15FromDiscord<leorize> as with all Araq's work, I'll believe it when it works↵(@Robyn [She/Her])
23:36:41FromDiscord<Elegantbeef> Hey it's compiling stuff now 😛
23:36:52FromDiscord<heysokam> very pragmatic
23:37:06FromDiscord<leorize> promising
23:37:16FromDiscord<Elegantbeef> Hey Araq promises the world, in fact I'm still waiting for view types in Nim 😛
23:37:58FromDiscord<Robyn [She/Her]> In reply to @leorize "as with all Araq's": Tbh fair
23:39:27FromDiscord<Elegantbeef> I will say it's nice to see at the very least openarray being implemented in usercode is nice
23:40:16FromDiscord<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:41FromDiscord<threefour> Not that minimal is a bad goal.
23:42:27FromDiscord<leorize> fwiw I'm not that much of a main nimskull contributor anymore \:p
23:42:28FromDiscord<Elegantbeef> Minimal for early adopters then once it supersedes Nim replace it
23:42:29FromDiscord<leorize> haven't been really active in the scene due to life and such
23:42:29FromDiscord<Elegantbeef> It's supposed to be Nim3.0 afaict
23:43:02FromDiscord<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:33FromDiscord<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:27FromDiscord<leorize> if you looked at my github heat map you'll know when my study terms started and ended lol
23:46:05FromDiscord<Robyn [She/Her]> from september activity has been low oof
23:46:40FromDiscord<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:49FromDiscord<threefour> In reply to @battery.acid.bubblegum "I assume minimal means": Yeah that makes sense