<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Tech — eBits Blog</title><link>https://embeddingbits.is-a.dev/tech/</link><description>Recent content in Tech on eBits Blog</description><generator>Hugo 0.152.2 -- gohugo.io</generator><language>en-us</language><copyright>Copyright © 2026 Amiitesh TSP. All rights reserved.</copyright><lastBuildDate>Mon, 27 Apr 2026 19:36:02 +0200</lastBuildDate><managingEditor>tspamiitesh@gmail.com (Amiitesh TSP)</managingEditor><webMaster>tspamiitesh@gmail.com (Amiitesh TSP)</webMaster><docs>https://www.rssboard.org/rss-specification</docs><ttl>60</ttl><atom:link href="https://embeddingbits.is-a.dev/tech/index.xml" rel="self" type="application/rss+xml"/><item><title>Connect to college WiFi using nmtui or networkmanager</title><link>https://embeddingbits.is-a.dev/tech/connect-to-college-wifi-using-nmtui-or-networkmanager/</link><pubDate>Tue, 13 Jan 2026 21:02:57 +0530</pubDate><guid isPermaLink="true">https://embeddingbits.is-a.dev/tech/connect-to-college-wifi-using-nmtui-or-networkmanager/</guid><dc:creator>Amiitesh TSP</dc:creator><category>linux</category><category>terminal</category><category>utilities</category><category>networks</category><category>software</category><category>nmtui</category><category>networkmanager</category><description>Connecting to college WiFi</description><content:encoded>
&lt;h2 class="heading" id="connecting-to-college-wifi-using-nmtui"&gt;
Connecting to college WiFi using nmtui
&lt;a class="anchor" href="#connecting-to-college-wifi-using-nmtui"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Open a terminal and run &lt;code&gt;nmtui&lt;/code&gt; and in the selection navigate to &lt;code&gt;activate a connection&lt;/code&gt;
&lt;figure class=""&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; From the list, select the WiFi you want to connect to.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; You&amp;rsquo;ll be taken to a screen similar to the one below:
&lt;figure class=""&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Verify that the SSID matches the network you want to connect to, then configure the settings below:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Authentication -&amp;gt; PEAP (Protected PEAP)&lt;/li&gt;
&lt;li&gt;Anonymous Identity -&amp;gt; Nil&lt;/li&gt;
&lt;li&gt;Domain -&amp;gt; Nil&lt;/li&gt;
&lt;li&gt;CA cert -&amp;gt; Nil&lt;/li&gt;
&lt;li&gt;CA cert password -&amp;gt; Nil&lt;/li&gt;
&lt;li&gt;Inner authentication -&amp;gt; MSCHAPV2&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; After configuring the settings as said below, enter your username and password and press enter.&lt;/p&gt;
&lt;p&gt;Following the above steps will get you connected to the college WiFi. If you feel difficult to connect through the terminal interface. Refer to GUI method below.&lt;/p&gt;
&lt;h2 class="heading" id="connecting-to-college-wifi-using-networkmanager-gui"&gt;
Connecting to college WiFi using NetworkManager GUI
&lt;a class="anchor" href="#connecting-to-college-wifi-using-networkmanager-gui"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Open the application -&amp;gt; &lt;strong&gt;Advanced Network Configuration&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
&lt;figure class=" img-small"&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; From the dropdown menu, Select WiFi and enter &lt;em&gt;Create&amp;hellip;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;
&lt;figure class=" img-small"&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Under the &lt;em&gt;WiFi&lt;/em&gt; tab, enter the name of the WiFi connection that you want to connect to in the SSID field.&lt;/p&gt;
&lt;p&gt;
&lt;figure class=" img-small"&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Now after that go to the &lt;em&gt;WiFi Security&lt;/em&gt; tab, you&amp;rsquo;ll see a configuration window similar to the one below:
&lt;figure class=""&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Under &lt;em&gt;WiFi Security&lt;/em&gt;, check if SSID is the network you want to connect to under the &lt;em&gt;WiFi&lt;/em&gt; tab and after that under the &lt;em&gt;WiFi Security&lt;/em&gt; tab change the settings to the one below:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Security -&amp;gt; WPA/WPA2 Enterprise&lt;/li&gt;
&lt;li&gt;Authentication -&amp;gt; PEAP (Protected PEAP)&lt;/li&gt;
&lt;li&gt;Anonymous Identity -&amp;gt; Nil&lt;/li&gt;
&lt;li&gt;Domain -&amp;gt; Nil&lt;/li&gt;
&lt;li&gt;Check the &amp;ldquo;&lt;code&gt;No CA certificate is required&lt;/code&gt;&amp;rdquo; checkbox&lt;/li&gt;
&lt;li&gt;CA cert -&amp;gt; Nil&lt;/li&gt;
&lt;li&gt;CA cert password -&amp;gt; Nil&lt;/li&gt;
&lt;li&gt;Inner authentication -&amp;gt; MSCHAPV2&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; After configuring the settings as said below, enter your username and password and press enter.&lt;/p&gt;
&lt;p&gt;Following these steps will get you connected to the college WiFi&lt;/p&gt;</content:encoded></item><item><title>Is Wayland better than X11</title><link>https://embeddingbits.is-a.dev/tech/is-wayland-better-than-x11/</link><pubDate>Sun, 11 Jan 2026 13:07:25 +0530</pubDate><guid isPermaLink="true">https://embeddingbits.is-a.dev/tech/is-wayland-better-than-x11/</guid><dc:creator>Amiitesh TSP</dc:creator><category>wayland</category><category>x11</category><category>linux</category><category>software</category><category>tech</category><description>Advantages of Wayland over X11</description><content:encoded>
&lt;h2 class="heading" id="introduction"&gt;
Introduction
&lt;a class="anchor" href="#introduction"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Wayland and X11 are one of the most prominent display servers. Both of them have their fair share of advantages and disadvantages. While, all the Desktop Environments, Window Managers are switching to Wayland due to it being a better alternative. But what are the differences between these two and why are users and developers switching to Wayland over X11. I&amp;rsquo;ll try my best to give my opinion on both of these display servers.&lt;/p&gt;
&lt;h2 class="heading" id="what-is-a-display-server"&gt;
What is a Display Server?
&lt;a class="anchor" href="#what-is-a-display-server"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;In Linux, A display server is a crucial component that acts as a intermediary between graphical applications and the hardware that is responsible for displaying them. It manages the graphical diplay and user input from input devices like keyboard and mouse.&lt;/p&gt;
&lt;h2 class="heading" id="x11-display-server"&gt;
X11 Display Server
&lt;a class="anchor" href="#x11-display-server"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;ll first talk about the older display server. The X11 project began in 1987 and has the stable support for almost all the linux native software. X11 follows the client-server protocol where the X server owns all the screens and input devices and all the GUI applications are the clients of the X server. It was specifically designed to work over a network it assumes clients and the server may be on different machines which leads to serialization and backwards-compatibility. It was built with assumptions but most of them no longer holds true. As of today, Linux runs on locally connected displays which is not something that X was designed for. This became increasingly problematic as modern computing kept evolving.&lt;/p&gt;
&lt;p&gt;By the early 2000s, X11 was seriously backward technically. Linux ecosystem was evolving which made most of X11&amp;rsquo;s features really unneccessary. Libraries like libinput started managing fonts which was a priviledge that only X11 had. Cairo and Freetype took over rendering which was earlier done by X11. Yet, X11 was still there with much of unneccessary feature which was seen as a bottleneck.&lt;/p&gt;
&lt;h3 class="heading" id="architecture"&gt;
Architecture
&lt;a class="anchor" href="#architecture"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;The kernel gets an event from an input device and sends it to the X server through the evdev input driver and the kernel does all the job from controlling and translating the protocol into the required standard.&lt;/li&gt;
&lt;li&gt;The X server then decides which window the event affects and sends it to that specific client. But X does not know how to do it properly since the windows are controlled by the compositor.&lt;/li&gt;
&lt;li&gt;The client looks at the event and has to decides. The UI has the change when the user controls it. So, the client sends the rendering request to the X server.&lt;/li&gt;
&lt;li&gt;After recieving the request, the X server sends it to the hardware to let it render the UI. Meanwhile, the server calculates the bounding region and sends it to the compositor as a damage event.&lt;/li&gt;
&lt;li&gt;The damage event tells the compositor that something has happened to the screen and it has to recomposite the entire screen with the changes.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;figure class=" img-small"&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;h2 class="heading" id="wayland-display-server"&gt;
Wayland Display Server
&lt;a class="anchor" href="#wayland-display-server"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;h3 class="heading" id="architecture-1"&gt;
Architecture
&lt;a class="anchor" href="#architecture-1"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;The kernel gets an event and immediately sends it to the compositor.&lt;/li&gt;
&lt;li&gt;The compositor looks through the scenegraph to see which window get the event.&lt;/li&gt;
&lt;li&gt;As in the X case, when the client receives the event, it updates the UI in response. But in the Wayland case, the rendering happens in the client, and the client just sends a request to the compositor to indicate the region that was updated.&lt;/li&gt;
&lt;li&gt;The compositor collects damage requests from its clients and then recomposites the screen. The compositor can then directly issue an ioctl to schedule a pageflip with KMS.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;figure class=" img-small"&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;h2 class="heading" id="wayland-is-faster-than-x11"&gt;
Wayland is faster than X11
&lt;a class="anchor" href="#wayland-is-faster-than-x11"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;In X11, the client talks to the X server -&amp;gt; X server talks to the window manager -&amp;gt; Window Manager to the compositor and finally the GPU. But in Wayland, the client directly interacts with the Compositor then to the GPU. X11 has to go through many steps which makes it slower and bloated when compared to Wayland.&lt;/p&gt;
&lt;p&gt;In X11, the application renders to pixmap, and the pixmap is copied to X server and the compositor has to copy again and the GPU finally displays it. But in Wayland, the application directly renders to the GPU buffer and the compositor just has to reference it from the buffer.&lt;/p&gt;
&lt;h2 class="heading" id="bottom-note"&gt;
Bottom Note
&lt;a class="anchor" href="#bottom-note"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Both the compositors have both of their pros and cons. X11 is more stable and has a mature codebase and it has a very predictable behaviour. X11 is ideal for screen recording remote desktops and has support for almost every software due to its maturity and a longer existence than Wayland. It is easier to write code for X11 and build low level tools. At the same time, It has many security flaws and broken features. The project is almost dead and many distros have continued to drop X11 as the default display server.&lt;/p&gt;
&lt;p&gt;Wayland on the other hand, Wayland is faster than X11 because of the Zero-copy rendering and its more secure since it allows the applications to see only their input and their own surfaces. It has almost perfect frame timing, the compositor controls VSync, frame scheduling and presentation timing which prevents screen tearing. At the same time, its harder to write wayland clients, has weaker remote desktop control when compared to X11 and harder to write low level tools. It is still evolving and many of its protocol extensions are still changing constantly. Many software are yet to extend compatibility to Wayland and iss still growing at a faster rate.&lt;/p&gt;</content:encoded></item><item><title>SSH for remote git repos</title><link>https://embeddingbits.is-a.dev/tech/ssh-for-remote-git-repos/</link><pubDate>Wed, 31 Dec 2025 21:52:16 +0530</pubDate><guid isPermaLink="true">https://embeddingbits.is-a.dev/tech/ssh-for-remote-git-repos/</guid><dc:creator>Amiitesh TSP</dc:creator><category>git</category><category>ssh</category><description>Using ssh for remote git repositories</description><content:encoded>
&lt;h2 class="heading" id="introduction"&gt;
Introduction
&lt;a class="anchor" href="#introduction"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;There are different ways to connect to a remote git repository like GitHub, CodeBerg, GitLab, etc:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;HTTPS&lt;/li&gt;
&lt;li&gt;SSH&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;HTTPS is for beginners and for casual coding and SSH on the other hand is more secure, easy to work with and used by professionals and few beginners.&lt;br&gt;
The setup is fairly easier and once setup is really easy to work with.&lt;/p&gt;
&lt;h3 class="heading" id="setup"&gt;
Setup
&lt;a class="anchor" href="#setup"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;h4 class="heading" id="step-1-generate-a-ssh-key"&gt;
Step 1: Generate a ssh key
&lt;a class="anchor" href="#step-1-generate-a-ssh-key"&gt;#&lt;/a&gt;
&lt;/h4&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ssh-keygen -t ed25519 -a &lt;span style="color:#d3869b"&gt;100&lt;/span&gt; -f ~/.ssh/git -C &lt;span style="color:#b8bb26"&gt;&amp;#34;git@tspamiitesh@gmail.com&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4 class="heading" id="step-2-start-the-ssh-agent"&gt;
Step 2: Start the ssh agent
&lt;a class="anchor" href="#step-2-start-the-ssh-agent"&gt;#&lt;/a&gt;
&lt;/h4&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fabd2f"&gt;eval&lt;/span&gt; &lt;span style="color:#b8bb26"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#fe8019"&gt;$(&lt;/span&gt;ssh-agent -s&lt;span style="color:#fe8019"&gt;)&lt;/span&gt;&lt;span style="color:#b8bb26"&gt;&amp;#34;&lt;/span&gt; &lt;span style="color:#928374;font-style:italic"&gt;# Depends upon the shell&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ssh-add ~/.ssh/git
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4 class="heading" id="step-3-add-ssh-public-key-to-github"&gt;
Step 3: Add ssh public key to GitHub
&lt;a class="anchor" href="#step-3-add-ssh-public-key-to-github"&gt;#&lt;/a&gt;
&lt;/h4&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cat ~/.ssh/git.pub
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Open GitHub (or any remote git service) → Settings&lt;/li&gt;
&lt;li&gt;Go to SSH and GPG keys&lt;/li&gt;
&lt;li&gt;Click New SSH key&lt;/li&gt;
&lt;li&gt;Paste the key&lt;/li&gt;
&lt;li&gt;Save&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 class="heading" id="step-4-test-the-ssh-connection"&gt;
Step 4: Test the ssh connection
&lt;a class="anchor" href="#step-4-test-the-ssh-connection"&gt;#&lt;/a&gt;
&lt;/h4&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ssh -T git@github.com
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4 class="heading" id="step-5-config-file"&gt;
Step 5: Config File
&lt;a class="anchor" href="#step-5-config-file"&gt;#&lt;/a&gt;
&lt;/h4&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;Host *
AddKeysToAgent yes
IdentitiesOnly yes
PreferredAuthentications publickey
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/git
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The above configuration is a really basic one and you can add up on many other features&lt;/p&gt;
&lt;p&gt;This is one of the most simplest ways to setup ssh&lt;/p&gt;</content:encoded></item><item><title>Tech Wrapped</title><link>https://embeddingbits.is-a.dev/tech/tech-wrapped/</link><pubDate>Mon, 29 Dec 2025 10:23:03 +0530</pubDate><guid isPermaLink="true">https://embeddingbits.is-a.dev/tech/tech-wrapped/</guid><dc:creator>Amiitesh TSP</dc:creator><category>wrapped</category><category>tech</category><category>software</category><category>open_source</category><category>contribution</category><description>My Tech Wrapped for 2025 from software that I used to the development I made</description><content:encoded>
&lt;h1 class="heading" id="tech-wrapped-2025"&gt;
Tech Wrapped 2025
&lt;a class="anchor" href="#tech-wrapped-2025"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;This post is a personal wrap-up of my year in tech, the stack I relied on, the software that shaped my daily workflow, and the projects I built throughout 2025.&lt;/p&gt;
&lt;p&gt;The goal isn’t to list everything I touched, but to document what actually mattered.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="tech-stack"&gt;
Tech Stack
&lt;a class="anchor" href="#tech-stack"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;This year, my stack gradually converged toward tools that emphasized &lt;strong&gt;simplicity, control, and long-term maintainability&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 class="heading" id="languages"&gt;
Languages
&lt;a class="anchor" href="#languages"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Zig:&lt;/strong&gt; I have always been a fan of C, but trying out Zig was a really good experience. I loved the syntax, its interoperability with C, and its strong support for bare-metal programming and embedded systems.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Golang:&lt;/strong&gt; I started getting into network programming and felt that C was a bit hard to work with for those use cases. That led me to Golang, which I really liked because of its goroutines and channels. Although I’m not a big fan of garbage collectors, I felt that sacrificing manual memory management for a better experience in hobby network programming was actually a good trade-off, in my opinion.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="software-i-used--loved"&gt;
Software I Used &amp;amp; Loved
&lt;a class="anchor" href="#software-i-used--loved"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Some software faded away quickly. The ones listed here earned a permanent place in my workflow.&lt;/p&gt;
&lt;h3 class="heading" id="daily-drivers"&gt;
Daily Drivers
&lt;a class="anchor" href="#daily-drivers"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;River:&lt;/strong&gt; I was a Hyprland user and wanted to try out a more lightweight window manager, as Hyprland felt a bit too much for me. While exploring lightweight options, I came across a window manager written in Zig. That’s how I found River, one of the more prominent projects built in Zig. After trying it out, I really liked it, especially its approach to configuration as a script and tools like riverctl.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ghostty:&lt;/strong&gt; I didn’t really plan to switch terminal emulators from Kitty. I tried Ghostty just for fun, but ended up liking it enough to make the switch.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 class="heading" id="notes-and-documentation"&gt;
Notes and Documentation
&lt;a class="anchor" href="#notes-and-documentation"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Neorg Plugin:&lt;/strong&gt; I was an Obsidian user for note-taking and really wanted to try an open-source alternative (FOSSification). While scrolling through Reddit, I came across the Neorg plugin in a subreddit. It’s essentially an Org-mode like system for Neovim, and I ended up switching to Neorg. I do realize that Org mode already exists, but I wanted to try something a bit more niche and tightly integrated with Neovim.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Typst:&lt;/strong&gt; I was using LaTeX for my college reports and for taking math notes, but its syntax has always been an obstacle that slowed me down. I came across Typst, which has a much easier learning curve and a far less overwhelming syntax. It follows a syntax style similar to Markdown, which made writing and iterating on notes much faster.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="contribution"&gt;
Contribution
&lt;a class="anchor" href="#contribution"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ly:&lt;/strong&gt; Things I have contributed around 162 lines to Ly display manager
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Improved Power Management Options:&lt;/strong&gt;
Added a hibernate option between sleep and brightness-down actions, giving users finer control over power behavior, especially useful for laptops. &lt;a href="https://codeberg.org/fairyglade/ly/pulls/867"&gt;#867&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Customizable Edge Margins:&lt;/strong&gt;
Introduced an edge margin option, allowing better layout control and improved ergonomics for different screen sizes and setups. &lt;a href="https://codeberg.org/fairyglade/ly/pulls/856"&gt;#856&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Battery Status Logic Fix:&lt;/strong&gt;
Fixed an issue where the battery status defaulted to an incorrect row when certain UI elements were hidden, ensuring consistent and predictable behavior. &lt;a href="https://codeberg.org/fairyglade/ly/pulls/845"&gt;#845&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Battery Status in the Top Bar:&lt;/strong&gt;
Added battery status support directly to the top bar alongside brightness controls, improving visibility and reducing the need for extra UI elements. &lt;a href="https://codeberg.org/fairyglade/ly/pulls/826"&gt;#826&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="projects-i-built-in-2025"&gt;
Projects I Built in 2025
&lt;a class="anchor" href="#projects-i-built-in-2025"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Some small projects that I built this year&lt;/p&gt;
&lt;h3 class="heading" id="completed-projects"&gt;
Completed Projects
&lt;a class="anchor" href="#completed-projects"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;h4 class="heading" id="simple-4bit-processor"&gt;
Simple 4bit Processor
&lt;a class="anchor" href="#simple-4bit-processor"&gt;#&lt;/a&gt;
&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Description:&lt;/strong&gt; This was for a college project for the subject Digital System Design&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tech Stack:&lt;/strong&gt; Verilog, GTKwave&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Core Problem Solved:&lt;/strong&gt; A really simple 4bit processor.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What I Learned:&lt;/strong&gt; Core VLSI perspective of a processor.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h4 class="heading" id="multi-threaded-file-downloader"&gt;
Multi Threaded File Downloader
&lt;a class="anchor" href="#multi-threaded-file-downloader"&gt;#&lt;/a&gt;
&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Description:&lt;/strong&gt; This is a multi-file downloader in Golang utilising Go channeling and Goroutines&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tech Stack:&lt;/strong&gt; Golang&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What I Learned:&lt;/strong&gt; Golang in computer networks&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 class="heading" id="gortscanner"&gt;
GortScanner
&lt;a class="anchor" href="#gortscanner"&gt;#&lt;/a&gt;
&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Description:&lt;/strong&gt; This is a really simple port scanner that I made in Golang&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tech Stack:&lt;/strong&gt; Golang&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What I Learned:&lt;/strong&gt; Golang in computer networks&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 class="heading" id="ongoing--in-progress-projects"&gt;
Ongoing / In-Progress Projects
&lt;a class="anchor" href="#ongoing--in-progress-projects"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;h4 class="heading" id="fastsh"&gt;
Fastsh
&lt;a class="anchor" href="#fastsh"&gt;#&lt;/a&gt;
&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Goal:&lt;/strong&gt; A POSIX-complaint shell that I am working on for my personal use cases.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tech Stack:&lt;/strong&gt; Zig&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Current State:&lt;/strong&gt; It can execute some basic builtins and executables in PATH.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Remaining Challenges:&lt;/strong&gt; Implement features like job management, conditional statements and much more.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="links"&gt;
Links
&lt;a class="anchor" href="#links"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/embeddingbits/"&gt;https://github.com/embeddingbits/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title>Typst vs LaTeX</title><link>https://embeddingbits.is-a.dev/tech/typst-vs-latex/</link><pubDate>Wed, 03 Dec 2025 00:00:00 +0000</pubDate><guid isPermaLink="true">https://embeddingbits.is-a.dev/tech/typst-vs-latex/</guid><dc:creator>Amiitesh TSP</dc:creator><category>documentation</category><category>note_taking</category><category>latex</category><category>typst</category><description>Typst and LaTeX: Differences and Use Cases</description><content:encoded>
&lt;h2 class="heading" id="introduction"&gt;
Introduction
&lt;a class="anchor" href="#introduction"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;We are in an era of arising &amp;ldquo;modern&amp;rdquo; alternatives. Almost all of the software and hardware products that we are using has a modern alternative.&lt;/p&gt;
&lt;p&gt;People were using &lt;strong&gt;Vim&lt;/strong&gt; and now there is an alternative called &lt;strong&gt;Neovim&lt;/strong&gt;. &lt;strong&gt;C/C++&lt;/strong&gt; has modern alternatives like &lt;strong&gt;Rust&lt;/strong&gt; and &lt;strong&gt;Zig&lt;/strong&gt;. &lt;strong&gt;Zoxide&lt;/strong&gt; is a better alternative of the &lt;code&gt;cd&lt;/code&gt; command. &lt;strong&gt;Zellij&lt;/strong&gt; is an alternative of &lt;strong&gt;tmux&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Similarly, &lt;strong&gt;LaTeX&lt;/strong&gt; has an easy alternative called &lt;strong&gt;Typst&lt;/strong&gt;. LaTeX has been the best in what it has been doing for the past 4 years. LaTeX is a document preparation system and a typesetting language that is used to create professional documents which extensively uses complex scientific and mathematical equations.&lt;/p&gt;
&lt;p&gt;Typst, similarly is a document preparation system which borrows its ideas and syntax from Markdown, LaTeX and other programming languages. It is much simpler than LaTeX, easier to debug and faster to prepare.&lt;/p&gt;
&lt;p&gt;Typst is still developing and its growing much faster whereas on the other hand, LaTeX is much powerful and has been the standard for most of the research papers and articles.&lt;/p&gt;
&lt;h2 class="heading" id="syntax"&gt;
Syntax
&lt;a class="anchor" href="#syntax"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-latex" data-lang="latex"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;\documentclass&lt;/span&gt;&lt;span style="color:#fabd2f"&gt;{&lt;/span&gt;article&lt;span style="color:#fabd2f"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;\begin&lt;/span&gt;&lt;span style="color:#fabd2f"&gt;{&lt;/span&gt;document&lt;span style="color:#fabd2f"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;\section&lt;/span&gt;&lt;span style="color:#fabd2f"&gt;{&lt;/span&gt;Introduction&lt;span style="color:#fabd2f"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;This is the introduction to the document.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;\subsection&lt;/span&gt;&lt;span style="color:#fabd2f"&gt;{&lt;/span&gt;Background&lt;span style="color:#fabd2f"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Details about the background of the topic.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;\subsubsection&lt;/span&gt;&lt;span style="color:#fabd2f"&gt;{&lt;/span&gt;Historical Context&lt;span style="color:#fabd2f"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;A brief overview of the historical context.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;\section*&lt;/span&gt;&lt;span style="color:#fabd2f"&gt;{&lt;/span&gt;Acknowledgements&lt;span style="color:#fabd2f"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Special thanks to everyone involved.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;\end&lt;/span&gt;&lt;span style="color:#fabd2f"&gt;{&lt;/span&gt;document&lt;span style="color:#fabd2f"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-typst" data-lang="typst"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;#set&lt;/span&gt; &lt;span style="color:#fabd2f"&gt;heading&lt;/span&gt;(numbering: &lt;span style="color:#b8bb26"&gt;&amp;#34;1.&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#b8bb26;font-weight:bold"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#b8bb26;font-weight:bold"&gt;= Introduction&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;This is the introduction to the document.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#b8bb26;font-weight:bold"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#b8bb26;font-weight:bold"&gt;== Background&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Details about the background of the project.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#b8bb26;font-weight:bold"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#b8bb26;font-weight:bold"&gt;== Historical Context&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;A brief overview of the historical context.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#b8bb26;font-weight:bold"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#b8bb26;font-weight:bold"&gt;== Acknowledgements&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Special thanks to everyone involved.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is just a really simple demonstration to show the simplicity of LaTeX, but in larger documents LaTeX uses many macros and importing of several other libraries to achieve a simple structured document.&lt;/p&gt;
&lt;p&gt;Similarly, writing math equations in Typst is really simpler than LaTeX&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;LaTeX&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-latex" data-lang="latex"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;The quadratic equation is given by &lt;span style="color:#b8bb26"&gt;$&lt;/span&gt;&lt;span style="color:#fabd2f"&gt;x &lt;/span&gt;&lt;span style="color:#fe8019"&gt;=&lt;/span&gt;&lt;span style="color:#fabd2f"&gt; &lt;/span&gt;\frac&lt;span style="color:#fabd2f"&gt;{&lt;/span&gt;&lt;span style="color:#fe8019"&gt;-&lt;/span&gt;&lt;span style="color:#fabd2f"&gt;b &lt;/span&gt;\pm&lt;span style="color:#fabd2f"&gt; &lt;/span&gt;\sqrt&lt;span style="color:#fabd2f"&gt;{b^&lt;/span&gt;&lt;span style="color:#d3869b"&gt;2&lt;/span&gt;&lt;span style="color:#fabd2f"&gt; &lt;/span&gt;&lt;span style="color:#fe8019"&gt;-&lt;/span&gt;&lt;span style="color:#fabd2f"&gt; &lt;/span&gt;&lt;span style="color:#d3869b"&gt;4&lt;/span&gt;&lt;span style="color:#fabd2f"&gt;ac}}{&lt;/span&gt;&lt;span style="color:#d3869b"&gt;2&lt;/span&gt;&lt;span style="color:#fabd2f"&gt;a}&lt;/span&gt;&lt;span style="color:#b8bb26"&gt;$&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Typst&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-typst" data-lang="typst"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;The quadratic equation is given by $x &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; (&lt;span style="color:#fe8019"&gt;-&lt;/span&gt;b plus.&lt;span style="color:#fabd2f"&gt;minus&lt;/span&gt; (&lt;span style="color:#fabd2f"&gt;sqrt&lt;/span&gt;(b^&lt;span style="color:#d3869b"&gt;2&lt;/span&gt; &lt;span style="color:#fe8019"&gt;-&lt;/span&gt; &lt;span style="color:#d3869b"&gt;4&lt;/span&gt; a c))) &lt;span style="color:#fe8019"&gt;/&lt;/span&gt; (&lt;span style="color:#d3869b"&gt;2&lt;/span&gt;a)$
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Typst is less cluttery to look at than LaTeX.&lt;/p&gt;
&lt;h2 class="heading" id="differences"&gt;
Differences
&lt;a class="anchor" href="#differences"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;h3 class="heading" id="learning-curve"&gt;
Learning Curve
&lt;a class="anchor" href="#learning-curve"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;LaTeX&lt;/strong&gt;: It has a really steep learning curve and a lot of packages to learn.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Typst&lt;/strong&gt;: It is really to learn and its much flatter than LaTeX.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 class="heading" id="compilation"&gt;
Compilation
&lt;a class="anchor" href="#compilation"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;LaTeX:&lt;/strong&gt; Compilation times are really long and debugging is really hard in LaTeX.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Typst:&lt;/strong&gt; Rapid compilation times and debugging is really than debugging in LaTeX.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 class="heading" id="language"&gt;
Language
&lt;a class="anchor" href="#language"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;LaTeX:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;The markup is really visible than the actual content.&lt;/li&gt;
&lt;li&gt;There are many macros in the language&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Typst:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;The syntax is really simple and the markup stays out of the way when editing.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 class="heading" id="packages"&gt;
Packages
&lt;a class="anchor" href="#packages"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;LaTeX:&lt;/strong&gt; There are many packages that are old and new and almost everything exists.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Typst:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Fewer packages than compared to LaTeX.&lt;/li&gt;
&lt;li&gt;The number of packages are rapidly growing&lt;/li&gt;
&lt;li&gt;Many built-in functions which reduce the need for third party packages.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 class="heading" id="use-cases-when-to-use-what"&gt;
Use Cases: When to Use What
&lt;a class="anchor" href="#use-cases-when-to-use-what"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;h3 class="heading" id="use-typst-when"&gt;
Use Typst When
&lt;a class="anchor" href="#use-typst-when"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;You want speed in writing and compiling.&lt;/li&gt;
&lt;li&gt;You’re writing:
&lt;ul&gt;
&lt;li&gt;Homework/assignments&lt;/li&gt;
&lt;li&gt;Reports&lt;/li&gt;
&lt;li&gt;Thesis drafts&lt;/li&gt;
&lt;li&gt;Technical documentation&lt;/li&gt;
&lt;li&gt;Notes&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;You want good output without fighting the compiler.&lt;/li&gt;
&lt;li&gt;You need custom formatting or programmatic layouts.&lt;/li&gt;
&lt;li&gt;Best for:
&lt;ul&gt;
&lt;li&gt;Students&lt;/li&gt;
&lt;li&gt;Engineers&lt;/li&gt;
&lt;li&gt;Technical writers&lt;/li&gt;
&lt;li&gt;Fast prototyping&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 class="heading" id="use-latex-when"&gt;
Use LaTeX When
&lt;a class="anchor" href="#use-latex-when"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;You are submitting to a journal/conference that requires LaTeX.&lt;/li&gt;
&lt;li&gt;You need:
&lt;ul&gt;
&lt;li&gt;Highly specialized math packages&lt;/li&gt;
&lt;li&gt;Complex bibliography/citation requirements&lt;/li&gt;
&lt;li&gt;TikZ-based graphics&lt;/li&gt;
&lt;li&gt;Perfect control for scientific publications&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;You’re using a template that only exists in LaTeX.&lt;/li&gt;
&lt;li&gt;You&amp;rsquo;re producing textbooks, research papers, or books where full TeX power is necessary.&lt;/li&gt;
&lt;li&gt;Best for:
&lt;ul&gt;
&lt;li&gt;Academics&lt;/li&gt;
&lt;li&gt;Scientific publishing&lt;/li&gt;
&lt;li&gt;Journals, IEEE/ACM submissions&lt;/li&gt;
&lt;li&gt;Math-heavy textbooks&lt;/li&gt;
&lt;li&gt;Established research workflows&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 class="heading" id="bottom-note"&gt;
Bottom Note
&lt;a class="anchor" href="#bottom-note"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Both softwares are excellent in their own ways. LaTeX has been around since 1984 and is more mature, stable, and extensively documented. Its the industry standard for research papers, academic publishing, complex mathematical typesetting, and large technical documents.&lt;/p&gt;
&lt;p&gt;Typst, introduced in 2023, is a modern alternative that focuses on speed, simplicity, and a more intuitive syntax. It is especially useful for class assignments, note-taking, project reports, and general documentation, where quick iteration and readability matter more.&lt;/p&gt;
&lt;p&gt;While LaTeX still dominates in formal publishing workflows, Typst is rapidly evolving and becoming a strong choice for students and developers who want clean, beautiful documents with less overhead.&lt;/p&gt;
&lt;h5 class="heading" id="links"&gt;
Links
&lt;a class="anchor" href="#links"&gt;#&lt;/a&gt;
&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://typst.app/"&gt;Typst&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.latex-project.org/"&gt;LaTeX&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title>Guide to QEMU as a Virtual Machine</title><link>https://embeddingbits.is-a.dev/tech/guide-to-qemu-as-a-virtual-machine/</link><pubDate>Tue, 25 Nov 2025 00:00:00 +0000</pubDate><guid isPermaLink="true">https://embeddingbits.is-a.dev/tech/guide-to-qemu-as-a-virtual-machine/</guid><dc:creator>Amiitesh TSP</dc:creator><category>qemu</category><category>vm</category><category>linux</category><description>Using QEMU as a Virtual Machine</description><content:encoded>
&lt;h2 class="heading" id="why-qemu"&gt;
Why QEMU?
&lt;a class="anchor" href="#why-qemu"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;There are lots of virtual machine software like VirtualBox and VMWare. But why specifically QEMU?&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;So, firstly, QEMU can emulate any software hardware:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ARM&lt;/li&gt;
&lt;li&gt;AArch&lt;/li&gt;
&lt;li&gt;RISC-V&lt;/li&gt;
&lt;li&gt;MIPS&lt;/li&gt;
&lt;li&gt;PowerPC&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It does full system emulation like CPU, timers, interrupts, UART, SPI/I2C. VMWare and VirtualBox do not emulate real hardware, they virtualise generic PC hardware. QEMU gives you near native performance and deeper kernel intergration and is highly scalable.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;There are many customisation that is possible with QEMU, it has virt-manager which provides a GUI to manage the VMs or we can use the normal command line.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;They can easily be automated with either scripts or Makefiles.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;They have really advanced I/O and storage features like Copy on Write (CoW), qcow snapshots and backing up files.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;This is really useful when it comes to building Operating systems for different architecture while working in a system with another architecture and its really useful for baremetal embedded systems projects and experimenting with other architectures.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 class="heading" id="using-qemu-to-boot-an-iso"&gt;
Using QEMU to boot an ISO
&lt;a class="anchor" href="#using-qemu-to-boot-an-iso"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;To create a VM, we have to initialise a virtual hard disk.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;qemu-img&lt;/code&gt; is used to create and convert virtual hard disk files.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;create&lt;/code&gt; flags tells &lt;code&gt;qemu-img&lt;/code&gt; to create a virtual hard disk.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;-f qcow2&lt;/code&gt; (QEMU Copy on Write) is the file format for QEMU, it is the native format for QEMU.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Then &lt;code&gt;os_image.img&lt;/code&gt; is the name of the image that we are going to create and &lt;code&gt;10G&lt;/code&gt; is the size allocation, this can be set according to user preference.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;qemu-img create -f qcow2 os_image.img 10G
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next up, to launch the VM from a &lt;code&gt;iso&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;qemu-system-x86_64&lt;/code&gt; runs the qemu emulator for 64 bit x86 systems, this is available for almost all the other architectures too.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-enable-kvm&lt;/code&gt; is to enable hardware acceleration using KVM (Kernel-based Virtual Machine).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-cdrom &amp;lt;iso_name&amp;gt;&lt;/code&gt; specify the iso file as the CDROM file.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-boot menu=on&lt;/code&gt; is enables a small boot menu at VM startup so you can choose boot device&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-drive file=os_image.img&lt;/code&gt; is attached.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-m 2G&lt;/code&gt; is the RAM that we are going to allocate for the virtual machince to function. This is dependant on user preferences and the system capability.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;qemu-system-x86_64 -enable-kvm -cdrom os.iso -boot menu&lt;span style="color:#fe8019"&gt;=&lt;/span&gt;on -drive file&lt;span style="color:#fe8019"&gt;=&lt;/span&gt;alpine.img -m 2G
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content:encoded></item><item><title>The AI browser hype</title><link>https://embeddingbits.is-a.dev/tech/ai_browsers/</link><pubDate>Wed, 05 Nov 2025 00:00:00 +0000</pubDate><guid isPermaLink="true">https://embeddingbits.is-a.dev/tech/ai_browsers/</guid><dc:creator>Amiitesh TSP</dc:creator><category>AI</category><category>browser</category><category>automation</category><description>Why is there a sudden increase in the AI browser Hype</description><content:encoded>
&lt;h2 class="heading" id="what-is-an-ai-browser"&gt;
What is an AI Browser?
&lt;a class="anchor" href="#what-is-an-ai-browser"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;So, basically an &lt;strong&gt;AI Browser&lt;/strong&gt; is something that integrates Artificial Intelligence to automate tasks, summarise pages and much more.
There were &lt;strong&gt;0 to no&lt;/strong&gt; AI Browsers until July when Perplexity decided to beta launch &lt;a href="https://www.perplexity.ai/comet"&gt;Comet&lt;/a&gt; on July 22nd.&lt;/p&gt;
&lt;p&gt;People are going crazy over this hype, they are booking tickets (by filling all the required details), applying jobs (submitting resume, filling up the questions and forms).
The new term for stuff like these are called &lt;strong&gt;Agentic Browsing&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 class="heading" id="are-they-safe-do-they-ensure-privacy"&gt;
Are they safe? Do they ensure privacy?
&lt;a class="anchor" href="#are-they-safe-do-they-ensure-privacy"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Now asking the real question, how safe are they and whether they ensure privacy.&lt;/p&gt;
&lt;p&gt;Personally, I&amp;rsquo;m nowhere closer to using an AI Browser, I have a fair share of important accounts logged in and I dont trust an LLM with my information. You&amp;rsquo;re basically giving a rock that was trained with mathematics to deal with your browser automation, filling tickets, automating payments. AI does not know to differentiate between &lt;em&gt;genuine prompts&lt;/em&gt; and &lt;em&gt;prompt injection&lt;/em&gt; attacks.&lt;/p&gt;
&lt;p&gt;For the people who aren&amp;rsquo;t aware of &lt;strong&gt;prompt injection&lt;/strong&gt;, it&amp;rsquo;s a cyberattack made to exploit LLMs to perform unintended action. I saw this really interesting article where a user had performed a prompt injection as a reddit comment.&lt;/p&gt;
&lt;p&gt;
&lt;figure class=""&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;In this injection, a comment in the post’s comment section sends a request to the Comet AI browser to open a link and then email certain details to a specified address, all without the user’s confirmation.&lt;/p&gt;
&lt;p&gt;Another common form of prompt injection involves providing a PDF containing ANSI escape characters or whitespace language and asking the AI to read it. The AI then executes the actions embedded in the ANSI escape sequences instead of following the user’s actual request.&lt;/p&gt;
&lt;p&gt;Personally, I don&amp;rsquo;t owe my information to a malicious PDF or a reddit comment section. &lt;strong&gt;Opera&lt;/strong&gt; has it&amp;rsquo;s own AI browser called the Opera Neon, and Opera themselves have warned about prompt injection:&lt;/p&gt;
&lt;p&gt;
&lt;figure class=""&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;We are nowhere near eliminating prompt injections in the near future, since it purely depends on the user to prevent the browser from falling for the injection attacks.
&lt;strong&gt;Google&lt;/strong&gt; has made an effort to prevent prompt injection which ultimately makes the AI dumber than what it usually was.&lt;/p&gt;
&lt;p&gt;LLMs are very prone to unexpected behaviour and will remain the same for at least the next few years, the market hype has led people to avoid researching a particular topic, tool, or software, resulting in major bugs and unexpected behavior being left unfixed. This leads to shorter release cycles that create more problems than a well-researched release would.&lt;/p&gt;
&lt;p&gt;I wanted to write about this since I&amp;rsquo;ve been noticing a lot more usage of AI browsers without precautions and side effects :(&lt;/p&gt;
&lt;h2 class="heading" id="bottom-note"&gt;
Bottom Note
&lt;a class="anchor" href="#bottom-note"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Browsers have been there for a while and they are one of the best creations of mankind and I can&amp;rsquo;t imagine a world without them. They are also mature in terms of security as a result of multiple years of optimisation, fixes, reasearch and more.&lt;/p&gt;
&lt;p&gt;The sense of an AI browser breaks years of maturity of security enhancement due to a software browsing on behalf of the user with or without the user&amp;rsquo;s confirmation.&lt;/p&gt;
&lt;p&gt;If we are still planning on using an AI browser, it is our responsibility to monitor every single action taken by the AI on behalf of the user and be a responsible digital user.&lt;/p&gt;
&lt;p&gt;Thanks to Adam Convey on providing insights: &lt;a href="https://www.xda-developers.com/please-stop-using-ai-browsers/"&gt;article&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title>Configuring Tmux</title><link>https://embeddingbits.is-a.dev/tech/configuring-tmux/</link><pubDate>Tue, 04 Nov 2025 16:28:33 +0530</pubDate><guid isPermaLink="true">https://embeddingbits.is-a.dev/tech/configuring-tmux/</guid><dc:creator>Amiitesh TSP</dc:creator><category>linux</category><category>terminal</category><category>tmux</category><description>Configuring a really simple tmux config</description><content:encoded>
&lt;h2 class="heading" id="introduction"&gt;
Introduction
&lt;a class="anchor" href="#introduction"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Welcome to this blog where I will be taking you through certain steps to get your own &lt;strong&gt;tmux configuration&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;First of all, let&amp;rsquo;s see: &lt;strong&gt;What is Tmux? and Why is it used?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tmux&lt;/strong&gt; stands for &lt;strong&gt;Terminal Multiplexer&lt;/strong&gt; and is used in Unix-like operating systems. It allows you to use &lt;strong&gt;multiple terminal sessions in a single terminal window&lt;/strong&gt;. Even if the actual terminal window closes, the tmux session runs in the background and can be accessed with the name of the session — which is helpful when we accidentally close the session without saving changes.&lt;/p&gt;
&lt;p&gt;Here’s how we can use tmux:&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;In the above video, I opened a tmux session, created three split panes, created a tmux window, closed the terminal, and reattached using the session name &lt;code&gt;&amp;quot;test&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;default configuration&lt;/strong&gt; for tmux is good, but we can add our own &lt;strong&gt;plugins&lt;/strong&gt;, &lt;strong&gt;colorschemes&lt;/strong&gt;, &lt;strong&gt;custom keybinds&lt;/strong&gt;, and more. Configuring tmux is &lt;strong&gt;not a tough job&lt;/strong&gt; and is relatively easy. I use a simple minimal tmux configuration — and I’ll take you through the steps to achieve it.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="getting-started"&gt;
Getting Started
&lt;a class="anchor" href="#getting-started"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;To begin, locate the tmux configuration file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;~/.tmux.conf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Open it with your favorite editor.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;first step&lt;/strong&gt; is to create a shortcut to &lt;strong&gt;reload the config&lt;/strong&gt; without restarting tmux:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-tmux" data-lang="tmux"&gt;unbind r
bind r source-file ~/.tmux.conf
&lt;/code&gt;&lt;/pre&gt;&lt;blockquote&gt;
&lt;p&gt;Now press &lt;code&gt;Ctrl+s&lt;/code&gt;, then &lt;code&gt;r&lt;/code&gt; to reload the config instantly.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="rebinding-the-default-prefix"&gt;
Rebinding the default prefix
&lt;a class="anchor" href="#rebinding-the-default-prefix"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;By default, tmux uses &lt;strong&gt;&lt;code&gt;Ctrl+b&lt;/code&gt;&lt;/strong&gt; as the prefix. This is not ergonomic.&lt;/p&gt;
&lt;p&gt;We’ll change it to &lt;strong&gt;&lt;code&gt;Ctrl+s&lt;/code&gt;&lt;/strong&gt; (you can choose any):&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-tmux" data-lang="tmux"&gt;set -g prefix C-s
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now your config looks like:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-tmux" data-lang="tmux"&gt;unbind r
bind r source-file ~/.tmux.conf
set -g prefix C-s
&lt;/code&gt;&lt;/pre&gt;&lt;hr&gt;
&lt;h2 class="heading" id="adding-mouse-support"&gt;
Adding mouse support
&lt;a class="anchor" href="#adding-mouse-support"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Tmux is &lt;strong&gt;keyboard-driven by default&lt;/strong&gt; — no mouse.&lt;/p&gt;
&lt;p&gt;Enable it with:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-tmux" data-lang="tmux"&gt;set -g mouse on
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex="0"&gt;&lt;code class="language-tmux" data-lang="tmux"&gt;unbind r
bind r source-file ~/.tmux.conf
set -g prefix C-s
set -g mouse on
&lt;/code&gt;&lt;/pre&gt;&lt;hr&gt;
&lt;h2 class="heading" id="setting-tmux-status-bar-position"&gt;
Setting tmux status bar position
&lt;a class="anchor" href="#setting-tmux-status-bar-position"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Move the status bar to the &lt;strong&gt;top&lt;/strong&gt; to avoid confusion with Vim/Neovim status lines:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-tmux" data-lang="tmux"&gt;set-option -g status-position top
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex="0"&gt;&lt;code class="language-tmux" data-lang="tmux"&gt;unbind r
bind r source-file ~/.tmux.conf
set -g prefix C-s
set -g mouse on
set-option -g status-position top
&lt;/code&gt;&lt;/pre&gt;&lt;hr&gt;
&lt;h2 class="heading" id="installing-tmux-plugin-manager-tpm"&gt;
Installing Tmux Plugin Manager (TPM)
&lt;a class="anchor" href="#installing-tmux-plugin-manager-tpm"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;We’ll use &lt;strong&gt;&lt;a href="https://github.com/tmux-plugins/tpm"&gt;TPM&lt;/a&gt;&lt;/strong&gt; to install plugins.&lt;/p&gt;
&lt;p&gt;Clone it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Add to &lt;code&gt;~/.tmux.conf&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-tmux" data-lang="tmux"&gt;# List of plugins
set -g @plugin &amp;#39;tmux-plugins/tpm&amp;#39;
set -g @plugin &amp;#39;tmux-plugins/tmux-sensible&amp;#39;
# Initialize TMUX plugin manager (keep this at the bottom)
run &amp;#39;~/.tmux/plugins/tpm/tpm&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Reload tmux config&lt;/strong&gt; (&lt;code&gt;Ctrl+s&lt;/code&gt;, &lt;code&gt;r&lt;/code&gt;) and press &lt;code&gt;Ctrl+s&lt;/code&gt;, &lt;code&gt;I&lt;/code&gt; (capital I) to install plugins.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="adding-colorscheme"&gt;
Adding colorscheme
&lt;a class="anchor" href="#adding-colorscheme"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Add your favorite theme under &lt;code&gt;# List of plugins&lt;/code&gt;. I use &lt;strong&gt;Nord&lt;/strong&gt;:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-tmux" data-lang="tmux"&gt;set -g @plugin &amp;#34;nordtheme/tmux&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Full config so far:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-tmux" data-lang="tmux"&gt;unbind r
bind r source-file ~/.tmux.conf
set -g prefix C-s
set -g mouse on
set-option -g status-position top
# List of plugins
set -g @plugin &amp;#39;tmux-plugins/tpm&amp;#39;
set -g @plugin &amp;#39;tmux-plugins/tmux-sensible&amp;#39;
set -g @plugin &amp;#34;nordtheme/tmux&amp;#34;
# Initialize TMUX plugin manager (keep this line at the very bottom)
run &amp;#39;~/.tmux/plugins/tpm/tpm&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;blockquote&gt;
&lt;p&gt;Reload (&lt;code&gt;Ctrl+s&lt;/code&gt;, &lt;code&gt;r&lt;/code&gt;) → Install plugins (&lt;code&gt;Ctrl+s&lt;/code&gt;, &lt;code&gt;I&lt;/code&gt;)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="conclusion"&gt;
Conclusion
&lt;a class="anchor" href="#conclusion"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Here’s your &lt;strong&gt;final minimal &lt;code&gt;.tmux.conf&lt;/code&gt;&lt;/strong&gt;:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-tmux" data-lang="tmux"&gt;unbind r
bind r source-file ~/.tmux.conf
set -g prefix C-s
set -g mouse on
set-option -g status-position top
# List of plugins
set -g @plugin &amp;#39;tmux-plugins/tpm&amp;#39;
set -g @plugin &amp;#39;tmux-plugins/tmux-sensible&amp;#39;
set -g @plugin &amp;#34;nordtheme/tmux&amp;#34;
# Initialize TMUX plugin manager (keep this line at the very bottom)
run &amp;#39;~/.tmux/plugins/tpm/tpm&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I hope you got your own config that fits you too.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;All Tmux Plugins:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/rothgar/awesome-tmux?tab=readme-ov-file"&gt;List of Tmux Plugins&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hope this blog has helped you get a &lt;strong&gt;starter tmux configuration&lt;/strong&gt; — and if you liked it, please follow up on future blogs!&lt;/p&gt;</content:encoded></item><item><title>Vim vs Neovim</title><link>https://embeddingbits.is-a.dev/tech/vim-vs-neovim/</link><pubDate>Sun, 05 Jan 2025 00:00:00 +0000</pubDate><guid isPermaLink="true">https://embeddingbits.is-a.dev/tech/vim-vs-neovim/</guid><dc:creator>Amiitesh TSP</dc:creator><category>neovim</category><category>vim</category><category>text editor</category><description>Differences between Vim and Neovim</description><content:encoded>
&lt;h2 class="heading" id="introduction"&gt;
Introduction
&lt;a class="anchor" href="#introduction"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Welcome to this blog, where I&amp;rsquo;ll be plotting the differences between &lt;strong&gt;Vim&lt;/strong&gt; and &lt;strong&gt;Neovim&lt;/strong&gt;. I&amp;rsquo;ll also be discussing which editor to use between the two for a better workflow and a better code editing experience.&lt;/p&gt;
&lt;p&gt;Vim and Neovim are &lt;strong&gt;Open Source text editors&lt;/strong&gt; which can be tweaked for our convenience and changed according to our workflow.&lt;/p&gt;
&lt;p&gt;Vim and Neovim are one of the best &lt;strong&gt;feature-rich text editors&lt;/strong&gt; available for us today alongside Emacs. They are called &lt;strong&gt;mode-based or modal text editors&lt;/strong&gt;, meaning that work is done in different modes. For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;To enter text → &lt;strong&gt;Insert Mode&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;To select text → &lt;strong&gt;Visual Mode&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;To replace text → &lt;strong&gt;Replace Mode&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;To perform tasks like copy, paste, macros → &lt;strong&gt;Command Mode&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="what-are-the-differences-between-vim-and-neovim"&gt;
What are the differences between Vim and Neovim?
&lt;a class="anchor" href="#what-are-the-differences-between-vim-and-neovim"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;h3 class="heading" id="basic-differences-between-the-text-editors"&gt;
Basic Differences between the text editors:
&lt;a class="anchor" href="#basic-differences-between-the-text-editors"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Extensibility:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Vim:&lt;/strong&gt; Uses &lt;strong&gt;Vimscript&lt;/strong&gt; (a scripting language made for Vim). It has a more restricted plugin system since plugins must be written in Vimscript. Getting advanced features can be challenging.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Neovim:&lt;/strong&gt; A fork of Vim, built with &lt;strong&gt;Lua&lt;/strong&gt; — a language with better documentation and support for plugins in &lt;strong&gt;multiple programming languages&lt;/strong&gt; (function calls are interoperable). Neovim also supports &lt;strong&gt;asynchronous plugins&lt;/strong&gt;, making it more &lt;strong&gt;performant and responsive&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;UI Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Vim:&lt;/strong&gt; Primarily runs in a terminal. Even with GUIs like &lt;strong&gt;GVim&lt;/strong&gt;, UI features are limited.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Neovim:&lt;/strong&gt; Designed to support &lt;strong&gt;external user interfaces&lt;/strong&gt;. Can run in any terminal emulator or GUI (e.g., &lt;strong&gt;Neovide&lt;/strong&gt;) — offering greater flexibility and Open Source freedom.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Built-In Terminal:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Vim:&lt;/strong&gt; No built-in terminal → requires a separate terminal tab.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Neovim:&lt;/strong&gt; Comes with a &lt;strong&gt;built-in terminal emulator&lt;/strong&gt;, enabling running code, interacting with REPLs, and executing commands directly in the editor.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 class="heading" id="detailed-differences-between-the-two-text-editors"&gt;
Detailed Differences between the two text editors:
&lt;a class="anchor" href="#detailed-differences-between-the-two-text-editors"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;LSP Support (Language Server Protocol):&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Vim:&lt;/strong&gt; No built-in LSP support.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Neovim:&lt;/strong&gt; Excellent &lt;strong&gt;built-in LSP support&lt;/strong&gt; via JSON-RPC. Enables language-specific features like &lt;strong&gt;code linting&lt;/strong&gt;, &lt;strong&gt;autocompletion&lt;/strong&gt;, and &lt;strong&gt;snippets&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Directory Structure:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Vim:&lt;/strong&gt; Hardcodes config location → changes must be made in a single file.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Neovim:&lt;/strong&gt; Follows &lt;strong&gt;XDG Base Directory&lt;/strong&gt; spec → config lives in &lt;code&gt;~/.config/nvim/init.lua&lt;/code&gt; (cleaner and standardized).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Code Formatting:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Vim:&lt;/strong&gt; Code style maintained by &lt;strong&gt;one person&lt;/strong&gt; → formatting philosophy is centralized.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Neovim:&lt;/strong&gt; Maintained by a &lt;strong&gt;large team of contributors&lt;/strong&gt; → more consistent and modern formatting.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Plugin Support:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Vim:&lt;/strong&gt; Rich plugin ecosystem, but &lt;strong&gt;IDE-like features are hard&lt;/strong&gt; due to Vimscript limitations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Neovim:&lt;/strong&gt; Plugins can be written in &lt;strong&gt;any language&lt;/strong&gt;. Using real programming languages makes &lt;strong&gt;IDE-like features much easier&lt;/strong&gt; to implement.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="bottom-note"&gt;
Bottom Note
&lt;a class="anchor" href="#bottom-note"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Both &lt;strong&gt;Vim&lt;/strong&gt; and &lt;strong&gt;Neovim&lt;/strong&gt; are powerful, open-source text editors designed for customization and efficient workflows. While &lt;strong&gt;Vim&lt;/strong&gt; has been a long-standing favorite for many developers, &lt;strong&gt;Neovim&lt;/strong&gt; enhances the experience with modern features such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Asynchronous plugin support&lt;/li&gt;
&lt;li&gt;Built-in terminal&lt;/li&gt;
&lt;li&gt;Native LSP support&lt;/li&gt;
&lt;li&gt;Improved extensibility via Lua&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These advancements make &lt;strong&gt;Neovim&lt;/strong&gt; more suitable for those seeking a &lt;strong&gt;flexible, IDE-like environment&lt;/strong&gt; without sacrificing performance.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Ultimately, the choice depends on your needs — but for a more feature-rich and modern editing experience, Neovim stands out as the better option.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;</content:encoded></item><item><title>Zig Programming Language</title><link>https://embeddingbits.is-a.dev/tech/zig-programming-language/</link><pubDate>Mon, 30 Dec 2024 00:00:00 +0000</pubDate><guid isPermaLink="true">https://embeddingbits.is-a.dev/tech/zig-programming-language/</guid><dc:creator>Amiitesh TSP</dc:creator><category>zig</category><category>c</category><category>language</category><description>Zig&amp;rsquo;s features</description><content:encoded>
&lt;h2 class="heading" id="introduction"&gt;
Introduction
&lt;a class="anchor" href="#introduction"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Zig is a modern programming language that is meant to be the successor of C programming language. Zig is a general-purpose programming language and toolchain for maintaining &lt;strong&gt;robust, optimal and reusable software&lt;/strong&gt;. There is no hidden control flow, no hidden memory allocations and no preprocessors and macros as in C.&lt;/p&gt;
&lt;p&gt;Zig has a very important and maybe the standout feature of the language and a new approach to metaprogramming. In Zig, we can call the functions at &lt;strong&gt;compile time&lt;/strong&gt; and the datatypes can be assigned at &lt;strong&gt;compile time&lt;/strong&gt; and much more to it.&lt;/p&gt;
&lt;h2 class="heading" id="what-makes-zig-special"&gt;
What Makes Zig Special
&lt;a class="anchor" href="#what-makes-zig-special"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Zig is built on three big ideas: it’s &lt;strong&gt;simple&lt;/strong&gt;, it’s &lt;strong&gt;fast&lt;/strong&gt;, and it gives you &lt;strong&gt;control&lt;/strong&gt;. Unlike some languages that make things complicated or force rules on you, Zig keeps things clear and lets you decide what to do.&lt;/p&gt;
&lt;p&gt;Here’s a simple Zig program that says hello:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-zig" data-lang="zig"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;const&lt;/span&gt; std &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; &lt;span style="color:#fabd2f"&gt;@import&lt;/span&gt;(&lt;span style="color:#b8bb26"&gt;&amp;#34;std&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;pub&lt;/span&gt; &lt;span style="color:#fe8019"&gt;fn&lt;/span&gt; &lt;span style="color:#fabd2f"&gt;main&lt;/span&gt;() &lt;span style="color:#fe8019"&gt;!&lt;/span&gt;&lt;span style="color:#fabd2f"&gt;void&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;const&lt;/span&gt; stdout &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; std.io.&lt;span style="color:#fabd2f"&gt;getStdOut&lt;/span&gt;().&lt;span style="color:#fabd2f"&gt;writer&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;try&lt;/span&gt; stdout.&lt;span style="color:#fabd2f"&gt;print&lt;/span&gt;(&lt;span style="color:#b8bb26"&gt;&amp;#34;Hello, {s}!&lt;/span&gt;&lt;span style="color:#b8bb26"&gt;\n&lt;/span&gt;&lt;span style="color:#b8bb26"&gt;&amp;#34;&lt;/span&gt;, .{&lt;span style="color:#b8bb26"&gt;&amp;#34;Zig&amp;#34;&lt;/span&gt;});
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This code prints &lt;code&gt;&amp;quot;Hello, Zig!&amp;quot;&lt;/code&gt; to your screen. The &lt;code&gt;!void&lt;/code&gt; part means the program might fail, and Zig makes sure you know it. We’ll talk more about that later.&lt;/p&gt;
&lt;h2 class="heading" id="managing-memory-in-zig"&gt;
Managing Memory in Zig
&lt;a class="anchor" href="#managing-memory-in-zig"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Memory is like space your program uses to store things. In Zig, &lt;strong&gt;you get to decide how to use that space&lt;/strong&gt;—no automatic system does it for you. This makes your program fast and safe.&lt;/p&gt;
&lt;p&gt;Here’s an example of making a list of numbers:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-zig" data-lang="zig"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;const&lt;/span&gt; std &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; &lt;span style="color:#fabd2f"&gt;@import&lt;/span&gt;(&lt;span style="color:#b8bb26"&gt;&amp;#34;std&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;pub&lt;/span&gt; &lt;span style="color:#fe8019"&gt;fn&lt;/span&gt; &lt;span style="color:#fabd2f"&gt;main&lt;/span&gt;() &lt;span style="color:#fe8019"&gt;!&lt;/span&gt;&lt;span style="color:#fabd2f"&gt;void&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;var&lt;/span&gt; gpa &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; std.heap.&lt;span style="color:#fabd2f"&gt;GeneralPurposeAllocator&lt;/span&gt;(.{}){};
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;defer&lt;/span&gt; gpa.&lt;span style="color:#fabd2f"&gt;deinit&lt;/span&gt;(); &lt;span style="color:#928374;font-style:italic"&gt;// Cleans up when done
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#928374;font-style:italic"&gt;&lt;/span&gt; &lt;span style="color:#fe8019"&gt;const&lt;/span&gt; allocator &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; gpa.&lt;span style="color:#fabd2f"&gt;allocator&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#928374;font-style:italic"&gt;// Make a list of 5 numbers
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#928374;font-style:italic"&gt;&lt;/span&gt; &lt;span style="color:#fe8019"&gt;var&lt;/span&gt; numbers &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; &lt;span style="color:#fe8019"&gt;try&lt;/span&gt; allocator.&lt;span style="color:#fabd2f"&gt;alloc&lt;/span&gt;(&lt;span style="color:#fabd2f"&gt;i32&lt;/span&gt;, &lt;span style="color:#d3869b"&gt;5&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;defer&lt;/span&gt; allocator.&lt;span style="color:#fabd2f"&gt;free&lt;/span&gt;(numbers); &lt;span style="color:#928374;font-style:italic"&gt;// Free the list later
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#928374;font-style:italic"&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#928374;font-style:italic"&gt;// Fill the list with numbers 0 to 4
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#928374;font-style:italic"&gt;&lt;/span&gt; &lt;span style="color:#fe8019"&gt;for&lt;/span&gt; (numbers, &lt;span style="color:#d3869b"&gt;0&lt;/span&gt;..) &lt;span style="color:#fe8019"&gt;|*&lt;/span&gt;num, i&lt;span style="color:#fe8019"&gt;|&lt;/span&gt; num.&lt;span style="color:#fe8019"&gt;*&lt;/span&gt; &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; &lt;span style="color:#fabd2f"&gt;@intCast&lt;/span&gt;(&lt;span style="color:#fabd2f"&gt;i32&lt;/span&gt;, i);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;const&lt;/span&gt; stdout &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; std.io.&lt;span style="color:#fabd2f"&gt;getStdOut&lt;/span&gt;().&lt;span style="color:#fabd2f"&gt;writer&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;try&lt;/span&gt; stdout.&lt;span style="color:#fabd2f"&gt;print&lt;/span&gt;(&lt;span style="color:#b8bb26"&gt;&amp;#34;List: {any}&lt;/span&gt;&lt;span style="color:#b8bb26"&gt;\n&lt;/span&gt;&lt;span style="color:#b8bb26"&gt;&amp;#34;&lt;/span&gt;, .{numbers});
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;What’s happening here:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;You Choose:&lt;/strong&gt; You tell Zig how to create and free the list.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cleanup:&lt;/strong&gt; &lt;code&gt;defer&lt;/code&gt; makes sure the list is deleted when you’re done.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Safety:&lt;/strong&gt; Zig checks everything when you build the program.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This way, you avoid mistakes like losing track of memory or using it twice by accident.&lt;/p&gt;
&lt;h2 class="heading" id="handling-problems-in-zig"&gt;
Handling Problems in Zig
&lt;a class="anchor" href="#handling-problems-in-zig"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Zig doesn’t hide problems—it &lt;strong&gt;tells you when something might go wrong&lt;/strong&gt; and helps you fix it. It uses a special way to show if a task worked or failed.&lt;/p&gt;
&lt;p&gt;Here’s an example of reading a file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-zig" data-lang="zig"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;const&lt;/span&gt; std &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; &lt;span style="color:#fabd2f"&gt;@import&lt;/span&gt;(&lt;span style="color:#b8bb26"&gt;&amp;#34;std&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;pub&lt;/span&gt; &lt;span style="color:#fe8019"&gt;fn&lt;/span&gt; &lt;span style="color:#fabd2f"&gt;readFile&lt;/span&gt;(allocator&lt;span style="color:#fe8019"&gt;:&lt;/span&gt; std.mem.Allocator, path&lt;span style="color:#fe8019"&gt;:&lt;/span&gt; []&lt;span style="color:#fe8019"&gt;const&lt;/span&gt; &lt;span style="color:#fabd2f"&gt;u8&lt;/span&gt;) &lt;span style="color:#fe8019"&gt;!&lt;/span&gt;[]&lt;span style="color:#fabd2f"&gt;u8&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;var&lt;/span&gt; file &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; &lt;span style="color:#fe8019"&gt;try&lt;/span&gt; std.fs.&lt;span style="color:#fabd2f"&gt;cwd&lt;/span&gt;().&lt;span style="color:#fabd2f"&gt;openFile&lt;/span&gt;(path, .{});
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;defer&lt;/span&gt; file.&lt;span style="color:#fabd2f"&gt;close&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;const&lt;/span&gt; size &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; &lt;span style="color:#fe8019"&gt;try&lt;/span&gt; file.&lt;span style="color:#fabd2f"&gt;getEndPos&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;const&lt;/span&gt; buffer &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; &lt;span style="color:#fe8019"&gt;try&lt;/span&gt; allocator.&lt;span style="color:#fabd2f"&gt;alloc&lt;/span&gt;(&lt;span style="color:#fabd2f"&gt;u8&lt;/span&gt;, size);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; _ &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; &lt;span style="color:#fe8019"&gt;try&lt;/span&gt; file.&lt;span style="color:#fabd2f"&gt;readAll&lt;/span&gt;(buffer);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;return&lt;/span&gt; buffer;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;pub&lt;/span&gt; &lt;span style="color:#fe8019"&gt;fn&lt;/span&gt; &lt;span style="color:#fabd2f"&gt;main&lt;/span&gt;() &lt;span style="color:#fe8019"&gt;!&lt;/span&gt;&lt;span style="color:#fabd2f"&gt;void&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;var&lt;/span&gt; gpa &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; std.heap.&lt;span style="color:#fabd2f"&gt;GeneralPurposeAllocator&lt;/span&gt;(.{}){};
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;defer&lt;/span&gt; gpa.&lt;span style="color:#fabd2f"&gt;deinit&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;const&lt;/span&gt; allocator &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; gpa.&lt;span style="color:#fabd2f"&gt;allocator&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;const&lt;/span&gt; stdout &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; std.io.&lt;span style="color:#fabd2f"&gt;getStdOut&lt;/span&gt;().&lt;span style="color:#fabd2f"&gt;writer&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;const&lt;/span&gt; content &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; &lt;span style="color:#fabd2f"&gt;readFile&lt;/span&gt;(allocator, &lt;span style="color:#b8bb26"&gt;&amp;#34;example.txt&amp;#34;&lt;/span&gt;) &lt;span style="color:#fe8019"&gt;catch&lt;/span&gt; &lt;span style="color:#fe8019"&gt;|&lt;/span&gt;err&lt;span style="color:#fe8019"&gt;|&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;try&lt;/span&gt; stdout.&lt;span style="color:#fabd2f"&gt;print&lt;/span&gt;(&lt;span style="color:#b8bb26"&gt;&amp;#34;Oops! Something went wrong: {}&lt;/span&gt;&lt;span style="color:#b8bb26"&gt;\n&lt;/span&gt;&lt;span style="color:#b8bb26"&gt;&amp;#34;&lt;/span&gt;, .{err});
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;return&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; };
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;defer&lt;/span&gt; allocator.&lt;span style="color:#fabd2f"&gt;free&lt;/span&gt;(content);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;try&lt;/span&gt; stdout.&lt;span style="color:#fabd2f"&gt;print&lt;/span&gt;(&lt;span style="color:#b8bb26"&gt;&amp;#34;File says: {s}&lt;/span&gt;&lt;span style="color:#b8bb26"&gt;\n&lt;/span&gt;&lt;span style="color:#b8bb26"&gt;&amp;#34;&lt;/span&gt;, .{content});
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;What’s going on:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Success or Fail:&lt;/strong&gt; The &lt;code&gt;!&lt;/code&gt; means this might work or might not.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Try:&lt;/strong&gt; Tries something and checks if it fails.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Catch:&lt;/strong&gt; If it fails, this part runs to handle the problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This makes sure you always know what’s happening—no surprises!&lt;/p&gt;
&lt;h2 class="heading" id="wrapping-up"&gt;
Wrapping Up
&lt;a class="anchor" href="#wrapping-up"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Zig is great for people who like to keep things &lt;strong&gt;simple and clear&lt;/strong&gt;. It lets you control your program’s memory and &lt;strong&gt;warns you about problems before they ruin everything&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Here’s the full file-reading code again:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-zig" data-lang="zig"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;const&lt;/span&gt; std &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; &lt;span style="color:#fabd2f"&gt;@import&lt;/span&gt;(&lt;span style="color:#b8bb26"&gt;&amp;#34;std&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;fn&lt;/span&gt; &lt;span style="color:#fabd2f"&gt;readFile&lt;/span&gt;(allocator&lt;span style="color:#fe8019"&gt;:&lt;/span&gt; std.mem.Allocator, path&lt;span style="color:#fe8019"&gt;:&lt;/span&gt; []&lt;span style="color:#fe8019"&gt;const&lt;/span&gt; &lt;span style="color:#fabd2f"&gt;u8&lt;/span&gt;) &lt;span style="color:#fe8019"&gt;!&lt;/span&gt;[]&lt;span style="color:#fabd2f"&gt;u8&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;var&lt;/span&gt; file &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; &lt;span style="color:#fe8019"&gt;try&lt;/span&gt; std.fs.&lt;span style="color:#fabd2f"&gt;cwd&lt;/span&gt;().&lt;span style="color:#fabd2f"&gt;openFile&lt;/span&gt;(path, .{});
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;defer&lt;/span&gt; file.&lt;span style="color:#fabd2f"&gt;close&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;const&lt;/span&gt; size &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; &lt;span style="color:#fe8019"&gt;try&lt;/span&gt; file.&lt;span style="color:#fabd2f"&gt;getEndPos&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;const&lt;/span&gt; buffer &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; &lt;span style="color:#fe8019"&gt;try&lt;/span&gt; allocator.&lt;span style="color:#fabd2f"&gt;alloc&lt;/span&gt;(&lt;span style="color:#fabd2f"&gt;u8&lt;/span&gt;, size);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; _ &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; &lt;span style="color:#fe8019"&gt;try&lt;/span&gt; file.&lt;span style="color:#fabd2f"&gt;readAll&lt;/span&gt;(buffer);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;return&lt;/span&gt; buffer;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;pub&lt;/span&gt; &lt;span style="color:#fe8019"&gt;fn&lt;/span&gt; &lt;span style="color:#fabd2f"&gt;main&lt;/span&gt;() &lt;span style="color:#fe8019"&gt;!&lt;/span&gt;&lt;span style="color:#fabd2f"&gt;void&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;var&lt;/span&gt; gpa &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; std.heap.&lt;span style="color:#fabd2f"&gt;GeneralPurposeAllocator&lt;/span&gt;(.{}){};
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;defer&lt;/span&gt; gpa.&lt;span style="color:#fabd2f"&gt;deinit&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;const&lt;/span&gt; allocator &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; gpa.&lt;span style="color:#fabd2f"&gt;allocator&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;const&lt;/span&gt; stdout &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; std.io.&lt;span style="color:#fabd2f"&gt;getStdOut&lt;/span&gt;().&lt;span style="color:#fabd2f"&gt;writer&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;const&lt;/span&gt; content &lt;span style="color:#fe8019"&gt;=&lt;/span&gt; &lt;span style="color:#fabd2f"&gt;readFile&lt;/span&gt;(allocator, &lt;span style="color:#b8bb26"&gt;&amp;#34;example.txt&amp;#34;&lt;/span&gt;) &lt;span style="color:#fe8019"&gt;catch&lt;/span&gt; &lt;span style="color:#fe8019"&gt;|&lt;/span&gt;err&lt;span style="color:#fe8019"&gt;|&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;try&lt;/span&gt; stdout.&lt;span style="color:#fabd2f"&gt;print&lt;/span&gt;(&lt;span style="color:#b8bb26"&gt;&amp;#34;Oops! Something went wrong: {}&lt;/span&gt;&lt;span style="color:#b8bb26"&gt;\n&lt;/span&gt;&lt;span style="color:#b8bb26"&gt;&amp;#34;&lt;/span&gt;, .{err});
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;return&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; };
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;defer&lt;/span&gt; allocator.&lt;span style="color:#fabd2f"&gt;free&lt;/span&gt;(content);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#fe8019"&gt;try&lt;/span&gt; stdout.&lt;span style="color:#fabd2f"&gt;print&lt;/span&gt;(&lt;span style="color:#b8bb26"&gt;&amp;#34;File says: {s}&lt;/span&gt;&lt;span style="color:#b8bb26"&gt;\n&lt;/span&gt;&lt;span style="color:#b8bb26"&gt;&amp;#34;&lt;/span&gt;, .{content});
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Want to learn more? Check out Zig’s home on &lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/ziglang/zig"&gt;https://github.com/ziglang/zig&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Have fun exploring Zig!&lt;/p&gt;
&lt;hr&gt;</content:encoded></item><item><title>DWM Window Manager</title><link>https://embeddingbits.is-a.dev/tech/dwm-window-manager/</link><pubDate>Mon, 09 Dec 2024 00:00:00 +0000</pubDate><guid isPermaLink="true">https://embeddingbits.is-a.dev/tech/dwm-window-manager/</guid><dc:creator>Amiitesh TSP</dc:creator><category>x11</category><category>window manager</category><category>linux</category><category>dwm</category><description>Overview of DWM Window Manager</description><content:encoded>
&lt;h2 class="heading" id="introduction"&gt;
Introduction
&lt;a class="anchor" href="#introduction"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Welcome to this blog where I will be writing about &lt;strong&gt;DWM (Dynamic Window Manager)&lt;/strong&gt; which is written in C intended to reduce bloat as much as possible giving us a smooth user experience. Configuring DWM can be hard for a few, but the end result is worth it. I recently wanted to try DWM for fun and turned out it was actually a very good experience that I have switched from Hyprland to DWM permanently.&lt;/p&gt;
&lt;p&gt;To configure DWM we have to manually edit the C source code, after the changes we save. Compile it with the &lt;code&gt;make&lt;/code&gt; command and then finally quit DWM and log back in for the changes. If there are any errors with the source code, then DWM won&amp;rsquo;t allow you to log inside the DWM until the error is corrected. So, what I did is I would backup after every stable change I make and in case of there are any errors I would copy the backup file or manually edit them in a tty.&lt;/p&gt;
&lt;h2 class="heading" id="about-dwm"&gt;
About DWM
&lt;a class="anchor" href="#about-dwm"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;DWM is a window manager for X server made by &lt;strong&gt;suckless.org&lt;/strong&gt; — a group of programmers working together to make software that &amp;ldquo;suck less&amp;rdquo;. They have made many tools like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;st&lt;/code&gt; (suckless terminal/simple terminal)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;surf&lt;/code&gt; (a web browser)&lt;/li&gt;
&lt;li&gt;and some other &amp;ldquo;core&amp;rdquo; programs for a suckless experience.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are many layouts to manage windows like &lt;strong&gt;tiled&lt;/strong&gt;, &lt;strong&gt;monocle&lt;/strong&gt;, &lt;strong&gt;floating layout&lt;/strong&gt;. We can switch between different layouts using keybinds dynamically according to the application that we are working with.&lt;/p&gt;
&lt;h2 class="heading" id="how-are-windows-managed"&gt;
How are windows managed
&lt;a class="anchor" href="#how-are-windows-managed"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;In &lt;strong&gt;tiled mode&lt;/strong&gt;, the windows are stacked above one another as a new window is created every time. Stack in the sense not &amp;ldquo;literally&amp;rdquo; stack but the windows act stacked in the memory as in the data structure &amp;ldquo;stack&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;In &lt;strong&gt;monocle layout&lt;/strong&gt;, all the windows are fullscreen and now are literally stacked above each other when they are created.&lt;/p&gt;
&lt;p&gt;In the &lt;strong&gt;floating layout&lt;/strong&gt;, it is like what we use in rest of the desktop environments and in Windows. All the newly created windows are floating.&lt;/p&gt;
&lt;p&gt;
&lt;figure class=""&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;h2 class="heading" id="workspacestags"&gt;
Workspaces/Tags
&lt;a class="anchor" href="#workspacestags"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;In DWM, the workspaces are called &lt;strong&gt;&amp;ldquo;tags&amp;rdquo;&lt;/strong&gt;. By default, there are 10 tags but we can change them to however many we want. We can also replace them with a logo instead of just numbers.&lt;/p&gt;
&lt;p&gt;We can switch between them with shortcut key, &lt;code&gt;ALT + &amp;quot;tag_number&amp;quot;&lt;/code&gt;. We can also change the keybinds to whatever we feel comfortable.&lt;/p&gt;
&lt;p&gt;
&lt;figure class=""&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The red circled is what is called tags&lt;/em&gt;&lt;/p&gt;
&lt;h2 class="heading" id="status-bar"&gt;
Status Bar
&lt;a class="anchor" href="#status-bar"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;There is a status bar by default provided by DWM. We can also add our own status bar if we want with &lt;strong&gt;patches&lt;/strong&gt; (I&amp;rsquo;ll cover that in the upcoming heading). The status bar is divided into three parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Left part&lt;/strong&gt; for the tags&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Middle part&lt;/strong&gt; for the activity that we are doing like the window name&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Right one&lt;/strong&gt; is for custom modules that we would display by script files for everything. By default, there is nothing on the right part&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are many status bars for the left part:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;slstatus&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dwmblocks&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dwmblocks&lt;/code&gt; with color support&lt;/li&gt;
&lt;li&gt;&lt;code&gt;anybar&lt;/code&gt; (which allows us to use any bar other than the default one provided by DWM)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;figure class=""&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;h2 class="heading" id="patches"&gt;
Patches
&lt;a class="anchor" href="#patches"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;We can add many other features we require by &lt;strong&gt;&amp;ldquo;patching&amp;rdquo;&lt;/strong&gt; the main source code. This is one of the most exhausting parts of DWM for people who want extra features.&lt;/p&gt;
&lt;p&gt;The patches are mostly written by other users themselves. Patches are nothing but adding extra functionality to the source code.&lt;/p&gt;
&lt;p&gt;When applying the patches there is &lt;strong&gt;7/10 chance&lt;/strong&gt; for a patch error to occur. The error is put into a &lt;strong&gt;&lt;code&gt;.rej&lt;/code&gt;&lt;/strong&gt; file with the changes that are to be made indicated with &lt;code&gt;+&lt;/code&gt; and &lt;code&gt;-&lt;/code&gt;. We have to manually edit them ourselves and compile the code. We have to add the lines that start with &lt;code&gt;+&lt;/code&gt; and delete the line that start with &lt;code&gt;-&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This is the part where most quit because it&amp;rsquo;s exhausting.&lt;/p&gt;
&lt;p&gt;This is because the patches are not intelligent enough to make all the changes by itself. They expect some block of code to be there but when there is no code block that the patch is expecting it returns an error and as I said — after we edit the file ourselves and if there are errors in the main source code, DWM won&amp;rsquo;t allow us to get into the DWM.&lt;/p&gt;
&lt;h2 class="heading" id="bottom-note"&gt;
Bottom Note
&lt;a class="anchor" href="#bottom-note"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;There are different Window managers but I really felt that this one was peculiar and thought of writing a blog on it.&lt;/p&gt;
&lt;p&gt;There are many window managers that are a fork of this like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://i3wm.org/"&gt;i3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/baskerville/bspwm"&gt;bspwm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://codeberg.org/dwl/dwl"&gt;dwl (which is a Wayland fork of dwm)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;and much more.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can try and install DWM if you want from the link below:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;DWM:&lt;/strong&gt; &lt;a href="https://dwm.suckless.org/"&gt;https://dwm.suckless.org/&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title>My Workflow</title><link>https://embeddingbits.is-a.dev/tech/my-workflow/</link><pubDate>Mon, 25 Nov 2024 00:00:00 +0000</pubDate><guid isPermaLink="true">https://embeddingbits.is-a.dev/tech/my-workflow/</guid><dc:creator>Amiitesh TSP</dc:creator><category>hyprland</category><category>lazygit</category><category>window manager</category><category>wm</category><category>river</category><description>My developer workflow</description><content:encoded>
&lt;h2 class="heading" id="introduction"&gt;
Introduction
&lt;a class="anchor" href="#introduction"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;h3 class="heading" id="about-myself"&gt;
About Myself
&lt;a class="anchor" href="#about-myself"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Welcome to this blog, in this blog I&amp;rsquo;ll be discussing about my developer workflow.&lt;/p&gt;
&lt;p&gt;I am a college student, currently in my freshman year. I develop many open source projects and through my journey of developing projects, I have tried many tools and software to make my job easier and interesting to work on. In this blog, I will be sharing all the tools and software I use everyday ranging from Desktop to CLI Tools.&lt;/p&gt;
&lt;h2 class="heading" id="operating-system"&gt;
Operating System
&lt;a class="anchor" href="#operating-system"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;This is one of my most favourite part. I have used &lt;strong&gt;Linux&lt;/strong&gt; since my childhood, because I was influenced by my dad that I started using Linux as he uses Linux and MacOS most of the time. I am so used to using Linux that is often annoys me when I have to use Windows here at college during labs cause I am more used to coding in terminal and terminal-based editors.&lt;/p&gt;
&lt;p&gt;Now, for the part of the operating system, Arch Linux. I used to use Ubuntu and wanted to try out Arch Linux for fun and it turned out that I liked it. Arch Linux is more of a DIY Operating System, it gives up complete freedom over what we want to do right from the time of installation.&lt;/p&gt;
&lt;p&gt;It has one of the most powerful package managers, &lt;strong&gt;pacman&lt;/strong&gt; and &lt;strong&gt;AUR (Arch User Repository)&lt;/strong&gt; package managers like &lt;strong&gt;yay&lt;/strong&gt; and &lt;strong&gt;paru&lt;/strong&gt;. There is almost every imaginable package or software in the AUR, so much so that anything that does not exist in the AUR can be said &amp;ldquo;uninvented&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Arch is a very &lt;strong&gt;lightweight distro&lt;/strong&gt; and can be very well suitable to be used on old hardware. Almost every desktop environment is stable on Arch and we can choose whatever we find suitable for us.&lt;/p&gt;
&lt;p&gt;Another advantage of using Linux is that we can configure almost everything right from the kernel to the visually-pleasing DEs.&lt;/p&gt;
&lt;h2 class="heading" id="desktop-environment"&gt;
Desktop Environment
&lt;a class="anchor" href="#desktop-environment"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;For the desktop environment, I use two different desktop environments: &lt;strong&gt;River&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;My primary DE is River, River is not exactly a DE but its called Window Manager, they automatically tile windows when they are created instead of manually adjusting them by ourselves.&lt;/p&gt;
&lt;p&gt;Now, I&amp;rsquo;ll explain why and how I use River. I follow certain rules that have become a habit for me over time. I initially got this idea from one of my favorite tech YouTubers, ThePrimeagen, and his way of using window managers.&lt;/p&gt;
&lt;p&gt;Window Managers are convenient for people who use keyboard more than the mouse like myself. Everything can be configured with keybinds right from switching panes to switching workspaces. In my config, I have 5 workspaces by default and I could switch them using &amp;ldquo;SUPER + workspace_number&amp;rdquo; (SUPER is nothing but the window key).&lt;/p&gt;
&lt;h3 class="heading" id="so-heres-how-i-use-it"&gt;
So, here&amp;rsquo;s how I use it:
&lt;a class="anchor" href="#so-heres-how-i-use-it"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Workspace 1:&lt;/strong&gt; In the first workspace, I have the &lt;strong&gt;text editor&lt;/strong&gt; and the &lt;strong&gt;terminal&lt;/strong&gt; I&amp;rsquo;m working running on a &lt;strong&gt;tmux session&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Workspace 2:&lt;/strong&gt; In workspace 2, I have my &lt;strong&gt;browser&lt;/strong&gt; open for whenever I encounter issues; I get them fixed with Stack Overflow.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Workspace 3:&lt;/strong&gt; I usually have my &lt;strong&gt;entertainment setup&lt;/strong&gt; here, because when I&amp;rsquo;m bored I would usually open up a browser, watch YT and get back to what I&amp;rsquo;m doing. (I don&amp;rsquo;t listen to songs when I&amp;rsquo;m working).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Workspace 4:&lt;/strong&gt; I don&amp;rsquo;t usually use 4 and 5 but it depends. But, most of the times its just junk that I have in here.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So, following the above rules over time, they became ingrained in my muscle memory. Now, when I think &amp;rsquo;editor,&amp;rsquo; my fingers instinctively press &amp;lsquo;SUPER + 1,&amp;rsquo; and when I think &amp;lsquo;browser,&amp;rsquo; they press &amp;lsquo;SUPER + 2,&amp;rsquo; and so on for the rest.&lt;/p&gt;
&lt;h2 class="heading" id="terminal-and-code-editor"&gt;
Terminal and Code Editor
&lt;a class="anchor" href="#terminal-and-code-editor"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;This is also one of the most parts of my workflow. I live in the terminal/command line (Shortly as TUI). The only time I use the GUI is for browsing the web, the rest of the time I only spend it in the terminal. So configuring a good terminal and a good terminal-based code editor is one of the most important part for people like me.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;For the terminal emulator, I use &lt;strong&gt;ghostty&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;For the code editor, I use &lt;strong&gt;Neovim&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 class="heading" id="ghostty-terminal-emulator"&gt;
Ghostty Terminal Emulator
&lt;a class="anchor" href="#ghostty-terminal-emulator"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;I use the kitty terminal with my minimal configuration like fonts, colorscheme and etc.&lt;/p&gt;
&lt;p&gt;For the fonts, I use a global configuration with IosevkaTerm Nerd Font and for the colorscheme I use Gruvbox all over my Linux config.&lt;/p&gt;
&lt;h3 class="heading" id="neovim-text-editor"&gt;
Neovim Text Editor
&lt;a class="anchor" href="#neovim-text-editor"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;I use &lt;strong&gt;Neovim&lt;/strong&gt; as a text editor for all purposes, from &lt;strong&gt;editing LaTeX documents to writing code&lt;/strong&gt;. Neovim has a &lt;strong&gt;steep learning curve&lt;/strong&gt;, but ultimately it&amp;rsquo;s incredibly useful because I rarely need to take my hands off the keyboard.&lt;/p&gt;
&lt;h2 class="heading" id="tools-and-software"&gt;
Tools and Software
&lt;a class="anchor" href="#tools-and-software"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;There are many CLI tools and software that makes my job done easier and faster.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Git/Github&lt;/li&gt;
&lt;li&gt;LazyGit&lt;/li&gt;
&lt;li&gt;Fish shell&lt;/li&gt;
&lt;li&gt;Tmux&lt;/li&gt;
&lt;li&gt;fzf&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 class="heading" id="gitgithub-and-lazygit"&gt;
Git/GitHub and LazyGit
&lt;a class="anchor" href="#gitgithub-and-lazygit"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;One of the most important tool that I use everyday is &lt;strong&gt;Git/GitHub combined with LazyGit&lt;/strong&gt;. I don&amp;rsquo;t store my codes or projects locally. Even if the project is uncompleted I store them on GitHub under a public or a private repo. LazyGit makes Git a easy job. Instead of wanting to have type all the commands manually, LazyGit created a TUI (Terminal User Interface) driven by keybinds. It helps view changes, stage them, write commits and push them to remote repo under just keybinds.&lt;/p&gt;
&lt;p&gt;This is how LazyGit looks:&lt;/p&gt;
&lt;p&gt;
&lt;figure class=""&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;As you can see, viewing the changes and commits all under a same place makes us complete our job way faster.&lt;/p&gt;
&lt;h3 class="heading" id="tmux-terminal-session-and-uses"&gt;
Tmux Terminal Session and uses
&lt;a class="anchor" href="#tmux-terminal-session-and-uses"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Tmux is another one of such useful tools that I use. Tmux stands for Terminal Multiplexer and is used in Unix-like operating systems. It allows to use multiple terminal sessions in the terminal window. Even if the actual terminal window closes, the tmux session runs in the background and can be accessed with the name of the session, which is helpful when we accidentally close the session without saveing the changes.&lt;/p&gt;
&lt;h3 class="heading" id="fish-shell-and-fzf-fuzzy-finder"&gt;
Fish Shell and fzf fuzzy finder
&lt;a class="anchor" href="#fish-shell-and-fzf-fuzzy-finder"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;The standard shell for all the Linux distros is bash. We can choose whatever shell we want after that. The most common choices for shells are bash, zsh and fish. The syntax and structure of fish is way different than what it is in zsh.&lt;/p&gt;
&lt;p&gt;Fish is a interactive shell where we can directly interact with the terminal. For example: In bash if we type ls and hit tab it will display the files and directories but we cannot directly interact with the shell to choose, instead we have to look at the file we want and type it and hit tab to complete. Whereas, in fish we can select it directly using the keys.&lt;/p&gt;
&lt;p&gt;With the combined use of fzf (a fuzzy finder), we can make fish shell more powerful than what it already is.&lt;/p&gt;
&lt;h2 class="heading" id="programming-language"&gt;
Programming Language
&lt;a class="anchor" href="#programming-language"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;For the part of programming language, I am more into Cybersecurity, Network programming, DevOps and Kernel development. So I work mostly in C, C++, Assembly (for reverse engineering), Python and bash script.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;For Kernel development, I use C programming.&lt;/li&gt;
&lt;li&gt;For embedded systems, I use C and Zig.&lt;/li&gt;
&lt;li&gt;For systems programming, I use C, Zig and C++.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 class="heading" id="bottom-note"&gt;
Bottom Note
&lt;a class="anchor" href="#bottom-note"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;These are the tools and software that I use when I develop projects and much more. I uniformly use the Nord colorscheme.&lt;/p&gt;
&lt;h4 class="heading" id="here-are-the-links-to-everything-i-use"&gt;
Here are the links to everything I use:
&lt;a class="anchor" href="#here-are-the-links-to-everything-i-use"&gt;#&lt;/a&gt;
&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;My Linux Configuration:&lt;/strong&gt; &lt;a href="https://github.com/embeddingbits/arch_dotfiles"&gt;https://github.com/embeddingbits/arch_dotfiles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Arch Linux:&lt;/strong&gt; &lt;a href="https://archlinux.org/"&gt;https://archlinux.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;River DE:&lt;/strong&gt; &lt;a href="https://codeberg.org/river"&gt;https://codeberg.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ghostty Terminal:&lt;/strong&gt; &lt;a href="https://ghostty.org/"&gt;https://ghostty.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Neovim:&lt;/strong&gt; &lt;a href="https://neovim.io/"&gt;https://neovim.io/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Custom Neovim Config&lt;/strong&gt;: &lt;a href="https://github.com/embeddingbits/arch_dotfiles"&gt;https://github.com/embeddingbits/arch_dotfiles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LazyGit:&lt;/strong&gt; &lt;a href="https://github.com/jesseduffield/lazygit"&gt;https://github.com/jesseduffield/lazygit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tmux:&lt;/strong&gt; &lt;a href="https://github.com/tmux/tmux/wiki"&gt;https://github.com/tmux/tmux/wiki&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fish Shell:&lt;/strong&gt; &lt;a href="https://fishshell.com/"&gt;https://fishshell.com/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the upcoming blogs, I&amp;rsquo;ll write on how to configure Tmux for a better work experience.&lt;/p&gt;</content:encoded></item><item><title>Why Linux is better than its other competitors</title><link>https://embeddingbits.is-a.dev/tech/why-linux-is-better-than-its-other-competitors/</link><pubDate>Sun, 17 Nov 2024 00:00:00 +0000</pubDate><guid isPermaLink="true">https://embeddingbits.is-a.dev/tech/why-linux-is-better-than-its-other-competitors/</guid><dc:creator>Amiitesh TSP</dc:creator><category>linux</category><category>hyprland</category><category>river</category><description>Overview of Linux and Debunking the myths</description><content:encoded>&lt;hr&gt;
&lt;p&gt;Did you know Linux powers &lt;strong&gt;90% of the world’s supercomputers&lt;/strong&gt; and most of the internet’s servers?
But have you ever thought about using it as your &lt;strong&gt;daily driver&lt;/strong&gt;?&lt;/p&gt;
&lt;p&gt;Welcome to this blog!
In this post, I’ll be discussing &lt;strong&gt;Linux&lt;/strong&gt; and why it’s better to daily-drive a Linux system.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="what-is-linux"&gt;
What is Linux?
&lt;a class="anchor" href="#what-is-linux"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Linux is an &lt;strong&gt;Operating System&lt;/strong&gt; (or more precisely, a &lt;strong&gt;Kernel&lt;/strong&gt;) based on &lt;strong&gt;Unix-like&lt;/strong&gt; systems, created by &lt;strong&gt;Linus Torvalds in 1991&lt;/strong&gt;.
It is &lt;strong&gt;open-source&lt;/strong&gt; and has huge use cases in the world of technology.&lt;/p&gt;
&lt;p&gt;A &lt;strong&gt;kernel&lt;/strong&gt; is a set of rules that instructs computer hardware to follow specific protocols, acting as a &lt;strong&gt;bridge between hardware and software&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;Linux kernel&lt;/strong&gt; is primarily written in &lt;strong&gt;C&lt;/strong&gt;, with some parts being rewritten in &lt;strong&gt;Rust&lt;/strong&gt; for improved safety and performance.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="why-is-it-a-better-option-to-daily-drive-linux"&gt;
Why is it a better option to daily-drive Linux?
&lt;a class="anchor" href="#why-is-it-a-better-option-to-daily-drive-linux"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Linux is a &lt;strong&gt;lightweight&lt;/strong&gt; operating system that typically uses &lt;strong&gt;1.5–2.5 GB of RAM&lt;/strong&gt;, making it ideal for older laptops and PCs.
In comparison, &lt;strong&gt;Windows&lt;/strong&gt; consumes &lt;strong&gt;5–6 GB on average&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Linux is &lt;strong&gt;faster than Windows&lt;/strong&gt; by a wide margin, in nearly every situation.&lt;/p&gt;
&lt;p&gt;Since Linux is a &lt;strong&gt;kernel&lt;/strong&gt;, its source code is used to create many &lt;strong&gt;distributions&lt;/strong&gt; (distros). Each distro serves general and specific purposes.&lt;/p&gt;
&lt;h3 class="heading" id="examples-of-linux-distributions"&gt;
Examples of Linux Distributions
&lt;a class="anchor" href="#examples-of-linux-distributions"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Mint Linux&lt;/strong&gt; – Stable and beginner-friendly.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ubuntu&lt;/strong&gt; – Good for both beginners and servers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fedora&lt;/strong&gt; – User-friendly and cutting-edge.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Arch Linux&lt;/strong&gt; – DIY distro for intermediate to advanced users.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;There are hundreds of Linux distributions to choose from!&lt;/p&gt;
&lt;hr&gt;
&lt;h3 class="heading" id="security-and-privacy"&gt;
Security and Privacy
&lt;a class="anchor" href="#security-and-privacy"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Linux’s &lt;strong&gt;open-source nature&lt;/strong&gt; means vulnerabilities are quickly found and patched by the community.&lt;/li&gt;
&lt;li&gt;Proprietary systems like Windows have &lt;strong&gt;less transparency&lt;/strong&gt; and may include &lt;strong&gt;hidden backdoors&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Due to its lower market share, &lt;strong&gt;malware targeting Linux&lt;/strong&gt; is extremely rare.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 class="heading" id="cost-efficiency"&gt;
Cost Efficiency
&lt;a class="anchor" href="#cost-efficiency"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Most popular Linux distros are &lt;strong&gt;completely free&lt;/strong&gt;, unlike Windows which costs around ₹12,000 ($139).
All Linux updates — whether &lt;strong&gt;kernel&lt;/strong&gt;, &lt;strong&gt;desktop environment&lt;/strong&gt;, or &lt;strong&gt;system-level&lt;/strong&gt; — are free.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 class="heading" id="customizability"&gt;
Customizability
&lt;a class="anchor" href="#customizability"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Linux is &lt;strong&gt;highly customizable&lt;/strong&gt; compared to proprietary operating systems.
You can choose from many &lt;strong&gt;Desktop Environments (DEs)&lt;/strong&gt; and &lt;strong&gt;Window Managers (WMs)&lt;/strong&gt; depending on your workflow.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;DEs: GNOME, KDE Plasma, XFCE, Sway&lt;/li&gt;
&lt;li&gt;WMs: Hyprland, i3, AwesomeWM, DWM, BSPWM&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Linux allows you to &lt;strong&gt;fully customize&lt;/strong&gt; your workflow and make your desktop &lt;strong&gt;visually pleasing&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 class="heading" id="software-availability"&gt;
Software Availability
&lt;a class="anchor" href="#software-availability"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Contrary to popular belief, Linux doesn’t lack software — it has &lt;strong&gt;more options&lt;/strong&gt; than most think.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Package Managers by Family:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;apt&lt;/code&gt; – Debian-based (Debian, Ubuntu, Pop!_OS, Kali)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dnf&lt;/code&gt; / &lt;code&gt;yum&lt;/code&gt; – Red Hat-based (Fedora, CentOS, RHEL)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pacman&lt;/code&gt; – Arch-based (fast and efficient)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Open Source Alternatives:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Office Suites → &lt;strong&gt;OnlyOffice&lt;/strong&gt;, &lt;strong&gt;LibreOffice&lt;/strong&gt;, &lt;strong&gt;OpenOffice&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Graphics Design → &lt;strong&gt;GIMP&lt;/strong&gt; (instead of Photoshop)&lt;/li&gt;
&lt;li&gt;Code Editors → &lt;strong&gt;Vim&lt;/strong&gt;, &lt;strong&gt;Neovim&lt;/strong&gt;, &lt;strong&gt;Emacs&lt;/strong&gt;, &lt;strong&gt;Nano&lt;/strong&gt;, &lt;strong&gt;VSCodium&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Using Linux exposes you to the &lt;strong&gt;FOSS ecosystem&lt;/strong&gt;, strengthening open-source awareness and collaboration.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 class="heading" id="performance-and-stability"&gt;
Performance and Stability
&lt;a class="anchor" href="#performance-and-stability"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Linux is known for its &lt;strong&gt;performance and efficiency&lt;/strong&gt;, largely due to minimal bloatware.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key Advantages:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Minimal Resource Usage:&lt;/strong&gt; Low background memory usage.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No Forced Updates:&lt;/strong&gt; You control updates — even after 15 years, it will still work fine.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 class="heading" id="lts-distributions-and-kernels"&gt;
LTS Distributions and Kernels
&lt;a class="anchor" href="#lts-distributions-and-kernels"&gt;#&lt;/a&gt;
&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;LTS&lt;/strong&gt; = &lt;em&gt;Long Term Support&lt;/em&gt;.
Some Linux versions are maintained for years with guaranteed stability and updates.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ubuntu LTS:&lt;/strong&gt; 5 years of security support.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Debian Stable:&lt;/strong&gt; Known for rock-solid long-term reliability.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are also &lt;strong&gt;LTS kernel versions&lt;/strong&gt; that ensure stable driver and security updates.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 class="heading" id="enhanced-productivity-and-use-cases"&gt;
Enhanced Productivity and Use Cases
&lt;a class="anchor" href="#enhanced-productivity-and-use-cases"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Linux boosts productivity due to its &lt;strong&gt;speed and command-line efficiency&lt;/strong&gt;.
While it supports great GUIs, many users eventually prefer using the &lt;strong&gt;terminal&lt;/strong&gt; for faster workflows.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;90% of Internet servers&lt;/strong&gt; run Linux because of its &lt;strong&gt;stability and scalability&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Cybersecurity professionals prefer Linux since most tools run better here.&lt;/li&gt;
&lt;li&gt;Linux proficiency is a &lt;strong&gt;valuable skill&lt;/strong&gt; during technical interviews.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="common-myths-about-linux"&gt;
Common Myths About Linux
&lt;a class="anchor" href="#common-myths-about-linux"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;h3 class="heading" id="myth-1-linux-is-only-for-tech-geeks"&gt;
Myth 1: Linux is only for tech geeks
&lt;a class="anchor" href="#myth-1-linux-is-only-for-tech-geeks"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Not true!
Linux can be used for general purposes. The terminal is not mandatory — it’s just powerful.
You can browse the web, use apps, and enjoy a normal desktop experience.&lt;/p&gt;
&lt;p&gt;Beginner-friendly distros include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ubuntu.com/download/desktop"&gt;Ubuntu&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fedoraproject.org/workstation/download"&gt;Fedora&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 class="heading" id="myth-2-its-hard-to-install-software-or-use-browsers"&gt;
Myth 2: It’s hard to install software or use browsers
&lt;a class="anchor" href="#myth-2-its-hard-to-install-software-or-use-browsers"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;False again.
Package managers make installing software much easier than Windows.
And yes — you can use browsers like Chrome, Firefox, Brave, etc. just as usual.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="getting-started-with-linux"&gt;
Getting Started with Linux
&lt;a class="anchor" href="#getting-started-with-linux"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Try these &lt;strong&gt;beginner-friendly distros&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.linuxmint.com/download.php"&gt;Linux Mint&lt;/a&gt; — Highly recommended&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ubuntu.com/download/desktop"&gt;Ubuntu&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fedoraproject.org/workstation/download"&gt;Fedora&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="bottom-note"&gt;
Bottom Note
&lt;a class="anchor" href="#bottom-note"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Linux is more than an operating system — it’s a &lt;strong&gt;philosophy of freedom, efficiency, and empowerment&lt;/strong&gt;.
With its vast software library, security, performance, and endless customization, Linux is a &lt;strong&gt;powerful alternative&lt;/strong&gt; to traditional systems.&lt;/p&gt;
&lt;p&gt;Transitioning might seem unfamiliar at first, but with its &lt;strong&gt;community support&lt;/strong&gt; and &lt;strong&gt;intuitive interfaces&lt;/strong&gt;, it’s an enjoyable learning journey.&lt;/p&gt;
&lt;p&gt;By adopting Linux, you’re not just choosing an OS — you’re &lt;strong&gt;joining a global movement&lt;/strong&gt; built on collaboration and innovation.&lt;/p&gt;
&lt;p&gt;So, why not give Linux a try?
You might just discover a &lt;strong&gt;new way of computing&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="thank-you-for-reading"&gt;
Thank You for Reading
&lt;a class="anchor" href="#thank-you-for-reading"&gt;#&lt;/a&gt;
&lt;/h2&gt;</content:encoded></item><item><title>Golang and its Philosophy</title><link>https://embeddingbits.is-a.dev/tech/golang-and-its-philosophy/</link><pubDate>Fri, 08 Nov 2024 00:00:00 +0000</pubDate><guid isPermaLink="true">https://embeddingbits.is-a.dev/tech/golang-and-its-philosophy/</guid><dc:creator>Amiitesh TSP</dc:creator><category>networks</category><category>golang</category><category>distibuted systems</category><description>Golang and its Philosophy</description><content:encoded>&lt;hr&gt;
&lt;p&gt;Go (or &lt;strong&gt;Golang&lt;/strong&gt;) is an Open Source programming language developed by Google. Go has many use cases like building &lt;strong&gt;Microservices&lt;/strong&gt;, &lt;strong&gt;Cloud Computing&lt;/strong&gt;, &lt;strong&gt;Web Applications&lt;/strong&gt;, and creating &lt;strong&gt;CLI Tools&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Go is a &lt;strong&gt;statically typed language&lt;/strong&gt;, and its structures and syntax resemble the &lt;strong&gt;C Programming Language&lt;/strong&gt;. Due to Go’s &lt;strong&gt;fast startup time&lt;/strong&gt;, &lt;strong&gt;low runtime overhead&lt;/strong&gt;, and &lt;strong&gt;platform independence&lt;/strong&gt;, it has become a very popular language for writing microservices and other systems. Go is also known for its &lt;strong&gt;concurrency&lt;/strong&gt;, meaning it can execute multiple processes simultaneously.&lt;/p&gt;
&lt;p&gt;Golang uses &lt;strong&gt;Goroutines&lt;/strong&gt; (lightweight processes) and a collection of &lt;strong&gt;packages and commands&lt;/strong&gt; for dependency management. It was designed to solve issues like &lt;strong&gt;slow build times&lt;/strong&gt;, &lt;strong&gt;difficulty writing tools&lt;/strong&gt;, and &lt;strong&gt;cross-language development&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In this blog, I’ll discuss Golang and provide resources to get started.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="history-of-go"&gt;
History of Go
&lt;a class="anchor" href="#history-of-go"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Golang was created by Google to solve their internal software engineering issues as an alternative to &lt;strong&gt;C++&lt;/strong&gt;. Development began in &lt;strong&gt;2007&lt;/strong&gt;, with the goal of designing a language that was easier to use while incorporating the best features of C++, JavaScript, and Python.
It was released as an &lt;strong&gt;Open Source project&lt;/strong&gt; by Google in &lt;strong&gt;2009&lt;/strong&gt;, allowing community contributions.&lt;/p&gt;
&lt;p&gt;Since then, new features have been added regularly, with a &lt;strong&gt;major update in 2022&lt;/strong&gt; introducing &lt;strong&gt;Generics&lt;/strong&gt; (a major feature from Java).&lt;/p&gt;
&lt;p&gt;Due to its fast growth and practical design, major companies such as &lt;strong&gt;Netflix&lt;/strong&gt;, &lt;strong&gt;Microsoft&lt;/strong&gt;, &lt;strong&gt;Cloudflare&lt;/strong&gt;, &lt;strong&gt;Docker&lt;/strong&gt;, &lt;strong&gt;Twitch&lt;/strong&gt;, and &lt;strong&gt;Dropbox&lt;/strong&gt; adopted Go in their codebases.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="philosophy-of-go"&gt;
Philosophy of Go
&lt;a class="anchor" href="#philosophy-of-go"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;The philosophy of Go and the problems it addresses are quite interesting:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Simplicity:&lt;/strong&gt; Go focuses on simplicity. While many languages add features that lead to bloat, Go only includes features considered useful in the long term.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Efficiency:&lt;/strong&gt; Go is designed for speed and efficiency — evident in its strong concurrency support.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Error Handling:&lt;/strong&gt; Go encourages explicit and reliable error handling, with built-in mechanisms in most functions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pragmatism:&lt;/strong&gt; Go emphasizes practical and logical solutions to real-world problems.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="features-of-go"&gt;
Features of Go
&lt;a class="anchor" href="#features-of-go"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Standard Library:&lt;/strong&gt; Rich collection of standard libraries ranging from math to networking.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Package Management:&lt;/strong&gt; Easy management of user-created packages and publishing them via CLI commands.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Static Typing:&lt;/strong&gt; Types are assigned at compile time, preventing type-related runtime errors.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unit Test Support:&lt;/strong&gt; Built-in unit testing to ensure code quality and parallel debugging.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Platform Independence:&lt;/strong&gt; Compiles and runs on any hardware or operating system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Concurrency:&lt;/strong&gt; Through &lt;strong&gt;Goroutines&lt;/strong&gt;, Go allows multiple tasks to run in parallel — one of its defining features.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="some-useful-go-commands"&gt;
Some Useful Go Commands
&lt;a class="anchor" href="#some-useful-go-commands"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;h3 class="heading" id="go-run"&gt;
&lt;code&gt;go run&lt;/code&gt;
&lt;a class="anchor" href="#go-run"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Compiles and executes code simultaneously.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;go run filename.go
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 class="heading" id="go-build"&gt;
&lt;code&gt;go build&lt;/code&gt;
&lt;a class="anchor" href="#go-build"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Compiles the code and creates an executable file.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;go build filename.go
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 class="heading" id="go-get"&gt;
&lt;code&gt;go get&lt;/code&gt;
&lt;a class="anchor" href="#go-get"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Imports third-party libraries from repositories like GitHub.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;go get github.com/libname
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 class="heading" id="go-fmt"&gt;
&lt;code&gt;go fmt&lt;/code&gt;
&lt;a class="anchor" href="#go-fmt"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Automatically formats code for readability using proper indentation and line spacing.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;go fmt filename.go
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4 class="heading" id="unformatted-file"&gt;
Unformatted File
&lt;a class="anchor" href="#unformatted-file"&gt;#&lt;/a&gt;
&lt;/h4&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-go" data-lang="go"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;package&lt;/span&gt; main
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;import&lt;/span&gt; &lt;span style="color:#b8bb26"&gt;&amp;#34;fmt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;func&lt;/span&gt; &lt;span style="color:#fabd2f"&gt;main&lt;/span&gt;(){
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;fmt.&lt;span style="color:#fabd2f"&gt;Println&lt;/span&gt;(&lt;span style="color:#b8bb26"&gt;&amp;#34;Sample Addition&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;a&lt;span style="color:#fe8019"&gt;:=&lt;/span&gt;&lt;span style="color:#d3869b"&gt;5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;b&lt;span style="color:#fe8019"&gt;:=&lt;/span&gt;&lt;span style="color:#d3869b"&gt;4&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;c&lt;span style="color:#fe8019"&gt;:=&lt;/span&gt;a&lt;span style="color:#fe8019"&gt;+&lt;/span&gt;b
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;fmt.&lt;span style="color:#fabd2f"&gt;Println&lt;/span&gt;(c)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4 class="heading" id="formatted-file-with-go-fmt"&gt;
Formatted File with &lt;code&gt;go fmt&lt;/code&gt;
&lt;a class="anchor" href="#formatted-file-with-go-fmt"&gt;#&lt;/a&gt;
&lt;/h4&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-go" data-lang="go"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;package&lt;/span&gt; main
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;import&lt;/span&gt; &lt;span style="color:#b8bb26"&gt;&amp;#34;fmt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#fe8019"&gt;func&lt;/span&gt; &lt;span style="color:#fabd2f"&gt;main&lt;/span&gt;() {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; fmt.&lt;span style="color:#fabd2f"&gt;Println&lt;/span&gt;(&lt;span style="color:#b8bb26"&gt;&amp;#34;Sample Addition&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; a &lt;span style="color:#fe8019"&gt;:=&lt;/span&gt; &lt;span style="color:#d3869b"&gt;5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; b &lt;span style="color:#fe8019"&gt;:=&lt;/span&gt; &lt;span style="color:#d3869b"&gt;4&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; c &lt;span style="color:#fe8019"&gt;:=&lt;/span&gt; a &lt;span style="color:#fe8019"&gt;+&lt;/span&gt; b
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; fmt.&lt;span style="color:#fabd2f"&gt;Println&lt;/span&gt;(c)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can see how the command improves readability and structure.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="what-is-go-used-for"&gt;
What is Go Used For?
&lt;a class="anchor" href="#what-is-go-used-for"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Go is widely used in various domains:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Container Services:&lt;/strong&gt; Tools like &lt;strong&gt;Docker&lt;/strong&gt; and &lt;strong&gt;Kubernetes&lt;/strong&gt; use Go for efficient containerization and concurrency.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network and Cloud Services:&lt;/strong&gt; Ideal for writing high-performance web servers and APIs (e.g., &lt;strong&gt;Bitcoin Lightning Network&lt;/strong&gt;, &lt;strong&gt;blockchain&lt;/strong&gt; systems).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Web Services:&lt;/strong&gt; Go’s built-in HTTP server helps companies like &lt;strong&gt;Netflix&lt;/strong&gt; build scalable backend services.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Command-line Tools:&lt;/strong&gt; Rich libraries for building powerful CLI tools.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Microservices:&lt;/strong&gt; Used to develop microservices such as FTP/SMTP servers — used by companies like &lt;strong&gt;Uber&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data Science:&lt;/strong&gt; Go’s concurrency and memory management make it suitable for handling large datasets efficiently.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="how-to-learn-go"&gt;
How to Learn Go
&lt;a class="anchor" href="#how-to-learn-go"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Go is relatively easy to learn. Some may find &lt;strong&gt;Goroutines&lt;/strong&gt;, &lt;strong&gt;Channels&lt;/strong&gt;, and &lt;strong&gt;Concurrency&lt;/strong&gt; challenging — but these are also Go’s most powerful features.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The best features always take effort to master!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The best way to learn is through &lt;strong&gt;books and official documentation&lt;/strong&gt;, not endless tutorials. Many beginners get stuck in &amp;ldquo;tutorial hell&amp;rdquo; — watching too many videos, getting confused, and eventually quitting.&lt;/p&gt;
&lt;p&gt;Go’s &lt;strong&gt;official documentation&lt;/strong&gt; is among the best of any language, offering concept-based lessons and an &lt;strong&gt;interactive playground&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The documentation is divided into two main parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A Tour of Go&lt;/strong&gt; — covers syntax and fundamentals, from variables to concurrency.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Effective Go&lt;/strong&gt; — teaches how to write clear, idiomatic Go code.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 class="heading" id="official-docs"&gt;
Official Docs
&lt;a class="anchor" href="#official-docs"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A Tour of Go:&lt;/strong&gt; &lt;a href="https://go.dev/tour/welcome/1"&gt;https://go.dev/tour/welcome/1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Effective Go:&lt;/strong&gt; &lt;a href="https://go.dev/doc/effective_go"&gt;https://go.dev/doc/effective_go&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 class="heading" id="recommended-book"&gt;
Recommended Book
&lt;a class="anchor" href="#recommended-book"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;The best beginner-friendly book to learn Go:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Learning Go:&lt;/strong&gt; &lt;a href="https://www.miek.nl/go/"&gt;https://www.miek.nl/go/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 class="heading" id="thank-you"&gt;
Thank You
&lt;a class="anchor" href="#thank-you"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Thank you for reading this blog!&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;</content:encoded></item></channel></rss>