joyride

mauricio.szabo 2022-05-13T02:20:03.180459Z

I answered on the GitHub discussions but I'll also explain here - in the past, I did make an experiment about awaiting promises in SCI (nbb) by changing the way SCI evals things. It made everything way slower, because basically the idea was to "bubble" promises until it hit the top-level form, and then await for that promise before evaluating the next top-form. So it is doable, the only question is that if it's worth it :D

borkdude 2022-05-13T08:58:08.418989Z

@mauricio.szabo I think it's interesting but I have a few concerns: 1. it is not standard CLJS so people might be confused by it - if CLJS will ever support await, then we would have a good implementation reference to compare against 2. performance :) but I think we could look into making it much faster, if we e.g. don't overload deref. In nbb I chose to use nbb.core/await and use a counter to check if it has been called, so I don't have to do anything if the counter stays the same. 3. it might not be necessary since with promesa you can handle "inner" promises sufficiently well, that's why I chose to only support the top level await in nbb with much less complex logic 4. if this would be supported in SCI, then I'd have to maintain it forever and I'm not sure if that would get me into a rabbit hole, as I haven't looked into the implementation deeply enough. Yet, I do appreciate that you've investigated this hack and we might revisit it in the future :-D

mauricio.szabo 2022-05-13T14:01:08.201209Z

Yes, I agree with all your points πŸ˜„. As for performance, it may be possible to make it faster, but I believe not by much - the trouble is that for this hack to work, it needs to "bubble up" the promise so every form evaluated may pay the performance price... And I also don't think it should be supported in SCI at all πŸ˜„

borkdude 2022-05-13T14:32:42.372389Z

but if you don't use the cljs.dialect/await form, then you should not have to do anything

pez 2022-05-13T13:44:39.031719Z

Idea for a video. We convince @danielamber2 to record a Joyride video with the three of us, Daniel, @borkdude and me. We tunnel out the REPL connection to Borkdude who insists on using Emacs and is Joyriding my or Daniel's editor from Emacs. No clue what else we would be doing in the video, but I'm sure we can figure something out. πŸ˜ƒ

Daniel Amber 2022-05-15T17:24:03.136829Z

Yes! Lets do this! πŸ˜„ i've been very quiet recently! We're about to have a baby so time has been tight! But I think I can do this at the end of June if you guys don't mind waiting πŸ˜› otherwise might be best to do this without me?

Daniel Amber 2022-05-15T17:25:04.846069Z

Unless we think of something we can do quickly? Maybe we can chat about this on Thursday?

borkdude 2022-05-15T18:08:16.203019Z

@danielamber2 Let's take our time. End of June is fine with me, then we have more time to mature joyride a bit :)

Daniel Amber 2022-05-15T18:15:40.745449Z

Awesome πŸ˜„

pez 2022-05-15T18:41:33.163049Z

Oh, wow

pez 2022-05-15T18:41:58.833009Z

A baby! That's wonderful!

borkdude 2022-05-15T18:58:12.346669Z

Congrats!

borkdude 2022-05-13T13:46:21.036189Z

hahaha sure

2
borkdude 2022-05-13T13:47:04.568579Z

Daniel already uses VSCode / Calva so he would be a good user to test this and make a video about it, while we're in the backseat giving him instructions ;)

borkdude 2022-05-13T13:47:34.868399Z

And I kill the electron process from emacs occasionally

pez 2022-05-13T13:47:39.801099Z

Giving his REPL server ”instructions” πŸ˜ƒ