monadless
ureq
Our great sponsors
monadless | ureq | |
---|---|---|
4 | 7 | |
275 | 1,528 | |
0.7% | - | |
0.0 | 8.4 | |
about 1 month ago | 13 days ago | |
Scala | Rust | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
monadless
-
Kind: A Modern Proof Language
The `{..}` is from `RecordWildCards`.
I do like the omission of `let` and `where` in favor of just variable definitions. For monadic notation, instead of `get` and `return` I'd prefer something like https://github.com/monadless/monadless
The main problem with `do`-inspired monadic notation is that it forces monadic code to always be in A-normal form, which is pretty annoying. It'd be far nicer to allow for monadic code to look the same as normal code, just with say an extra brace (such as "IO { }") to indicate that you're inside a monad.
Well `RecordWildcards` has been around for 14 years... but even without it instead of `{..}` you'd just have `_`s. The main thing that is different is that your Kind example had nested case statements while your Haskell example tried to match everything on one shot, which makes for a non-equivalent comparison.
> Not sure how that could work, though. Idris had an interesting syntax, but IIRC it wasn't general.
I assume you're talking about idiom brackets for applicatives? The general syntax is given in something like https://github.com/monadless/monadless. The idea is to basically take async-await syntax and generalize it to any monad.
So e.g. your `Maybe` example (using `!` for the equivalent of `await` for concision) would look like
Maybe {
-
Why asynchronous Rust doesn't work
> If anything, async-await feels like an extremely non-functional thing to begin with
It, like many other things, forms a monad. In fact async-await is a specialization of various monad syntactic sugars that try to eliminate long callback chains.
Hence things like Haskell's do-notation are direct precursors to async-await (some libraries such as Scala's monadless https://github.com/monadless/monadless make it even more explicit, there lift and unlift are exactly generalized versions of async and await).
ureq
-
Thermostat Control for Ecobee
I also enjoyed using ureq as an http client.
-
An HTTP request parser with rust and pest.rs
After a quick check of the available rust http client libraries I opted for reqwest. It has a pretty simple API and it seems to be among the most used libraries for this matters. But I'm a bit concerned about all its dependencies so I might try ureq later.
- Why asynchronous Rust doesn't work
-
http client facade library?
If you want an HTTP client with few dependencies and little unsafe code, take a look at https://github.com/algesten/ureq
-
Tokio, the async runtime for Rust, hits 1.0
Give ureq a try: https://github.com/algesten/ureq
What are some alternatives?
reqwest - An easy and powerful Rust HTTP Client
hyper - An HTTP library for Rust
curl-rust - Rust bindings to libcurl
rust-http-clients-smoke-test
teepee - Teepee, the Rust HTTP toolkit
async-trait - Type erasure for async trait methods
smol - A small and fast async runtime for Rust
surf - Fast and friendly HTTP client framework for async Rust
py2many - Transpiler of Python to many other languages
tokio - A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...
async-std - Async version of the Rust standard library
rust - Empowering everyone to build reliable and efficient software.