Async Rust is a Bad Language
Very good intro and thought provoking article on #concurrency and #parallelism, and their use in #Rust.
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 🤷♂️
Anyway, here's the article:
https://bitbashing.io/async-rust.html
#concurrency #parallelism #rust #TonyHoare #csp #occam #rustlang #async
Tucking your tokio tasks in bed #rustlang #coding #rustprogramming #tokio #async
https://youtube.com/shorts/uPwS6FLEs4Q?feature=share
#rustlang #coding #rustprogramming #tokio #async
Awaitable class for Unity 2023.1: https://youtu.be/X9Dtb_4os1o?si=UNYiwgJQYeorUTYE #Unity3D #Async #GameDev #IndieDev #IndieGameDev
#unity3d #async #gamedev #indiedev #indiegamedev
Great overview of #Python #async frameworks. I still like the #gevent framework as works with minimal code changes and no need for additional #asyncio libs (just run 'apt search python3-aio' to see what I mean). The monkey patching still feels like magic fairy dust to me.
https://www.bitecode.dev/p/asyncio-twisted-tornado-gevent-walk
#python #async #Gevent #asyncio
📢 It’s time… We are finally talking #Celery! 🎉
In this article, we offload the work from our application and run #async tasks using Celery workers on Fly Machines! 🚀
#django #python #tasks #machines
https://fly.io/django-beats/celery-async-tasks-on-fly-machines/
#celery #async #django #python #tasks #machines
Seems to work, but could use some syntactic sugar:
if @var
@var.value
else
@var = Async::Variable.new
value = # do work
@var.resolve(value)
return value
end
Am I correct in assuming that Async::Variable can be used to safely wrap around `@ivar ||= ...` logic in multi-fiber async code?
https://rubydoc.info/gems/async/Async/Variable
#ruby #async
@toledano probé #FastAPI para un proyecto hace tiempo. No quedé encantado la verdad. A la fecha no tiene documentación de su #API y esto quiere decir que si quieres hacer algo que no cubre alguno de los tutoriales tienes que leer su código fuente.
Además está construido sobre la (falsa) premisa de que hay que reescribir todas las bibliotecas python usando #async
Ya teníamos async en python mucho antes de que la sintaxis entrara al lenguaje via #eventlet #greenlet y familia.
#fastapi #api #async #eventlet #greenlet
Why go through all of this trouble rather than just using the #JaneStreet `resource_cache`?
Well, a big part of it is that I wanted to build an actor system with #eio as I was learning #OCaml and that I think the actors will be useful elsewhere in the #JsonLD project :p
Another piece of it is that the docs on resource_cache ( https://ocaml.org/p/resource_cache/latest/doc/Resource_cache/index.html ) are not entirely clear and it roots into #async, which isn't a problem per se but I've been trying to stay as close to eio alone as possible.
#janestreet #eio #ocaml #jsonld #async
Bitcoin’s Lightning Network is growing, but there are still three major challenges - The Lightning Network is growing, but liquidity issues and a need... - https://cointelegraph.com/news/bitcoins-lightning-network-major-challanges #watchtower #opennode #markets #phoenix #breeze #async #zeus
#zeus #async #breeze #phoenix #markets #opennode #watchtower
Devs often point out the flaws of #async languages with the concept of function #coloring, arguing that it places seemingly arbitrary restrictions on functions and their semantics, which is a criticism I can definitely understand.
https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/
Is #Rust's borrowing rules just another form of "coloring"? Consider:
1. You can do anything with an owned object (red).
2. You can convert an owned reference (red) into a borrowed reference (blue).
3. You can't convert a borrowed reference (blue) into an owned ref (red).
4. You may copy a borrowed reference (blue) into a new owned ref (red).
5. You can have multiple borrows (blues) of the same value.
6. You can only have one owned reference (red).
7. A function cannot return a borrowed reference (blue) to a locally owned (red) value.
8. A value passed as an owned parameter (red) into a function cannot be referenced after the call.
The list goes on. Is borrowing just a form of "value coloring"?
Coming soon! A Python implementation of #colang. Bubble sort with bubbles, fizzbuzz with fizz and start writing with a language that always keeps you #refreshed.
#colang #refreshed #foss #lisp #async
And now, we have cancellable `Future`, https://github.com/mozilla/uniffi-rs/pull/1684. How fun :-).
I would appreciate any help on this: https://stackoverflow.com/questions/76782305/mochajs-test-keep-running-when-using-async-await
#mochajs #nodejs #express #async
I am pretty deep in the "obscure #rustlang errors" realm.
🦀 Bogus `higher-ranked lifetime error` in an async block.
I am busy messing around with #Python #async, for API consumption, but the API library isn't implemented with asyncio.
I can either fork the library and possibly switch its request object with an async version, but often we might not be able to do this and we need to work with blocking functions.
I struggled to get this working in my current code, so I tried it in another file and got it to work. There are still a few things I could change, allowing for more threads and using an executor, but here is the #gist
https://gist.github.com/e-dreyer/82196b2781b3ebc9429c8bb6607651ff
Recently, I was messing around with #async in #Python and tried something where some class attributes were initialized in __init__() ny async functions.
This is not possible as __init__ may not return a coroutine. It should return None. Now, I am wondering if I can implement the getters and setters by using properties as async functions. Is this possible? I have been unable to get any documentation on this.
Okay, so I have been shaving a huge yak, and I've ended up with a new #rust crate:
https://crates.io/crates/regex-chunker
https://docs.rs/regex-chunker/0.3.0/regex_chunker/
It's kind of like std::io::Split, but delimited by an arbitrary #regex. There's also an #async type that implements Stream.