<< 11-05-2026 >>

00:11:48*Mister_Magister quit (Quit: bye)
00:14:22*Mister_Magister joined #nim
02:06:02*xutaxkamay quit (Quit: ZNC 1.9.1+deb2+b3 - https://znc.in)
02:09:04FromDiscord<[Next-System] systemblue> In reply to @_timurski "Native JVM programs are": really?
02:09:06FromDiscord<[Next-System] systemblue> why?:
02:09:58FromDiscord<[Next-System] systemblue> Does Native JVM not compile before distribution?(like Dart)
02:10:05FromDiscord<[Next-System] systemblue> (edit) "distribution?(like" => "distribution?(unlike"
02:10:22FromDiscord<mr_rowboto> you mean Graal?
02:10:26FromDiscord<[Next-System] systemblue> I thought they do compilation in distribute time
02:10:32FromDiscord<[Next-System] systemblue> yeah yeah Graal
02:10:35FromDiscord<mr_rowboto> Graal is one thing, native is another thing, and JVM is another thing.
02:10:46FromDiscord<[Next-System] systemblue> I don't know much about JVM
02:10:50FromDiscord<mr_rowboto> kotlin-native, scala-native, are not graal
02:10:53FromDiscord<[Next-System] systemblue> please teach me some
02:11:28FromDiscord<[Next-System] systemblue> I heard that Graal supports AOT compilation so it's performance is closed to Go
02:11:31FromDiscord<mr_rowboto> the -native part in those langs is basically that they use an LLVM-based backend
02:11:48FromDiscord<mr_rowboto> so basically, all JVM optis fall short
02:11:55FromDiscord<mr_rowboto> (edit) "short" => "short, they're just not there"
02:11:55FromDiscord<[Next-System] systemblue> and it have to be faster than on JVM
02:12:01FromDiscord<mr_rowboto> it is not
02:12:18FromDiscord<mr_rowboto> (edit)
02:12:59FromDiscord<[Next-System] systemblue> so how does Scala Native, Kotlin Native works?
02:13:02FromDiscord<mr_rowboto> In reply to @mr_rowboto "What's funnier is that": ^
02:13:11FromDiscord<mr_rowboto> In reply to @bluewhale_unkown_x "so how does Scala": llvm-based backend
02:13:27FromDiscord<mr_rowboto> and probably missing a lot of libraries that make "native" behave well
02:13:31FromDiscord<mr_rowboto> SIMD is just one example
02:14:14FromDiscord<mr_rowboto> another could be how they individually implement their own wonky RTTI, their own wonky GC, etc.
02:14:29FromDiscord<mr_rowboto> so they're _native_ in the sense that they can compile against C
02:14:42FromDiscord<mr_rowboto> but they're not free from those language's original design choices
02:14:46FromDiscord<[Next-System] systemblue> um... SIMD and other libraries are missing so it makes difference of performance right?
02:14:51FromDiscord<mr_rowboto> Scala supports A LOT of generic features
02:14:53FromDiscord<_timurski> In reply to @bluewhale_unkown_x "so how does Scala": their compilers are just not as good
02:14:57FromDiscord<mr_rowboto> that forces you to have a giant runtime
02:15:06FromDiscord<_timurski> In reply to @_timurski "their compilers are just": and JIT can do certain things that AOT can't do
02:15:16FromDiscord<mr_rowboto> and if you have a compiler that has to support that for a single language on an odd target
02:15:22FromDiscord<[Next-System] systemblue> In reply to @mr_rowboto "Scala supports A LOT": does generic have runtime?
02:15:28FromDiscord<mr_rowboto> what ixume says happens: the compilers are not as good
02:15:33FromDiscord<mr_rowboto> In reply to @bluewhale_unkown_x "does generic have runtime?": of course
02:15:37FromDiscord<[Next-System] systemblue> why?
02:15:41FromDiscord<mr_rowboto> why not?
02:15:41FromDiscord<[Next-System] systemblue> Nim generic has no runtime
02:15:56FromDiscord<mr_rowboto> well C#, and Java, and Kotlin, and Scala does
02:16:08FromDiscord<[Next-System] systemblue> it only exists in comptime
02:16:08FromDiscord<mr_rowboto> (java and kotlin not so much tbh, but they "kind of do")
02:16:20FromDiscord<_timurski> In reply to @bluewhale_unkown_x "does generic have runtime?": generics have runtime cost, as i believe the native compilers don't generate polymorphic functions for every generic
02:16:25FromDiscord<_timurski> In reply to @bluewhale_unkown_x "it only exists in": this is not the case for JVM
02:16:30FromDiscord<_timurski> in fact it's designed not to be the case
02:16:30FromDiscord<mr_rowboto> comptime generics have limitations with runtime introspection
02:16:36FromDiscord<mr_rowboto> and all those languages
02:16:40FromDiscord<mr_rowboto> have runtime introspection
02:16:49FromDiscord<_timurski> JVM authors specifically didn't want generics to be compile time because it sacrifices flexibility
02:16:49FromDiscord<mr_rowboto> nim solves that by not having runtime introspection
02:16:51FromDiscord<mr_rowboto> which is actually elegant
02:17:25FromDiscord<[Next-System] systemblue> and is there any situation that type would change in runtime?
02:17:31FromDiscord<mr_rowboto> but the impediment of course is that nim will never be fit for runtime self-modifying applications
02:17:37FromDiscord<_timurski> In reply to @_timurski "JVM authors specifically didn't": but JIT can generate machine code for hotly used generics when necessary
02:17:42FromDiscord<mr_rowboto> (AKA: big things with plugins)
02:17:51FromDiscord<_timurski> In reply to @bluewhale_unkown_x "and is there any": you cannot know all possible types the function will be used at compile time
02:17:52FromDiscord<mr_rowboto> In reply to @bluewhale_unkown_x "and is there any": infinite
02:17:57FromDiscord<mr_rowboto> plugins
02:18:09FromDiscord<_timurski> In reply to @_timurski "you cannot know all": because you cannot know what other code will run alongside your function
02:18:22FromDiscord<mr_rowboto> runtime introspection vs comptime introspection is just a design choice, and both apply for their use cases
02:18:50FromDiscord<_timurski> JIT can simply do more when it knows how the code is actually being used
02:18:52FromDiscord<mr_rowboto> comptime intro is fast as hell↵runtime intro can be absolutely polymorphic
02:18:57FromDiscord<_timurski> (edit) "when" => "than AOT bcs"
02:19:25FromDiscord<_timurski> i would imagine some of the native compiled things have ways for you to specify to generate polymorphic code at comptime tbh
02:19:30FromDiscord<[Next-System] systemblue> In reply to @_timurski "you cannot know all": but every types are determinate in comptime
02:19:32FromDiscord<_timurski> that seems like a feature people would want
02:19:35FromDiscord<_timurski> In reply to @bluewhale_unkown_x "but every types are": they're not
02:19:38FromDiscord<_timurski> this is not true for java
02:19:40FromDiscord<mr_rowboto> In reply to @bluewhale_unkown_x "but every types are": not always
02:19:45FromDiscord<[Next-System] systemblue> really??
02:19:47FromDiscord<mr_rowboto> have you never installed a plugin?
02:19:53FromDiscord<[Next-System] systemblue> plugin?
02:19:56FromDiscord<mr_rowboto> plugins come with arbitrary code
02:19:57FromDiscord<mr_rowboto> yeah
02:19:58FromDiscord<mr_rowboto> like
02:20:04FromDiscord<mr_rowboto> arbitrary extensions of a software
02:20:18FromDiscord<_timurski> you can put many compiled jar's together and update them individually in one runtime
02:20:29FromDiscord<mr_rowboto> With comptime introspection, you're just limited to C abi: structs and functions.
02:20:32FromDiscord<_timurski> and so you cannot possibly know all the types at compile time
02:20:38FromDiscord<mr_rowboto> With runtime introspection you can load anything.
02:20:48FromDiscord<[Next-System] systemblue> but most time when software makes plugin, they can't "change" code in runtime(OS doesn't allow)↵↵so they bypass it by linking(dynamic linking) and pointer
02:20:57FromDiscord<_timurski> java specifically allows that
02:20:59FromDiscord<mr_rowboto> In reply to @bluewhale_unkown_x "but most time when": OS != VM
02:21:00FromDiscord<_timurski> that's like the whole point of java
02:21:09FromDiscord<mr_rowboto> yep
02:21:11FromDiscord<mr_rowboto> and .NET
02:21:15FromDiscord<_timurski> (edit) "java specifically allows that ... " added "(dynamic code loading)"
02:21:19FromDiscord<_timurski> (edit) "that's like ... the" added "(one of)"
02:21:23FromDiscord<_timurski> java is an interpreted language
02:21:37FromDiscord<[Next-System] systemblue> that's why minecraft can have mod in runtime? right?
02:21:38FromDiscord<mr_rowboto> In reply to @_timurski "java is an interpreted": KIND OF... C'MON hhahaa
02:21:44FromDiscord<mr_rowboto> In reply to @bluewhale_unkown_x "that's why minecraft can": exactly
02:21:44FromDiscord<_timurski> the same way you can create more types at runtime in python you can do in java
02:21:50FromDiscord<mr_rowboto> and you don't have to recompile the whole thing
02:22:01FromDiscord<_timurski> In reply to @mr_rowboto "KIND OF... C'MON hhahaa": in the sense that dynamic code loading is easy
02:22:03FromDiscord<[Next-System] systemblue> and it will be very unsafe for securiuty
02:22:11FromDiscord<_timurski> well not really
02:22:12FromDiscord<mr_rowboto> In reply to @_timurski "in the sense that": i'd say it's a language that runs on a VM
02:22:14FromDiscord<mr_rowboto> but not interpreted
02:22:18FromDiscord<_timurski> ykwim
02:22:24FromDiscord<_timurski> In reply to @mr_rowboto "but not interpreted": well bytecode is literally interpreted
02:22:28FromDiscord<mr_rowboto> In reply to @_timurski "ykwim": yeye but maybe blu doesn't
02:22:37FromDiscord<[Next-System] systemblue> Java was interpreted language(when they starts) but turn to JIT mostly now
02:22:38FromDiscord<mr_rowboto> In reply to @_timurski "well bytecode is literally": they don't run the bytecode itself
02:22:45FromDiscord<_timurski> they do when it's unoptimized
02:22:45FromDiscord<mr_rowboto> bytecode is mashed into target
02:22:54FromDiscord<_timurski> oh are you talking about Native
02:22:58FromDiscord<mr_rowboto> nono
02:22:58FromDiscord<mr_rowboto> JVM
02:23:07FromDiscord<mr_rowboto> jVM is a brutally optimized piece of wokr
02:23:09FromDiscord<mr_rowboto> (edit) "wokr" => "work"
02:23:11FromDiscord<mr_rowboto> (edit) "jVM" => "JVM"
02:23:13FromDiscord<mr_rowboto> it's disgusting
02:23:13FromDiscord<_timurski> JVM doesn't immediately optimize bytecode to machine code if it's not run much
02:23:15FromDiscord<_timurski> is what i'm saying
02:23:19FromDiscord<mr_rowboto> oh sure
02:23:31FromDiscord<mr_rowboto> hot paths
02:23:50FromDiscord<_timurski> In reply to @bluewhale_unkown_x "and it will be": well the people who create the software control what other code is loaded
02:24:02FromDiscord<_timurski> and people do not really every allow users to do that
02:24:04FromDiscord<mr_rowboto> In reply to @bluewhale_unkown_x "and it will be": it's not as bad as you think
02:24:14FromDiscord<mr_rowboto> they're still running on top of an OS limiting memory addressing
02:24:32FromDiscord<mr_rowboto> like, anything running arbitrary code is _dangerous_ like...
02:24:34FromDiscord<mr_rowboto> your browser
02:24:54FromDiscord<_timurski> In reply to @_timurski "and people do not": but for example how interpreters for other languages work in java (at least the good ones) is they compile the code into JVM bytecode, so you could write java code that takes in code from the user, and compiles it into bytecode and executes it at runtime
02:25:00FromDiscord<mr_rowboto> security has nothing to do with mem safety or running code in the end
02:25:23FromDiscord<_timurski> In reply to @_timurski "but for example how": but this is a problem (to a lesser or greater degree) in any language with scripting or whatever
02:25:35FromDiscord<_timurski> in the sense that you can't always trust the user
02:26:27*rockcavera quit (Remote host closed the connection)
02:26:40FromDiscord<mr_rowboto> the JVM has it's good deal of restrictions on that end
02:26:53FromDiscord<mr_rowboto> 30+ years of history hardens things
02:31:14FromDiscord<mr_rowboto> One of the things that made me choose nim over the JVM is that the comptime introspection and generics work perfectly, and make the thing go blazing.↵↵The sacrifice was having a plugin architecture, but in the end it payed off.
02:31:50FromDiscord<mr_rowboto> (edit) "blazing.↵↵The" => "blazing fast.↵↵The"
02:32:00FromDiscord<mr_rowboto> (edit) "One of the things that made me choose nim over the JVM is that the comptime introspection and generics work perfectly, and make the thing go blazing fast.↵↵The sacrifice was ... having" added "not"
02:32:05FromDiscord<mr_rowboto> (edit) "One of the things that made me choose nim over the JVM is that the comptime introspection and generics work perfectly, and make the thing go blazing fast.↵↵The sacrifice was not having a ... plugin" added "runtime"
02:33:11FromDiscord<[Next-System] systemblue> sent a code paste, see https://play.nim-lang.org/#pasty=ZwBxRlKr
02:33:22FromDiscord<mr_rowboto> yah
02:33:25FromDiscord<mr_rowboto> totally
02:33:26FromDiscord<[Next-System] systemblue> lol
02:33:32FromDiscord<[Next-System] systemblue> very dangerous way
02:33:35FromDiscord<[Next-System] systemblue> but powerful
02:33:42FromDiscord<mr_rowboto> you wouldn't know the types in runtime tho
02:33:45FromDiscord<mr_rowboto> it's just opaque
02:33:54FromDiscord<mr_rowboto> but at that point you're just re-creating interfaces
02:33:57FromDiscord<[Next-System] systemblue> nono TypeList is runtime value
02:33:58FromDiscord<[Next-System] systemblue> so
02:34:02FromDiscord<mr_rowboto> so use interfaces or whatever they're called here
02:34:05FromDiscord<[Next-System] systemblue> you can know types in runtime
02:34:13FromDiscord<mr_rowboto> oh I see
02:34:31FromDiscord<[Next-System] systemblue> but this is very dangerous so don't use
02:34:39FromDiscord<mr_rowboto> hahaha
02:34:44FromDiscord<mr_rowboto> I come from the C minefields
02:34:50FromDiscord<mr_rowboto> don't tell me what to use 🤣
02:36:37FromDiscord<[Next-System] systemblue> and see my fancy zero-cost slicearray type↵↵this slicearray is viewtype(like openArray) and only use in input parameter https://media.discordapp.net/attachments/371759389889003532/1503224278274015283/message.txt?ex=6a029234&is=6a0140b4&hm=83ef0edb612fd0569cc4463e431d091b532c02059eee934a68fcc1503dbce619&
02:37:00FromDiscord<[Next-System] systemblue> and there's autoopt↵and it's my macro(unroll)(
02:37:46FromDiscord<[Next-System] systemblue> sent a code paste, see https://play.nim-lang.org/#pasty=IGWRbFQP
02:37:53FromDiscord<[Next-System] systemblue> and here's unroll and check code
02:38:47FromDiscord<mr_rowboto> nice! finally Araq can rest and not be nagged with slicearray by the slice fans 😂
02:38:54FromDiscord<[Next-System] systemblue> sent a code paste, see https://play.nim-lang.org/#pasty=HukbsGFZ
02:38:54FromDiscord<[Next-System] systemblue> this?
02:39:05FromDiscord<[Next-System] systemblue> In reply to @mr_rowboto "nice! finally Araq can": lol
02:39:20FromDiscord<[Next-System] systemblue> araq deny it
02:39:21FromDiscord<[Next-System] systemblue> and I made it
02:39:22FromDiscord<mr_rowboto> In reply to @bluewhale_unkown_x "do you know there's": honestly no, is there one?
02:39:28FromDiscord<mr_rowboto> In reply to @bluewhale_unkown_x "and I made it": probably a good thing to do
02:39:44FromDiscord<[Next-System] systemblue> In reply to @mr_rowboto "honestly no, is there": no there's difference I check it with test
02:40:04FromDiscord<mr_rowboto> oh maybe all the object semantics?
02:40:08FromDiscord<mr_rowboto> refcounting and so on
02:40:21FromDiscord<[Next-System] systemblue> I think there might be difference because object creating cost
02:40:22FromDiscord<[Next-System] systemblue> or
02:40:23FromDiscord<mr_rowboto> yeah definitely
02:40:27FromDiscord<[Next-System] systemblue> object copying cost
02:40:31FromDiscord<mr_rowboto> it's refcounting
02:40:38FromDiscord<mr_rowboto> objects have to report to the GC
02:40:46FromDiscord<mr_rowboto> don't they?
02:40:58FromDiscord<[Next-System] systemblue> nono
02:40:59FromDiscord<mr_rowboto> or am I being stupid because it's a value object <:frog_think:1112825121380511745>
02:41:01FromDiscord<[Next-System] systemblue> little difference
02:41:22FromDiscord<[Next-System] systemblue> but it's true that object needs more cost than distinct pointer
02:42:34FromDiscord<[Next-System] systemblue> Nim's ORC is determined system ↵but it needs reference counting to object to collect ref cycle
02:42:57FromDiscord<[Next-System] systemblue> In reply to @mr_rowboto "or am I being": um... yes... it's value object
02:43:23FromDiscord<mr_rowboto> yep
02:44:18FromDiscord<[Next-System] systemblue> and I don't know nim's ORC watches value object too↵↵↵I think main reason is object copy/reference(when register accesses memory, it might need double reference when it's object when it's not optimised)
02:44:19FromDiscord<[Next-System] systemblue> cost
02:50:53FromDiscord<[Next-System] systemblue> sent a long message, see https://pasty.ee/pFEdVLDG
03:02:56FromDiscord<[Next-System] systemblue> sent a code paste, see https://play.nim-lang.org/#pasty=FcqVtUoD
03:10:26FromDiscord<mr_rowboto> I am not a rust lover. Idk how you managed to interpret that 😂
03:10:34FromDiscord<mr_rowboto> I literally hate the guts out of that language.
03:11:20FromDiscord<mr_rowboto> _if anything, you are the rust lover that want to add a slice type to nim lol_
03:11:29FromDiscord<mr_rowboto> (edit) "want" => "wants" | "lol_" => "lol 😂 _"
03:12:32FromDiscord<mr_rowboto> In reply to @bluewhale_unkown_x "<@176460389662457856> you": hehehe, yah, an Error monad. I always come and go with these things.↵Sometimes I like their semantics, sometimes I'm just "I'm just reinventing exceptions"
03:12:39FromDiscord<mr_rowboto> (edit) "In reply to @bluewhale_unkown_x "<@176460389662457856> you": hehehe, yah, an Error monad. I always come and go with these things.↵Sometimes I like their semantics, sometimes I'm just "I'm just reinventing ... exceptions"" added "type-checked"
03:14:08FromDiscord<mr_rowboto> (edit) "I'm" => "I" | "Ijust ... "I'm" added "thikn" | removed "just"
03:14:13FromDiscord<mr_rowboto> (edit) "thikn" => "think"
04:29:13*xutaxkamay joined #nim
06:20:00*oculux joined #nim
06:23:33*kick455 quit (Ping timeout: 272 seconds)
06:27:31*kick455 joined #nim
06:28:21*oculux quit (Ping timeout: 255 seconds)
08:25:10*beholders_eye joined #nim
10:06:24*beholders_eye quit (Ping timeout: 246 seconds)