Correctly implementing distributed algorithms such as the #paxos and Raft consensus protocols is notoriously difficult due to inherent nondetermism such as message reordering by network devices. Stateright is a #rust actor library that aims to solve this problem by providing an embedded #modelchecker, a UI for exploring system behavior (demo), and a lightweight actor runtime.
the book, "Building Distributed Systems With Stateright."
Untapped potential in Rust's type system
Written on 28/05/2021 by Jakob Meier
(...) types can be used for other than checking code properties (...)
talk about runtime type evaluation (...) an interesting mix between dynamic typing with compile-time checked types.
It's official: NetBSD's public IRC channels have moved from Freenode to Libera. http://blog.netbsd.org/tnf/entry/public_netbsd_irc_channels_moved
Schrödinger's Code - Undefined behavior in theory and practice
by Terence Kelly
Undefined behavior ranks among the most baffling and perilous aspects of popular programming languages. (...) This article surveys the most prominent pitfalls, presents examples from production software, and suggests practical ways to prevent and detect such bugs in serial code.
Tightness Driven Development in #rust
The tightness of a type is the proportion of invariants that are upheld in the type definition as opposed to its methods.
(...) tightness has nothing to do with compile time decisions (...) is more about defining responsibilities.
the benefits of perfect tightness:
- Pushes towards the right abstractions
- More expressiveness from safely exposed internals
- APIs are cleaner, with fewer error returns
- No regressions when adding functionality
The rest is taken care of by the compiler.¯\_(ツ)_/¯
It absolutely changes the way you think about algorithms and data structures, because you can finally focus on them and make them really fast without fear.
I used to peruse and deeply appreciate the "comp.lang.c Frequently Asked Questions": (...) they distill knowledge gleaned from many sources and answer questions which are demonstrably Frequent, FAQ lists serve as useful references outside of their originating Usenet newsgroups (...)
This will print memory allocation statistics from #jemalloc
And another epiphany in #Rust 🤯:
When you have a generic type parameter `T` that is bound to the 'static lifetime, it basically means that:
- the concrete type for `T` must not have any references in them
- or must not have references in them that live shorter than the lifetime of the program.
Especially the first point wasn't clear to me at all.😮
See this elaborate example:
Inventing the Service trait
(...) A Service is an asynchronous function that takes a request and produces a response. (...) let's look at the motivation behind Service by imagining how you might invent it if you started from scratch.
How to to_string in Rust
In #rust, there are several ways to turn a value into a string. In this article, we will explore a few different ways and discuss what are the most idiomatic approaches (...).
- Implementing our own to_string()
- Rust traits
- The Debug trait
- The ToString trait
- The Display trait
I have re-entered the world of blogs, by looking at my RSS reader again. I performed spring cleaning of old feeds, and would be happy to receive suggestions for blogs on: a) game design, b) networking (protocols, etc), c) cryptography.
There are probably quite a few other suggestions I'd check out, so don't feel restricted to these.