higher-kinded-lifecycle
cheats.rs
higher-kinded-lifecycle | cheats.rs | |
---|---|---|
2 | 3 | |
0 | 3,914 | |
- | - | |
0.0 | 8.2 | |
almost 10 years ago | 7 days ago | |
Scala | Rust | |
- | - |
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.
higher-kinded-lifecycle
-
Using enums to represent state in Rust
Time to re-pimp my idea of doing this using a single type parameterised to reflect different states:
https://github.com/tim-group/higher-kinded-lifecycle/blob/ma...
-
Const generics MVP hits beta
I proposed using it to model lifecycles of entities:
https://github.com/tim-group/higher-kinded-lifecycle/blob/ma...
(in this code, "idea" is a domain concept from the firm i worked for at the time - basically a recommendation to buy a stock, which is 'opened' on a certain date, and 'closed' when it no longer seems like a good recommendation)
My collegues didn't like it, and stuck to using separate types for objects in different stages of the lifecycle!
cheats.rs
-
Using enums to represent state in Rust
Reposting: https://cheats.rs/#memory-layout
> Does the value take up the same width regardless of state?
Yes. As the other commenter mentioned, it's the size of the largest variant (same as a union in C) + a tag (almost the same as an enum in C). In some cases, the compiler even manages to optimize out the tag.
-
Rust Language Cheat Sheet
> Is it just me or the output PDF has quite a bit of broken pages
Nope! The breaks are really there. I guess they converted the HTML to PDF somehow and it didn't work as expected. However in case you need it offline, the source [1] is written for zola [2] - a single-binary static site generator (of course written in Rust). You can clone the repo and run `zola serve` in it. It renders quite well.
[1] https://github.com/ralfbiedert/cheats.rs/
[2] https://www.getzola.org/
What are some alternatives?
runwasi - Facilitates running Wasm / WASI workloads managed by containerd
ceylon-lang.org - Awestruct built static website for ceylon-lang.org
RustPython - A Python Interpreter written in Rust
slint - Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
rust - Empowering everyone to build reliable and efficient software.