Skip to main content

Posts

Emacs on WSL2: From Monochrome Misery to Modern Elegance

Windows Subsystem for Linux (WSL) has come a long way—especially under Windows 11 . WSL2 now offers smooth integration for Linux graphical applications, making it feel less like a compatibility layer and more like a native experience. But if you're an Emacs user, you might have noticed something off. Launching Emacs under WSL can feel like stepping into a time machine. Tiny fonts, washed-out visuals, and a UI that evokes the green-and-amber glow of vintage terminals. Functional? Yes. Pleasant? Absolutely not. But here's the good news: it is easy to make Emacs under WSL2 look just as sharp and modern as it does on Mac OSX . The emacs-pgtk build is designed for better graphical integration under WSL. It uses the Pure GTK interface , which plays nicely with WSL’s GUI support. sudo apt install emacs-pgtk To make Emacs look great, we’ll use Windows’ rich font library. First, edit your font configuration: sudo emacs /etc/fonts/fonts.conf and add the Windows Font directory...

Vibe coding with Gemini CLI

 For sometime I wanted to build a data explorer for Valkey Cache , and this past long weekend afforded me some time to start the project. Instead of building the application from scratch, I decided to give " vibe-coding " a try. After all, there is a lot of excitement around it now, and I wanted to see for myself how effective it could be. I fired off gemini-cli in an empty directory, and gave simple instructions of what I wanted to accomplish: a simple key-value explorer for open source valkey , that runs locally on my machine, can load and save CSV data files, and offers the ability to change keys and values interactively. I asked for the app to be built in python , and to use the tcl-tk libraries for the graphical user interface. I chose tcl-tk for a couple of reasons: it is available on multiple platforms, and is a challenge on OSX after Apple deprecated support for it. The CLI started cranking, and created the directory structure for the application, and asked for pe...

New ASUS RT-AX88U router

  I have been using Asus routers for many years, and have been pretty happy with them. The web interface is superb, and the firmware upgrades are timely and easy to apply, and over the last couple of years have introduced newer features that kept my old router relevant and functional.   After many years of service, my older router finally gave way, and started dropping Wifi connections randomly, especially when under heavy load. The connection drop happens whenever the kids have a Zoom meeting, or my wife and I are on work calls. Turning the laptop/iPad Wifi off and on again did not help, and we usually had to reboot the router to be able to connect again. Out of curiosity I looked at the CPU/memory stats of the router under heavy load, and could not see any issues. Even when all of us were in video calls, the CPU/memory did not rise about 50%. I could not see anything abnormal in the logs either. Online I saw that a lot of people had similar problems after upgrading to the la...

Python on Windows 10

Last weekend I wanted to clean up my python installation on Windows 10. In the past, I used a combination of Anaconda, Python app from the Windows Store, and Python distributions from python.org. Most of these were older versions that I have not updated in a while since I spend most of my time in WSL. I started by deleting everything and cleaning up the installs. Afterwards, I downloaded python 3.8 from python.org, and proceeded with the installation. I selected install python for everyone and adding it to the %PATH% environment variable. After the installation completed everything worked like a charm, until I started installing packages. I started with installing TensorFlow: pip install tensorflow and got a cryptic error that one of the TensorFlow files was missing. A quick internet search revealed that it is due to a missing setting for long filenames in Windows 10.   Following the instructions in this Stackoverflow post to enable long filenames option in the loc...

Interns at Microsoft

One of my favorite times at work is when the interns in my organization present the projects they have been working on for the past 10 or so weeks. It is amazing to see what they have accomplished during that period, and its impact on the business.   In my groups, I always make sure that everything the interns work on makes it to production and has visible business impact. The interns enjoy that quantifiable sense of accomplishment and seeing that their work lives in a launched product and improves some aspect of it.   After the interns demo their projects, I schedule follow-up 1:1 meetings with each of them. During the meeting, we go over their experiences during the internship, what they have learned in the process, and how can we make the experience better the next time around.   Their suggestions are always on point, constructive, and actionable. The conversations invariably drift to learning more about Microsoft, and what advice would I give them to have ...

