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

Is asyncio over engineering for this line of work? How much concurrency is really needed here and couldn't it have been addressed by threads instead?


Given async file IO in Rust without io_uring (and without being on Linux) means "dispatch work onto a background thread pool", it's essentially the same. It's just using a different programming model - which you might either prefer or not.


The effort expenditure is not the same, at all. Not by a long shot.


Personally I don't get the blowback that's shown up a couple places.

Why do we so readily convince ourselves against doing the right thing, picking good technology? "Over engineering" is a huge massive bat of a word that is applied to "correct" all kinds of spirited ambition.

Fear Uncertainty & Doubt is a dangerous default mode to adapt. I do not feel that it should be such an ordeal, require such courage, to do the good & right things. Better to try & fail than risk whiling ones time on lukewarm efforts.

What is the actual danger here? What are you afraid of? Why hold your biases against another's endeavor?


Async creates race conditions and even if you show me a proof that says there will never be a deadlock or other unexpected behavior I generally will believe that either there is an error in your proof or the actual executing code is different from the algorithm you've proved correct in some significant way.

Doing previews in a non-blocking way sounds really cool though, I'm not ragging on the concept, just saying I am mistrustful of async.


This is Rust, which is a language that doesn't have data races (though other kinds of races are certainly possible).

For an application like yazi async is likely a much more pleasurable experience to write code in than trying to manage threads and cancellations by hand.


But you see, there's a problem right there - threads aren't cool anymore. Not that the user knew or cared, but it's important perceived concurrency is shoved through the lens of async, somehow.


If you look at the video showing how it works, you will see, that it apparently starts displaying file content, while you navigate over files and directories. I think this is what happens asynchronously, in order to never block the ability to navigate.

I am not sure I am a fan of this, because I don't actually need everything to start being rendered. Maybe rendering something when I press a specific button would be good enough and that wouldn't necessarily require async stuff.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: