💾 Archived View for gemini.circumlunar.space › users › wakyct › el › 08-07-2020.gmi captured on 2020-10-31 at 00:59:39. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2020-09-24)
-=-=-=-=-=-=-
I've found (as an amateur enthusiast) in the handful of times I've messed around with lisp that, even though repl-based interactive development is held up as one of its selling points, it's often easier to develop with the dirt simple code -> compile -> test -> code cycle common to most every development environment, using the repl occasionally to test some assumption. What happened was I started out that way with the Complete Roguelike Tutorial and Chicken Scheme, but after the first week I realized I really wanted to try repl-based development, and on top of that develop the game while it was running. Live coding has always been fascinating to me but I've never done much with it. One aha moment was watching a video where the programmer noted they didn't typically work in the repl itself, but sent forms to it from the code buffer.
Practical Chicken Scheme with Emacs - hello-world webserver
But when I followed along in my Emacs, it wasn't working correctly. Like the video I would start a green thread to run a loop and keep my repl from blocking, but the output from the loop wouldn't flush normally -- only when I flushed output from the main thread would the green thread's output flush as well.
Fortunately, I got great help from the chicken-users mailing list,
https://lists.nongnu.org/archive/html/chicken-users/2020-07/msg00000.html
And I now have a working live coding environment, albeit with some indirection and third party tooling thrown in. But the initial problem I had kept bugging me. I got a clue about the issue by doing some research in the Chicken and Emacs mailing lists and got a reply from an Emacs maintainer on /r/emacs,
https://www.reddit.com/r/emacs/comments/hkcfjo/scheme_repls_on_windows_and_threads/
The accepted fact up to this point in all the discussion I read was that Windows generally had these types of problems because unlike Unixy systems it didn't have pseudo ttys (ptys). But then I read this blog post,
So Windows now has a pty. Putting two and two together, it seems feasible for Emacs to use this new Windows feature to improve how Emacs communicates with sub processes on Windows.
Even though I now have a perfectly workable solution for the issue I had with my immedate task (the roguelike tutorial) this idea of improving Emacs is also now firmly lodged in my thinking meat. I was inspired to ask about it in Emacsland,
https://lists.gnu.org/archive/html/help-emacs-windows/2020-07/msg00000.html
And here I am.
And now I C-x C-f to code, I hope I finish before I grow old. And if I die before I save, that's one less yak I'll have to shave.