<< 28-02-2025 >>

00:27:21FromDiscord<michaelpcobb530> Are there someone that will try to make small money in here?
01:13:45*beholders_eye quit (Ping timeout: 265 seconds)
01:40:10FromDiscord<fl4shk> https://nim-lang.org/docs/destructors.html does this mean no GC?
01:40:22FromDiscord<fl4shk> with that mode, I mean
01:44:53FromDiscord<fl4shk> oh huh, apparently not
01:45:17FromDiscord<fl4shk> arc is apparently like that to a degree though?
01:45:19FromDiscord<fl4shk> could use that
01:45:31FromDiscord<fl4shk> (edit)
01:59:08*tiorock joined #nim
01:59:09*tiorock quit (Changing host)
01:59:09*tiorock joined #nim
01:59:09*rockcavera is now known as Guest9894
01:59:09*Guest9894 quit (Killed (calcium.libera.chat (Nickname regained by services)))
01:59:09*tiorock is now known as rockcavera
02:01:16*tiorock joined #nim
02:01:16*rockcavera is now known as Guest761
02:01:16*Guest761 quit (Killed (osmium.libera.chat (Nickname regained by services)))
02:01:16*tiorock is now known as rockcavera
03:24:08FromDiscord<albassort> this is nonsensical but
03:24:35FromDiscord<albassort> 1. can i make a proc that takes in vargs procs of any parameter type
03:25:08FromDiscord<albassort> (edit) "1. can i make a proc that takes in vargs procs of any parameter type ... " added "as long as they return a string↵2. how can i iterate over a proc's params/get itas a tuple type desc"
03:25:48FromDiscord<albassort> or maybe funcs
03:26:59FromDiscord<albassort> OH NO IM DOING INDIRECT THREADING LOL
03:31:51FromDiscord<albassort> maybe i can use closures
03:46:30FromDiscord<albassort> how do i get a proc as a nimnode in macros?
04:33:32*rockcavera quit (Remote host closed the connection)
04:40:23*disso-peach quit (Quit: Leaving)
05:01:46*SchweinDeBurg quit (Quit: WeeChat 4.6.0-dev)
05:13:14*SchweinDeBurg joined #nim
06:04:41FromDiscord<entropydev> I've got a bit of a question about creating a type in Nim. I want to wrap the C++ vector type (which I know how to do) but I want when I make function arguments that I may ask for a fixed size vector and have the type system check for that, but then when I don't ask for a fixed size vector that an object declared as a fixed size vector will still work. How would I go about making this type?
06:50:18*ensyde joined #nim
08:22:27*alexdaguy joined #nim
08:35:15*ensyde quit (Ping timeout: 276 seconds)
08:40:04*ntat joined #nim
09:10:56FromDiscord<lainlaylie> In reply to @entropydev "I've got a bit": what is a fixed size vector?
09:27:17*ntat quit (Quit: Leaving)
09:31:12*pmp-p quit (Ping timeout: 252 seconds)
09:38:24*pmp-p joined #nim
09:40:15FromDiscord<entropydev> In reply to @lainlaylie "what is a fixed": for example OpenCV use lots of InputArray and OutputArray parameters, which can accept pretty much anything, Mat, vec, 2d vec, but this is not actually accurate. It often can only take specific fixed sized objects like a 3 x 3 Mat, or a vector of size 3 vectors
09:40:36FromDiscord<entropydev> and I'm hoping to make a type that will allow me to actually allow for typechecking of that
09:40:53FromDiscord<entropydev> (edit) removed "me to actually allow" | removed "of"
09:49:00*ntat joined #nim
10:04:44*mal`` quit (Quit: Leaving)
10:17:19*mal`` joined #nim
10:27:12*ntat quit (Quit: Leaving)
10:29:19*beholders_eye joined #nim
10:37:34*ntat joined #nim
10:58:40*beholders_eye quit (Ping timeout: 244 seconds)
11:12:27*ntat quit (Quit: Leaving)
11:30:12*ntat joined #nim
11:36:57*derpydoo joined #nim
11:59:31*derpydoo quit (Ping timeout: 268 seconds)
12:03:31*ntat quit (Quit: Leaving)
13:54:26*ntat joined #nim
15:27:28*xet7 quit (Remote host closed the connection)
15:42:01*alexdaguy quit (Quit: w)
16:32:26FromDiscord<threefour> In reply to @fl4shk "arc is apparently like": As I understand it, ARC and ORC _are_ this new non-GCed memory management system that is described on that page. Other MM methods don't actually use the hooks. Using ARC and ORC means you don't have a runtime garbage collector. It knows where to insert memory frees and whatnot at compile time. ORC is just ARC with a cycle collector mechanism added in.
16:32:44FromDiscord<fl4shk> In reply to @threefour "As I understand it,": ooh neat
16:32:51FromDiscord<fl4shk> that's good to hear, and should do for my purposes
16:35:12FromDiscord<fl4shk> for the kinds of things I need it for
16:35:32FromDiscord<fl4shk> (edit) "it" => "this stuff"
16:35:39FromDiscord<fl4shk> thus Nim can totally replace C++ for me
16:35:51FromDiscord<fl4shk> (except maybe at work)
16:35:56FromDiscord<threefour> It's very similar to Rust, and I believe C++, though I haven't used that in a long long time.
16:36:07FromDiscord<fl4shk> I see
16:36:11FromDiscord<fl4shk> so does it catch memory errors?
16:36:26FromDiscord<fl4shk> (edit) "errors?" => "error like Rust?"
16:37:33FromDiscord<fl4shk> I know some stuff like that exists at runtime
16:37:39FromDiscord<fl4shk> (edit) "runtime" => "runtime... or is it compile time?"
16:38:12*ntat quit (Remote host closed the connection)
16:38:47FromDiscord<threefour> It's less strict than Rust is. I only mean it's like Rust in the sense of static memory management. Rust has lifetime labels and the borrow checker and all sorts of memory vulnerability guards. Nim has some things it can spot if you use the right language features, but not to the level Rust does.
16:39:32*ntat joined #nim
16:40:45FromDiscord<threefour> I don't really like Rust's approach personally and don't use it much, so I'm admittedly hazy on the exact comparison details.
16:42:21FromDiscord<fl4shk> ah
16:43:08FromDiscord<threefour> This is another decent explanation writeup:
16:43:10FromDiscord<threefour> https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc-in-nim.html
18:49:13FromDiscord<cineration> I’m trying to use the dimscord library. I’ve made a couple discord bots with it but can’t figure out how to handle reactions. I know I can use the ‘messageCreate’ proc for messages and I’m trying to use the ‘messageReactionAdd’ proc to hook the reaction events but it doesn’t seem to work? Does anybody know how I can do this properly?
19:46:57FromDiscord<.bobbbob> sent a code paste, see https://play.nim-lang.org/#pasty=pLRsFmhV
19:47:51FromDiscord<.bobbbob> (edit) "https://play.nim-lang.org/#pasty=AgyiQWFJ" => "https://play.nim-lang.org/#pasty=UuYYtlMP"
19:49:06FromDiscord<nnsee> yeah, it's a ref object
19:50:38FromDiscord<.bobbbob> deepcopy time
19:52:49FromDiscord<Elegantbeef> Or think whether you need a ref
19:54:50FromDiscord<Elegantbeef> @System64 ~ Flandre Scarlet well I have found some minor bugs with vsbf due to fuzzing, so as you're my sole user consider updating to 0.1.11 😄
20:01:58FromDiscord<System64 ~ Flandre Scarlet> In reply to @Elegantbeef "<@380360389377916939> well I have": Oh! Thanks for notifying me! Gotta update this in Kurumi XP!
20:03:55FromDiscord<System64 ~ Flandre Scarlet> Oh, my patches are still loading fine, nice
20:07:45FromDiscord<Elegantbeef> I did not expect any breaking changes, just some things like distincts now properly save
20:12:19*beholders_eye joined #nim
20:38:08*disso-peach joined #nim
20:59:51*rockcavera joined #nim
21:38:28*ntat quit (Quit: Leaving)
21:55:16*tiorock joined #nim
21:55:16*tiorock quit (Changing host)
21:55:16*tiorock joined #nim
21:55:16*rockcavera is now known as Guest192
21:55:16*Guest192 quit (Killed (tantalum.libera.chat (Nickname regained by services)))
21:55:16*tiorock is now known as rockcavera
21:57:22*tiorock joined #nim
21:57:22*rockcavera is now known as Guest7206
21:57:22*Guest7206 quit (Killed (mercury.libera.chat (Nickname regained by services)))
21:57:22*tiorock is now known as rockcavera
22:01:15FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#pasty=jkyKDGXk
22:03:54FromDiscord<Elegantbeef> Need a macro like from fusion for that
22:04:04FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#pasty=pDznyuFO
22:04:23FromDiscord<aintea> In reply to @Elegantbeef "Need a macro like": how sad is the fact Nim doesn't implement that
22:04:37FromDiscord<Elegantbeef> Not to me
22:04:53FromDiscord<aintea> I love ML stuff
22:05:03FromDiscord<Elegantbeef> You're quite literally just doing `if req.url.path == "/"` there though
22:05:11FromDiscord<aintea> less readable
22:05:24FromDiscord<aintea> also I will expand it
22:05:37FromDiscord<Elegantbeef> I don't know how a whole match case is less redable 😄
22:05:38FromDiscord<aintea> I will pattern match the reqMethod too, this is just a minimalistic example
22:05:58FromDiscord<Elegantbeef> Right well it's not there so you have to pull a macro or suffer
22:06:06FromDiscord<aintea> Suffering it is
22:06:10FromDiscord<aintea> Thanks for the answers
22:35:28FromDiscord<TӨMΛ ☠> Can you make type statements like `(uint8 10)` to make it equivalent to `(uint8, uint8, uint8, uint8, ...)`?
22:36:04FromDiscord<TӨMΛ ☠> I think Python had something like that, so was wondering if Nim has this kind of sugar syntax too
22:42:40FromDiscord<aintea> I mean you can make a macro for it
22:42:55FromDiscord<aintea> And pretty sure Python doesn't have that
22:43:03FromDiscord<aintea> Why would Python need type stuff
22:56:30FromDiscord<emmathemartian> I would like to implement a modding/plugin API into my game, and preferably using a scripting language. I'd like to use NimScript (probably with Nimscripter) so that the syntax is the same (for the most part) between the game's source and the mods, although Wren and a few others are appealing too.↵Before implementing it, I wanted to get the opinions of others: What scripting languages have you worked with in Nim, and which ones c
22:57:29FromDiscord<nasuray> In reply to @aintea "Is there a way": It's called a case statement macro
23:03:48FromDiscord<nasuray> I wrote one recently for result types https://github.com/daylinmorgan/resultz/blob/43ed7f7e991b326e738ec14db4909b7330de089b/src/resultz.nim#L30
23:04:31FromDiscord<aintea> I understand that it exists in third party libraries, but I am surprised there is nothing like that in the stdlib
23:20:35*oprypin quit (Quit: Bye)
23:20:45*oprypin joined #nim