(recur think)

Random musings of a human.

What is Xfce?

The people not around in Linux/BSD ecosystem might not know the role of Xfce. To understand it in proper terms, it is a lightweight Desktop Environment designed for Unix-like operating systems and can be installed and used on Linux and BSD. It is one of the lightest, fastest and low on system resources desktop environments.

What is a Desktop Environment?

It is an ecosystem of different software components to interact with the OS. You have a kernel, take Linux Kernel, and you want to access the kernel (which is technically what you’re doing), but, you cannot directly interact with the kernel or directly make sense of most of the things unless you understand the Kernel properly. If you are an everyday, user, you need an interface which can provide you with information and options to interact with the Kernel. There are two ways to do it, one is by using command-line interfaces (think, terminals, more specifically, TTY) or, graphical user interface which is mostly called desktop environment. Actually, Desktop environments not just provide graphical user interface but, do provide functionalities/components/tools which can make working with the Kernel easier.

What constitutes a Desktop Environment?

To be a Desktop environment, it must provide all the basic features required in some form of GUI. The journey starts from user being able to log in, to user being able to create/edit files, and user being able to install other software and use them properly. Desktop Environment, actually, is a collection of software which interoperates with each other to provide the seamless experience. In the core level of things, the Desktop environment contains, a window manager, a desktop manager, a user session/login manager, a power manager, a file manager, a sound/network manager and other individual components. When, you use a desktop environment, you don’t think of these individual things, rather, you think of the collective environment as, all of these interact with each other to provide a unified interface for the user.

What happens when a Computer starts up?

Let’s assume the computer is using some Linux distros, and let us assume, it has Xfce already installed and is using GRUB bootloader. So, what happens when you power on the Computer?

First, you come to the bootloader and, according to our assumption, the GRUB bootloader from which you can select your installation and also, can choose the version of Linux Kernel to boot to. After picking the Kernel version, you are then dropped to a Login Manager or Display Manager. Login Manager provides a user interface and contains a login daemon and can track user sessions. Login Manager isn’t a requirement, as, you can start a Xfce4 session by logging into the TTY interface and can start xfce4 (as, Xfce is using major version 4 now, so it is, xfce4), but, having it makes tracking sessions easier and simple. After logging in, you drop into the Xfce4 desktop environment.

Okay, so I logged into Xfce. What happens next?

So, if you are logged into Xfce, you might see it’s wallpaper, panel, desktop icons, etc. like the image below. https://docs.xfce.org/_media/xfce/slider-desktop.jpg?w=600&tok=d15f32 Image src: https://docs.xfce.org

Internally, what happens while loading all this is in the following steps:

  1. Xfce session manager is activated and starts its startup process. Since, this session manager has to save the state of the desktop and restore it during startup, this is checked.

  2. Start of Xfce core components, Xfce core components like xfce4-power-manager, xfce4-session, xfce4-settings, xfdesktop, xfwm4, etc.

  3. It, then, also checks previously saved sessions of applications and loads them if they are saved.

  4. It then, also, starts applications/commands configured to auto-start during login. These can be some commands or some application to kick off.

  5. Then, Xfce components like panel, desktop icons, wallpaper, themes and other configurations start loading.

  6. And finally, user-specific settings kept in specific files are applied. E.g., keyboard mappings kept in .Xmodmap file is applied.

This is all for Part 1 of About Xfce. In the future parts, we will delve into its core components, try to understand how functionalities like power-management, etc. work by visiting the code and I will also, write about the workflow for submitting MRs to Xfce components.

Since the last blog post, lots of stuff has happened. I got sick during the following midweek and took some time to recover completely. When you’re sick and can’t do many things, you think the world should stop and all your affairs should stop, as your body is taking its time to heal. Sadly, that doesn’t happen, and all your work piles up. There’s the old things you had that paused, but there are new things too, which you couldn’t get to because you were sick.

This isn’t only for adults, but, back when you were in school, if you were sick and couldn’t go to school, yes, you wouldn’t have added homework to do. But, the chapters being taught, and other things would continue on, which you later would have to catch on to. The whole point is that the world moves on, with or without you.

So, after I caught up with most of the things I missed, I decided not to procrastinate much and contribute to some open-source projects, which I find interesting or were in my interests for some time. I contributed a simple patch to Thunar which is a file manager for Xfce.

