Here is a set of path manipulation functions that I first wrote in 2000, and have tinkered with on and off since then.
The functions fall into three categories:
-
- Path stripping
- Path building
- Path listing
Here is a set of path manipulation functions that I first wrote in 2000, and have tinkered with on and off since then.
The functions fall into three categories:
I was looking for a way to process a list of items in an ant build file, similar to what you would do in Java with a construct like:
for ( Element element : elements ) { // do stuff with element }
The approach of XSLT, using recursive calls with local variables, looked promising. In the ant-user mailing list, I found a posting on the topic Implementing a loop in ANT with something like what I was looking for. Ben Stringer’s example gave me the critical information—that I could make indirecly recursive calls to antcall. He also used an external file, updated with the buildnumber task, to maintain state through the recursive calls. Bingo!
One of the frustrations of using ant was the difficulty of deriving one property value performing some sort of editing operation on an existing property value. The mapper task does a lot of grunt work for file names, but not for property values as such.
A common requirement is to map a Java package name to a corresponding directory structure. I have a property containing the package name, and I want to create another property with the directories. Here’s one way to do that. Continue reading “Ant: edit property values”
Continue reading “Using environment.plist with Mountain Lion”
If you want to set environment variables in OS X in such a way as to be recognised in applications run from Finder, it is not enough to set the env var in .profile. You must also ensure that the variables are set in the file ~/.MacOSX/environment.plist. Setting values in that file is most conveniently done using the executable PlistBuddy.
On my system, the command
$ which PlistBuddy
yields
/usr/sbin/PlistBuddy
Continue reading “Setting Environment Variables in OS X Lion”
I am moving any potentially useful posts over from my LiveJournal blog in hopes that they may be found a little more readily. Most of these posts are from years ago, but some still have relevance.
Daniel Dennett published an article titled ‘A Perfect and Beautiful Machine’: What Darwin’s Theory of Evolution Reveals About Artificial Intelligence in The Atlantic on 22nd June, 2012. What follows is the text of a post of mine on the Polanyi Discussion List, polanyi_list.
Daniel Dennett is performing conjuring tricks for his Atlantic audience.
To this day many people cannot get their heads around the unsettling idea that a purposeless, mindless process can crank away through the eons, generating ever more subtle, efficient, and complex organisms without having the slightest whiff of understanding of what it is doing.
How true. Drop the last couple of clauses, and he’s describing Polanyi.
In order to be a perfect and beautiful computing machine it is not requisite to know what arithmetic is.
This in bold, no less. I’ll come back to this. Continue reading “‘A Perfect and Beautiful Machine’”
The Anglicans have rewritten the Gloria Patri to make it less offensive, bless their hearts. The optional new, improved version goes like this.
Glory to God, Source of all being, Eternal Word and Holy Spirit,
As is was in the beginning, is now, and shall be forever. Amen.
In the collection of essays on which I based my discussions of Bultmann, you will find, as the last essay, a summary of the original eight essays by Austin Farrer, entitled An English Appreciation. In the course of it, he offers this:
The established, or virtually established, positions of science and history give rise to necessary refusals, as when we refuse to believe that the world was created eight thousand years ago or that the sun stood physically still for Joshua… About necessary refusals nothing can be done or ought to be done. They must be accepted.