Half way through the year
It was too hot too think or do anything apart from watch Twin Peaks at the start of this week.
Updated the versions of libraries used in aliases within Practicalli Clojure CLI Config and cut a new release
Movies and TV this week
-
Transcendence - an excellent film about a technological singularity and how humans struggle to understand or trust an intelligence that doesn't look like them. Small minded people end up ruining the world because of something they feared rather than tried to understand.
-
Twin Peaks is a very quirky TV show that was hugely popular when I was in my early 20s. The show has many rich characters and a few very silly ones (depending on your point of view). The storyline is based around a tragic crime that is being investigated by Agent Dale Cooper. Agent Cooper is not your typical FBI agent and really makes the show worth watching all by themselves 😃
Cyclingλ︎
With the rear gear cable and thumb-wheel replaced during the Isle of Wight trip, there are only the pedals and chain to replace 😆
I ordered the Look Keo Classic 3 pedals which are only a few grams heavier than the Look Keo Carbon Max 2 (Chrome Mobideum Steel axle's).
I'll probably get the Sram PC 1110 chain again (last fitted in February). It seems to do about 75% of the distance the Shimano chain can do, but is at least half the price. Replacing the chains is a relatively simple task that I can do that myself, thanks to the chain having quick links.
Recovery ride on Wednesday, a little damp but still a nice ride.
Cassetteλ︎
My chain is close to being worn so its also useful to review if the cassette needs replacing too.
Shimano Ultegra R8000 11-speed
model | Weight (grams) |
---|---|
11-32T | 292 |
11-30T | 269 |
11-28T | 251 |
Shimano Casette specifications
Sigma Sports have a Sigma Ultegra R8000 11-speed cassette 11-32T currently at 54.95 GBP (recommended retail price is 90 GBP.
ZTTO SLR Gen3 11 speed cassettes
model | Weight (grams) |
---|---|
11-32T | 122 |
11-30T | 116 |
11-28T | 113 |
I believe one reason these cassettes are so light is that the lugs that hold the cassette onto the hub slots are only part of the length of the hub. This may be the part they had to strengthen, or it could be another part.
Although these are light cassettes, I think I will avoid them until I am less than 80km in rider weight.
ZTTO Official store on AliExpress
Rustλ︎
Installed rust using default locations using the install Rust script
rustup install - default location
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
info: downloading installer
warn: It looks like you have an existing rustup settings file at:
warn: /home/practicalli/.rustup/settings.toml
warn: Rustup will install the default toolchain as specified in the settings file,
warn: instead of the one inferred from the default host triple.
Welcome to Rust!
This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.
Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:
/home/practicalli/.rustup
This can be modified with the RUSTUP_HOME environment variable.
The Cargo home directory is located at:
/home/practicalli/.cargo
This can be modified with the CARGO_HOME environment variable.
The cargo, rustc, rustup and other commands will be added to
Cargo's bin directory, located at:
/home/practicalli/.cargo/bin
This path will then be added to your PATH environment variable by
modifying the profile files located at:
/home/practicalli/.profile
/home/practicalli/.bashrc
/home/practicalli/.zshenv
You can uninstall at any time with rustup self uninstall and
these changes will be reverted.
Current installation options:
default host triple: x86_64-unknown-linux-gnu
default toolchain: stable (default)
profile: default
modify PATH variable: yes
1) Proceed with standard installation (default - just press enter)
2) Customize installation
3) Cancel installation
>
info: profile set to 'default'
info: default host triple is x86_64-unknown-linux-gnu
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2025-06-26, rust version 1.88.0 (6b00bc388 2025-06-23)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
20.1 MiB / 20.1 MiB (100 %) 13.4 MiB/s in 1s
info: downloading component 'rust-std'
29.5 MiB / 29.5 MiB (100 %) 14.5 MiB/s in 2s
info: downloading component 'rustc'
76.3 MiB / 76.3 MiB (100 %) 15.6 MiB/s in 5s
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
20.1 MiB / 20.1 MiB (100 %) 8.2 MiB/s in 2s
info: installing component 'rust-std'
29.5 MiB / 29.5 MiB (100 %) 10.5 MiB/s in 2s
info: installing component 'rustc'
76.3 MiB / 76.3 MiB (100 %) 11.0 MiB/s in 6s
info: installing component 'rustfmt'
info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'
stable-x86_64-unknown-linux-gnu installed - rustc 1.88.0 (6b00bc388 2025-06-23)
Rust is installed now. Great!
To get started you may need to restart your current shell.
This would reload your PATH environment variable to include
Cargo's bin directory ($HOME/.cargo/bin).
To configure your current shell, you need to source
the corresponding env file under $HOME/.cargo.
This is usually done by running one of the following (note the leading DOT):
. "$HOME/.cargo/env" # For sh/bash/zsh/ash/dash/pdksh
source "$HOME/.cargo/env.fish" # For fish
source $"($nu.home-path)/.cargo/env.nu" # For nushell
Rust course Oreillyλ︎
What is rust - flexible and fast programming language - combines power/speed with rigour/safety - inherently safer code
Use rust to create many kinds of apps - low-level systems (device drivers, etc) - business focused applications - tooling and toolsets, windows kernel writtein in rust) - products (much of firefox is written in rust)
Install via the rustup script on rust-lang.org/tools/install
Check the install
❯ rustc --version
rustc 1.88.0 (6b00bc388 2025-06-23)
❯ cargo --version
cargo 1.88.0 (873a06493 2025-05-10)
❯ rustup --version
rustup 1.28.2 (e4f3ad6f8 2025-04-28)
Docs not immediately intuitive, only understand the docs once you have a better understanding of all the terminology used.
Macros are a way to extend the Rust language.
There are many built in macros (referred to as closures)
You can write your own macros (if you want to take responsiblity for them - a macro is for life, the life of the project and everyone who has to manage the project)
cargo build
included debug information, placed in target/debug
Rust project - contents of target directory after first build
├── CACHEDIR.TAG
└── debug
├── build
├── deps
│ ├── rust_course_oreilly-3f09f31358bb937c
│ └── rust_course_oreilly-3f09f31358bb937c.d
├── examples
├── incremental
│ └── rust_course_oreilly-0cmy9owcq5u86
│ ├── s-h8vctyuied-125eqxx-8na9u08luwce795ao45zbbxrn
│ │ ├── 2ga4xgz86cyjn7wdvju8ooq62.o
│ │ ├── 895q7782bxetjuxc8lg7n8wwu.o
│ │ ├── 96mmcrvo3hbw6ficz7ztq5tqa.o
│ │ ├── 9afiqj64yzqqd2c8m5py3ayc5.o
│ │ ├── 9r57n2pupszf4v57aqd41k03u.o
│ │ ├── aok4y9obdca4fb52msvqhltam.o
│ │ ├── dep-graph.bin
│ │ ├── query-cache.bin
│ │ └── work-products.bin
│ └── s-h8vctyuied-125eqxx.lock
├── rust-course-oreilly
└── rust-course-oreilly.d
8 directories, 15 files
cargo build --release
creates an optomised build in target/release
❯ tree release
release
├── build
├── deps
│ ├── rust_course_oreilly-89e671dbf764e006
│ └── rust_course_oreilly-89e671dbf764e006.d
├── examples
├── incremental
├── rust-course-oreilly
└── rust-course-oreilly.d
5 directories, 4 files
build with debug and run
build a release and run
Run code through the compiler without building an executable
Language featuresλ︎
- Integers, floating points,
isize, usize - use if speed is important
Use specific integer types (i8, i16, etc.) to optomise memory use (assuming you know how much memory it will always use)
Packagingλ︎
module // rust equivalent of namespace or package
Example
Immutable by defaultλ︎
All variables are immutable by default.
mut
is required to mutate the value
Rust compiler will suggest adding mut
if code in a project tries to change an immutable value.
Longer standing languages are typically opt-in to immutability
- C requires a
CONST
- Java required
final
Castingλ︎
The compiler does not automatically convert between types
Need to use the as
keyword to convert between types
Thank you.