If you are not familiar with XFCE or how it works, I will explain it in my next blog. I wanted to contribute to XFCE because it is purely C and GTK for core components, and it emphasizes being fast and lightweight. It works well on low-spec machines, which makes it an intriguing desktop environment to learn more about. I intend to provide further updates on this matter in my forthcoming blog and anticipate submitting additional merge requests, as I have identified certain issues that require resolution.

See you next week!

When I was young, I thought I wasn't very creative. I didn’t draw or doodle a lot during primary school, even though most of my friends did. We used to have drawing classes with different materials and homework.

The materials and technique more or less looked like this to me:

I managed to do just enough to get by the classes, and I didn’t enjoy the classes at all. My friends were excellent sketchers, and they were capable of drawing a good picture of people, actors, etc.

I had one moment, when I found out, I could draw. During one rainy evening, I was agitated with numerous things happening and had no way to distract my mind with something like games, movies, etc. I found some pencil colors in my desk drawer. I thought, I should just play tic-tac-toe with myself or doodle something. Suddenly, I remembered that I had a storybook containing multiple stories and exceptional art illustrations that was gifted to me years ago. I decided to give it some effort and try to draw it as it is from the book. I selected a drawing and meticulously examined its contours, shading, perspective, facial expressions, and other pertinent details. Moreover, I was familiar with monochrome art and opted to depict it by using a single color. I don't understand why I did it that way, but I went with what my heart wanted back then.

I started drawing slowly, taking my time and having no desire to show it to someone or get it done with. Moreover, I really liked drawing it and worked on it for two hours, even though it only felt like half an hour. Just as I was able to complete the drawing, my sibling came to my room and saw the art I was making, she was surprised with the art that I made. She praised me and showed it to everyone around. That moment felt magical as, I enjoyed the whole process and final art.

I then realized that I am a creative person who liked drawing, but the way I was taught was not effective. Subsequently, I started drawing whenever I wanted to or when I was stressed out.

Not to show anyone, not to win prizes, not to challenge myself, or to make money.

Just to enjoy it and allow art to take shape from my mind onto the paper.

2/30.

I try to post a blog every week, but things always get in the way, and I tend to put it off. I started writing once every two weeks, but it didn't work because I kept moving it to the next week. To devise a more effective remedy for my procrastination, which is impeding my enthusiasm, I opted to undertake the challenge of publishing one blog every week (every Sunday) until the conclusion of December.

This is the first of many blogs to come, and I'm following the Seinfeld strategy to make this a routine. I intend to commence with brief blogs and gradually progress towards longer ones, based on the subject at hand.

Wish me luck!

1/30.

I believe I’m a huge consumer of information just like every other people with the internet. The internet has blessed us with access to information but, also introduced us to a new term “TMI”. TMI stands for Too Much Information.

Cambridge Dictionary online defines TMI as:

too much information: used to say that you are, or someone else is, giving too many details about a subject in a way that is embarrassing, usually personal details about something that should be kept private.

That sounds about right, but, in the case of the internet, the information might not be personal but, it does contain a lot of information.

So, you’re casually browsing Hacker News to see what’s happening on OpenAI vs Elon Musk war and you see, a post about how someone wrote a Vector Database on a weekend and about some interesting bugs in the Browser engine. Since this wasn’t the information you were looking for in the first place, what would you do?

A: Save it somewhere to consume it later. B: Read it quickly and if it is interesting research more. C: Ignore it.

If you’re like me, you would choose Option A because the post you just looked over was well-written and interesting. Additionally, you may want to write a Vector Database someday…

OpenAI. (2024). ChatGPT [Large language model]. /g/g-2fkFE8rbu-dall-e

Enter tools and software for you to store those websites and other materials. They can range from free bookmarks to paid read-it-later services. Yes, bookmarks might be free but you have to arrange all the categories apply filters, and don’t get cool features of read-it-later services like speed reading, text-to-speech to listen to your text documents, forever storage of information even if they are deleted, etc.

Awesome! With these services, you can read your saved contents wherever you want, you usually have your phone with you and you can go to their app or web app and start reading your saves, it’s even designed for you to make it easier to read. Great, right?

