Rust From The First Principles

Given the US govt. security agencies recommendations for using Memory Safe Languages (as if there is more than one!), let’s bootstrap the right understanding of what the “memory safety” means from the first principles. The “first principles” will be indeed the first ones, because we will go all the way back to the underlying recurring patterns in What Is, from which the fundamental mathematical notions have been captured, properly generalized, abstracted away, named and their properties systematically studied. ...

June 30, 2025 · <lngnmn2@yahoo.com>

The Rust Cheat Sheet

An intuitive understanding – approximate, imprecise but not wrong in the principles. A level of vague abstractions which capture the right underlying relationships – nothing essential is missed, nothing imaginary and non-existent is added. Everything “just naturally follows” from (can be explained by) the “right [intuitive] understanding”. This is what our ancient ancestors used before they have evolved the “scientific method”. Almost everything, however, can be “explained” (to a fool) by an arbitrary super-natural make-believe nonsense, so we have to be very suspicious to what the “talking heads” are saying and question everything. ...

June 30, 2025 · <lngnmn2@yahoo.com>

On Rust (again)

Reading Rust theads on /g/ is an endless source of astonishment . We live in the age of enshitffication of knowledge and even information, where literal genens are obsessed with emotionally charged narratives about make-believe problems. Anyway, whatever. The real and fundamental innovation behind Rust is this. The great well-educated by studding the underlying principles of everything around them “old-timers”, like Joe Armstrong (R.I.P.), discovered the mathematical /fact that sharing and mutation cannot coexist in principle. The fundamental mathematical property of “referential transparency” is necessary to make any guarantee about the correctness of a program. The notion is that everything is an expression and any expression is “pure”, and only denotes a value (to which it can be eventually reduced or evaluated to. Thus, any expression can be substituted by a value it denotes (eventually evaluated to) without changing the meaning (semantics) of the any other expression within a program. This is the essence of functional programming, and it is a fundamental property of all correct programs. ...

June 26, 2025 · <lngnmn2@yahoo.com>

LLMs-generated Rust code

Rust code is the ultimate evidence of the principal inability for a probability-based generating algorithm (based on sampling from a “learned” probability distribution over “tokens”) to come up with something that passes the type checker, but for the most trivial cases. The “causality” is that generation of the complex syntactic forms without the actual, proper understanding principles and heuristics is, well, “problematic”. The running example is these were subtle “already borrowed” panics, where the issue in with the underlying semantics, and the syntax is “correct”. The problem is that a recursive function has to drop all the borrows before a recursive call, and this constraint cannot be expressed in the syntax unless by redundant bindings which will automatically be drooped at the end of the scope. ...

June 25, 2025 · <lngnmn2@yahoo.com>

Solving async-await for Rust

So, you want to add these async/~await/ keywords? First of all, it has already been seriously researched by the C#/F# .NET guys. Just learn what they have come up with. One’s own principle-guided reasoning could proceed like this: The fundamental difference between ordinary procedures and async procedures is the whole protocol for calling and returning of values, and dealing with actual implementation of the corresponding mechanisms (abstract at this point, but has to reuse what is already out there). ...

October 6, 2023 · <lngnmn2@yahoo.com>

Understanding Rust

The Rust programming language has been hyped as a system programming language, which implies that it has to have an explicit “access” to the hardware-level abstractions, such as the Stack, the Heap and the Procedures, together with the operating system-level abstractions, such as following the particular calling conventions (a set of standardized interfaces) for an “arch and OS /duo”, and to be “aware of” the ABIs in general. Overview Rust is, in principle, an imperative language. The order of statements matters (a lot, giving the changes of ownership), expressions are just an addition, and there is no (and never will be) referential transparency. ...

July 15, 2023 · <lngnmn2@yahoo.com>