<< 25-04-2023 >>

00:02:40*Goodbye_Vincent quit (Remote host closed the connection)
00:03:22*Goodbye_Vincent joined #nim
00:40:12*Goodbye_Vincent quit (Remote host closed the connection)
00:40:57*Goodbye_Vincent joined #nim
01:03:08*tiorock joined #nim
01:03:08*tiorock quit (Changing host)
01:03:08*tiorock joined #nim
01:03:08*rockcavera is now known as Guest2352
01:03:08*tiorock is now known as rockcavera
01:05:45*Guest2352 quit (Ping timeout: 240 seconds)
01:17:43*Goodbye_Vincent quit (Remote host closed the connection)
01:18:34*Goodbye_Vincent joined #nim
01:38:01FromDiscord<Yardanico> i don't remember, sorry
01:38:12FromDiscord<Yardanico> btw, regarding https://github.com/FedericoCeratto (https://github.com/nim-lang/Nim/pull/21566) - seems like actually an interesting idea
01:38:33FromDiscord<Yardanico> https://github.com/pythonspeed/cachegrind-benchmarking https://pythonspeed.com/articles/consistent-benchmarking-in-ci/
01:38:38FromDiscord<Yardanico> sqlite is apparently using valgrind for its benchmarks since forever https://sqlite.org/cpu.html#performance_measurement
01:38:50*derpydoo joined #nim
01:44:08FromDiscord<Elegantbeef> Would be nice to get a flamegraph aswell, but yea it's good
01:44:37FromDiscord<Yardanico> I just didn't realise you could use cachegrind for this - consistent benchmarks across different environments
01:44:43FromDiscord<Yardanico> since valgrind emulates a x86 core it makes sense
01:44:45FromDiscord<Yardanico> (edit)
01:45:04FromDiscord<ringabout> In reply to @Yardanico "https://github.com/pythonspeed/cachegrind-benchmark": Nice article, I will share it to the group.
01:45:13FromDiscord<Yardanico> federico already read those I think
01:45:17FromDiscord<Yardanico> since his code is based on that repo
01:45:28FromDiscord<Yardanico> minimize looks cool, but idk about the license (yeah it doesn't matter a lot for a tool like this but still)
01:45:37FromDiscord<Yardanico> and it should be in the nim org anyway if it's gonna be part of the CI
01:46:21FromDiscord<Yardanico> and then add more benchmarks, more options - e.g. it only tests with -d:danger right now, while -d:release is what most people will use for real programs
01:46:41FromDiscord<Yardanico> and then add more rules so it doesn't get triggered on non-code (compiler or stdlib) change
01:47:03FromDiscord<Yardanico> but as a start I guess it's not so bad
01:47:19FromDiscord<Yardanico> but .csv will quickly become hard to maintain, sqlite is a good alternative
01:47:37FromDiscord<ringabout> Yeah, it will be after it is merged.
01:47:49FromDiscord<Yardanico> ah yeah i see
01:48:30*xet7 quit (Ping timeout: 255 seconds)
01:48:55FromDiscord<Yardanico> time to (a)buse minimize to see how those microbenchmarks benefit from PGO with refc vs orc, because I want to confirm that orc is indeed much better for pgo
01:55:13*Goodbye_Vincent quit (Remote host closed the connection)
01:55:59*Goodbye_Vincent joined #nim
01:58:08FromDiscord<Yardanico> also @ringabout seems like KCacheGrind uses a different formula than the one in the article (it's also mentioned in the article)
01:58:52FromDiscord<Yardanico> <https://github.com/KDE/kcachegrind/blob/master/libcore/globalconfig.cpp#L70>
02:32:50*Goodbye_Vincent quit (Remote host closed the connection)
02:33:34*Goodbye_Vincent joined #nim
02:43:23*derpydoo quit (Ping timeout: 264 seconds)
03:08:07FromDiscord<ringabout> In reply to @Yardanico "also <@658563905425244160> seems like": I see
03:08:21FromDiscord<Yardanico> i left the comment in the PR
03:10:20*Goodbye_Vincent quit (Remote host closed the connection)
03:11:05*Goodbye_Vincent joined #nim
03:47:56*Goodbye_Vincent quit (Remote host closed the connection)
03:49:09*Goodbye_Vincent joined #nim
04:25:31*Goodbye_Vincent quit (Remote host closed the connection)
04:26:16*Goodbye_Vincent joined #nim
04:26:36*Goodbye_Vincent quit (Client Quit)
04:39:21*Goodbye_Vincent joined #nim
04:58:03*rockcavera quit (Remote host closed the connection)
05:03:02*Goodbye_Vincent quit (Remote host closed the connection)
05:03:47*Goodbye_Vincent joined #nim
05:09:48*Goodbye_Vincent quit (Quit: )
06:04:11*fallback_ quit (Ping timeout: 250 seconds)
06:39:48madpropsok back again on github actions
06:39:56madpropsim not sure now if it's what im thinking
06:40:11madpropsi just want to offer binaries that users can download from my repo
06:40:20madpropsthat get compiled automatically on new releases
06:40:43madpropsso the user doesn't need to compile it themselves
06:45:44madpropsgonna study some yml files
06:47:10*kenran joined #nim
06:49:09FromDiscord<huantian> obligatory plug for my program's github action↵<https://github.com/huantianad/levelsync/blob/master/.github/workflows/main.yml>
06:53:01madpropsrun: nimble build -d:release
06:53:09madpropsthat's what i was trying to find out
06:53:37madpropsi saw "nimble build" elsewhere
06:53:44madpropsi guess it uses whatever i configure in the repo
06:53:56madpropsto get an optimized binary
06:54:49madpropsalso lots of different stuff there
06:54:52madpropslike build and release
06:57:18FromDiscord<faldor20> How would I check the value of enums in a "when" block?
07:18:49*Goodbye_Vincent joined #nim
07:24:14madpropsthanks huantian
07:24:19madpropsyml was useful
07:27:00*Notxor joined #nim
07:32:14FromDiscord<Elegantbeef> take in a `static YourEnum`↵(@faldor20)
07:33:28FromDiscord<huantian> In reply to @madprops "yml was useful": \❤️
07:45:25FromDiscord<ieltan> Hello, i think the nim playground is offiline right now. just an headsup 🙂
07:46:09*fredrikhr joined #nim
07:46:23FromDiscord<Elegantbeef> Shout in nordic languages and the message might reach pmunch
07:47:42*azimut joined #nim
08:54:38*azimut quit (Ping timeout: 255 seconds)
09:04:51*pharonix71 quit (*.net *.split)
09:47:56FromDiscord<ricky> In reply to @Elegantbeef "Shout in nordic languages": nordic? i dont have a fucked up keyboard to write such a lang
09:48:02FromDiscord<ricky> helvete
10:01:52*jmdaemon quit (Ping timeout: 252 seconds)
11:27:12FromDiscord<ieltan> sent a code paste, see https://play.nim-lang.org/#ix=4ueP
11:29:16FromDiscord<ieltan> usecase: have a case statement that match agaisnt a bool, if true then we dont capitalize the first element, if not we do so we'll have something like `presult[0 .. ^1].applyIt(it.capitalizeAscii)`
11:30:34FromDiscord<ieltan> sent a code paste, see https://play.nim-lang.org/#ix=4ueS
11:30:36FromDiscord<ieltan> to... to.. what ?
11:31:07FromDiscord<ieltan> I'm a mid coder but this smells like a compiler issue ?
11:31:40Amun-Rais static int a new addition or was it always an equivalent of static[int]?
11:31:56FromDiscord<ieltan> or is there something that i have overlooked ? Why can't iterate over `presult` and mutate its elements with a slice ?
11:32:11FromDiscord<ieltan> i can do it just fine without slicing but then again it's not as elegant imo
11:33:29FromDiscord<Ras> sent a code paste, see https://play.nim-lang.org/#ix=4ueT
11:33:30FromDiscord<ieltan> In reply to @ieltan "usecase: have a case": there no need to slice at all for this one it was just an example btw
11:33:46FromDiscord<ieltan> (edit) "In reply to @ieltan "usecase: have a case": there ... no" added "is"
11:41:33FromDiscord<ieltan> solved by doing ↵`var presult = result.split("_")[1 .. ^1]`
11:42:54*xet7 joined #nim
11:44:22FromDiscord<ieltan> nvm that didnt do what i wanted
11:44:26FromDiscord<ieltan> i still need help
11:44:32*xet7 quit (Remote host closed the connection)
11:45:42FromDiscord<Ras> In reply to @Ras "i'm trying to debug": never mind, i'm dumb
11:46:12FromDiscord<Rika> The [] operator for slices does not have a mutablem version
11:46:14FromDiscord<Rika> https://nim-lang.org/docs/system.html#%5B%5D%2CopenArray%5BT%5D%2CHSlice%5BU%3A%20Ordinal%2CV%3A%20Ordinal%5D
11:46:19FromDiscord<Rika> (edit) "mutablem" => "mutable"
11:46:51FromDiscord<Rika> Since views aren’t fully supported yet iirc
11:47:01FromDiscord<Rika> In reply to @ieltan "nvm that didnt do": What do you want to do
11:52:24*xet7 joined #nim
11:54:16FromDiscord<ieltan> In reply to @Rika "What do you want": Using futhark's `renameCallback` procedure to rename types like "vips_some_enum" and turn it to "SomeEnum" for example
11:55:32FromDiscord<ieltan> if it's a function then it should rename "vips_some_proc" to "someProc"
11:56:36FromDiscord<ieltan> i already have checks in order to distinguish procs and types/enums
11:59:50*Notxor quit (Quit: Leaving)
12:03:46FromDiscord<Rika> Capitalise will make all characters capitalised
12:03:55FromDiscord<Rika> You might be looking to do title casing instead
12:04:00FromDiscord<Rika> I don’t know if there’s a procedure for that
12:06:44FromDiscord<firasuke> so I am using `execCmdEx("dash -c '. someScript && do_something'")` to source `someScript` that has `do_something`, then I am running that, is there a better way to do this? Also apparently this sometimes creates a zombie process as the parent does not wait, how can I fix this, or design it in a better way?
12:07:01FromDiscord<ricky> In reply to @Rika "The [] operator for": 😔 cursed timeline
12:08:59FromDiscord<firasuke> In reply to @firasuke "so I am using": perhaps using `waitForExit` or avoiding the `dash -c` would fix this
13:20:19FromDiscord<Gabben> Is there a function in std to create `string` from `cstring`?
13:30:45*xet7 quit (Ping timeout: 240 seconds)
13:32:28*pharonix71 joined #nim
13:39:55FromDiscord<michaelb.eth> sent a code paste, see https://play.nim-lang.org/#ix=4ufx
13:40:28FromDiscord<michaelb.eth> (edit) "https://play.nim-lang.org/#ix=4ufx" => "https://play.nim-lang.org/#ix=4ufy"
13:45:18FromDiscord<Gabben> sent a code paste, see https://play.nim-lang.org/#ix=4ufz
14:03:48FromDiscord<Rika> its a common issue, we all forget $ is tostring
14:03:53*progranner joined #nim
14:04:56*progranner quit (Client Quit)
14:13:08*progranner joined #nim
14:13:52*kenran quit (Remote host closed the connection)
14:36:55*fredrikhr quit (Quit: Disconnecting...)
15:12:54*lucasta joined #nim
15:21:45*fallback joined #nim
15:37:53*arkurious joined #nim
15:42:01FromDiscord<Z3NTL3> sent a code paste, see https://play.nim-lang.org/#ix=4ugj
16:24:31FromDiscord<Gumbercules> sent a code paste, see https://play.nim-lang.org/#ix=4ugr
16:24:49FromDiscord<michaelb.eth> yeah, but I just meant to show going from cstring to Nim string
16:24:54FromDiscord<Gumbercules> Gotcha
16:25:08FromDiscord<michaelb.eth> if the cstring is e.g. coming from the return of an importc'd function, you sill use `$`
16:25:22FromDiscord<michaelb.eth> (edit) "sill" => "still"
16:27:00FromDiscord<Gumbercules> Is the runtime going to copy the memory pointed to by the cstring in that case?
16:28:28FromDiscord<Gumbercules> I think the semantics around cstring and character arrays and conversion to Nim strings can be needlessly confusing at times
16:31:16FromDiscord<demotomohiro> I think it is because strings in C is confusing.↵It seems string in Nim can be literal or heap allocated.↵string in C can be any kind of memory.
16:33:48FromDiscord<Gumbercules> Yeah
16:33:59FromDiscord<demotomohiro> So if you want to create a Nim string from cstring, copying content is safest way.
16:34:10FromDiscord<Gumbercules> I just wish I didn't have to resort to copyMem so much
16:34:26FromDiscord<Gumbercules> It feels dirty, but then again I'm interfacing with C so...
17:01:06*progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…)
17:01:37*rockcavera joined #nim
17:15:57*progranner joined #nim
17:19:45*progranner quit (Client Quit)
17:26:29*progranner joined #nim
17:39:32*progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…)
17:44:50*progranner joined #nim
17:46:42*progranner quit (Client Quit)
17:49:36*progranner joined #nim
17:58:32FromDiscord<Z3NTL3> @Yardanico yoo Nim contributors please make a standard high level xPath library otherwise it takes more time to F with XML, with XPATH it can be more easy
17:58:48FromDiscord<Yardanico> What?
17:58:55FromDiscord<Yardanico> Just use nimquery
17:59:06FromDiscord<Yardanico> It allows you to search html with css selectors
17:59:16FromDiscord<Z3NTL3> ohhh thnx
17:59:24FromDiscord<Z3NTL3> didnt know
18:07:28*junaid_ joined #nim
18:09:33*progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…)
18:39:26*junaid_ quit (Remote host closed the connection)
18:43:41FromDiscord<Prestige> Maybe missing it but is there a way to print regex groups? Like if I have `re"^foo (.)"` I'd want to print just everything in the parens
18:44:38FromDiscord<Prestige> I'm trying to use `=~` with `matches` but I'm getting a lot of empty string matches along with my captured group
19:05:07*Notxor joined #nim
19:09:00*progranner joined #nim
19:13:17*progranner quit (Client Quit)
19:18:58*progranner joined #nim
19:20:07*jmdaemon joined #nim
19:40:04*Notxor quit (Remote host closed the connection)
19:43:16*Notxor joined #nim
20:06:25FromDiscord<Elegantbeef> @Prestige I do have to ask what are you searching through?
20:07:40FromDiscord<Elegantbeef> I know I know regex is cool and all but my mind just sees `line.scanf("foo $+", yourCapture)`
20:08:37FromDiscord<Elegantbeef> Otherwise I guess use `findAll` and manually calculate ranges?
20:09:11FromDiscord<Prestige> Does that work with capture groups?
20:09:26FromDiscord<Elegantbeef> Not a clue, i do not use regex 😄
20:09:32FromDiscord<Prestige> Rip
20:10:39FromDiscord<ricky> Rip
20:10:44FromDiscord<Elegantbeef> My reading of your pattern makes me assume you're iterating over a file in memory and searching for `setString some other writing here`
20:11:29FromDiscord<Elegantbeef> Hence why I suggested scanf 😛
20:19:00*progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…)
20:23:05*pharonix71 quit (Remote host closed the connection)
20:23:08*progranner joined #nim
20:32:13*lucasta quit (Remote host closed the connection)
20:46:18*lucasta joined #nim
20:54:17*lucasta quit (Remote host closed the connection)
21:09:24FromDiscord<Anton i guess> What's the state of VR in Nim?
21:14:26*progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…)
21:19:24*TakinOver quit (Ping timeout: 250 seconds)
21:20:32*TakinOver joined #nim
21:38:25*TakinOver quit (Ping timeout: 260 seconds)
21:53:41FromDiscord<Chronos [She/Her]> In reply to @Anton i guess "What's the state of": If libraries support it, you can use it
21:54:08FromDiscord<Chronos [She/Her]> Naylib is a Raylib binding, Raylib supports VR
21:54:33FromDiscord<Chronos [She/Her]> Raylib isn't a game engine, though so
21:55:00FromDiscord<Anton i guess> What about the gear? What about the controllers that support full hand movement? Like in the Oculus Quest
21:55:15FromDiscord<Anton i guess> Is there any support for that?
21:58:00*Notxor quit (Remote host closed the connection)
22:07:46*TakinOver joined #nim
22:22:17*lucasta joined #nim
22:24:54FromDiscord<Yardanico> nothing that I heard of, maybe ask in #gamedev
22:25:07FromDiscord<Yardanico> but I think the chances of people doing VR games without any big engines is quite small in general unless it's a big company
22:30:55*TakinOver quit (Ping timeout: 260 seconds)
22:31:44*TakinOver joined #nim
22:32:38FromDiscord<demotomohiro> You probably be able to create Nim libraries for VR gear and controllers if there are C/C++ libraries for these hardwares.
22:36:20FromDiscord<jmgomez> You can also use NimForUE for VR, didnt test it but it should work out of the box