Well, err, em, the only problem now is you don’t have the context to consume information, and sitting in an overcrowded commute, sweating on a hot summer day trying to read how to write a toy VM in Python isn’t pleasing. Plus, you will read the contents, and probably cross off the post but, what’s the takeaway? That a toy VM can be written in Python? Will you be able to write a VM now that you have the information?

Yes, I’m describing only a single situation. But, what I’m trying to justify is that, even if you’re lying on a hammock sipping some Piña colada and trying to read all the information that you stored at some point in time that you find interesting, it might not give you the value at that moment, which you thought it would give. But, also, you won’t be just storing a single interesting thing, right? Each day Hacker News has lots of new submissions, also, someone might be sharing some interesting article on X, Reddit, etc. You will create your own Kafka queue. Bookmarks, saves, etc. will keep on increasing in the cluster, but, you can only consume as much.

Knowledge is an expiring asset, you might remember a few things now, but, slowly gradually, you’ll be at a point where you remember nothing of it and it’s just like you never read it. In which case, when you need that information you will go and read it and you will then, read more documents around the subject, you will be in the context that’s why you’ll remember it(for a long time). Our brain is single-threaded, context switching is an expensive process and it can only keep much information, the point of getting information is to use it and not just store it. Because that’s what your machine is doing.

So, relax, there will always be new things, and you will never be able to learn everything. If you find something interesting now, and you have time to read it, do it now! (it might not be interesting tomorrow) When you read it, understand it properly as you are using your mental effort.

And yeah, delete your bookmarks. :) :)

There’s no freedom like letting go….

The year has come to an end, it’s December 31st, 2023 and I’m drafting this post, by the time this will be posted, it might be 2024!

This year has been particularly interesting for me, I’ve experienced extremes of ups and downs both personally and professionally. One thing that was constant over the year was, the variety of emotions felt each month.

“My mom always said life was like a box of chocolates. You never know what you're gonna get.”

  • Forrest Gump

Here are some of the wins of 2023:

  1. Experimented heavily on OpenAI: ChatGPT and OpenAI were the spotlight of the whole year 2023. The start of the year was with GPT-3.5, later on, GPT-4, and finally the whole ordeal with firing the founder/s. I won’t go into the details here as just a quick search on the internet yields tons of articles and posts. Luckily, I got to experiment a lot on OpenAI, building models, and training models for my day job. I experimented with custom GPT, Assistants API, and creating fine-tuned models that could generate acceptable results based on prompts. Having the opportunity to work on a product with a focus on Generative AI, I got to be in the driver's seat to experiment with this. Will definitely write about this in upcoming blogs.

  2. Healthy Diet: Since, February, I started a diet to decrease my Body Mass Index(BMI)”) as I was in the overweight zone, and I had planned to get into the normal index by 6 months. Luckily, thanks to proper diet, exercise, and discipline, I was able to reach my goal in 2.5 months. I have been sustaining it and I’m planning to continue that in 2024.

  3. Learned to drive: Although I did know how to drive a car, I couldn’t drive on the road in Kathmandu. Driving in Kathmandu is extremely tough as there are lots of bikes covering the road, there aren’t many working traffic lights and we have to depend on traffic police for signals additionally, there’s too much public transport.

  4. New Language: At the end of 2023, I started to follow my interest and learn how to design compilers and language. I’m currently, working on a language that is (trying to be) syntactically similar to a well-known language and will have some extra language features than that and will compile to an executable than the VM which the inspiration language depends on. This is by no means a new idea and there are a ton of languages like that but, I wanted to try my hand at this and also learn about the Algorithms involved while creating effective hash-maps, GC, etc. What’s wrong with n+1 language? :–)

  5. Books and Music: This year I read, 24 books ranging from Technical books and non-fiction to Novels and other fictional books. This is I believe quite low from the previous year, I will have to pick this up in 2024. The plan is to read at least 3 mid-size books a month. On music, I did make quite good progress as I listened to 240 new albums I hadn’t heard before and from 115 new artists.

  6. Learned to Draw: In the last quarter of this year, I enrolled in a course on Udemy on Drawing. So far, I’m enjoying it a lot and will share some of my drawings in upcoming blogs.

  7. Limiting social media: I never had an Instagram account till 2020, and didn’t have a Facebook account from 2017-2020, and was pretty much non-existent on Twitter till 2019. But, during covid phase, I started using social media as it was the only way to connect with people and I went back to checking social media every hour or so since then. Thankfully, during mid-2023, I decided that enough was enough and have limited my usage as I have deleted my account on some platforms and I only use other media only an hour a day. The only thing I have tried unsuccessfully to limit is YouTube. Maybe this is a challenge for 2024.

  8. Completed Games: I’m an avid gamer and I keep on getting new games when interesting ones come out or go on sale but, am not able to finish it properly due to which my games backlog grew to 150 in the last quarter of 2023. Out of which, I completed 15. So, there are still 135 games to be played (if I don’t get something new).

