Home Blog Feed

Preferred Plain text format for storage and exchange

Why?

I started programming adventure with Visual Basic but C was the language I spent much of time in college and first job. C is still one of favorite language, simple and concise language to learn. I have dwelled in C++, Python, Perl and Tcl in my career so far and touched upon Go, Javascript, a bit of Haskell. Recently started leaning lisp, specifically emacs-lisp and common-lisp.

But I was of a mind that preferred a staple language for most of my scripts and utilities. The reasoning was that it is easier to manipulate data and I can just dump the data into a file quick and dirty, as offered my the language enviroment (e.g. pickle in case of python).

This was okay until all the components of my workflow were written by me. But as I start using others’ tools(not doing that is insane as I have learned the hard way), this brittle single language idea crumbles into dust. Using a database sounds like a good idea, but for some reason I never liked databases.

Existing solutions

CSV/TSV

For most simple cases a csv file format is enough. Common data like expense tracking fits well into this.

Json and Yaml

Json and Yaml are both very well designed and can represent almost any sort of data structure.

Json and Yaml seems to be popular for the my use cases, since the libraries needed to parse and dump the data from and to in these formats are ubiquitous. Almost all mainstream languages comes with libraries bundled with them. Though I prefer the Yaml’s elegant look and editablility over Json’s, some times mixing tabs and spaces gives rise to nightmares. Json’s syntax though looks algol-ish, it is easier to debug. That is just my opinion. Json library in Python is what turn to in most cases.

My recent acquaintance with lisp, made me explore s-expressions as a serious alternatives. Are there any other preferred plaintext formats for exchanging info with your personal computing ecosystem?