Tuesday, January 17, 2012

`My song is love unknown' (hymn)

Recently, I heard a moving hymn, `My song is love unknown' (1664) by Samuel Crossman (1624-1683) and w/s found this post by Rupert Christiansen (in U.K.'s The Telegraph) for a story behind it.

Actually, what moved me was its tune, Love Unknown (1918) by John Ireland (1879-1962). Set to it, some contemporary churches know better the words, `Oft when of God we ask' by English Congregational minister Thomas Toke Lynch (1818-1871, more here).

During the 254 years that passed before Ireland wrote his, I wonder which tune the Crossman hymn used? There's currently no answer in Wikipedia's article. I found a list of alternate tunes for the text, but all are of poorer quality IMO for the words compared to Ireland's; it seems no wonder he was inspired to compose it, perhaps!

Crossman as a family name would seem to suggest to a boy, BTW, thinking about religion. However, that speculation remains unconfirmed by Wikipedia's article on Crossman.

Copyright (c) 2012 Mark D. Blackwell.

Tuesday, January 10, 2012

Lisp & Ruby metaprogramming

I just reread Paul Graham's article, Beating the Averages, on Lisp being the most powerful computer programming language because of Lisp macros (which, BTW, are not like assembly language macros). It led me to the obvious perception that because Ruby lacks Lisp macros, metaprogramming in it is weaker than in Lisp.

He explains the essence of Lisp macros: '[I]n general, for application software, you want to be using the most powerful ...language you can get, and using anything else is a mistake. ...Lisp code, after it's read by the parser, is made of data structures that you can traverse. If you understand how compilers work, [in Lisp you] write programs in the parse trees that get generated within the compiler when other languages are parsed. But these parse trees are fully accessible to your programs. You can write programs that manipulate them. In Lisp, these programs are called macros. [P]ower ...refers to features you could only get in [a] less powerful language by writing an interpreter for [a] more powerful language in it.'

So, for someone who wants to know where to go next after Ruby, and thinks that, in a Ruby code base, having a high proportion of metaprogramming code, like some say Rails 3 has these days, results in awkwardness, the next step is Lisp. Lisp apparently is perhaps a better metaprogramming language.

Copyright (c) 2012 Mark D. Blackwell.