Movatterモバイル変換


[0]ホーム

URL:


<< 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, seehttps://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, seehttps://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, seehttps://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 foundhttps://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]

[8]ページ先頭

©2009-2025 Movatter.jp