Today I finished Functions and Control Flow etc.
While these are not new “concepts” for me, one always learns something new when learning a new language.
Two things I learnt:
I liked the fact that rust does not evaluate anything other than boolean as truthy like both python and ruby loop can have labels, and can be used with break and continue to indicate where should the execution continue
Today I started with Data Types
While most of it is intuitive, it is useful to go over the documentation.
e.g. For tuple, I had expected that to access specific index, syntax would be mytuple[0]. mytuple.0 was not I had expected.
I also tried to print the tuple.
In the process, I learnt about pretty printing only from the compiler errors.
The compiler errors are so descriptive 😍
Here is the code in case you are interested
Today I finished the Number guessing game
During the early part of the code, my mind started thinking “How will comparing string input from the user, work with a number? 🤔” (💪 of having gone through such issues numerous times over the years)
Of course, it was explained later.
I was a bit disappointed that the code paniced upon entering non-number 😞 especially after the expect clause.
Turns out that is expected behaviour.
In this new year, I have decided to learn rust
All my recent experience has been in dynamic languages (90% python, 10% ruby)
But I started my software development career in C, and did that for probably 10 years. So I’m not new to compiled languages.1 But things have changed a lot (for the better) in these years.
Additionally, rust is getting a lot of attention from bigwigs like MS.
After using vim keybindings inside Obsidian, I came across obsidian.nvim plugin that makes working with Obsidian from inside Neovim pleasurable.
This is definitely better than vim keybindings in Obsidian 1
But I had not not used neovim in a long time. After I upgraded to Monterey, I had not installed neovim again.
So getting it (as in neovim) was a bit of work. But I had my old config saved, so at least I didn’t have to start from the ground floor.
Today I discovered that Obsidian supports vim style keybindings out of the box.
But it knows that vim is not for everyone.
So it checks whether you know what you are doing (when you enable the setting, which is OFF by default) by having you enter a command in a pop up 😄
TBH, one can easily find out that command and “cheat”. On the other hand, if you don’t know vim, and still want to turn on the setting (by cheating) - you deserve what you get 😄
Obsidian is not new to me. I come across it from time to time, but never paid much attention.
That changed when I migrated my PKM site to use Obsidian-zola.
Technically, it use Zola, and has nothing to do with Obsidian (for Publishing)
The “source” is maintained in Obsidian, but it is just collection of markdown files, which can easily be maintained outside.
But then I got Obsidian desktop installed. I used it for making minor edits to markdown files.
Today we purchased a new car!
Thank you (Here I assume you are congratulating me 😄)
It is a great feeling.
Some quick thoughts (in random order)
The process took about 2 hours, even though we were waiting just 10 minutes for our turn.
Tomorrow onward there will be a lot of rush due to Diwali
Kids got bored towards the end, when the executive was giving me the demo/explaning the features.
It started with a post on Emacs Stories Telegram group. Someone posted a pretty picture with Emacs-logo-on-a-butterfly and a comment M-x butterfly
But the actual command M-x butterfly is boring (to me at least)
I wanted the nice image.
Some nice soul on the group directed me to this page
First I changed the icon of my doom emacs to this image.
I followed these instructions.
No immediate success.
Because, I have Emacs installed from brew, so one in /Applications folder is a symlink to the actual file in /opt/.
Last night when I wanted to check this site, but I started getting security error related to certificate. But it did not say domain expired.
I know Netlify automatically renews the cerificates, so I was confused.
But I was too sleepy to troubleshoot.
This morning, for some reason I checked my other email account which I almost never use except for domain registrar 😄
The Domain has expired email was smiling at me.