MacOS Catalina, OneDrive, and case sensitive file systems

Over the weekend, I dusted off my old Macbook Air to search for some old family photos. I have not used the laptop for a long time, and it was completely out of charge. I plugged it in, and it quickly booted. Shortly after, I got bombarded with notifications that many of the applications needed updating, and that a new version of the OS was available.   I waited till I found the photos I was looking for, before attempting to upgrade anything. I also wanted to install OneDrive to get my old files to the cloud, so that I can access them from any of my devices, instead of dusting off old computers to get to them. The MacOS upgrade experience has always been fantastic, and this one was no different. The OS upgrade files downloaded quickly and after a restart and a quick install, the Macbook Air was ready to go.   Upgrading the installed applications was also a breeze, however in the process I discovered that a large majority of the applications installed were not compatible ...

Upgrading from WSL1 to WSL2 on Windows 10

I have been using WSL1 for a long time now and have been extremely pleased with it. After setting up Cygwin/X server, I don’t have a need for running Linux in a VM anymore. With the new Windows update, WSL is changing to support GPUs and GUI applications, so I decided to upgrade my install to make use of these improvements once they are shipped.  The upgrade path is easy: you can choose to configure a new WSL2 environment, or you can migrate your existing one. I decided to upgrade my install, since I had a lot of packages installed, and did not want to reinstall and configure them in a new environment again.  First, I started by getting everything I have in my Ubuntu environment up to date:   sudo apt update  sudo apt upgrade  Then in a windows command prompt, I updated my default WSL environment to version 2:   wsl –set-default-version 2  WSL2 requires Virtual machine platform support, and if that is not enabled, you can easily enable it throu...

School and Chromebooks

 This year schools shifted to remote learning because of COVID-19. Before the semester started, our school district planned on a hybrid approach, where students attended schools physically a couple of days a week, and studied from home for the rest of the week. The thinking behind the plan was to balance the students’ exposure vs the benefits of in-person learning, however as the virus situation did not improve by the school start, the district abandoned the plan and opted for a full-time at home learning schedule. Before the school started, my plan was to have the kids use their iPads to access their learning materials. They were comfortable with their iPads, knew how to use a web-browser, and switch between applications well. As school start neared, I started thinking that they would benefit from a bigger screen, and a decent physical keyboard, so I began to look for reasonably priced laptops that would do the job. As I started looking late, and I think a lot of parents had ...

Office in the cloud

Over the last month I have been using the web version of Office applications. I switched over from the desktop versions not because I was dissatisfied with them, but I switched because I wanted to be on the bleeding edge and get a preview of the new features quickly. I also did not want to update the desktop applications every day to get the new features, and the web apps relieved me from that burden.  As I used the web apps daily, I found that I did not miss the desktop versions. Sure, the web apps have their quirks, and living on the bleeding edge with preview features does not help. However, in this case, the plusses outweighed the minuses.  For one, I did not miss the ability to work offline, as I am almost always online and connected to a high-speed network. I loved that the browser took care of managing my open documents, presentations, spreadsheets, email, and calendar tabs, and automatically restored them when I restarted my computer or updated my browser. I also love...

Offline matching and the catalog from Dell

A couple of weeks ago I saw an ad on my phone for the new Dell XPS laptop. Out of curiosity I clicked on it, and started configuring a couple of options just for fun. I read a lot of good reviews about the upcoming XPS laptop, how the design rivals that of Apple’s MacBook laptops, and how certain configurations come with Linux preinstalled. I played around with the options, and configured two beast laptops just for fun, then I left and have not thought about it anymore, since I am not in the market for a new laptop, being satisfied with my Surface 3 laptop and all. A couple of weeks later, I received a Dell catalog for the first time, addressed to me and not to the usual “Current Resident”, that has more details about the XPS laptops, gaming laptops, desktops, and peripherals that Dell sells. The catalog also included a 15% discount, which was a nice touch. I wondered how I got that catalog, even though I have not explicitly sign up for it, nor request one, nor provide any informat...

