9/23/2023 0 Comments Ripgrep work stealing queue![]() ![]() The comments acknowledge that there are a welter of half-solutions in third-party crates but describe no consensus about which to adopt. Upon further investigation I found that there are no proposals to actually fix this problem in the core language. The current answer is “spawn a task per socket”. We do not currently have an epoll/select abstraction. Contemplate this bug report: Is there some API like “select/poll/epoll_wait”? and get a load of this answer: Then I found out that a feature absolutely critical for writing network servers is plain missing from Rust. By four days in of exploring Go I had mastered most of the language, had a working program and tests, and was adding features to taste. The language demands a huge amount of fussy, obscure ritual before you can get anything done. The learning curve was far worse than I expected it took me those four days of struggling with inadequate documentation to write 67 lines of wrapper code for the server.Įven things that should be dirt-simple, like string concatenation, are unreasonably difficult. In practice, I found Rust painful to the point of unusability. As a service daemon with no real-time requirements written around a state machine of the kind I can code practically in my sleep, I thought this would make a good warmup for NTP. My chosen learning project in Rust was to write a simple IRC server. I was evaluating it in contrast with Go, which I learned in order to evaluate as a C replacement a couple of weeks back. I finally cleared my queue enough that I could spend a week learning Rust. I’ve been investigating it for months, from the outside, as a C replacement with stronger correctness guarantees that we could use for NTPsec. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |