Skip to content

sympoze

sympoze

sympoze is a social bookmarking site for philosophers. Currently in beta, sympoze is only open to professional philosophers and graduate students. Not only can you submit links but sympoze has the following features:

  • Voting on submitted links
  • User profiles
  • Online status
  • Instant messaging

Looks to be an excellent online resource if enough philosophers participate—and not just because a bookmark to one of my posts made it to the front page. ;)

Pushing and Tracking Remote Branches with Git

I write at home and at work, so it is natural for me to use a remote repository to keep track of my work—even with Git. Distributed version control may not force this workflow on you the way subversion does, but the cool thing about Git is that it doesn’t force any particular workflow—it can be adapted to your needs.

The best thing about Git is branching. However, there is a hiccup in pushing a branch to a remote repository that always makes me pause when doing it. So this post is nothing earth shattering. Just a brain dump in the hope that the procedure will become hardwired so that I don’t have to anxiously glance at a man page each time a create a remote branch.

Creating a branch in your local repository is easy enough:

$ git branch <local branch name>

And pushing the branch to the remote repository is easy as well:

$ git push origin <local branch name>

So what’s the problem? The problem is that your local branch isn’t automatically tracking the remote branch. You could edit the git config, but that is a hassle. There is an easier way, though. You can delete the local branch a create a new local branch from the remote one. Fortunately, this can be done in a line:

$ git branch -f <local branch name> origin/<remote branch name>

The key is the -f option—it forces the creation of a new branch even if one of that name already exists. And the second argument specifies the remote branch from which the local branch is created. Creating a new local branch in this way causes it to automatically track the remote branch, so that you can, for example, use git pull without further arguments.

Delicate Flower

Are you a delicate flower? Does spelling mistakes and profanity in comments feeds make you cringe? YouTube Comment Snob may be for you. This is a Firefox extension that filters out “undesirable” comments fro YouTube comments threads. The following rules are available:

  • More than # spelling mistakes: The number of mistakes is customizable, and the extension uses Firefox’s built-in spell checker.
  • All capital letters
  • No capital letters
  • Doesn’t start with a capital letter
  • Excessive punctuation (!!!! ????)
  • Excessive capitalization
  • Profanity

Find myself struggling like Kirk under an alien influence. Must. Not. Make. Offensive. Remark…

Portent

A harbinger of TM2?

Real men don’t use semicolons

Apparently. Jan Freeman in an article, Sex and the semicolon, reports the views of Ben McIntyre writing for the Times of London (otherwise unattributed—like many sites relying on advertising, the Boston Globe seems not to use external links, see O’Reilly for an explanation):

Kurt Vonnegut called the marks “transvestite hermaphrodites representing absolutely nothing.” Hemingway and Chandler and Stephen King, said McIntyre, “wouldn’t be seen dead in a ditch with a semi-colon (though Truman Capote might). Real men, goes the unwritten rule of American punctuation, don’t use semi-colons.”

Typographic rage rears its ugly head again!

I am unsure what about the semicolon could raise such ire. It is true that I rarely, if at all, use semicolons. But this a manifestation of neither principle nor ill-will. At one point, in a desperate bid to improve the clarity of my writing, I resolved to write in a ruthlessly simple manner. My prose has since loosened up (and continued to improve, I hope). But in moving away from an adolescent penchant for syntactic complexity, I seem to have lost my grip on when, exactly, to deploy semicolons. So no anti-semicolon policy, just punctuation ignorance.

Paul Collins reports that semicolon rage is far from new:

When the Times of London reported in 1837 on two University of Paris law profs dueling with swords, the dispute wasn’t over the fine points of the Napoleonic Code. It was over the point-virgule: the semicolon. “The one who contended that the passage in question ought to be concluded by a semicolon was wounded in the arm,” noted the Times. “His adversary maintained that it should be a colon.”

(Slate, unlike the Boston Globe, helpfully provides a plethora of external links.)

Paul Butterworth, in a piece published in the Financial Times, seeks a rationale for what might otherwise appear to be an irrational hostility. Unfortunately, the rationale is spurious, and the hostility is manifestly irrational. What we get is the chicken little rant familiar from prescriptivist grammarians transposed to the typographic:

“The most common abuse of the semicolon, at least in journalism,” explains Kinsley, “is to imply a relationship between two statements without having to make clear what that relationship is. I suppose there are worse crimes in the world. (I don’t know if Osama bin Laden uses semicolons or not.) But Fred did have it right.”

Real men don’t use semicolons; though maybe Al Qaeda does. ;P

Post Commit Hooks

Commit hooks, scripts run when you commit to your repository, can be handy and are readily adaptable to a variety of workflows. Here is a quick and dirty post commit hook that I use for my dotfiles, remind files, and my todo list. These are kept in lightweight git repositories. Moreover, I want to push any changes that are committed immediately. Easily done:

$ cd my_git_repository
$ echo 'git push' > .git/hooks/post-commit
$ chmod 755 .git/hooks/post-commit

LaTeX and the Logic of Sectioning

In LaTeX, sections and subsections lack closing tags. So a section with a subsection followed by another section would be represented like so:

\section{A Section} 

\subsection{A Subsection}

\section{Another Section}

A lack of closing tags, however, is far from being structurally innocent. Suppose, instead, we had sections and subsections represented like LaTeX environments:

\begin{section}{A Section}
    \begin{subsection}{A Subsection}
        
    \end{subsection}
\end{section}

With closing tags, we could have text at the beginning of the parent section and at the close of the section that was not part of any subsection. Why would you want to do that? I am currently writing a paper and I decided to break a long section into two subsections—both for ease of reading and to reflect the emerging structure of the text. It made sense to have some introductory remarks and some closing remarks that were part of the section but not part of either subsections. With closing tags, this would have been simple and transparent:

\begin{section}{A Section}
    
    Some introductory remarks.
    
    \begin{subsection}{A Subsection}
        
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
        
    \end{subsection}
    
    \begin{subsection}{Another Subsection}
        
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
        
    \end{subsection}
    
    Some closing remarks.
    
\end{section}

However, without closing tags, there is no way to represent this logical structure. The introductory remarks at the beginning of the parent section were no problem. It was the closing remarks following the final subsection that posed the problem:

\section{A Section} 

Some introductory remarks

\subsection{A Subsection}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\subsection{Another Subsection}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Some closing remarks.

Notice, the closing remarks are part of the second subsection. To deal with this I had to resort ot a visual hack:

\section{A Section} 

Some introductory remarks

\subsection{A Subsection}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\subsection{Another Subsection}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\\

\noindent Some closing remarks.

\\ in effect introduces a blank line, and \noindent forces the paragraph to begin without indentation. In this way, I signalled that the closing remarks were part of the section and not the final subsection. It is a visual hack since I signalled the status of the closing remarks by the visual layout of the text. As far as LaTeX is concerned, however, the closing remarks are still part of the final subsection. Disheartening for someone enamoured of structural markup.

LaTeX3 is vaporware, and I have no evidence that this issue will even be addressed. I am unfamiliar with ConTeXt—an alternative macro language for TeX that is meant to be based on more uptodate ideas about structural markup. I would be curious to see if this issue arises in ConTeXt as well.

Clear Pond

A quick TextMate theme I knocked off since I need a light theme but hated the available white themes.

Clear Pond

It is hosted at GitHub, so git users can get theme with git clone git://github.com/PhilGeek/clear-pond.git. Other wise, it can be downloaded here.

Keeping your LaTeX Preamble in a Git Submodule

One of the much vaunted conceptual advantages of structural markup is the separation of form and content. In LaTeX, the preamble determines the the form of the document, how it is to be typeset, while the main body determines the content of the document and should contain only structural markup, markup that specifies the logical structure of the content.

As I explained in an earlier post, it is useful to independently maintain any LaTeX preambles you may have in version control. Independently, that is, of your present LaTeX project. The rationale is simple. If you discover some heretofore overlooked need requiring a change to the preamble, it would be useful if this change were made available to any other LaTeX document that uses that preamble.

Here is how to do this with Git and Git submodules. (Something similar could be achieved with Subversion and Subversion externals.)

First, let’s create a Git repository for our LaTeX project:

~ $ mkdir myproject
~ $ cd !$
~/myproject $ touch mytex.tex
~/myproject $ git init
Initialized empty Git repository in /Users/markelikalderon/myproject/.git/
~/myproject $ git add .
~/myproject $ git commit -m "Initial commit"

mytex.tex is just an empty file so far. Here is the template LaTeX file that I am currently using:

%!TEX TS-program = xelatex 
%!TEX TS-options = -output-driver="xdvipdfmx -q -E"
%!TEX encoding = UTF-8 Unicode
%
%  my_title
%
%  Created by my_name on date.
%  Copyright (c) year. All rights reserved.
%

\documentclass[12pt]{article} 

% Definitions
\newcommand\mykeywords{} 
\newcommand\myauthor{} 
\newcommand\mytitle{}
\newcommand\mybib{}

\input{preamble/preamble}

%%% BEGIN DOCUMENT
\begin{document}

% Title Page
\maketitle
% \begin{abstract} % optional
% \end{abstract} 
\vskip 2em \hrule height 0.4pt \vskip 2em
% \epigraph{text of epigraph}{\textsc{author of epigraph}} % optional; make sure to uncomment \usepackage{epigraph}

% Layout Settings
\setlength{\parindent}{1em}

% Main Content



% Bibligography
\bibliographystyle{plainnat} 
\bibliography{\mybib} 

\end{document}

A couple of observations about this. First, I am assuming that the included preamble is called preamble.tex and is in a subdirectory called preamble. This is required since we will be keeping our preamble in a Git submodule, and submodules are always subdirectories of the superproject. Second, I have defined some commands, \mytitle, \myauthor, etc. Basically these are all the elements of the preamble that could change from one LaTeX project to another. (So, in the preamble, we have \title{\mytitle}.) This was done to generalize the preamble so it can remain constant from project to project. Also, with a template, it is useful to pull, in this way, all the bits you would need to fill in to the top of the document so that you don’t need to hunt through the code. Once you have added content to mytex.tex, you will, of course, need to commit these changes.

Next we want to push to a remote repository. I will assume that your remote repository is hosted by GitHub (they provide free accounts for publically availbale repositories). So create a repository, “myproject”, on GitHub and then:

~/myproject $ git remote add origin git@github.com:myname/myproject.com
~/myproject $ git push origin master

(where “myname” is your GitHub username).

Now for something mysterious, but it’s required for Git submodules to work. We are going to delete our local Git repository and clone the remote repository:

~/myproject $ cd ..
~ $ rm -rf myproject/
~ $ git clone git@github.com:myname/myproject.com

Now we are going to create a Git submodule. Your preamble, call it preamble.tex, needs to be in a git repository. For the sake of illustration, we will use the preamble I am hosting on GitHub:

% Packages
\usepackage{geometry} \geometry{a4paper} 
\usepackage{url}
\usepackage{pdfsync} 
\usepackage{txfonts}
\usepackage{color}
\definecolor{gray}{rgb}{0.459,0.438,0.471}
% \usepackage{setspace}
% \doublespace % Uncomment for doublespacing if necessary
% \usepackage{epigraph} % optional
 
% XeTeX
\usepackage[cm-default]{fontspec}
\usepackage{xltxtra,xunicode}
\defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text}
\setmainfont{Hoefler Text}
\setsansfont{Gill Sans}
\setmonofont{Inconsolata}
 
% Section Formatting
\usepackage[]{titlesec}
\titleformat{\section}[hang]{\fontsize{14}{14}\scshape}{\S{\thesection}}{.5em}{}{}
\titleformat{\subsection}[hang]{\fontsize{12}{12}\scshape}{\S{\thesubsection}}{.5em}{}{}
\titleformat{\subsubsection}[hang]{\fontsize{12}{12}\scshape}{\S{\thesubsubsection}}{.5em}{}{}
 
% Headers and Footers
\usepackage{fancyhdr}
\pagestyle{fancy}
\pagenumbering{arabic}
\lhead{\thepage}
\chead{}
\rhead{\itshape{\nouppercase{\leftmark}}}
 
% Bibliography
\usepackage[round]{natbib} 
 
% Title Information
\title{\mytitle} % For thanks comment this line and uncomment the line below
%\title{\mytitle\thanks{}}% 
\author{\myauthor} 
% \date{} % Leave blank for no date, comment out for most recent date
 
