It champions #TonyHoare's #CSP model of concurrency which takes me back. Back to the time I failed to get funding for a start-up to build an #Occam compiler targeting i386. Which was largely a ploy to get the UK government to buy me some neat kit 🤷♂️
Using #RevoltPHP for one of my new projects. It's very nice working with #PhpFibers and not dealing with generators/promises as much. Can't wait for other #Async#Frameworks to start refactoring to use it more. I know #AmpPhp has added it to their HttpServer lib already.
Upcoming, a new & simplified implementation of https://thi.ng/csp (currently still only on a feature branch[2]) for building blocks for Communicating Sequential Processes.
Also still WIP only, async iterable support for https://thi.ng/rdom, i.e. in the same way as rstream subscriptions, such async iterables can soon be directly embedded as component/element bodies or attribute values and then perform pinpointed DOM updates each time their value changes...
As I said, async all the thi.ngs...
[1] h/t @sjb3d for an ancient tweet with a similar sentiment & outcome :)
[2] The CSP package too was somewhat deprecated (for similar reasons) and a while ago I added another alternative CSP implementation via https://thi.ng/fibers, but that package too might see some more refactoring/simplifying by switching to async generators...
To celebrate, we're releasing Promise v3, the next big step towards the future ReactPHP v3. Now reporting all unhandled promise rejections, better type safety & much more! 🔥
Released v1.6.0 of our async PromiseStream component! 🎉
Better forward compatibility with Promise v3 by avoiding unhandled rejections, improve memory usage and more. All in preparation for the upcoming ReactPHP birthday next week! 🚀
I'm using the #reqwest crate to call two different APIs. One is working fine, the other I had working intermittently but not sure what fixed/unfixed it.
The issue is that the await doesn't return even though using curl works fine.
Why would await not return after a few seconds when the curl request returns immediately?
As suspected the issue was not in the code I created to use remote web APIs.
The issue was that using the async function which polls the web APIs as a tokio::future was preventing the await on the web request from ever returning, even though the remote web API was responding correctly.
I fixed this by doing the polling of the my async function manually alongside the select! macro which handles the other two futures, all within a loop.
A timely blog from Tyler Mandry supports the possibility that my issue could arise from the way I'm using futures.
He mentions some facerakes which can occur using select! rather than merge! to combine futures so that's another avenue to pursue. Bonus: I will learn to produce more reliable async code.
Very interesting and commendable blog post on the state and future [cough] of #async#Rust:
In our latest development team working agreement someone added the item "If you're going to #Slack someone a question, don't write 'hi' and then wait for them respond, just send the question." Friends, I never felt more seen than in that very moment. #Agile#Async#Software
🧶 Why choose async/await over threads? - notgull.net
「 Smart programmers try to avoid complexity. So, they see the extra complexity in async/await and question why it is needed. This question is especially pertinent when considering that a reasonable alternative exists in OS threads 」
For @made and others who might have questions about the new https://thi.ng/transducers-async library, I've tried to illuminate the behind-the-scenes approach over here: