Technologique
663 subscribers
144 photos
3 videos
42 files
949 links
Deeply involved developers about various aspects, tendencies & conceptions of programming technologies, FLOSS, Linux, security, cloud infrastructures & DevOps practices, distributed systems, data warehousing & analysis, DL/ML, web3, etc.
Author: @andrcmdr
Download Telegram
Uncontrolled type conversions and forced type coercion can be dangerous, affect your codebase and make high financial harm to your product, even if you're using memory secure programming language like Rust!

https://lapitsky.com/how-to-get-paid-800k-for-a-clippy-warning/

(Enable all Clippy warnings in your CI and locally! It can saves you from harm!)

#Rust
#WASM
An article that unburied an old hatchet - Rust versus C++ debates.

https://lucisqr.substack.com/p/why-i-think-c-is-still-a-very-attractive

#Rust
#CPP
And here are another articles by the author from this series with more deep takes and better reasoning in comparison apples to apples, i.e. Rust and C++:

https://lucisqr.substack.com/p/quants-use-rust-devs-use-c

https://lucisqr.substack.com/p/move-semantics-and-low-latency-programming

https://lucisqr.substack.com/p/the-c-technique-that-slashes-rusts

Overall, I prefer to use move semantics by default, with explicit ownership transfer, with explicit copies and cloning, with immutability and locality for everything by default, with lifetimes (for region based memory management, with exclusive RCs, rather than GCed memory) tied to local scopes, to ownership transfers and to borrowing by reference (either one mutable or many immutable) - all of this prevents of easy creation of whole class of issues and vulnerabilities related to operations with allocated memory, as dangling pointers, use after free, undefined behavior for dangling pointers and use after free, memory leaks (mostly, but not always, due to logical possible issues in code), shared mutable states and data races, especially in concurrent and multi-threaded code (search for fearless concurrency with Rust), and, what's mostly important, all of this in compile time, with strongly typed safety guarantees.

And many other modern programming things too - functional approach (first class functions, Fn, FnOnce, FnMut traits), Ord and Eq traits for ordering and equality checks for data types, iterators, generators and streams, pattern matching, futures and channels for asynchronous code with deferred computations, trait based ad-hoc polymorphism (with compile-time monomorphization) and generics (with even higher kinded types!), dyn traits for dynamic dispatching, as an exception, rather than the rule, and this fair as well for unsafe local blocks (which gives only reasonable type system relaxation, for only five options, needed for more deep systems development and optimizations, mainly raw pointers dereferencing , all options listed here https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html, but unsafe mode inside particular local blocks not turns off borrow and ownership checker inside of unsafe blocks! only one owner allowed, with ownership transfer, with same rules for borrowing via references and for scope/ownership/borrowing based lifetimes!), and many many more wonderful things!

#Rust
#CPP
Expansion of Rust language application in aerospace sphere.

Rust already widely applied for hard real-time systems - DAW (digital audio workstation), HFT (high frequency trading), industrial system, but also for automotive and aerospace vehicle systems, like autopilots, space orientation and telemetry. In such systems a stable latency and reaction time should be provided, which means every operation should take only exact amount of time.

And now the new hard real-time subsystem (with more wide abilities than Linux RT patch-set) for Linux, RROS, which working along with Linux kernel, is used for running real-time software for on-board systems on the new recently launched China satellite.

'Cause Rust gives a system access level to work with the hardware, same as C language provides, but also powerful yet simple abstractions and smart-pointers, as C++ language provides.

https://bupt-os.github.io/website/news/2023_12_9/satellite_launch/

https://github.com/BUPT-OS/RROS

https://github.com/BUPT-OS/RROS/tree/main/rust

Other post on this topic in my blog in Telegram:

https://t.me/technologique/1540

https://t.me/technologique/1512

https://t.me/technologique/1524

#Rust
#Linux
#RTOS
#aerospace
#automotive
Async functions and impl Trait in return position in traits.

Asynchronous functions and impl Trait (type which implements that particular trait) in return position for traits are finally stabilized and delivered in Rust stable branch! 🥳🎉🎊🍾

https://blog.rust-lang.org/2023/12/28/Rust-1.75.0.html

#Rust
#RustLang
That's the real thing guys! A better code editor, faster and even more responsive than Sublime Text, better than VSCode. Best for #Rust developers. Moreover, it's written in Rust! Check it out! I was pretty skeptical, but it turns out to worth tried out something new, revisiting my tools for daily routines working on code and change something for the better comfort, productivity, and a better developer experience!

https://github.com/zed-industries/zed

https://zed.dev

BTW: Zed is made by the creator and developers from the Atom team. They know how to deliver best developer experience.
And all that responsiveness are delivered by new UI framework, which built like a game engine, to utilize hardware video acceleration for UI rendering to the fullest!
And when you have more responsive interaction with UI - the work became more joyful! =)

PS: Yep, I'm still using VSCode+RLS/Rust-Analyzer as my daily driver for production development, Sublime Text for quickly edit small files or large files with regexps and multiple cursors (power cursors plugin - still missing point in vim/nvim, although same is reachable with macroses) and vim/nvim/tmux for work with remote servers with restricted environment through ssh.
A really good and deep (on compiler and dataflow level) explanation from Chris Lattner, author of Mojo, Swift and LLVM, about move semantics, ownership model, borrowing and lifetimes, on example and in comparison of Mojo, Rust, and C++ approaches to that conceptions. Must watch!

https://www.youtube.com/watch?v=9ag0fPMmYPQ

#Mojo
#MojoLang
#Rust
#RustLang
https://security.googleblog.com/2024/09/eliminating-memory-safety-vulnerabilities-Android.html

Cool stuff!
Whole class of vulnerabilities have been eliminated (and also huge performance improvements are made!) just thanks to Rust type safe programming approach and type safety in memory management, according to its substructual affine&linear type-system for managing the ownership and borrowing of references and pointers to code and data in memory and analysing lifetimes (NLL) for every call stack statically during compilation on a LLVM's IR/MIR codeflow/dataflow level.

#Rust
Rust is an engineering tool, a really good modern tool (but still just a tool, not an egregor), applied and adopted already in many critical areas (like cyber security, distributed systems, cryptography, decentralised financial systems, AI), a type safe language, which respects safety, and way much better designed than C++, or Go (inconsistent data structures implementation, where behaviour depends on implementation, implicitly satisfied interfaces, is a truly nightmare), or even C. There's no usable system level language with integrated non-optional type safety on a type system level (rather than having all that kind of external tools, like linting, fuzzying, sanitizers, etc.). Probably from modern languages only Mojo and ATS can be accompanying Rust in this group (a type safe language with static typing and static memory management).
And thus learning curve is pretty steep and entry barrier is pretty high for Rust ecosystem.
The C language is a basis, fundamental technology, it's pretty simple, sharp, and dangerous, where freedom == responsibility.
The only cool thing of C++ is SFINAE. But it's a dynamic implicit thing for types coercion, thus completely eliminated by Rust type system.

#Rust
#CPP
#C
#Notes
#Thoughts
https://hez2010.github.io/async-runtimes-benchmarks-2024/

Whoa! Rust's Tokio runtime doing really great! 👍 (Even greater with just for cycles for making new Futures, mapping them on pool of system threads and awaiting in an event loop).
And statically AoT compiled C# amazes me a lot!

#Rust
https://fishshell.com/blog/rustport/

I love Fish, using it everyday - shell is amazing, on par with zsh, and scripting language is like natural extension to Bash scripts, with a lot of additional helpful functions (like random, math, etc.). Now it's on Rust. Love it even more now! 💜

If you want to move to alternative shell - the best moment is now!
You won't miss anything in Fish, always can run/call Bash or substitute it through CLI.
Transition will be natural, just one day to start using it efficiently for everyday work. Less friction than with zsh. Oh... And fish_update_completions (https://fishshell.com/docs/current/cmds/fish_update_completions.html) running right from shell is a killer feature along with command history and fuzzy search substitutions from existing command history.

#Fish
#Shell
#Bash
#Rust
#RustLang
The drama around Rust drivers inclusion into Linux kernel became worser and even worser.

Old kernel maintainer against of Rust code inclusion into DMA for drivers.
Asahi Linux maintainer resigned from Linux kernel maintainers.

The question is - what is better, maintain two languages and handle this complexity, one of it, Rust, provided memory safety, when usafe blocks are strictly located and controlled, or, continue to maintain old (and new) error prone code in C language with all that memory safety issues, as it was before, for many years, without accepting new approaches to develop safe system software, drivers and kernel modules.

Overall, that's the problem of old minded people, who doesn't want to put the efforts to accept something new, which can be better than old approach.

I've got only one question - if there are so much resistance from old minded people, kernel maintainers, for what the Rust for Linux subsystem was even included into the kernel, what old kernel maintainers and Linus himself expected when they've done that, i.e. introduction of Rust subsystem into kernel? They want to keeping it in cage of just subsystem for drivers development, when the problem is the whole old approach to memory management?

If this situation will be progressing (and it will!) many new wave kernel maintainers and kernel developers will leave and resign from Linux kernel. And that's not good for Linux, as maintainers became older and older and it's became tremendously hard to involve new generation of system developers into kernel development and maintenance.
Many new wouldn't even join Linux kernel, because of such toxic environment in conversations, and the better option here for new wave system developeers is to consolidate common efforts on some alternative kernel, like RedoxOS microkernel for example, which is a Unix POSIX compatible kernel, fully written in Rust, and someday, in 10-20 years from now, when Linux gets old and cost of maintenance of old error prone C code will be high (same as with assembly language kernels in previous age), Redox will became a Linux alternative, same as BSD kernels and distros, but better.

https://lore.kernel.org/lkml/20250207-rm-maint-v1-1-10f069a24f3d@marcan.st/

https://www.theregister.com/2025/02/05/mixing_rust_and_c_linux/

https://www.theregister.com/2025/02/07/linus_torvalds_rust_driver/

#Rust
#RustLang
#Linux
#kernel
The data storage engine projects we're all waiting for!

I was expecting data storage engines and data warehouse solutions, cloud native solutions for data lakes, will be made using Rust, as systems language, in Rust community.

Long awaited stuff, for the whole time since 2015, stabilized Rust v1.0 compiler and Rust 2015 standard.

https://github.com/RustFS/RustFS

#Rust
#RustLang
#RustFS
Python 3.14

https://blog.miguelgrinberg.com/post/python-3-14-is-here-how-fast-is-it

In short - new Python 3.14 it's awesome! Worth to update immediately!

3.14 is way much better in performance than any previous versions, has optionally enabled JIT (doesn't give too much performance boost, due to the too much dynamic nature of Python and vibrant run-time objects lifetimes) and optionally disabled GIL for multi-threading (installed as separately compiled binary in a system).
But PyPy JIT still outperform CPython.

Much love for Python anyways! 🙌 Python is a cross-system glue now!

Comparison with Rust is just for fun here - Python always will be much more slower, due to the dynamic types dispatch through vtables. And due to the dynamic nature Python always will allow run-time unexpected behavior and run-time crashes (thus should be covered thoroughly with tests for everything), while Rust is fully static (even Dyn trait impls checked by compiler in compile time) and fully type safe (in compile time, before running).

There are also more consistent benchmarking test suite across languages:
https://benchmarksgame-team.pages.debian.net/benchmarksgame/box-plot-summary-charts.html
(They should update Python environment soon and we'll see 3.14 results - now 3,13 used.)

#Python
#Rust