handlebars-ml
My personal celebration this week is that I did released
the OCaml handlebars templating library
that I was working on. I felt happy when I read the “Thanks”
and “Your PR … has been merged” emails for publishing to
the opam repository. This can now be installed with opam install handlebars-ml
.
I think this is software that I am proud of. I have tested it enough for me
to feel confident about relying on it. I should likely do a more detailed write-up
about this because I did learn several things in the process of making it:
ocamllex
, menhir
, sedlex
, when claude code
was useful, how opam publishing
works, yada yada. Even the opam CI had an interesting, thorough testing process–for
example that the project gets built & tested on different OCaml versions and with the
latest & lower-bound versions of the dependencies. This is a new testing model that I
will carry with me.
I feel more fondly about handlebars
than I did at some point during the making of
it. My confusion/distaste plotted against time would be a monotonously increasing graph
with a sudden drop from the peak close to completion. It has pitfalls and semantics
that silently ignore where things should probably crash soon. That said, I feel
comfortable enough with those to be able to make use of the convenience features
that sit on top. Perhaps I should add optional warnings in these cases to compensate.
In any case, both the good & bad of this deserve a more detailed write-up. In summary,
I feel happy about having completed this. I am also happy about the error-reporting
& CLI interface that I built in, and so I would in fact like to make use of it in my own
projects.
huml
I am procrastinating on the category of activities that this writing would also fall into. I am bike shedding on the static site generator that the templating engine is supposed to be a part of. My latest side quest after being satisfied with the handlebars parser was to perhaps write another OCaml parser–this time for a configuration language called huml. huml stands for HUman-oriented Markup Language, and is an experiment by kailash to make a replacement for YAML. I agree with the dislike of YAML. I do sometimes find TOML less than easily readable. I think that is because the hierarchy is not obvious from the visual representation of the text as it is in YAML. I have made some progres on this. If I do get to a version that works with the tests that are put up, then I will very likely consider using it for my static site generator and writing to kailash about it.
I also really like that there is a language-neutral test set for it, so I can actually verify that my implementation works. This is great for times when the specification is ambiguous. I think a formal grammar specification (a BNF) would also perhaps be useful towards that end.
life
I had fun making a short video in the format of old good-morning photos with
hindi songs for a friend’s birthday. I did that in p5.js and took help of
the silicon-family techbros to get there. I am amazed again about how
powerful p5 is. I will likely consider making a tool to make it easier
to get GIFs of animations or fix the saveGIF
method they had because
it did not work for me. I ended up doing a screen recording at the end
and then stitch that with an audio file with ffmpeg
.
I do enjoy playing around in the command line. It is satisfying to write
an ffmpeg
command and have it do the thing you want. I think of the
SICP-ian analogy of the wizard’s incantations.
I also visited the Indian Music Experience museum this week which was absolutely beautiful. I would like to share some pictures from the visit in a post.
website
- I fixed my website’s RSS feed thanks to Abhinav’s nudge.
- should absolutely get started on the static site generator
- need to fix my infra. i have setup comments but they don’t show up on my posts because my laptop is turned off and i need to change the boot order to get it back up and runnning as a homeserver.
more to be added?