Daily Entries

Daily log of what I did for the day, easier for people to get a history on what I've been up-to.


To get started with HardCaml, make sure to source the Vivado settings script using:

source /tools/Xilinx/Vivado/2024.2/settings64.sh

You can use ocamlfind query to find installed OCaml packages. It's important to switch compilers appropriately using opam switch, as only OCaml version 4.13.1 seems to work reliably. Newer compiler versions appear to cause significant issues with the setup.

I’m planning to write a simple HardCaml program for the Arty board that flashes LEDs. The idea is to use this as a demonstration piece. Eventually, I’ll also put together a complete write-up documenting all the challenges and solutions I encountered. This should prove to be a valuable resource for others, especially during the upcoming workshop.

During the setup, I ran into some Firefox error reports and other miscellaneous problems. However, my experience with the Shakti-SOC challenge turned out to be very helpful—it gave me solid exposure to the required tooling.

I also intend to create a comprehensive document that covers everything HardCaml-related, with a particular focus on insights from the Ceramic Hacker blog. Tomorrow, I’ll start working on my visa preparation as well.

On the tooling side, dpkg works fine, but tar does not. Tools like Grok were incredibly helpful, and I plan to use Grok in conjunction with Claude 4 to draft a more polished and complete documentation page.


[19-MAY-2025 — 23-MAY-2025] Trying the Shakti Microprocessor Challenge & Settling in

Arriving at IIT-Madras for the first time proved overwhelming as I navigated room move-in procedures and familiarized myself with campus facilities before even beginning real work. However, by week's end, I've settled comfortably into my environment and can finally focus on meaningful projects. The lab atmosphere has been fantastic—incredibly friendly people in an extremely chill space that genuinely motivates growth and better work. Campus life has been surprisingly pleasant with decent restaurants, good bus service, AC labs, and beautiful nature that helps me consistently hit my 10k daily steps, though I still need to figure out logistics like laundry and delivery services like BlinkIt/Zomato. The internet situation presents unique challenges—no personal connection means depending on lab-mates for WiFi access which has unpredictably throttled speeds ranging from painfully slow 9-27 kBps to impressive 800kBps-3.2mbps bursts.

After meeting with Professor KC Sivaramakrishnan, we agreed I should explore and play around with the ARTY board and give SHAKTI SOC Challenge a try, which I optimistically estimated would take a day or two but consumed an entire week instead. I immediately ran into outdated dependencies and missing packages—libusb-0.1 and libpython3.6-dev proved nearly impossible to install, forcing me to skip them and hope it works with the latest versions. The official manual conflicted significantly with YouTube tutorials, requiring me to locate the original GitLab repository for accurate steps. An outdated device tree compiler package caused massive issues until I switched to the latest package, while Vivado's web installer became obsolete due to its 2-3 year expectancy limit it's release date but the youtube video and the docs fail to mention this. Working through WSL presented storage constraints when Vivado's massive size overflowed my C drive, crashing my WSL environment despite following successful Medium articles. I also accidentally installed the new Ubuntu 25.02 instead of stable 24.02 which slowed my system but still got to work with it. Shakti programs were riddled with issues like using 40GB limits instead of 4GB in makefiles and incorrect variable comparison operators. Unfortunately, the final makefiles completely thrashed my computer's RAM, forcing me to abandon this project temporarily.

Despite these setbacks, I've gained valuable insights into embedded systems development, making me appreciate HardCaml even more. I've decided to pivot directly to HardCaml and begin the actual project work. The silver lining has been thoroughly reading through ARTY documentation, which proved far less overwhelming than initially assumed. SHAKTI CHALLENGE


[26-APR-2025 — 17-MAY-2025] Technical Break

My OCaml learning journey hit an unexpected roadblock when both my laptop and mobile were damaged during travel to a family function, resulting in the loss of my entire Linux setup and minor hardware damage. Despite the setbacks, I managed to rebuild my development environment on Windows 11 with WSL and had valuable conversations with Edmund Humenberger who works on open-source FPGA and chip design tools. I still tried as much as I can to quickly familiarize myself with the OCaml ecosystem.

Setting up a fresh environment on Windows 11 with WSL proved surprisingly pleasant, though Merlin's LSP experience fell short of my expectations, I kinda prefer ocaml-lsp for everything. After wasting a day trying to configure vim properly, I switched to Neovim, which worked seamlessly. While OCaml by Example remains frustratingly incomplete, Learn X in Y Minutes provided a much better language overview, though I found myself lacking the deeper understanding of OCaml I needed. My Rust programming background helped bridge some gaps, but a proper refresher would be ideal.

I discovered GDB debugging for OCaml through KC's excellent blog post, which was genuinely enjoyable to explore. I've also prioritized learning performance tools and seeking high-quality codebases for study to get how OCaml is done in the real world. VS Code's OCaml LSP initially appeared broken but resolved itself after some troubleshooting from my side. For experimentation, I much prefer Jupyter notebooks over utop for it's cleaner interface. After some initial skimming, I found Real World OCaml and OCaml Programming: Correct + Efficient + Beautiful are the best resources to drill down the fundamentals in programming OCaml, while Programming Well: Abstraction and Design in Computation is best at teaching functional programming. It's unfortunate I couldn't focus on the courses but I do want to hit the project running and learn OCaml practically that way. REAL WORLD OCAML OCAML PROGRAMMING: CORRECT + EFFICIENT + BEAUTIFUL LEARN X IN Y MINUTES GDB DEBUGGING


[25-APR-2025] Introduction to OCaml

I started learning OCaml this past week but got slightly delayed due to F1 visa issues. Today I finally set everything up properly and made good progress. I'm finding functional programming quite intuitive and elegant. The ecosystem is well-organized with tools like dune and opam, though package installation can be time-consuming and makes my cpu go brr. I've completed Chapter 1 of Abstraction and Design in Computation, wrote my first "Hello World" program, and set up my development environment with Jupyter notebooks, Docker, and vim configurations with Merlin.

While the syntax initially confused me (particularly ref, rec, and subleq), a quick searches clarified these concepts. I'm keen to explore Core (Jane Street's stdlib replacement) and practice writing idiomatic OCaml code and figure out why it's idiomatic. For the next session, I plan on implementing GCD algorithms, studying Core's design, and continuing with more the learning resources.

ABSTRACTION AND DESIGN IN COMPUTATION OCAML BY EXAMPLE CSCI7000 PRINCIPLES OF FUNCTIONAL PROGRAMMING


Last updated