Circular Buffer Performance Trick

UPDATE 12/04/2024: I’ve received some great feedback from various communities about this post and I’ve incorporated some of it into this post. Speficially, I’ve added: alternative Rust implementations skipping the usage of Vec<String> in favour of String using std::collections::VecDeque instead of implementing it by hand mention of a Go module that implements deque I have been hacking on AI agents recently for both fun and profit as part of the work I’m doing for one of my clients. [Read More]

A Small Tool for Exploring Text Embeddings

Last year I wrote about the superpowers text embeddings can give you and how I tried using them to compare the song lyrics of some music artists. Though the results failed to paint the picture I hoped for – this was due to the methodology, or rather lack thereof – it made me appreciate the importance of simple open source tools (OSS) in the currently booming AI/LLM space. To get to the point of displaying the embedding projections in the blog post I had to jump through some hoops and combine a lot of different Go modules before I could finally generate the nice interactive plots from the computed data. [Read More]

Fun With AI Embeddings in Go

Update 9th January, 2024: Changed the title to “Fun With AI Embeddings in Go” Before the end of last year, I visited San Francisco (SF) for a few weeks. It felt great meeting some old friends and ex-colleagues face-to-face after a long hiatus. There is something incredibly refreshing about being in the same room with the folks you’ve spent chatting to so much time over the past few years on Zoom or Slack. [Read More]

Getting Started With LDAP in Go

Recently I had to write a fair amount of Go code which interacts with Active Directory (AD) for one of my clients. AD uses Lightweight Directory Access Protocol (LDAP) [1] for client-server communication. LDAP is a very mature and powerful protocol to interact with directory services, though some of my friends argue that it’s a bit of a relic of past at this point. I disagree with this sentiment, but my explanation why would probably take a whole another blog post. [Read More]

Build a Graph of Kubernetes API Objects in Go

Over the past few months, I have been rekindling my interest in graph theory. I’m not quite sure what has caused this shift in my mind as I didn’t play with graphs too much since I graduated many moons ago, besides the occasional interview preparation. Maybe it was my reading about all the new graph databases that have come to existence over the past few years, or maybe it was my interest in the Graph Neural Networks which also seem to have (re)gained a lot of attention in the research community or maybe, stimulated by the recent coronavirus outbreak, it was the result of my random thinking of the ever so increasingly interconnected nature of our world. [Read More]

Breadth-first search using Go standard library

Just like many Go developers out there, I’m a big fan of Go standard library. Over the past few years I’ve been hacking on Go, I’ve discovered some real gems that not only made my life as a developer easier (no need to maintain unnecessary code), but they also made my code considerably more readable for others to follow. The last time I blogged I talked about how you can leverage Go standard library to generate weighted random draws. [Read More]

Weighted Random Draws in Go

When working on my last project I needed to find a way to draw a random number from a list based on some weight assigned to it i.e. given a list of numbers each of which has a weight assigned to it, I had to find a way to draw a number from the list based on the weight. The numbers which have higher weight assigned to them should be more likely to be drawn than the numbers with lower weights. [Read More]

Apollo program, Kalman Filter and Go

Before the end of the last year I went to see a movie made by one of my favourite movie directors, Damien Chazelle. The movie is called First Man and it tells the story of the journey of the first man on the Moon. I am also a bit of a space nerd, so my expectations were sky high. I was happy to find out the movie delivered on its promise. [Read More]

Edge computing with Go and Intel Movidius Neural Compute Stick

This summer I spent quite a bit of time speaking to various people about “intelligent” Edge computing. I put double quotes around the word intelligent to avoid the wrath of the thought leaders on the internet as they fight each other over what intelligence is and what is not. The more I talked to people the more I was realizing the possibilities and opportunities the edge computing opens up for the future: “injecting” intelligence into dumb physical objects seems akin to injecting “life” to dead objects, at least for us, scifi fans, which makes up for interesting vision of the future (for brevity let’s ignore the IoT security issues in this post). [Read More]

Hopfield networks in Go

As I continue to explore the realm of Artificial Neural Networks (ANN) I keep learning about some really cool types of neural networks which don’t get much attention these days. Many of these networks have not found much practical use in the “real world” for various reasons. Nevertheless, I find learning about them in my free time somewhat stimulating as they often make me think of some problems from a different perspective. [Read More]