<< 08-07-2025 >>

00:24:50*Artea joined #nim
00:31:59*disso-peach quit (Quit: Leaving)
00:45:35*xet7 quit (Remote host closed the connection)
01:14:49*thunder joined #nim
03:27:07*SchweinDeBurg quit (Quit: WeeChat 4.7.0-dev)
03:43:41*SchweinDeBurg joined #nim
04:01:01*amadaluzia joined #nim
04:41:57FromDiscord<spotlightkid> @ringabout\: https://github.com/nim-lang/choosenim/pull/84
05:17:07FromDiscord<litlighilit> sent a code paste, see https://play.nim-lang.org/#pasty=twtjYEQF
05:18:01FromDiscord<litlighilit> um, beef had mentioned
05:54:23*skippy8 joined #nim
06:36:48*jjido joined #nim
06:45:01FromDiscord<heysokam> How would you guys map a 3dimensional chart to a Nim data structure that points to a specific character?↵Specific Context to map: https://www.seeingspeech.ac.uk/ipa-charts/?chart=1&datatype=3&speaker=1↵Goal is to pick 3 properties, and get back a single/unique character from the table
06:45:49*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
06:46:24FromDiscord<heysokam> eg: `0,0,0 -> a`, `0,1,0 -> b`, `5,0,2 -> j`, etc
06:58:01FromDiscord<TӨMΛ ☠> sent a code paste, see https://play.nim-lang.org/#pasty=LETkyEIa
07:04:44*jjido joined #nim
07:37:24*nils` quit (Ping timeout: 260 seconds)
07:45:35*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
07:53:09*jjido joined #nim
08:04:02*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
08:15:58*ntat joined #nim
08:30:00*amadaluzia quit (Quit: ZNC 1.10.0 - https://znc.in)
08:32:11*amadaluzia joined #nim
09:13:18*nils` joined #nim
09:17:46FromDiscord<lainlaylie> https://nim-lang.org/docs/strutils.html#parseEnum%2Cstring
09:18:02FromDiscord<lainlaylie> it matches against the associated string if there is one, otherwise the name
09:24:50*amadaluzia quit (Quit: ZNC 1.10.0 - https://znc.in)
09:25:47*amadaluzia joined #nim
09:26:21*amadaluzia quit (Client Quit)
09:27:11*amadaluzia joined #nim
09:27:54*amadaluzia quit (Client Quit)
09:29:03*amadaluzia joined #nim
09:32:06*xet7 joined #nim
09:32:53*end quit (Ping timeout: 245 seconds)
09:33:37*bcksl quit (Ping timeout: 248 seconds)
09:34:13*xet7 quit (Remote host closed the connection)
09:34:14*amadaluzia quit (Ping timeout: 260 seconds)
09:35:37*xet7 joined #nim
09:38:12*amadaluzia joined #nim
09:57:24*bcksl joined #nim
10:04:25*end joined #nim
10:29:12*beholders_eye joined #nim
10:33:29*thunder quit (Killed (NickServ (GHOST command used by metasintactic)))
10:33:31*metasintactic joined #nim
12:13:17FromDiscord<pmunch> Is there a way to use a shared global "config" object from async procedures?
12:39:53FromDiscord<spotlightkid> std/tables with tuple[a,b,c\: int] as keys?↵(@heysokam)
12:44:14FromDiscord<spotlightkid> https://play.nim-lang.org/#pasty=rsxbsxAX
14:35:18*amadaluzia quit (Quit: ZNC 1.10.0 - https://znc.in)
14:36:27*amadaluzia joined #nim
15:03:40FromDiscord<arnetheduck> In reply to @pmunch "Is there a way": put it in a `{.threadvar.}`
15:05:00FromDiscord<arnetheduck> or pass it around (the better option, usually)
15:42:20FromDiscord<Phil> if it's a threadvar, make sure you clean it up afterwards unless automatic threadvar cleanup has been implemented since last I messed with threads
15:42:31FromDiscord<Phil> (edit) "if it's a threadvar, make sure you clean it up afterwards ... unless" added "before the thread dies"
15:54:42FromDiscord<heysokam> In reply to @spotlightkid "std/tables with tuple[a,b,c\: int]": Interesting idea↵What exactly is the key internally in this situation, assuming a C backend? 🤔
15:58:38*amadaluzia quit (Quit: ZNC 1.10.0 - https://znc.in)
15:59:54*amadaluzia joined #nim
16:00:24*amadaluzia quit (Client Quit)
16:01:11*amadaluzia joined #nim
16:09:39strogon14https://nim-lang.org/docs/hashes.html#Hash
16:16:04FromDiscord<pmunch> In reply to @arnetheduck "or pass it around": What we were trying to do was to avoid passing it around everywhere 😅 I guess a threadvar could work though
16:30:17FromDiscord<alehander92> store it in the filesystem
16:30:23FromDiscord<alehander92> just half kidding
16:31:16FromDiscord<alehander92> i am still using the filesystem as a kv store, so maybe i am not kidding
16:59:27FromDiscord<Elegantbeef> @Phil Heh silly you thinking important things would be fixed
17:03:53FromDiscord<Elegantbeef> spotlightkid will you be making a PR back to miniaudio or will I have to do that? 😄
17:10:59*pmp-p quit (Quit: No Ping reply in 180 seconds.)
17:11:12*pmp-p joined #nim
17:13:11*jjido joined #nim
17:18:51FromDiscord<spotlightkid> I haven't done that yet, because futhark throws a curious error when generating the wrapper.↵So I wanted to make an issue about that first.
17:45:45FromDiscord<Elegantbeef> spotlightkid Ah I was just checking if you were going to be maintaining your own fork
17:46:05FromDiscord<Elegantbeef> I've had a few people fork my code I check the fork they add a few commits and do not merge back
17:46:08FromDiscord<spotlightkid> What would you prefer?
17:46:26FromDiscord<Elegantbeef> If you want to PR back do it, I cannot force you 😄
18:28:08*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
19:30:16*jjido joined #nim
20:00:00*amadaluzia quit (Quit: ZNC 1.10.0 - https://znc.in)
20:01:48*beholders_eye quit (Ping timeout: 252 seconds)
20:03:41*beholders_eye joined #nim
20:11:40FromDiscord<litlighilit> 3d ago I've finished %-format (sprintf style format) in pure Nim https://github.com/nimpylib/nimpylib/blob/43378424222610f8ce4a10593bd719691fbb634b/src/pylib/stringlib/percent_format.nim#L541but it works for neither JS nor nimvm(compile-time) backend...(due to lack of getTypeInfo support)So I once even thought it was no better than simply implementing via passing format to C's `sprintf`...
20:13:32FromDiscord<litlighilit> After working on it another 3d, I've impl part support for JS, nimvm.However, this implementation code is not only inadequate but also urly.
20:19:39*skippy8 quit (Quit: WeeChat 4.6.3)
20:23:01FromDiscord<Elegantbeef> Why are you using type info?
20:24:18FromDiscord<litlighilit> btw, the latest commit to feat-percent-format might be force-pushed (and very urly due to a loss of patenice)↵https://github.com/nimpylib/nimpylib/blob/01a7eae4dcbcefe202ee073416da07deaf695609/src/pylib/stringlib/percent_format.nim#L704
20:24:43FromDiscord<litlighilit> I'm trying to get rid of it
20:25:58FromDiscord<litlighilit> Initially it's because if getitem for a tuple, index argument must be `static`
20:26:40FromDiscord<litlighilit> Initially it's because if getitem for a tuple, the index argument must be `static`. So I firstly transform tuple to an array of `Any`
20:27:13FromDiscord<litlighilit> Initially it's because if getitem for a tuple (a.k.a. `tuple[index]`), the index argument must be `static`. So I firstly transform tuple to an array of `Any`
20:27:44FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=RcHRDwPc
20:30:24FromDiscord<litlighilit> um, looks less effective (but handy anyway)
20:31:02FromDiscord<litlighilit> omg what I'm writing, what a mess \:/
20:31:50FromDiscord<Elegantbeef> What syntax do you support?
20:32:13FromDiscord<litlighilit> If u have a look on this... (not recommend), you can imagine how impatient when I was writing them
20:32:30FromDiscord<litlighilit> Python's `%` for string
20:32:40FromDiscord<Elegantbeef> That means nothing to me 😄
20:32:51FromDiscord<litlighilit> For all of C,JS,nimvm backend
20:34:49FromDiscord<litlighilit> hh in fact Python itself soft deprecates its using. And even no test about it remains in CPython's repo
20:35:31FromDiscord<Elegantbeef> Looking at it now I see a large spec that needs supported
20:36:13FromDiscord<litlighilit> I finished the first 70% in the first 10% time, and then into a hell of "Internal Error"s
20:36:59FromDiscord<litlighilit> yeah, not know them till I'm implementing it
20:39:44FromDiscord<litlighilit> I'm about to alter to use it...if the last 1% part will cost more than 10% time of all😰
20:40:03FromDiscord<Elegantbeef> Huh?
20:41:38FromDiscord<litlighilit> I think... I'm close to finish it ... tho not sure how many times I've think so
20:42:59FromDiscord<litlighilit> Detect of `dictMode` blocks me
20:43:54FromDiscord<Elegantbeef> Well you can use dispatch to reduce the complexity
20:44:21FromDiscord<Elegantbeef> `%` that takes a `static string` and `openArray[(T, Y)]` enables dict detection
20:46:56FromDiscord<Elegantbeef> Unless you also want to support objects
20:46:56FromDiscord<litlighilit> You know why i used untyped...↵I wanna support literal like `{'a': 'c', 'b': 7}`
20:46:56FromDiscord<Elegantbeef> Just use a tuple 😄
20:46:57FromDiscord<Elegantbeef> `(a: c, b: 7)` works much nicer and is more consistent with the rest of the language
20:47:15FromDiscord<litlighilit> once using other type over untyped, such a literal will be evaluated, and Nim will find it invalid
20:47:25FromDiscord<Elegantbeef> Yes I know
20:51:13FromDiscord<Elegantbeef> You can have a `object | tuple`
20:51:13FromDiscord<Elegantbeef> Then you can just do `"...." % (a: 'c', 'b': 7)`
20:51:14FromDiscord<Elegantbeef> Just cause you can make it look like python doesn't mean you should
20:51:14FromDiscord<Elegantbeef> Whoops \`(a\: 'c', b\: 7)
20:51:14FromDiscord<litlighilit> great idea! I hadn't noted such
20:51:51FromDiscord<litlighilit> Oh. And very important, report type error at compile time
20:52:04FromDiscord<litlighilit> over runtime
20:53:25FromDiscord<litlighilit> so that things like u`"%i" % "s"` not compile, not to crash your program
20:53:59FromDiscord<litlighilit> so that things like u`"%i" % "s"` not compile, not to crash your program when running
20:54:12FromDiscord<litlighilit> so that things like `u"%i" % "s"` not compile, not to crash your program when running
20:54:38FromDiscord<Elegantbeef> Yea since the string is static the dispatch can be reasoned at compile time if you do it with what I said
20:55:51FromDiscord<litlighilit> yeah. So after I finished my `args: openArray[Any] | openArray[T] ...` version, I'm now on NimNode's
20:57:25FromDiscord<litlighilit> I've distinguish `static S` with `S`,↵the type of `args` doesn't affect whether it runs CT or RT
20:57:48FromDiscord<litlighilit> I've distinguish `static S` with `S`,↵the type of `args` isn't whether it runs CT or RT
20:57:55FromDiscord<Elegantbeef> Right it won't cause it to run at CT, but the thing is when you know your input string and the type data at compile time the dispatch will happen at compile time
20:58:02FromDiscord<litlighilit> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1392248329328656596): I've distinguished `static S` with `S`,↵the type of `args` isn't whether it runs CT or RT
20:58:28FromDiscord<litlighilit> it does
20:58:49FromDiscord<Elegantbeef> `"${test}" % (a: 100, b: 200)` this can be validated at CT cause we know the tuple has no `test` key
21:04:12*beholders_eye quit (Ping timeout: 244 seconds)
21:04:12FromDiscord<litlighilit> 😅validation for `args: Mapping` at CT is something to worry about later, as it involves whether `args` is `static` or not
21:04:13FromDiscord<litlighilit> well i'll try impl it↵...after some rest and finishing the rest of current part
21:06:26*beholders_eye joined #nim
21:08:30*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
21:10:00FromDiscord<litlighilit> btw I've created [#pylib\:matrix.org](https://matrix.to/#/#pylib:matrix.org) (tho nobody yet 🤣)
21:10:25FromDiscord<litlighilit> btw I've created [#nimpylib\:matrix.org](https://matrix.to/#/#nimpylib:matrix.org) (tho nobody yet 🤣)
21:10:32FromDiscord<Elegantbeef> I don't use python so uhhh 😄
21:10:40*ntat quit (Quit: leaving)
21:10:41FromDiscord<Elegantbeef> Could talk to whoever owns the nim space to add it
21:11:07*beholders_eye quit (Ping timeout: 276 seconds)
21:11:58FromDiscord<Elegantbeef> Sorry I should correct myself, I do use python but only cause I'm forced to
21:12:50FromDiscord<litlighilit> Uh, so use nimpylib(pylib), where u're still using nim
21:13:16FromDiscord<Elegantbeef> Nah the python is existent programs that I use
21:16:10FromDiscord<litlighilit> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1392251502592131183): btw I've created [#pylib\:matrix.org](https://matrix.to/#/#pylib:matrix.org) (tho nobody yet 🤣)
21:26:16*jjido joined #nim
22:06:14*amadaluzia joined #nim
23:28:18*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
23:36:46*rockcavera joined #nim