<< 09-05-2025 >>

02:39:59*fedorafan quit (Ping timeout: 244 seconds)
03:01:23*fedorafan joined #nim
03:31:50*rockcavera quit (Remote host closed the connection)
03:38:22*_________ quit (Ping timeout: 252 seconds)
03:45:57*fedorafan quit (Read error: Connection reset by peer)
03:46:13*fedorafan joined #nim
04:04:19*_________ joined #nim
04:11:17*skippy8 joined #nim
04:18:29*Jjp137_ quit (Ping timeout: 248 seconds)
04:18:47*Jjp137_ joined #nim
05:16:14*fedorafan_ joined #nim
05:16:52*fedorafan quit (Read error: Connection reset by peer)
05:19:30*ntat joined #nim
06:27:36*nils` quit (Ping timeout: 272 seconds)
06:34:58*fedorafan joined #nim
06:35:45*fedorafan quit (Remote host closed the connection)
06:51:58*ntat quit (Quit: leaving)
07:32:27FromDiscord<Phil> In reply to @aintea "yes I know I'll": Could aaaaaaaalso make an http server as a drop-in replacement for httpx 😄 ?
07:53:37*ntat joined #nim
08:08:08FromDiscord<aintea> I don't understand the question
08:08:17FromDiscord<aintea> At least I'm not sure to
08:13:21*ntat quit (Read error: Connection reset by peer)
08:17:58*redj quit (Quit: No Ping reply in 180 seconds.)
08:18:02*beholders_eye joined #nim
08:19:31*redj joined #nim
08:37:39FromDiscord<Phil> In reply to @aintea "At least I'm not": If you're building a micro webframework, the absolute minimalistic version of that is typically to have an http server and provide syntax to route HTTP requests to specific functions that get called.↵↵I was making a joke that you could write another http server while you're at it as well since httpx has a few issues ^^
08:38:07FromDiscord<Phil> (edit) "In reply to @aintea "At least I'm not": If you're building a micro webframework, the absolute minimalistic version of that is typically to have an http server and provide syntax to route HTTP requests to specific functions that get called.↵↵I was making a joke that you could write another http server while you're at it as well since httpx ... has" added "(the one I use in prologue)"
08:38:54FromDiscord<aintea> Oh yeah I was going to make that, but I'm not sure I can compete with httpx lmao
08:39:21FromDiscord<aintea> + I have other projects on the side like making the same in C
08:44:01FromDiscord<System64 ~ Flandre Scarlet> In reply to @kapendev "`discard` is slop. Boooom!!!!1!1!1!!": AI is slop
08:53:32*ntat joined #nim
09:21:46FromDiscord<0xfab_10> does chronos have special stuff for async io and stuff like that?
09:22:43FromDiscord<0xfab_10> is it singlecore async or multicore?
09:27:19*ntat quit (Quit: leaving)
09:36:09*andy-turner joined #nim
09:45:33*fedorafan_ quit (Read error: Connection reset by peer)
09:45:50*fedorafan joined #nim
09:59:31FromDiscord<griffith1deadly> In reply to @fabric.input_output "is it singlecore async": single
09:59:50FromDiscord<griffith1deadly> nim don't has at this moment multicore async
09:59:59FromDiscord<griffith1deadly> in any way
10:00:08FromDiscord<griffith1deadly> cps can be used for multicore
10:00:16FromDiscord<griffith1deadly> but it is more nimskull
10:04:12FromDiscord<0xfab_10> hm I wanna implement a multicore async runtime
10:28:33*beholders_eye quit (Ping timeout: 248 seconds)
11:57:50*nils` joined #nim
12:40:59*skippy8 quit (Quit: WeeChat 4.5.2)
12:51:48FromDiscord<moogly> In reply to @isofruit "Could aaaaaaaalso make an": Or will we finally have our version of WSGI
12:51:57FromDiscord<moogly> And ASGI
12:52:06FromDiscord<moogly> but for Nim
12:53:11FromDiscord<moogly> Python had an issue where web frameworks would come and go, you would invest your time and code into one only to have it become deprecated. With WSGI as long as you just target the spec you could swap out frameworks with much more ease
15:51:09FromDiscord<Robyn [She/Her]> In reply to @fabric.input_output "hm I wanna implement": could look at yasync?
15:51:51FromDiscord<Robyn [She/Her]> nvm i don't think it supports threads
15:55:41FromDiscord<leorize> httpleast have one
16:28:35FromDiscord<Robyn [She/Her]> doesn't httpleast use cps?
16:29:43FromDiscord<leorize> it does, but cps isn't the one implementing a multicore runtime
16:30:12FromDiscord<leorize> speaking of that disruptek/insideout is an another multicore runtime
16:30:25*ntat joined #nim
16:30:34FromDiscord<leorize> https://github.com/disruptek/insideout
16:31:53FromDiscord<Robyn [She/Her]> gotcha
16:52:18*ntat quit (Quit: leaving)
16:54:27*fedorafan quit (Ping timeout: 252 seconds)
17:01:07*fedorafan joined #nim
17:42:30*ntat joined #nim
18:23:32*ntat quit (Quit: leaving)
19:40:25*skippy8 joined #nim
21:26:42*andy-turner quit (Quit: Leaving)
21:35:08*skippy8 quit (Quit: WeeChat 4.5.2)
22:42:02*fedorafan quit (Quit: Leaving)
23:10:17FromDiscord<0xfab_10> how does nimskull handle default generic generic type parameter in functions?
23:11:22FromDiscord<Elegantbeef> I don't think either compiler has any spec on default generic parameters↵(@0xfab_10)
23:13:32FromDiscord<0xfab_10> I really want that generic allocator parameter with a default
23:14:16FromDiscord<Elegantbeef> Some of the skull folks seemed unapposed to an implicit context like Odin but that requires work so don't hold your breath
23:15:25FromDiscord<0xfab_10> I just want a working `[T; A: Allocator[T] = GlobalAllocator[T]]` type thing
23:15:29FromDiscord<0xfab_10> 😭
23:16:24FromDiscord<Elegantbeef> Doesn't that work?
23:16:43FromDiscord<0xfab_10> I don't think it did last time I tried
23:20:57FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=qoOTiEzO
23:21:33FromDiscord<0xfab_10> https://play.nim-lang.org/#pasty=AfHhDjbJ
23:21:44FromDiscord<Elegantbeef> It of course doesn't work with `seq` or `ref` but would let you build any of your own types like Odin/Zig
23:22:07FromDiscord<0xfab_10> I don't want the dynamic dispatch
23:22:14FromDiscord<0xfab_10> that's why generics
23:22:20FromDiscord<Elegantbeef> There is no dynamic dispatch
23:22:27FromDiscord<Elegantbeef> notice `static Allocator`
23:22:54FromDiscord<Elegantbeef> This is what you're after afaict
23:23:51FromDiscord<0xfab_10> how do you attach it to objects
23:24:10FromDiscord<0xfab_10> In reply to @fabric.input_output "https://play.nim-lang.org/#pasty=AfHhDjbJ": this works if I remove the concept restriction
23:24:15FromDiscord<Elegantbeef> `T: static Allocator`
23:24:32FromDiscord<0xfab_10> wait what
23:24:34FromDiscord<0xfab_10> wtf
23:24:39FromDiscord<0xfab_10> 🤯
23:24:54FromDiscord<Elegantbeef> https://github.com/beef331/nimtrest/blob/master/remoterefs.nim I did something eons ago that uses static parameters to statically bind allocators to data
23:25:12FromDiscord<Elegantbeef> https://github.com/beef331/nimtrest/blob/master/tremoterefs.nim usage of it is here
23:26:15FromDiscord<0xfab_10> feels hacky
23:26:43FromDiscord<Elegantbeef> I don't see how
23:26:50FromDiscord<Elegantbeef> You're tagging the type with their alloc and free procedures
23:27:03FromDiscord<Elegantbeef> The only hacky part is the usage of dot operators
23:27:24FromDiscord<Elegantbeef> Well I should say in a properly compiled language it's not hacky, but given that Nim static generics are a joke it might be
23:27:32FromDiscord<0xfab_10> and how does this pass runtime data that the allocator might need for context?
23:28:11FromDiscord<0xfab_10> cuz that's why I pass the parameter in my example
23:28:20FromDiscord<Elegantbeef> It doesn't
23:28:21FromDiscord<0xfab_10> value param, not generic
23:28:33FromDiscord<Elegantbeef> So you have runtime dispatch
23:28:50FromDiscord<Elegantbeef> Just pass a context around like Odin it's easy and it works
23:29:15FromDiscord<Elegantbeef> Data allocator should store the allocator it was allocated with so it can always free properly, and you're done
23:29:16FromDiscord<0xfab_10> dispatch can be whatever but I don't want it to be forced into dynamic. by context I mean just some data the allocator functions might use
23:30:40FromDiscord<Elegantbeef> https://github.com/odin-lang/Odin/blob/master/base/runtime/core.odin#L380 worth a gander
23:32:15FromDiscord<0xfab_10> nope not what I'm looking for
23:32:53FromDiscord<0xfab_10> wait how come it's false? https://play.nim-lang.org/#pasty=XLtJokwG
23:34:16FromDiscord<Elegantbeef> Cause new style concepts are silly
23:34:27FromDiscord<0xfab_10> ??
23:34:40FromDiscord<Elegantbeef> I've never have them work
23:34:46FromDiscord<0xfab_10> bruh
23:34:56FromDiscord<0xfab_10> do the old ones still work?
23:35:12FromDiscord<Elegantbeef> Yes
23:35:29FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=eiyIpZwz
23:35:55FromDiscord<Elegantbeef> I do not see how this is any different to Odin if you're passing an instance around
23:36:10FromDiscord<Elegantbeef> You can inline your allocations, yay
23:36:23FromDiscord<0xfab_10> the instance can be empty
23:36:33FromDiscord<0xfab_10> I'm trying to have a generic thing here
23:36:47FromDiscord<0xfab_10> god dammit what is wrong with new concepts
23:37:03FromDiscord<Elegantbeef> They're not used and are abandoned
23:37:10FromDiscord<0xfab_10> really?
23:37:15FromDiscord<Elegantbeef> Wait until nimony and you might have them usable who knows
23:37:30FromDiscord<0xfab_10> does nimskull have them?
23:37:35FromDiscord<Elegantbeef> I mean it's Nim if there is a feature that isn't used often it's likely cause it was half implemented then abandoned
23:38:08FromDiscord<Elegantbeef> I do not know, possibly not since it was a fork from 1.6, but there are plans for a 'signature' solution which behaves like traits
23:38:32FromDiscord<0xfab_10> 🙏
23:38:40FromDiscord<0xfab_10> love me traits
23:39:12FromDiscord<Elegantbeef> Same, pull traitor in just to make a trait for that allocator and nothing else 😄
23:39:33FromDiscord<0xfab_10> hm how static is it
23:39:45FromDiscord<Elegantbeef> It has a fully static `StaticTraitor[T]`
23:40:40FromDiscord<Elegantbeef> But it doesn't get you much more than your above concept except possibly more helpful errors
23:41:25FromDiscord<0xfab_10> as long as I can have static dispatch and defaults
23:42:18FromDiscord<0xfab_10> thanks