<< 18-01-2024 >>

01:07:56*krux02 quit (Remote host closed the connection)
01:25:03*lucasta joined #nim
01:59:56*casaca joined #nim
02:00:20*lucasta quit (Remote host closed the connection)
03:15:23*flouer quit (Remote host closed the connection)
03:16:14*flouer joined #nim
03:31:38FromDiscord<zectbumo> `koch web` doesn't work↵`Error: invalid command: web`↵https://nim-lang.org/docs/koch.html#commands-web-command
03:32:43FromDiscord<zectbumo> oh, I probably built a leanCompiler. got it
03:51:56*nmz joined #nim
04:42:29*jkl__ is now known as jkl
04:48:31*azimut quit (Ping timeout: 240 seconds)
04:48:38*disso-peach joined #nim
05:15:53*flouer quit (Remote host closed the connection)
05:16:12*flouer joined #nim
05:59:24*rockcavera quit (Remote host closed the connection)
07:08:16*redj quit (Ping timeout: 245 seconds)
07:10:12*redj joined #nim
07:10:41*PMunch joined #nim
07:16:40FromDiscord<bung8954> anyone know where is the original data source for https://github.com/nim-lang/Nim/blob/devel/lib/pure/mimetypes.nim↵It seems wrong that `text/plain` registered to so many extensions.
07:17:12FromDiscord<bung8954> and I don't see these from https://www.iana.org/assignments/media-types/media-types.xhtml
07:33:04PMunchA hint at least: https://github.com/nim-lang/Nim/pull/10621
07:50:02*advesperacit joined #nim
07:50:53FromDiscord<bung8954> thanks! so there must be something wrong, I checked text/plain extension, both source site not same as the nim source.
08:15:27*jjido joined #nim
09:02:03Amun-Rayou can disable using setjmp in nim 1.6 with --exceptions=goto, nim 2.x seems to use setjmp either way, is there a way to disable generating C code without setjmp in Nim 2?
09:09:20PMunchI'm guessing --gc:refc --exceptions:goto
09:09:50PMunchARC/ORC changes the exception handling I believe
09:11:35Amun-Rait still needs setjmp
09:13:52Amun-RaI'm on 2.1.1, I'll check that behavior on 2.0.2
09:14:12PMunchJust curious, why don't you want to use setjmp?
09:15:34Amun-RaI'm testing compiling to wasm with clang with target wasm32-wasi, there's no setjmp in libc-wasi
09:22:47Amun-Rait's used by markStackAndRegisters
09:23:20PMunchAh I see
09:41:44*krux02 joined #nim
09:44:16*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
10:11:09FromDiscord<arnetheduck> In reply to @Amun-Ra "it's used by markStackAndRegisters": technically, that's solveable with nlvm that can fetch gc roots the compiler instead of making conservative guesses with setjmp - it's a bit of work though
10:14:45Amun-RaI've to check nlvm out
10:15:02Amun-Raemscripten works fine with 2.x line, but my AmigaOS ports won't build
11:19:52FromDiscord<arnetheduck> nah, as in - it _could_ be done with nlvm but the feature is not there yet
11:31:18Amun-Ranlvm did compile sample successfully
11:47:11FromDiscord<arnetheduck> yeah, by disabling the gc entirely 😉
11:47:20FromDiscord<arnetheduck> (edit) "yeah, by disabling the gc entirely ... 😉" added "in wasm mode"
12:24:30*azimut joined #nim
12:36:14*azimut quit (Remote host closed the connection)
12:36:43*azimut joined #nim
12:40:28Amun-Raoh :P
12:42:53*jjido joined #nim
12:47:35FromDiscord<Robyn [She/Her]> In reply to @PMunch "Just curious, why don't": WASM doesn't support it
13:13:09PMunchYeah Amun-Ra already told me :P
13:16:13*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
13:17:59PMunchWell isn't this fun.. Debugging my program in GDB. Everything looks good, values are set in my object, then I enter a function declared in C and all of a sudden my object changes and the `data` pointer stored in the object is null..
13:19:48*rockcavera joined #nim
13:25:08PMunchHuh, it actually looks like Futhark messed up the memory layout for this object
13:25:15PMunchI'll be damned
13:31:49PMunchHmm, the C code is a simple enum with two fields mapped to 0U and 1U. But clang sees this as being cuint in size..
13:44:23*gooba quit (Remote host closed the connection)
13:47:47*gooba joined #nim
13:50:36*cnx quit (Remote host closed the connection)
13:51:24*cnx joined #nim
13:51:58*gooba_ joined #nim
13:54:28*goober__ joined #nim
13:55:07*gooba quit (Ping timeout: 276 seconds)
13:55:58PMunchHmm, so this is annoying. I manually changed the Futhark wrapper, and now it works, but now I need to figure out how to make Clang give me the actual size of the enum..
13:57:15*gooba_ quit (Ping timeout: 268 seconds)
14:00:27*gooba_ joined #nim
14:02:53*goober__ quit (Ping timeout: 252 seconds)
14:04:54Amun-Rait should be sizeof(cint) or sizeof(cuint)
14:26:40*rockcavera quit (Remote host closed the connection)
14:31:05PMunchYeah that's what it is currently
14:31:15PMunchOr it gets the underlying int type from clang
14:31:25PMunchBut for some reason it packs it into a single byte in this object..
14:35:10*rockcavera joined #nim
15:05:22*xet7 quit (Ping timeout: 246 seconds)
15:11:08*jjido joined #nim
15:12:25*PMunch quit (Quit: Leaving)
15:25:54*xet7 joined #nim
15:40:09*junaid_ joined #nim
15:42:40*junaid_ quit (Client Quit)
15:52:06*xet7 quit (Remote host closed the connection)
16:01:33*xet7 joined #nim
16:07:06*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
16:20:43*jmdaemon quit (Ping timeout: 276 seconds)
16:28:37Amun-RaI always mark C enums with size pragma
16:36:55*azimut quit (Ping timeout: 240 seconds)
16:39:08*azimut joined #nim
16:42:46*azimut quit (Remote host closed the connection)
16:44:18*azimut joined #nim
16:44:23Amun-RaI need to pass proc name (typed) to template/macro, what's the best way of obtaining its name as string?
16:46:52Amun-Rawell, var of proc type to be precise
16:52:03*azimut quit (Remote host closed the connection)
16:52:38*azimut joined #nim
16:58:09Amun-Ragot it: https://play.nim-lang.org/#pasty=PNducYegjFJF
17:15:28FromDiscord<bung8954> how to generate doc if my module all procs are platform specific ?
17:16:28Amun-Rayou can add clause to when
17:16:45Amun-Rafor example: when defined(js) or defined nimdoc: import myspecificjsmodule
17:17:17Amun-Ra"or defined nimdoc" is your friend :>
17:19:46FromDiscord<bung8954> stil I can only find my procs in index, and only the windows procs am running on
17:21:32Amun-RaI suspect you have still an expression somewhere that evaluates false
17:24:51Amun-Raie: add {.error.} pragma to parts of the code that doesn't show up and check whether it pops with nim doc
17:26:21FromDiscord<bung8954> I attempt to use `when defined(nimdoc)` and put all procs declaration under it , but compiler tell me need implement it.
17:31:06FromDiscord<Phil> Hmmm still struggling with how to set up an event-loop with chronos that has all the properties I want
17:38:19FromDiscord<Phil> I mean, thans to arne's advice I managed to find a way to no longer need sleep and thus be more energy efficient, but I keep getting stuck at it being neither possible to interrupt poll() nor possible to prevent poll() from being stuck in an eternal loop (since once the thread is stuck in poll() without work in the queue, your thread is basically stuck).↵↵All the examples I see rely on you sort of just being able to spawn a bunch of
17:39:40Amun-Rapoll has a timeout
17:39:53FromDiscord<Phil> sent a long message, see https://pasty.ee/ZBKplzzhyCki
17:40:01FromDiscord<Phil> In reply to @Amun-Ra "poll has a timeout": std/asyncdispatch.poll has
17:40:01Amun-RaI mean at least poll(2) has
17:40:06FromDiscord<Phil> chronos poll does not
17:40:11Amun-Raah :/
17:40:24FromDiscord<Phil> Which is why once you're stuck in poll you're dead
17:40:56FromDiscord<Phil> And thus chronos really wants to force you to a pattern where you collect a bunch of futures and waitFor them in a batch-like manner
17:42:12FromDiscord<Phil> At least for my purposes where I want one thread to be active and processing and responsive as long as messages get sent to it and only spin down to a low power state when it is neither receiving messages, nor has left over async work to perform from previous messages that require multiple poll calls to finish
17:42:44FromDiscord<Phil> With the "waitFor combined futures" pattern I can basically just ditch async because for my purposes you might as well not bother with it then.
17:43:04FromDiscord<Phil> (edit) "then." => "then, it'll not change performance really."
17:44:43FromDiscord<Phil> Because if e.g. your main thread fires multiple messages to your backend thread that trigger async IO operations (for example), the only way to efficiently do them "together" / "in parallel via async" would be to combine all those messages into an individual one that deals with multiple async-IO operations at once.
17:44:59FromDiscord<Phil> (edit) "Because if e.g. your main thread fires multiple messages to your backend thread that trigger async IO operations (for example), the only way to efficiently do them "together" / "in parallel via async" ... would" added "in the backend-thread"
17:45:26Amun-RaI haven't played with chronos at all
17:47:36FromDiscord<Phil> I mean, for the most part what I understood from arne is that what I'm trying to do is an anti-pattern. Or at least uses things that are commonly used in anti-patterns
17:48:41FromDiscord<Phil> I just don't get how the alternatively proposed solutions are supposed to have the same or better properties
17:51:27*advesperacit quit ()
17:54:02*advesperacit joined #nim
18:04:52*azimut quit (Remote host closed the connection)
18:05:54*azimut joined #nim
18:06:04FromDiscord<Phil> In reply to @Amun-Ra "I haven't played with": Turns out I just can't read
18:06:06FromDiscord<Phil> As is so often the case
18:06:37Amun-Ra;)
18:06:40FromDiscord<Phil> sent a long message, see https://pasty.ee/BEmXvXpPpkXr
18:06:52Amun-Rastory of my life too
18:08:38FromDiscord<Phil> @arnetheduck Thanks again for the forum posts. ↵Particularly that second one was gold.↵It took me a couple days to finally understand what you meant as well as learning some basics for mechanisms like epoll (so I could get a mental model for ThreadSignal going) but I think I have the basics for proceeding from there.
18:37:07FromDiscord<pmp_p> sent a code paste, see https://play.nim-lang.org/#pasty=RWGckGTzAonE
19:16:46*pmp-p joined #nim
19:17:44pmp-pAmun-Ra: did you finally test with 2.0.2 for wasi ?
19:25:14FromDiscord<pmp_p> In reply to @pmp_p "i'm trying to define": nvm i forgot -mexec-model=reactor
19:34:18Amun-Rapmp-p: I modified my project to be 1.6.x compatible
19:35:03FromDiscord<pmp_p> because of setjmp ?
19:35:07Amun-Rayes
19:35:31Amun-RaI mean emscripten works fine but I have to target other platforms
19:36:56FromDiscord<pmp_p> well i don' t use exceptions so i'll stick to 2.0.2
19:37:16Amun-RaI'll test something else: .nim -> .wasm -> .c (wasm2c) ;)
19:37:55Amun-Rayou don't have to use exceptions at all for resulting C file to use setjmp
19:38:15pmp-pwell i just linked noop
19:38:26pmp-pbtw for wasm2c this one may do the job https://github.com/tyfkda/xcc
19:38:31Amun-Rahmm
19:39:18pmp-pi also added proc mmap(adr: pointer, len: int, prot, flags, fildes: cint,off: uint64): cint {.exportC} = 0
19:39:18pmp-p proc munmap(adr: pointer, len: int): cint {.exportC } = 0
19:39:43pmp-pit wanted to link them too
19:39:51Amun-Rause -d=usemalloc
19:39:59pmp-pha
19:40:06Amun-Rathat should switch nim from using mmap to use malloc
19:40:34pmp-pyes nice !
19:43:07Amun-Rathanks for the link, I'm going to test xcc tomorrow :>
20:08:35FromDiscord<maxtachine> guys im a bit lost why is it doing that https://media.discordapp.net/attachments/371759389889003532/1197633656395673670/image.png?ex=65bbfa42&is=65a98542&hm=6609624c9f40c05fc12d4f214aac551950da690bf5e118890598f4834fe6ba34& https://media.discordapp.net/attachments/371759389889003532/1197633656865431733/image.png?ex=65bbfa42&is=65a98542&hm=ea982d31a098f02c989221a471c51cbdd86c37e19cdae24b96a5fba563f2d5b0&
20:08:51FromDiscord<maxtachine> on nim 2.0.2
20:09:32FromDiscord<Elegantbeef> You left out `var` on the parameter
20:10:04FromDiscord<Phil> In reply to @maxtachine "guys im a bit": To expand on what beef wrote:↵You're trying to add an entry to an immutable list
20:10:08FromDiscord<Phil> or rather, seq
20:10:37FromDiscord<Phil> Ah no wait that's a different add
20:10:52FromDiscord<maxtachine> nvm it works
20:11:06FromDiscord<maxtachine> its been a bit since i last used nim
20:14:37*jjido joined #nim
20:16:50FromDiscord<kcvinker5420> sent a code paste, see https://play.nim-lang.org/#pasty=JfMmadyBoduJ
20:17:04FromDiscord<Elegantbeef> If you alloc you free
20:17:38FromDiscord<kcvinker5420> How to make GC take care of this ?
20:18:38FromDiscord<griffith1deadly> In reply to @kcvinker5420 "How to make GC": wrap it into object/ref object with `=destroy` hook override
20:19:41FromDiscord<kcvinker5420> Wraping it inside an object/ref obj is okay. But I never succeeded in writing a `=destroy` proc
20:22:54FromDiscord<Elegantbeef> Well without showing a failure we can only really point and laugh
20:23:05FromDiscord<Elegantbeef> Maybe I'm still too sick to interact with people
20:25:37FromDiscord<kcvinker5420> In reply to @Elegantbeef "Maybe I'm still too": No probs. Sometimes it's quite hard to reopen the closed chapters. But yeah, when I get more courage to experiment with `=destory` I will sure come with a sample code.
20:43:16FromDiscord<penguinite> Is there someone with experience in writing happyx here? What did you think of it? I am considering using it in place of Karax+Jester
20:43:53FromDiscord<Phil> Haven't written in it, but from what I'm seeing from Ethosa if I were to try something new out, I'd use it
20:45:14FromDiscord<Phil> I interacted with them only on the basis of them providing integration with norm etc. ↵Their goal seems to really be to build something with batteries included.↵How high quality that is I cannot say, but at a glance they appear to know what they're doing
20:45:29FromDiscord<Phil> (edit) "etc." => "(which I contributed to)etc."
20:46:43FromDiscord<Q-Master> There's a sandbox for it written by HappyX author. https://hub.docker.com/r/qtless/happyx-sandbox-api↵(@penguinite)
20:47:21FromDiscord<Phil> In reply to @Q-Master "There's a sandbox for": It's stuff like this, all the little tooling things surrounding the project that Ethosa is writing that make me think they know what they're doing
20:47:39FromDiscord<Q-Master> Author is mainly in telegram AFAIK
20:48:33FromDiscord<penguinite> I think using happyx is a good idea then, I could have replaced just jester with fx. prologue since I just need an actively maintained framework but I decided to replace the both of them.
20:50:13FromDiscord<Phil> In reply to @Q-Master "Author is mainly in": I mean, their "Discussion" section on github is open as well. So if there were a larger topic to discuss or question to ask it would make sense to ask it there
21:30:35*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
21:34:13*jjido joined #nim
21:51:17*jmdaemon joined #nim
22:03:39FromDiscord<kcvinker5420> How do I know which c compiler is my nim compiler uses ?
22:05:40FromDiscord<leorize> `--listCmd`?
22:05:58FromDiscord<kcvinker5420> Thanks. Let me check.
22:06:14FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#pasty=ugZCjjAhFQWc
22:06:29FromDiscord<user2m> (edit) "https://play.nim-lang.org/#pasty=bvaauARlakrt" => "https://play.nim-lang.org/#pasty=uUmNBxBEmnEA"
22:07:00FromDiscord<user2m> (edit) "https://play.nim-lang.org/#pasty=dbizEMvjHEao" => "https://play.nim-lang.org/#pasty=euGAlPEGAKlv"
22:54:24*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
22:59:57*advesperacit quit ()
23:23:47*mal`` quit (Quit: Leaving)
23:38:02*mal`` joined #nim
23:58:54FromDiscord<kcvinker5420> sent a code paste, see https://play.nim-lang.org/#pasty=FQSWRVgYmXIu