Left Sage

Today was my last day at Sage (I joined Lockstep, which was acquired by Sage) I spent a little over two years working with the wonderful engineering team there. I learnt a lot from everyone on the team, and made some new friends (I knew one person before I joined) during my stay.

Most of the team was junior to me (in terms of number of years of experience.) But as I worked with them, I noticed that every single one of them were exceptional engineers. Without exception.1

Continue Reading »

Why I switched to Zellij

I had tried switching to tmux for local shell sessions in past, but never truly understood why I might need it.

I extensively used tmux for remote sessions. But why might I need it locally ?

Then slowly I stopped using tmux and switched to wezterm which provided multiple tabs.

Fast-forward several years later.

Recently I came across Zellij. I decided to give it a go.

When I had tried tmux it took some time to get used to the keybinding.

Continue Reading »

How I generated 2000 parallel requests using nu-shell

At work, I need to load test new framework I had deployed.

Usually, I work with QA team. They use JMeter (with Azure Load test) for such task.

But today, the QA person was busy with other tasks, and I didn’t want to get blocked.

Since I am learning rust, (nu-shell is built in rust) I remembered that it may be possible to run parallel requests in nu-shell.

and it is!

Continue Reading »

My Macbook Pro won’t boot anymore :(

I was watching some Youtube videos in the evening, and then at night, it just became unresponsive.

Over the next few days, I tried various options.

Booted from external USB. Worked!

Tried Internet Recovery.

Turns out the SSD is recognised, but can’t be fixed/formatted/erased.

Looks like a hardware issue.

Clippy

Clippy is a linter for Rust programming language.

If you are annoyed by the compiler (shouting at telling you how your code is wrong), wait till you install and use clippy ๐Ÿ˜„

Jokes apart, why I want to use clippy is it tells us about idiomatic rust and can autofix issues (if we tell it to do so)

Couple of fun facts I discovered :

  • First search result for clippy is not what I was looking for ๐Ÿ˜„ till I searched for rust clippy
  • clippy can not be installed via cargo install (As I tried initially)
    • (As with rest of the rust ecosystem) there was a helpful error message with solution ๐Ÿ˜‡
 error: Clippy is no longer available via crates.io

 help: please run `rustup component add clippy-preview` instead

Nu Shell

Earlier I wrote about various utilities written in rust. Nu shell is one of the most important of them (It is an entire shell after all, not just single utility)

Installing

Turns out I had installed nu-shell earlier, but via macports

and I had forgotten about macports (and nu shell)

Mysterious upgrade failure (Or so I thought)

When I installed nu-shell via brew I got the latest version, but nu kept invoking older version.

Continue Reading »

โ†’ Oxidise Your Life โˆž

This youtube video mentions the following tools:

  • exa
  • bat
  • zellij
  • mprocs
  • ripgrep
  • irust
  • bacon
  • cargo-info
  • ncspot
  • porsmo
  • speedtest-rs
  • rtx-cli

Of these I installed zellij, which is replacement for tmux (or screen)

I also installed mprocs, irust

I already have ripgrep

I had tried exa and bat in past, they are good but novelty item.

Installing bacon failed during the compile step :(

I’ve also installed nu-shell

I’ll write about nu-shell separately, after giving it enough time

100 Days of Rust : Day 9 (Testing)

I continued reading Command Line Applications in Rust

Learnt that testing is easy. Any function that has #[test] above it, will be found (across any files) and used by cargo test

Couple of interesting crates :

  • exitcode
    • It has quite well defined exit codes. They come from FreeBSD
    • I wish other languages / frameworks had something similar
  • proptest
    • is a property testing framework
    • Based on python’s Hypothesis
    • I need to spend time actually trying this
  • human-panic
    • Generates report file on panic
    • Shows nice (if a bit long) message to the user, asking them to (optionally) email the report file to the developer ๐Ÿคฏ

Things to explore:

Continue Reading »

100 Days of Rust : Day 8

Today I started reading Command Line Applications in Rust

Even though I have not finished reading “the book”, I am (by now) familiar with enough rust code that reading this book was kinda refreshing.

Few important things I picked up :

  • {:?} in println! is called debug representation (quite useful for .. debugging ๐Ÿ˜„)
  • Custom data types can add support for {:?} for debugging and logging, one needs to add a #[derive(Debug) above their definition. (Not tried it yet)

I’m gonna convert my “Temparature Converter” assignment using the stuff I learnt in this book

100 Days of Rust : Day 7

Technically this may be more like day 8 or 9, cause I did read some stuff from the rust book in last few days, and made note here

Nothing improves your understanding better than doing

– Me ๐Ÿ˜„

I was trying accessing the individual fields in tuple struct using dot notation via the index

Since the rust book does not have an example of it, I used rust playground (Awesome resource BTW) and just printed stuff.

Continue Reading »