<< 07-12-2024 >>

00:31:35*rockcavera quit (Remote host closed the connection)
02:47:19*SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev)
02:47:41*SchweinDeBurg joined #nim
03:34:27*jkl quit (Quit: Gone.)
03:37:36*jkl joined #nim
03:47:09*rockcavera joined #nim
04:02:32FromDiscord<Robyn [She/Her]> out of curiosity, would something like `wasm2c` but for Nim have any benefits at all?
04:09:11FromDiscord<Elegantbeef> If you want to convert a Nim wasm binary into C for some reason
04:10:07FromDiscord<maxtachine> sent a code paste, see https://play.nim-lang.org/#pasty=geeAfoEy
04:10:30FromDiscord<Elegantbeef> It works the same as in any language
04:10:31FromDiscord<maxtachine> it gives me a "express has no address" on busPtr
04:10:39FromDiscord<Elegantbeef> You probably want `var ptr sd_bus`
04:10:51FromDiscord<maxtachine> oh
04:11:25FromDiscord<Elegantbeef> But it depends on the API
04:11:47FromDiscord<maxtachine> its an import from libsystemd
04:12:09FromDiscord<Elegantbeef> Right, but does it want to change where the value points
04:13:22FromDiscord<maxtachine> i have no idea of how it works, it seems like from the doc that its requiring a double pointer to do refcount
04:13:30FromDiscord<maxtachine> thats what i understood
04:13:34FromDiscord<maxtachine> https://www.freedesktop.org/software/systemd/man/latest/sd_bus_default.html#
04:14:25FromDiscord<Elegantbeef> Anyway you can use `ptr ptr` your above issue sounds like not using a modern nim
04:14:40FromDiscord<Elegantbeef> You might need `unsafeAddr`
04:15:34FromDiscord<maxtachine> whats the difference between the var ptr and the ptr ptr
04:16:09FromDiscord<Elegantbeef> `var ptr` is a mutable reference `ptr ptr` is just a ptr ptr T
04:16:28FromDiscord<maxtachine> oh okay
04:17:04FromDiscord<Elegantbeef> In Nim you prefer `var T` where applicable as it means you do not need to explicitly use `.addr`
04:20:00FromDiscord<maxtachine> yeah but since im importing stuff from a C library i dont think this is applicable
04:20:06FromDiscord<Elegantbeef> It is
04:20:12FromDiscord<maxtachine> fr?
04:20:25FromDiscord<Elegantbeef> `var T` is the same as `T` in C
04:20:31FromDiscord<maxtachine> o
04:21:12FromDiscord<maxtachine> sent a code paste, see https://play.nim-lang.org/#pasty=VOVJWWfl
04:21:41FromDiscord<maxtachine> and ig for the m variable i can do the same
04:25:29FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "If you want to": I mean a tool like `wasm2nim`
04:26:29*perr__ quit (Quit: WeeChat 3.8)
04:29:56FromDiscord<Elegantbeef> I suppose if you want to convert a wasm file to a nim module for some reason that'd be fine
07:47:31*alexdaguy joined #nim
08:05:20*beholders_eye joined #nim
08:10:10*coldfeet joined #nim
08:13:38*ntat joined #nim
08:22:51FromDiscord<4zv4l> is there a tool to see nim doc in the command line ?↵something like `perldoc` ?
08:23:04FromDiscord<4zv4l> or to start an http server with the stdlib doc locally ?
08:25:31FromDiscord<k0ts> `nim doc --project main.nim && python3 -m http.server -d htmldocs`
08:25:43FromDiscord<demotomohiro> How about to just open html files generated by nim doc by browser?
08:26:10FromDiscord<demotomohiro> with browser.
08:41:03*beholders_eye quit (Ping timeout: 276 seconds)
08:46:07FromDiscord<4zv4l> In reply to @k0ts "`nim doc --project main.nim": thanks ! is there a way to include the stdlib doc with it ? 🥺
09:29:11*disso-peach joined #nim
09:46:55FromDiscord<k0ts> I don't know of any way
10:42:35*tiorock joined #nim
10:42:35*tiorock quit (Changing host)
10:42:35*tiorock joined #nim
10:42:35*rockcavera quit (Killed (erbium.libera.chat (Nickname regained by services)))
10:42:35*tiorock is now known as rockcavera
10:44:40*rockcavera is now known as Guest3955
10:44:40*tiorock joined #nim
10:44:40*Guest3955 quit (Killed (tantalum.libera.chat (Nickname regained by services)))
10:44:40*tiorock is now known as rockcavera
11:06:11*coldfeet quit (Ping timeout: 265 seconds)
11:27:36*coldfeet joined #nim
12:48:42*coldfeet quit (Ping timeout: 252 seconds)
12:53:46*tiorock joined #nim
12:53:46*rockcavera is now known as Guest1256
12:53:46*tiorock is now known as rockcavera
12:55:54*tiorock joined #nim
12:55:54*tiorock quit (Changing host)
12:55:54*tiorock joined #nim
12:55:54*rockcavera is now known as Guest2099
12:55:54*Guest2099 quit (Killed (erbium.libera.chat (Nickname regained by services)))
12:55:54*tiorock is now known as rockcavera
12:57:52*Guest1256 quit (Ping timeout: 252 seconds)
13:00:59FromDiscord<enthus1ast.> @treeform does pixie has support for hsv/hsl?
13:01:41FromDiscord<enthus1ast.> i want to build a mosaic image, but distance on rgb produce some weird stuff
13:08:03FromDiscord<enthus1ast.> sent a code paste, see https://play.nim-lang.org/#pasty=IcodIpMt
13:08:21FromDiscord<enthus1ast.> sent a code paste, see https://play.nim-lang.org/#pasty=yMRbLUky
13:09:33FromDiscord<.throwstar> In reply to @enthus1ast. "<@107140179025735680> does pixie has": He has a library for working with different color spaces
13:09:44FromDiscord<enthus1ast.> ahhh
13:09:48FromDiscord<enthus1ast.> i remeber
13:09:48FromDiscord<.throwstar> https://github.com/treeform/chroma
13:09:49FromDiscord<enthus1ast.> crhoma
13:10:18FromDiscord<enthus1ast.> ah perfect
13:11:00FromDiscord<enthus1ast.> i would love to show my mosaic but its nsfw so far (its for a friend that sits in jail currently ... )
13:11:01FromDiscord<enthus1ast.> 😉
13:16:24FromDiscord<odexine> Colour distance is best done on perceptual colour spaces
13:16:31FromDiscord<odexine> I usually use Oklab for that
13:17:00FromDiscord<odexine> In reply to @odexine "I usually use Oklab": Chroma supports this
13:25:56*alexdaguy quit (Quit: w)
13:26:59FromDiscord<enthus1ast.> so hsv?
13:27:11FromDiscord<enthus1ast.> i've just called chromas distance function
13:27:25FromDiscord<enthus1ast.> it looks good so far
13:47:07FromDiscord<odexine> HSV and LAB are not the same
13:47:18FromDiscord<odexine> Also HSV is not perceptual
14:49:03FromDiscord<nikolina.mahin> 💛
14:49:26FromDiscord<nikolina.mahin> https://github.com/treeform/chroma
14:58:09FromDiscord<nikolina.mahin> Kako se ti zoveš sad
15:29:58*coldfeet joined #nim
15:39:49*tiorock joined #nim
15:39:50*tiorock quit (Changing host)
15:39:50*tiorock joined #nim
15:39:50*rockcavera is now known as Guest4620
15:39:50*Guest4620 quit (Killed (calcium.libera.chat (Nickname regained by services)))
15:39:50*tiorock is now known as rockcavera
15:41:59*tiorock joined #nim
15:41:59*tiorock quit (Changing host)
15:41:59*tiorock joined #nim
15:41:59*rockcavera is now known as Guest3599
15:41:59*Guest3599 quit (Killed (tungsten.libera.chat (Nickname regained by services)))
15:41:59*tiorock is now known as rockcavera
16:03:59*nils` quit (Remote host closed the connection)
16:49:17*coldfeet quit (Quit: Lost terminal)
17:23:49*tiorock joined #nim
17:23:49*rockcavera quit (Killed (tantalum.libera.chat (Nickname regained by services)))
17:23:49*tiorock is now known as rockcavera
17:25:55*tiorock joined #nim
17:25:55*rockcavera is now known as Guest5707
17:25:55*Guest5707 quit (Killed (zinc.libera.chat (Nickname regained by services)))
17:25:55*tiorock is now known as rockcavera
17:28:45*disso-peach quit (Quit: Leaving)
17:32:30FromDiscord<bosinski2023> In reply to @pmunch "AoC day 6! https://twitch.tv/pmunche": had the same problem, solved it - won't spoil here. BUT i can't believe peoples claim to solve that thing in 300ms (Rust) or < 4 sec (Python) - 120sec with one or two things to optimize - maybe 80-sec, but below 4 seems impossible...
17:39:03*xaltsc quit (Quit: WeeChat 4.4.3)
18:07:01FromDiscord<pmunch> Mine only ran for a couple of seconds and wasn't really optimised at all. With some clever data structures I don't doubt it could run much faster
18:07:41FromDiscord<pmunch> But maybe what I missed would cause a massive slowdown, haven't quite figured out where I went wrong..
18:11:37*xaltsc joined #nim
18:15:07*nils` joined #nim
18:18:27FromDiscord<bosinski2023> In reply to @pmunch "But maybe what I": hmm, my prob. was about the initial track crossing itself. A obstacle placed on a 'junction' can only be passed from the intial heading, but not later-in-time from any other direction, cos' its a obstacle 🙂
18:20:27FromDiscord<bosinski2023> In reply to @pmunch "But maybe what I": maybe some data-sets are more compute-intesive than others. My initial walk is >6.000-steps.
18:20:37FromDiscord<bosinski2023> (edit) "compute-intesive" => "compute-intensive"
18:22:18FromDiscord<bosinski2023> (edit) "In reply to @pmunch "But maybe what I": maybe some data-sets are more compute-intensive than others. My initial walk is >6.000-steps. ... " added "After some reduction, still ~5.600 possible locations for obstacles remain with average 4.000 steps to go => 20/Mill lookups.."
18:40:50*coldfeet joined #nim
18:50:39*nils` quit (Ping timeout: 265 seconds)
19:23:40FromDiscord<.bobbbob> In reply to @4zv4l "is there a tool": maybe use w3m or links to open the html on the terminal?
19:37:56*nils` joined #nim
19:50:31*ftajhii quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
19:54:18FromDiscord<.throwstar> Is there a way to tell the compiler that an `{.emit.}`ed statement compiles to something that has a type? ↵Im working with js and only a small subset of the DOM is supported so Im trying to implement what I need
19:54:57Amun-Rayou can create type based on JsObject
19:55:35Amun-Raand play with {.importjs.}
19:56:21Amun-Rait'll work almost exactly like emit, but with type control
19:56:35FromDiscord<.throwstar> Ill look into these, thanks
19:56:49Amun-Rasee how they done it in stdlib, ie: lib/js/jsre.nim
20:01:06*ftajhii joined #nim
20:05:21*coldfeet quit (Quit: Lost terminal)
20:37:40*modev joined #nim
20:46:40*modev quit (Quit: WeeChat 4.4.2)
21:51:36*ntat quit (Quit: Leaving)
22:53:52FromDiscord<.throwstar> Nim makes webdev enjoyable
23:09:01*modev joined #nim
23:10:19*modev quit (Client Quit)
23:39:25FromDiscord<pmunch> In reply to @bosinski2023 "maybe some data-sets are": Oh yeah, comparing across peoples inputs can't be done down to the ms level. But you should be able to uncover 10x speedups and such. I've got a 4th gen i7, so not exactly a speed demon over here...