Windows 10 May Update v2004

I upgraded all my devices to the Windows May update, all but my new Surface 3 laptop. Whenever I checked manually for the system updates, I got nothing, apart from the occasional Windows Defender updates. For a week I checked religiously, and when I did not get any notifications, I started searching online to see if there were any issues with my device. It turns out that there were. There is an issue affecting the Surface 3 laptop, and other devices that use an always on, always connected networking. The issue blocks the update for these devices, per the Known Issues and Release Problems page since it leads to random restarts or crashes. The issue is currently under investigation, and once resolved, the surface will get the update. I will wait till then. Interestingly there are recommendations online to circumvent the block on the Surface, by using the Update Assistant Tool , or the media creation tool. I don’t recommend either, unless you enjoy bricking your laptop. Luckily the a...

WSL and X11 applications

I have been using the Windows Subsystem for Linux for a long time now and have been pretty pleased with it for text-based applications. When I need to use a graphical application, I fire up Hyper-V with a full Ubuntu install, and mount my local drives to access my directories and files. The heavy-handed solution worked well for a long time now, but over time I found I was installing the same set of programs I used frequently in both places. There must be a better solution. If only I could run graphical applications on WSL. Turns out there is a way.   I searched for a free X11 server that I can install on Windows 10 and found a couple that were highly rated. I also remembered that when I used Cygwin long time ago, it came with its own X-server, and wondered if I can install that separately, since with WSL I did not need Cygwin as a whole. It did, and I installed Cygwin/X server and fonts. After the install, I ran Xlaunch, which ran a configuration wizard to start the X-serv...

Upgrading my desktop

At Microsoft we get to refresh our desktops and laptops every couple of years. Most people jump at the opportunity to get the latest equipment, but I usually don’t. I don’t like migrating from an older machine to a newer one and delay the refresh for as long as I can, preferably until the equipment dies, or goes out of compliance. After approving many equipment upgrades for my team this year, I decided to upgrade my monitor. I always had a single small monitor for my desktop, and never liked the dual monitor setup, or what I jokingly call the “flight simulator” setup with 4 monitors—three side by side, and one on top. My team swears by the productivity increase of seeing everything they need at once, and I believe them.  However, for me I was weaned on Unix terminals, Emacs, and command line tools, so I learned to live within the confines of a small screen. Nonetheless, getting a larger and crisper display was appealing, so I took the plunge and ordered a 38-inch monitor...

A week with the Galaxy Note 10+

Last week I made an impulse buy. I was at the Microsoft store trying to pass time while my kids were enjoying painting on the surface laptops and playing games on the Xbox. I walked around the store in search of something interesting and stopped at the phone display. The display had the newest family of the Samsung Galaxy phones, preloaded with Microsoft business applications. I picked up the biggest model and started to play with it. I liked its bigger edge-to-edge screen and the quality of the display. I must have enjoyed it very much, because I tried a lot of my favorite sites and applications, and compared how easy it was to read on the bigger screen than on my smaller iPhone X screen. I was so absorbed in the comparisons, that I did not see the sales associate approaching. She was very cordial, and started to chat about the differences between the two eco-systems—Android and iOS, and that most of the applications that I used including work applications ran on both. Then she...

Cars and Tech

Twelve years ago, when I bought my car, my decision criteria were simple. I wanted a car that is fun to drive, had good reliability, and was gas efficient; traits that were missing in my prior car. I did not put a lot of weight on the technological innovations the car had; I was happy with a good navigation system, a CD player that held multiple CDs, and a backup camera that made parallel parking easier. At the time, almost all car manufacturers provided undifferentiated versions of these capabilities, with minor tweaks to the user interface, which made my selection a lot easier. Over the years as the technology advanced, these originally innovative features started to feel obsolete. It was almost impossible to upgrade the hardware with newer and faster components, and software did not have a better story.   Only if either had issues or bugs, did the manufacturer offer an upgrade, through vehicle recalls or maintenance, or through map update CDs on a yearly basis, that captu...

