8 Mar 2024 |
FromIRC | <disruptek> don't take our word for it, though. the impl is in user-land nim. if you want to see the differences in how they are implemented, you can literally compare the impls. | 22:04:33 |
15 Mar 2024 |
| @noracat:nitro.chat joined the room. | 12:36:31 |
| @noracat:nitro.chat left the room. | 12:36:47 |
17 Mar 2024 |
Robyn [She/Her] | I believe Leorize talked about how my event system I made a while ago would be unnecessary with cps, but I'm not sure how exactly, could someone elaborate? https://github.com/Nimberite-Development/Pulse-Nim it has a basic example of how it works in the README | 20:43:35 |
leorize | my comment was on how you were using them | 21:00:03 |
leorize | iirc you were trying to dispatch read/write commands to an I/O thread then wait for a responding event | 21:01:42 |
leorize | of which I commented that cps could render this obsolete because you can just move the "compute" to an another thread and unblock your current one, then resume once you're done | 21:02:14 |
Robyn [She/Her] | In reply to @leorize:envs.net iirc you were trying to dispatch read/write commands to an I/O thread then wait for a responding event Yeah | 21:32:02 |
Robyn [She/Her] | In reply to @leorize:envs.net of which I commented that cps could render this obsolete because you can just move the "compute" to an another thread and unblock your current one, then resume once you're done Ah okay so then my event system is still important then? :P | 21:32:33 |
18 Mar 2024 |
FromIRC | <disruptek> if it works for you, keep using it. this is basically promises, which are naturally implemented in cps just as you experience them in js (which is cps under the covers). | 02:14:19 |
FromIRC | <disruptek> if there's an advantage to doing it with cps, it's that all the metaprogramming of composing events and handlers and type-erasure is all performed for you by the cps transform. that's about it. | 02:15:16 |
21 Mar 2024 |
Robyn [She/Her] | In reply to @leorize-irc-bridge:envs.net <disruptek> if there's an advantage to doing it with cps, it's that all the metaprogramming of composing events and handlers and type-erasure is all performed for you by the cps transform. that's about it. My idea was to pass continuations across threads seeing as that's doable, which would let me push events that are supposed to happen on a specific thread (networking vs game updates) | 22:28:57 |
Robyn [She/Her] | Also, would Mummy + CPS make sense? I'm not too sure since I think it's using std/net under the hood so I wouldn't benefit from ioqueue, but maybe I'd still benefit from cps? But my understanding of cps is limited and I'm used to asyncdispatch and similar | 22:31:17 |
disruptek | take a look at Zevv’s actors. | 22:36:16 |
disruptek | if that doesn’t blow your mind, then you want my insideout project. | 22:36:42 |
Robyn [She/Her] | # Wait for all the kids to finish, then kill the calculator hm... | 22:47:56 |
Robyn [She/Her] | Ah okay | 22:48:13 |
Robyn [She/Her] | I think I understand | 22:48:17 |
Robyn [She/Her] | Yeah okay I'm struggling to wrap my head around that, I'll probably end up tinkering with cps once I get a MVP | 23:18:58 |
disruptek | go look at insideout/examples/telegram.nim | 23:22:00 |
Robyn [She/Her] | That was what I was looking at | 23:38:10 |
Robyn [She/Her] | It's probably a case of me using it myself and tinkering with the example to understand it | 23:39:01 |
FromIRC | <disruptek> what is the app. | 23:39:30 |
FromIRC | <disruptek> if you are coming from a web background, maybe phil's threadbutler appeals to your taste. | 23:40:08 |
FromIRC | <disruptek> not a lot of asyncdispatch fans here, though, i'm afraid. | 23:40:33 |
Robyn [She/Her] | In reply to @leorize-irc-bridge:envs.net <disruptek> if you are coming from a web background, maybe phil's threadbutler appeals to your taste. I don't come from a web background, I've mostly tinkered on small projects here and there, currently I'm attempting to work on a chat server, I'll take a look at telegram.nim again once I've gotten a fresher head, maybe that'll help me to understand it more | 23:48:08 |
Robyn [She/Her] | In reply to @leorize-irc-bridge:envs.net <disruptek> not a lot of asyncdispatch fans here, though, i'm afraid. To be fair, there is a reason I'm here and not using asyncdispatch, I'm looking into learning multithreading while still having the convinience that asyncdispatch or alternatives could provide me, and cps looks very versatile | 23:49:26 |
22 Mar 2024 |
FromIRC | <disruptek> what if it compiled faster but, like, you could only use it for coroutines. | 01:22:49 |
varriount | disruptek: CPS looks really neat. I am curious though - doesn't the fact that any section of a continuation can be run more than once (or out of order, etc.) prevent compiler optimizations? | 02:59:03 |
FromIRC | <Zevv> sure. even if you run it *in* order | 05:00:48 |