HackerTrans
TopNewTrendsCommentsPastAskShowJobs

jonathan_s

no profile record

comments

jonathan_s
·3 lata temu·discuss
If you can, best is to always spawn them in a task group (either using anyio or Python 3.11's task groups).

This prevents tasks from being garbage collected, but also prevents situations where components can create tasks that outlive their own lifetime. Plus, it's a saner approach when dealing with exception handling and cancellation.
jonathan_s
·4 lata temu·discuss
I've gone very recently through a rewrite from Rocket to Axum and very much love it so far.

The initial motivation was the need for web socket support, which Rocket doesn't have (yet). But I love how simple it is, and also that it does not want to be the entry point of the application. (I like an http server that's a library that can be embedded at any place in the application.) Another great thing is the examples/ directory in the Axum repository.

I had to use the latest version from GitHub though to get some of the features I needed, but maybe that's not the case anymore.
jonathan_s
·4 lata temu·discuss
Same experience here. Canvas rendering is much faster for terminal apps if done well. I think also VS code uses a canvas for its terminal because its superior performance.