% PDF Stuff
\usepackage[plainpages=false, pdfpagelabels, bookmarksnumbered, backref, pdftitle={\mytitle}, pagebackref, pdfauthor={\myauthor}, pdfkeywords={\mykeywords}, xetex, dvipdfmx, colorlinks=true, citecolor=gray, linkcolor=gray, urlcolor=gray]{hyperref} 

Here is what we need to do to create the submodule:

~ $ cd myproject/
~/myproject $ git submodule add git://gist.github.com/835.git preamble
~/myproject $ git submodule init
~/myproject $ git submodule update

Now, if we want to make a change to our preamble and make it available to all our LaTeX projects that use that particular preamble, you need only commit these changes to the Git repository where your preamble lives.

For more information about git submodules, see this tutorial.

Cuil Not So Cool

So I tried out cuil, the search engine founded by former Google employees that is meant to give more relevant returns by doing a semantic analysis of webpages. Meh. I tried several searches and none returned as reliable results as Google. I tried a couple vanity searches (natch), some research related searches, some searches for friends and acquaintances, some music searches. In each case, my target was on the first page of Google’s results, but rarely found at all by Cuil and, when found, buried in page after page of extraneous results. That is when the server was responding. Not a good showing on launch day for the semantic search engine.

Still maybe things will improve. I hope so. It would be good to have more, and different, research tools on the web. The question is will they survive the ill will generated from a wobbly first day long enough to improve things.

Update: Here is the BBC’s take, and Language Log’s.

BitBucket

BitBucket is providing mercurial hosting:

Bitbucket is a place for you and your team to host and follow your Mercurial projects. Mercurial is a so-called DVCS, or Distributed Version Control System, a new paradigm in version control, rapidly substituting the likes of Subversion and CVS.

We have plans for several purposes, including an extremely generous free plan. If you want to host an open source project with us, we are happy to grant sponsorships and give out free professional plans. We rely on open source software, and are always happy to give something back to the community!

The screenshots they provide make the site look very similar to GitHub—even down to the coloring of the diffs. If mercurial is your distributed version control of choice, you might check them out.

Philosophy Feeds

As promised links to philosophy feeds. The list is not exhaustive and there are some gaps. Cambridge journals have not been included since the feeds seem only to be available to individual subscribers and not institutional subscribers. If there are any additions you would like please let me know and I will update the list. Eventually I will provide a stable page for these links, until then you can download the opml file or follow these links:

Git Resource

Scott Chacon is maintaining this site, a useful compendium of git resources.

Dumbing down LaTeX

Reed College offers advice on how to make LaTeX look like Word.

My reaction.

Wordle

Wordle is a web service that generates word clouds from submitted text. Here are a couple of examples. The first is from my paper “Color Pluralism”:

The second is from my paper “Respecting Value”:

Too fun =)

The Gist of LaTeX

GitHub has just launched Gist, a Git driven pastebin service. It is very handy to have a lightweight public (or private) repository. From the GitHub blog (see also here), Bryan Liles demos Gist:


BryanL demos Gist: A Super Hot Pastebin from Bryan Liles on Vimeo.

In the spirit of sharing, I have posted my LaTeX preamble and associated files. Feel free to download or clone these files, or better yet, post your own!

It is useful to independently maintain any LaTeX preambles you may use. Suppose, for example, you discover some need and make a corresponding change to your preamble. You might want that change available to some of your other LaTeX documents. Next time I will explain how to do this with include statements and git submodules.

Typographic Snoot Gone Gangsta

From the rut—typographic snoot gone gangsta: This cartoon wrote a sweary word on your toilet wall.

Markdown Plugin for Eclipse

Daniel Winterstein has just released a new version of his Markdown plugin for Eclipse. From the Markdown mailing list:

There’s syntax highlighting, a preview window, and it can export to html. The best feature is the document outline, which is a joy for editing large documents. Plus you can use TODO tags and these get picked up as tasks, and an emacs-style text formatting tool.

If IDEs are your thing and you are using Eclipse, you might want to check it out.

Desktop Curtain

As a quick test of ScreenFlow, I put together this screencast explaining how the interaction of Desktop Curtain and Exposé can fruitfully exploited.


Desktop Curtain from PhilGeek on Vimeo.