A few interesting things

Published: by Pradeep Gowda.

entr is nice tool to add to the repertoire of scripting and make files. One of the examples given on that page is to use this program to watch over HTML+CSS file when you are editing one. I am thinking of using this to create a kind of “markdown live editor”, which uses pandoc to render markdown to html.


I posted a gerbil scheme to lobste.rs where the creator of Fennel Lang posted a link which lead to this rich makefile which is worthy of studying.

For instance, this line: reference.html: fennel/reference.md ; $(PANDOC) --toc -o $@ $^. I believe this means I can write one line “actions” followed by semi-colon.

The other thing that Makefile reminded me of is the --lua-filter. Pandoc ships with a lua interpreter, which makes it easy to write post processing filters without needing an additional software installed (eg: for python, you still need some kind Pandoc library).

Each Lua filter must contain element-transforming functions indexed by the name of the AST element on which the filter function should be applied.

The pandoc Lua module provides helper functions for element creation. It is always loaded into the script’s Lua environment.

The following is an example Lua script for macro-expansion:

function expand_hello_world(inline)
  if inline.c == '{{helloworld}}' then
    return pandoc.Emph{ pandoc.Str "Hello, World" }
  else
    return inline
  end
end

return {{Str = expand_hello_world}}

Important thing to remember from above snippet – Make sure you are “indexing” the functions by the AST element (above, the function expand_hello_world is indexed to Str AST element type).


Data science courses of Dr Michael Guerzhoy at Princeton SML201 has good intro material based on R.


Started using bbedit more. I even configured the scripts that help me in editing this blog to use bbedit directly. I really like (much like Textwrangler’s) ability to “Untitled” buffers as a quick way to start writing without worrying about losing them if I close the editor without saving them to a file.


Humour: Why we at $FAMOUS_COMPANY Switched to $HYPED_TECHNOLOGY via Ramakrishnan.


I rediscovered Gerbil Scheme two days ago, and many things clicked for me this time around, perhaps reading all the Clojure and Janet code helped. But, since this evening Racket is blowing my mind. I totally see myself reading more about Racket in the days to come.