Rust: When rustc Beats Cargo for quick trial code

Recently, I needed to test try some functionality (of getting user’s home directory) 1

Setting up a throw away project via cargo new is certainly possible but seemed overkill.

Continue Reading »

Polywork Shutting Down

This morning, I got an email notification that polywork.com shutting down.

Polywork was a good idea.

I never updated it regularly because I was worried about such thing (it going away) But I liked the idea of putting regular “updates” and I started this microblog.

Continue Reading »

Happy New Year 2025 to everyone and their family !

May your dreams come true

Rust: How to print Command Output

I was going thru struct Command in std::process 1

Obviously, I tried the very first code snippet in the rust playground. There is a very convinient ▸ to run the sample code.

The code ran without any errors.

But no output 🤔

Continue Reading »

Finally got Auto Complete working in Helix

I have been using Helix as an editor, not as an IDE. One of the USP of Helix is LSP support out of the box

Recently, I’ve been programming in rust.

Helix is also written in rust.

So I think it is natural that they would support rust LSP rust-analyzer and it does.

But I wasn’t getting auto completions 😞

Continue Reading »

Today I completed “Rust: The Complete Developer’s Guide” course on Udemy 🎉

Here is the certificate

Rust: Unit tests in a separate file

In rust, tests are written in the same file as the code. But I want to have the tests in a separate file. Conventionally, only the integration tests are written in files under tests folder. 1 I just wanted to have the unit tests in a separate file. So I created a file src/my_tests.rs and moved all the tests there. But cargo test kept saying running 0 tests Turns out, I’m not the only one.

Continue Reading »

Updated the README for the Theme Repo

It has been little over 2 years since I forked and updated jnjosh’s internet-weblog theme While I made several changes to my fork, I never updated the README. till now that is. During last few days, I updated the README to match my fork. These are minor changes, and majority of the README is still from the original (For the things that have not changed) If you are curious, have a look 😄

Jujutsu: Working With Git

After reading (not done) Steve’s Tutorial and Official doc 1 (which mentions Steve’s tutorial anyway) I decided that actually using it on real projects is the way to go. Here is the workflow (after a few 2 iterations 3) that works jj new : Declare your intention to start new work. jj describe : Intention alone is not enough 😀. What will you be working on ? Now work. Make changes.

Continue Reading »

Jujutsu : git compatible but better DVCS

I learnt about Jujutsu from the “Rust in Production” podcast episode about Git Butler One of the attractive quality about it is that it works with existing git repos 1 First superpower : Start using it with existing git repo locally cloned using jj git init --git-repo=. 2 This creates a .jj folder in the existing repo. .jj and .git co-exist peacefully But I didn’t know that. So for the first project to try Jujutsu, I jj git cloned my existing repo in a new folder, so that I have “old” git repo as well as jujutsu repo.

Continue Reading »