Kindle Paperwhite

I have always been allergic to buying specialized electronic devices that do only one thing, such as the Kindle, the iPod, and fitness trackers. Why buy these when technology evolves so fast that a multi-purpose device such as the phone or a smart watch can eventually do the same thing, but with the convenience of updates that fix bugs and add functionality? So, I was shocked when this weekend I made an impulse buy and got the newest Kindle Paperwhite—a special purpose device for reading eBooks. I was walking past the Amazon store in the mall and saw that the newest Kindle Paperwhites were marked down by $40 for the holidays. The device looked good in the display, so I went in to look at it closely. The Paperwhite is small and light, with a 6” screen that is backlit and waterproof.   The text was crisp and readable, and in the ambient light, it felt like I am reading a printed book. I was sold and bought it on the spot. At home I have struggled to put it down. The bo...

On even and odd numbers, and kid's questions

Kids ask the best questions. Unburdened by prior knowledge or assumptions, their questions are driven by pure curiosity and a deep desire to learn something new. As adults we can learn a lot from how kids ask questions and seek knowledge. And we can also learn or strengthen our understanding of a particular topic by answering kids questions. For example, my son asked me a question about even and odd numbers, and why we get an even number when we add two even numbers or two odd numbers, and an odd number when we add an even and an odd number. Because this knowledge is drilled into us since our younger years, we stop wondering why. Intuitively we know the proposition is true, and we can cite a couple of examples to prove it to ourselves. For example, adding 2 and 4--both even numbers, gives us 6, also an even number. When we add 3 and 5--both odd numbers, we get 8, which is an even number. If we choose a mix of an even number and an odd number and add them, we got an odd numbe...

The Bystander Effect

At work, each floor has a kitchen area, with two beverage fridges, containing sodas, milk, and a variety of juices. Beverages are stocked weekly, and often checked for expiry or spoil. Last week, one of the fridges broke down, and to protect the milk from spoiling, someone moved it to the neighboring fridge. The next day I passed by the kitchen, the fridge was still broken, and more beverages started migrating to the working fridge. A week passed, and nothing changed. I realized that we are witnessing the bystander effect in action. The bystander effect or bystander apathy is a phenomenon where people are less likely to act when others are present, because they assume that in a group someone eventually will. The apathy increases with the number of people in a group. The internet has a lot of examples of the bystander effect, and advice on how to circumvent it when you need to ask for help. Most of the examples involve dire and emergency situations, which highlight the incongrui...

A computer in your hand

Not so long ago, my laptop was my preferred device to use after hours. Relaxing on the couch, I can check my work email, catchup on the news, read research papers, or enjoy reading books. As technology advanced, I could also stream videos and shows at my leisure without commercial interruptions, that for the last 10 years or so, I had no need for a cable subscription or a TV. Then came tablets. I was not one of the early adopters, since laptops were sufficiently advanced at the time: they were faster, had a keyboard and a better screen resolution, and the short battery life was not a deterrent. An electric outlet was always close by, and I could still work while the laptop is charging. Then came kids, and the chaos associated with them. Kids have a natural talent where they know exactly when you need to focus on something that’s not them or when you’ve been sitting down for longer than a minute, and they are compelled to rectify such injustice. This leads to a lot of work inter...

Po'boy

Lunches at work are usually nothing to write about, however every now and then, we get an external restaurant that makes a memorable dish. A couple of weeks ago, that was the Cajun shrimp po’boy. The sandwich was relatively simple: a toasted baguette, a big of mayonnaise, some shredded lettuce, and seasoned Cajun shrimp, however the taste was amazing. I had an inkling about the origin of the name po’boy, but the price of the sandwich betrayed that thinking. A bit of research on the web revealed a couple of origin stories. The most plausible and heartwarming was on Wikipedia : that during a 1929 street car workers’ strike, restaurant owners served the sandwich to their striking colleagues for free, jokingly referring to the strikers as poor boys, after which the sandwiches took the name, and in the Louisiana dialect shortened to po’boy.