These are some of the wins of 2023, yes, there are plenty of losses too, but, the idea is to focus on the positives and build upon them. Hoping the list for 2024 grows into a massive list with too many wins.

Also, one challenge for me in 2024 is to blog every week. I did get a long subscription for write.as, as I believe this a great blogging platform and I do want to get into a habit of writing long posts each week.

Happy New Year, 2024!

(Calvin and Hobbes, Bill Watterson. Retrieved from: https://www.gocomics.com/calvinandhobbes/1995/12/31)

I have nothing to write and have been stalling this blog for so long. So, I’m going to start with this.

It’s not writer’s block or being too busy to write something but, I have been procrastinating on doing some interesting things and then writing about it. Oh well, I do tend to do interesting stuff but, don’t seem to write about it. For now, I’m going to bore you with software I use daily that helps me get the job done and manage aspects of my life.

Blogging:

  • Write.as: Let’s start with Blogging and I use write.as for it as you can see. Previously, I used Jekyll, Hugo and many other frameworks or static site generators. I used to host it all via Github and redirect to my domain. One I hosted on Github’s domain is still up. The whole process of maintaining and hosting was going fine for some time until I found out, there were lots of software out there which could help me focus only on writing and publishing. (Additionally, my way of constantly changing themes on my blogs, and tweaking CSS was also, time-consuming.) I tried every blog hosting service under the sun until I found out write.as. I’m not going to post negatives about them but, I found most of their flow disruptive and hard to read without having an account while some still needed maintenance from my side. Although write.as isn’t free as other services, it makes the writing and publishing experience good. I can also change css and js of this blog and not have to worry about breaking things but, the default theme is just about right.

Organization and Management:

For organizing and managing the daily, weekly, or monthly aspects of my life, work, and activities I depend on multiple software.

  • Obsidian: I use Obsidian for everything. Be it for instantly writing down food recipes or noting down addresses. I have a Supernote A5X which I use to read PDFs and take notes on meetings or figuring things out. I export the contents of the supernote to Obsidian for organizing and record it for easy finding. Supernote gives me the feeling of writing down on paper with a pen which I have been accustomed to all my life and Obsidian gives me the indexing and quick searching of things when I need to look into it (like a library).
  • TickTick: I use TickTick for my Pomodoro timer and manage my daily tasks list. Using TickTick I can also estimate how much time I should spend on a task at hand(by either taking rough time estimation for a new task or looking at how much time I spent on a similar task earlier). This helps me breakdown my day better and ticking each task throughout the day also gives me a sense of accomplishment. (While writing this blog, I have a timer going on and after much postponing finally, I will be able to check this for today. :–))

Fitness:

  • Fitbit App: I use Fitbit App on my iOS and Fitbit Sense for tracking my steps, calories, and most importantly sleep. Although I’m satisfied with Fitbit Sense, I do not like Fitbit App, it’s lacking in many features compared to Apple Health, and also, Premium costs $80/year for 1-2 features that are actually useful to me. Also, the whole Google Pixel Watch and migration to Google accounts is quite confusing and messy. At this point, I think Google should create one app for both Fitbit and Google Pixel watch so that there would be similar features. (Yeah, but, OS is different between them and Fitbit OS has far fewer features than even Android Wear…)

So, this is it for this blog post, maybe in the next post, I’ll write about tools and software that I use for programming and on my work. See you on the next blog.

New Experiment with write.as!

Trying out this blog setup. Looking forward to posting more here.

Enter your email to subscribe to updates.