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:38 | FromDiscord | <zectbumo> `koch web` doesn't work↵`Error: invalid command: web`↵https://nim-lang.org/docs/koch.html#commands-web-command |
03:32:43 | FromDiscord | <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:40 | FromDiscord | <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:12 | FromDiscord | <bung8954> and I don't see these from https://www.iana.org/assignments/media-types/media-types.xhtml |
07:33:04 | PMunch | A hint at least: https://github.com/nim-lang/Nim/pull/10621 |
07:50:02 | * | advesperacit joined #nim |
07:50:53 | FromDiscord | <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:03 | Amun-Ra | you 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:20 | PMunch | I'm guessing --gc:refc --exceptions:goto |
09:09:50 | PMunch | ARC/ORC changes the exception handling I believe |
09:11:35 | Amun-Ra | it still needs setjmp |
09:13:52 | Amun-Ra | I'm on 2.1.1, I'll check that behavior on 2.0.2 |
09:14:12 | PMunch | Just curious, why don't you want to use setjmp? |
09:15:34 | Amun-Ra | I'm testing compiling to wasm with clang with target wasm32-wasi, there's no setjmp in libc-wasi |
09:22:47 | Amun-Ra | it's used by markStackAndRegisters |
09:23:20 | PMunch | Ah I see |
09:41:44 | * | krux02 joined #nim |
09:44:16 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
10:11:09 | FromDiscord | <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:45 | Amun-Ra | I've to check nlvm out |
10:15:02 | Amun-Ra | emscripten works fine with 2.x line, but my AmigaOS ports won't build |
11:19:52 | FromDiscord | <arnetheduck> nah, as in - it _could_ be done with nlvm but the feature is not there yet |
11:31:18 | Amun-Ra | nlvm did compile sample successfully |
11:47:11 | FromDiscord | <arnetheduck> yeah, by disabling the gc entirely 😉 |
11:47:20 | FromDiscord | <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:28 | Amun-Ra | oh :P |
12:42:53 | * | jjido joined #nim |
12:47:35 | FromDiscord | <Robyn [She/Her]> In reply to @PMunch "Just curious, why don't": WASM doesn't support it |
13:13:09 | PMunch | Yeah Amun-Ra already told me :P |
13:16:13 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
13:17:59 | PMunch | Well 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:08 | PMunch | Huh, it actually looks like Futhark messed up the memory layout for this object |
13:25:15 | PMunch | I'll be damned |
13:31:49 | PMunch | Hmm, 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:58 | PMunch | Hmm, 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:54 | Amun-Ra | it should be sizeof(cint) or sizeof(cuint) |
14:26:40 | * | rockcavera quit (Remote host closed the connection) |
14:31:05 | PMunch | Yeah that's what it is currently |
14:31:15 | PMunch | Or it gets the underlying int type from clang |
14:31:25 | PMunch | But 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:37 | Amun-Ra | I 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:23 | Amun-Ra | I need to pass proc name (typed) to template/macro, what's the best way of obtaining its name as string? |
16:46:52 | Amun-Ra | well, 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:09 | Amun-Ra | got it: https://play.nim-lang.org/#pasty=PNducYegjFJF |
17:15:28 | FromDiscord | <bung8954> how to generate doc if my module all procs are platform specific ? |
17:16:28 | Amun-Ra | you can add clause to when |
17:16:45 | Amun-Ra | for example: when defined(js) or defined nimdoc: import myspecificjsmodule |
17:17:17 | Amun-Ra | "or defined nimdoc" is your friend :> |
17:19:46 | FromDiscord | <bung8954> stil I can only find my procs in index, and only the windows procs am running on |
17:21:32 | Amun-Ra | I suspect you have still an expression somewhere that evaluates false |
17:24:51 | Amun-Ra | ie: add {.error.} pragma to parts of the code that doesn't show up and check whether it pops with nim doc |
17:26:21 | FromDiscord | <bung8954> I attempt to use `when defined(nimdoc)` and put all procs declaration under it , but compiler tell me need implement it. |
17:31:06 | FromDiscord | <Phil> Hmmm still struggling with how to set up an event-loop with chronos that has all the properties I want |
17:38:19 | FromDiscord | <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:40 | Amun-Ra | poll has a timeout |
17:39:53 | FromDiscord | <Phil> sent a long message, see https://pasty.ee/ZBKplzzhyCki |
17:40:01 | FromDiscord | <Phil> In reply to @Amun-Ra "poll has a timeout": std/asyncdispatch.poll has |
17:40:01 | Amun-Ra | I mean at least poll(2) has |
17:40:06 | FromDiscord | <Phil> chronos poll does not |
17:40:11 | Amun-Ra | ah :/ |
17:40:24 | FromDiscord | <Phil> Which is why once you're stuck in poll you're dead |
17:40:56 | FromDiscord | <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:12 | FromDiscord | <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:44 | FromDiscord | <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:04 | FromDiscord | <Phil> (edit) "then." => "then, it'll not change performance really." |
17:44:43 | FromDiscord | <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:59 | FromDiscord | <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:26 | Amun-Ra | I haven't played with chronos at all |
17:47:36 | FromDiscord | <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:41 | FromDiscord | <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:04 | FromDiscord | <Phil> In reply to @Amun-Ra "I haven't played with": Turns out I just can't read |
18:06:06 | FromDiscord | <Phil> As is so often the case |
18:06:37 | Amun-Ra | ;) |
18:06:40 | FromDiscord | <Phil> sent a long message, see https://pasty.ee/BEmXvXpPpkXr |
18:06:52 | Amun-Ra | story of my life too |
18:08:38 | FromDiscord | <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:07 | FromDiscord | <pmp_p> sent a code paste, see https://play.nim-lang.org/#pasty=RWGckGTzAonE |
19:16:46 | * | pmp-p joined #nim |
19:17:44 | pmp-p | Amun-Ra: did you finally test with 2.0.2 for wasi ? |
19:25:14 | FromDiscord | <pmp_p> In reply to @pmp_p "i'm trying to define": nvm i forgot -mexec-model=reactor |
19:34:18 | Amun-Ra | pmp-p: I modified my project to be 1.6.x compatible |
19:35:03 | FromDiscord | <pmp_p> because of setjmp ? |
19:35:07 | Amun-Ra | yes |
19:35:31 | Amun-Ra | I mean emscripten works fine but I have to target other platforms |
19:36:56 | FromDiscord | <pmp_p> well i don' t use exceptions so i'll stick to 2.0.2 |
19:37:16 | Amun-Ra | I'll test something else: .nim -> .wasm -> .c (wasm2c) ;) |
19:37:55 | Amun-Ra | you don't have to use exceptions at all for resulting C file to use setjmp |
19:38:15 | pmp-p | well i just linked noop |
19:38:26 | pmp-p | btw for wasm2c this one may do the job https://github.com/tyfkda/xcc |
19:38:31 | Amun-Ra | hmm |
19:39:18 | pmp-p | i also added proc mmap(adr: pointer, len: int, prot, flags, fildes: cint,off: uint64): cint {.exportC} = 0 |
19:39:18 | pmp-p | proc munmap(adr: pointer, len: int): cint {.exportC } = 0 |
19:39:43 | pmp-p | it wanted to link them too |
19:39:51 | Amun-Ra | use -d=usemalloc |
19:39:59 | pmp-p | ha |
19:40:06 | Amun-Ra | that should switch nim from using mmap to use malloc |
19:40:34 | pmp-p | yes nice ! |
19:43:07 | Amun-Ra | thanks for the link, I'm going to test xcc tomorrow :> |
20:08:35 | FromDiscord | <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:51 | FromDiscord | <maxtachine> on nim 2.0.2 |
20:09:32 | FromDiscord | <Elegantbeef> You left out `var` on the parameter |
20:10:04 | FromDiscord | <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:08 | FromDiscord | <Phil> or rather, seq |
20:10:37 | FromDiscord | <Phil> Ah no wait that's a different add |
20:10:52 | FromDiscord | <maxtachine> nvm it works |
20:11:06 | FromDiscord | <maxtachine> its been a bit since i last used nim |
20:14:37 | * | jjido joined #nim |
20:16:50 | FromDiscord | <kcvinker5420> sent a code paste, see https://play.nim-lang.org/#pasty=JfMmadyBoduJ |
20:17:04 | FromDiscord | <Elegantbeef> If you alloc you free |
20:17:38 | FromDiscord | <kcvinker5420> How to make GC take care of this ? |
20:18:38 | FromDiscord | <griffith1deadly> In reply to @kcvinker5420 "How to make GC": wrap it into object/ref object with `=destroy` hook override |
20:19:41 | FromDiscord | <kcvinker5420> Wraping it inside an object/ref obj is okay. But I never succeeded in writing a `=destroy` proc |
20:22:54 | FromDiscord | <Elegantbeef> Well without showing a failure we can only really point and laugh |
20:23:05 | FromDiscord | <Elegantbeef> Maybe I'm still too sick to interact with people |
20:25:37 | FromDiscord | <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:16 | FromDiscord | <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:53 | FromDiscord | <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:14 | FromDiscord | <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:29 | FromDiscord | <Phil> (edit) "etc." => "(which I contributed to)etc." |
20:46:43 | FromDiscord | <Q-Master> There's a sandbox for it written by HappyX author. https://hub.docker.com/r/qtless/happyx-sandbox-api↵(@penguinite) |
20:47:21 | FromDiscord | <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:39 | FromDiscord | <Q-Master> Author is mainly in telegram AFAIK |
20:48:33 | FromDiscord | <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:13 | FromDiscord | <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:39 | FromDiscord | <kcvinker5420> How do I know which c compiler is my nim compiler uses ? |
22:05:40 | FromDiscord | <leorize> `--listCmd`? |
22:05:58 | FromDiscord | <kcvinker5420> Thanks. Let me check. |
22:06:14 | FromDiscord | <user2m> sent a code paste, see https://play.nim-lang.org/#pasty=ugZCjjAhFQWc |
22:06:29 | FromDiscord | <user2m> (edit) "https://play.nim-lang.org/#pasty=bvaauARlakrt" => "https://play.nim-lang.org/#pasty=uUmNBxBEmnEA" |
22:07:00 | FromDiscord | <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:54 | FromDiscord | <kcvinker5420> sent a code paste, see https://play.nim-lang.org/#pasty=FQSWRVgYmXIu |