dasein::labs RSS

nick-orton.log

Archive

Nov
29th
Sun
permalink

Handbreak rulz!

I was trying to migrate a flash video to mp4. I spend a couple of hours trying to compile and configure ffmpeg correctly. Then I found handbreak. It just does everything I want to do with a nice friendly gui.

Nov
11th
Wed
permalink

macro for pojo criteria in clojure

(ns no)

(defmacro ?ry
([& args]
(let [target (last args) props (butlast args)] `(fn [obj#] (= ~target (.. obj# ~@props))))))

no=> (def things ‘(1 “bob” 2.0 “mike”)) no=> (filter (?ry getClass toString “class java.lang.String”) things)

(“bob” “mike”)

no=> (def q (and (?ry getClass toString “class java.lang.string”) (?ry toString “mike”)))

(filter q things)

(“mike”)

Jun
28th
Sun
permalink

Ibycus is blogging!

I created Ibycus this weekend for fun. It is a program that writes poetry. Thanks to tumblr’s easy to use api, it was very easy to set Ibycus up in a cron job that blogs the poems. The sourcecode is hosted on github

May
4th
Mon
permalink

Benevolence is a Luxury

To do good requires expending something of value. This may be as crass as money or as subtle as time and effort. Virtue is universally admired and wickedness deplored. However, we must not be too quick to praise those who are liberal with the wealth that fortune has provided or too quick to blame those who are miserly in their poverty. If you are fortunate, Goodness is a pleasure that is worth the expenditure. Furthermore, some forms of luxury such as paintings, fine wines, or good deeds can be a wise investment.

Apr
1st
Wed
permalink

Blowup

I just finished watching the movie Blowup directed by Michelangelo Antonioni.

Plot Summary (spoiler alert):

Once upon a time in the early sixties a popular fashion photographer stumbles upon a murder and learns that you can end a film with a scene of mimes playing tennis without anyone realizing you were just being lazy.

Besides being a stereotype of pretentious 60s film-making, the film did have some positive qualities. The Yardbirds were in the movie for at least 43 seconds. Also since the director was italian there was gratuitous female nudity every 15 minutes or so.

Mar
31st
Tue
permalink

Implementation Patterns

I finally got around to reading Implementation Patterns by Kent Beck. It was a nice little read. The main jist of the book was that the goal of coding in a high order language should be to communicate your intentions to other programmers. The code and examples in the book are all in java, but the author does a good job of talking about issues that should apply to all languages.

This book wasn’t really about teaching new tricks. It was more about explaining the reasons for choosing one way of doing things over another. For example, two things that he classifies as ‘implementation patterns’ are field and parameter. If you don’t already know what a fields or parameters are, this won’t help you. Also, you probably have an instinctive idea when to use a field and when to use a parameter. However, you may not have actually sat down and articulated to yourself the reasons behind choosing one or the other. There is an Einstein quote about not really being able to understand something until you are able to explain it to your grandmother. I’m sure Kent’s grandmother writes extremely well factored code.

The last couple of chapters were about framework design and performance testing. It just so happens I am currently writing performance tests for a framework I helped design. This part of the book did get me to re-think some of the choices that I had made. I haven’t made any changes inspired by the book, but considering the problem is a very important step.

Mar
21st
Sat
permalink

Thoughts on Justice I Had While Taking a Shower

When people talk about justice they usually mean two different things. The more common use of the word is in regards to the criminal court system. Here justice really just means revenge. We realized a long time ago that a person’s ability to take revenge is limited by their personal power. We want everyone to have the opportunity to partake in revenge, so we outsourced it to an entity bigger and more powerful than any of us: the state.

The more perplexing use of the word justice relates to ‘social justice’. Social justice, to my understanding refers to structuring society in such a way that a certain group of people benefit. Who those people are, what benefits they get, and how you actually go about achieving them are matters of controversy. Most people simply skip to the last part and start talking about how to structure society as if the first two were a given.

There are generally two camps of thought about who are the elect beneficiaries of social justice. The only thing that everyone can agree on is that they are members of this group. The first camp tends to view ‘the people’ as an undifferentiated mass, and so the ‘elect’ consists of the majority. Part of me sympathises with this view. I am a member of ‘the people’ so I can empathise with them. Also, everyone I know and like is a person, and I want good things to happen to them as well. However, I am a New Yorker and I ride the subway to work every day. The people I ride to work with are pushy, loud, rude and smelly. They also generally read crappy books. I don’t empathise with those people and I honestly don’t care if they benefit from society. The other camp feels that the ‘elect’ should be populated by people who ‘deserve’ it. This is a very attractive view. People feel that they deserve the good things that happen to them, and that they deserve even better things than they already have. I am one of those people. However, one’s lot in the civilized world comes down to smarts and luck. Deserving seems to have a moral connotation. Morality generally hinges on some sort of free choice. I’m pretty sure I didn’t choose my smarts. If I had, I would have chosen more of them. Luck, by definition is outside of choice.

Without settling on who the ‘elect’ are, what might their benefits be? Perhaps they should be happy. Perhaps they should be wealthy. Perhaps you just read A Brave New World, or you are really influenced by 19th century romanticism, and you think that people should have some sort of human dignity that supersedes happiness or material interests. Perhaps you are religious and think people should have a super afterlife. This seems like a judgement call with no real logical answer.

As for how to achieve social justice, I’m pretty sure you have to decide who gets the goodies and what they are before you can figure out how to give them to them.

Mar
18th
Wed
permalink

Podcast Collection

I’ve been making an effort to move my computer’s configuration off of the hard drive and onto the internets. For the most part this means version control with mercurial and bitbucket. I use amarok to load up my ipod with music, but I have so far not figured out how to export the podcast locations. So I decided that I would have a post that I would keep updated with my favorite podcasts.

Mar
16th
Mon
permalink

Mysticism and Logic

I picked up a copy of Mysticism and Logic by Bertrand Russell. Its a 1929 first edition and I picked it up for 15 bucks at the Strand. It is a collection of 10 short essays. It was a really good read. I won’t get into all the essays, just the ones that I particularly enjoyed.

The contents:

  1. Mysticism and Logic
  2. The Place of Science in a Liberal Education
  3. A Free Man’s Worship
  4. The Study of Mathematics
  5. Mathematics and the Metaphysicians
  6. On Scientific Method in Philosophy
  7. The Ultimate Constituents of Matter
  8. The Relation of Sense-Data to Physics
  9. On the Notion of Cause
  10. Knowledge by acquaintance and Knowledge by Description

The titular essay was an analysis of what is meant by mystical thinking and how it has been blended with logic in philosophy from Heraclitus onwards. He characterised mystical attitudes as favouring intuitive reasoning, monism, and the unreality of time and sense perception. As you might imagine, Russell doesn’t care much for mystical thinking, which he more or less dismisses as lazy.

The Place of Science in a Liberal Education harkens back to a time when education meant classics and little else. As governments have long since recognised the material benefits of having a population with high mathematical skills, its funny to think of a highly educated populace with little scientific or mathematical literacy.

The Study of Mathematics was an apology for Math. He lamented that it is does not have as high a place in civilization as he believed that it should. He discussed at length the beauty of mathematics. He called it “a beauty cold and austere, like that of sculpture, without appeal to any part of our weaker nature… yet sublimely pure, and capable of a stern perfection such as only the greatest art can show.” He went into some depth of how math is taught in progressive levels of abstraction starting with concrete arithmetic, moving onto the more general truths of algebra, and finally ending in the paradise of Cantor’s infinite.

In Mathematics and the Metaphysicians he claimed the greatest discovery of the 19th century was the formalisation of mathematics. He more or less proposed that philosophy should concentrate on formalism and methodology. I’m not exactly sure when this was written, but it seemed like a precursor to Principia Mathematica.

In the Ultimate Constituents of Matter and The Relation of Sense-Data to Physics, he drew out a six-dimensional universe made of ‘spectacles’ that are trapped within our perspectives. We deduce a three dimensional world by compressing different spectacles into a single ‘thing’. I’m pretty sure he wouldn’t hold this opinion today.

I particularly liked ‘On the Notion of Cause’. He threw causality out the window. He talked about how the language of cause and effect is completely absent from physics. He defined a determinism in terms of functional relations between objects in space time. He also mediated the fate/free will dichotomy by talking about the mental state and physical state of the mind as having a functional mapping. The physical state of the mind has a functional mapping to the physiological movements of the body and its interaction with the outside world. “We feel that our will is not compelled, but that only means that it is not other than we choose it to be.”

Knowledge by Acquaintance and Knowledge by Description was a brief voyage into semantic issues in epistemology. It was premature and underdeveloped but foreshadowed later Witgenstein.

Mar
15th
Sun
permalink