Structed Object Definition Language (SODL)

Introduction The Structured Object Definition Language (SODL) is a domain-specific language designed for defining data structures, relationships, and constraints in a clear and organized manner. Files written in SODL use the .sodl extension, reflecting the language’s focus on structured object definitions. SODL provides a rich set of constructs that allow developers to model complex data relationships while maintaining type safety and data integrity. The name “Structured Object Definition Language” reflects the language’s core purpose: it provides a structured way to define objects and their relationships in a data model. The “Structured” aspect emphasizes its systematic approach to organizing data definitions, while “Object Definition” highlights its primary focus on defining data objects and their properties. ...

January 5, 2025 · 10 min · Shivanand Velmurugan

Working with large C codebases

Searching for symbols The product that I work on, has over 22 million lines of source – most of it a nightmare. I use vim as my editor of choice 1. Both cscope and ctags (integrated into vim), allow me to quickly move between files and lookup definitions of symbols, and help in understanding the challenge-du-jour. Throw in fuzzy find capabilities of the most awesome Ctrl+p plugin, and vim becomes the best ‘IDE’ out there! ...

December 29, 2016 · 2 min · Shivanand Velmurugan

Elixir - A crash course

These are notes from the official Elixir documentation. It a quick walk-through of the unique features in Elixir for someone coming from years of C — a way for me to remember and use as a reference. Summary Types Operators Control Structures Types Atoms Named contants with a value. true and false are atoms. Strings Supports unicode string natively! It’s about time. 1 You can concatenate strings using <>. "hello" <> " world". Anonymous functions Native support for closures – called anonymous functions. Also, functions are first-class, i.e. can be passed as arguments into other functions. Special syntax is required to invoke ananymous functions. ...

November 6, 2016 · 5 min · Shivanand Velmurugan

Somethings should be obvious, but are not, obviously

Update: Apparently, I had accidentally hit a minor bug in pew. This has now been fixed. Every so often, we spend several hours battling an issue, fighting linux or python or people or thoughts. The solution, often, leaps out when there has been a respite in the constant search for the solution. It’s the “duh” moment, that all of us feel. There is a little self-loathing, and relief at having arrived at solution. It is a moment of great pleasure, that I have learned to relish. ...

February 14, 2014 · 2 min · Shivanand Velmurugan

More unix goodness

Ohh the unix command prompt, I love thee! Can you guess what these commands do? 1 2 # grep -l <regex> # find . -name <regex> -delete

May 21, 2012 · 1 min · Shivanand Velmurugan

Badly punctuated parameter list in #define

Sometimes working with an old c compiler brings up painful, yet fun-filled days of making it speak the same language as you, and sometimes you just go “*$&%*$#&% you piece of sh** compiler” I had one such moment today, and after I had returned to Zen (some soul-searching and some google searching), I realized it quite simple. 1 2 3 4 5 6 7 $ gmake ... ... some_file.h:42: badly punctuated parameter list in \`#define' some_file.h:64: badly punctuated parameter list in \`#define' Failed to compile $ This was caused by the following: ...

November 8, 2011 · 1 min · Shivanand Velmurugan

Power of 2

It’s been a while since I’ve done anything except write code – lots of it. The last 20 days have been insane, and ofcourse to a take a break from writing code, I like to read code that others write. (You DO know that I’m crazy, right?!). In one of my futile attempts at clearing my google-reader reading list, I chanced upon a post by Veerabahu, on finding if a number is a power of 2 (or not). ...

November 3, 2010 · 3 min · Shivanand Velmurugan

Why does Java not support unsigned int? - Part 1

An interesting thing for me, is that if I am active on twitter during daytime in India (now that I’m here on vacation), I get to have some interesting conversations about design and development. Today, I chanced to talk about the lack of unsigned values support in Java. veechand is there unsigned int in #java support your answers 10 Jul 2010 from TweetDeck shiva @veechand nope. but use char instead. If you really want a type, you can define your own class backed by char 12 Jul 2010 from Twitter for iPhone in reply to veechand ...

July 13, 2010 · 4 min · Shivanand Velmurugan

The Holy Grail and the Programmer's High

Dave Winer, the inventor of RSS, wrote today about twitter’s latest API update for supporting the lists feature It turns out there’s an API call that retrieves the timeline for a list, and it works exactly like the API call that retrieves the timeline for an account. So much so that I didn’t even have to change the glue script, I pass in a different URL and it just worked > orig link I wonder if there can be a better award?! Dave Winer applauding twitter?! I never thought I’d see the day ;) (Just kidding Dave). Dave’s right though. There is a certain high that you get when something just works (as it was intended). That is the high that we programmers live for. It’s like a runner’s high. ...

October 26, 2009 · 2 min · Shivanand Velmurugan

The devil is in the why?

Recently I got asked, what the best way to do a join between two large lists, into another list was? I always tend to answer that question with: it depends. Just like any other algorithm, there is no silver bullet. It is a trade off between CPU and memory utilisation. Sometimes, we do have to think about these things (this is code in c++ on a device with scarce resources, to say the least). ...

February 14, 2009 · 3 min · Shivanand Velmurugan