Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm not going to have a great answer for how, especially in something with as much legacy as emacs. And I certainly don't mean to imply that solving the problem is easy (or possible for 100% of cases), or otherwise detract from efforts that the community has made.

My intent was to highlight on what a good solution looks like from a user perspective.

Off the top of my head, in an incredibly hand-wavey fashion:

A quick win would be to set a timeout on every single i/o action, with the default timeout being quite low. That doesn't remove the problem, but it'd probably be a good start towards easing the user pain. Bringing an indefinitely long hang down to 1s is a win.

For a total solution, I'd consider looking into implementing a concurrency model with a preemptive scheduler, probably using erlang as inspiration. have updates to the ui becoming a message sent to the ui inbox, and the routine for rendering the ui just reading from the inbox and applying the given command.

This is without thought to how to actually implement that, and what implications it would have on legacy elisp, or how legacy elisp could be brought into a CSP world without breakage.

So just some armchair architecting on a day off for a project I've never worked on :)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: