Latin
Vacation, Week I, So Far: Textmate for Latin Students
So far this first week of vacation has been used, as Lauren astutely noted, as, effectively, study hall. This weekend was largely spent preparing for my Latin probatio on Tuesday. The good news is that I managed to catch up on all the optional exercises in the back of my Wheelock’s and I had an interesting opportunity to learn more about extending Textmate.
I have discussed elsewhere the power curve of the editor emacs versus vim, but think that Textmate may have hit the sweet spot in terms of writing extensions.
Extension 1: Writing Macrons
While I had earlier posted about my joy of finding a keyboard map which would allow me to enter macron-ized vowels with Option + Vowel, I found this to me a very straining key combination on my keyboard. It’s not that easy to hook a thumb under to hit option plus a vowel.
Thanks to my crazy remapped keyboard, where Control is where Caps Lock is, I was able to remap Control + Vowel -> Macronized Vowel. This is a much better typing arrangement ( try it: Push caps lock plus a/e/i/o/u ). Even nicer is that on a Dvorak keyboard, all of these combinations can be hit with the left hand solely.
While this may be nifty, you say, I can say that it’s even niftier because I was able to scope the effectiveness of these bindings to be within certain types of documents. While emacs and vim certainly both support this feature it was incredibly easy to implement in Textmate. I simply scoped this command set to be within the text.html scope and it was carried into text.html.markdown ( an HTML shorthand ) text.html.textile and good old text.html itself. This is huge, huge, huge. This means that when editing PHP or Perl code Control + “e” or macronized-e reverts to its default setting of “end of line”. Very handy.
{ Aside: Astute readers may note that by assigning Ctrl+e to be macron I lost a handy mnemonic key-binding for go-to-end-of-line. I did, in fact. I have remedied this by adding, in that same scope Control + “]” as a replacement and that’s worked out pretty well so far. }
##Extension 2: Speaking of Markdown
So key bindings and scoping may not be that big of a deal to you, but it was a huge step forward to me. Further, modal text editing is not something particularly foreign to vim or emacs. However, I had a few needs come up that would have been hairy to add in Vim’s scripting language, but that were incredibly easy to add with Textmate.
###Ascii Table
Often when answering the questions in the back of Wheelock the question takes the form of:
- Identify the personal endings of the future and imperfect tenses of the first two conjugations. 1) -o 2)-s 3)….
Obviously, constructing the answer in a table would be preferable with column headings being the given number, the given ending, the identification / the translation / etc. But the code for entering an HTML table is, while simple, a bit of a pain to enter. It’s very tag-heavy. Textmate has not done the best job of making this process easier.
In the php-markdown-plus wordpress extension, suppotr was added for Ascii tables. Why this hasn’t been added for the Markdown master code base I have no idea.
####Step 1: Create columns
There were six rows of data. Add plus one for the headers.
ruby -e ‘7.times{puts “|”}’
I type into textmate and push Ctrl+R. I get this:
|
|
|
|
|
|
|
Textmate just let me type a Ruby one-liner into the text, hit Control R and insert the text. Not too shabby.
####Step 2: Fill in the table headers:
|person|imperfect|future|
|
|
|
|
|
|
####Step 3: Let’s fill in the given persons…
|person|imperfect|future|
|1st sg
|2nd sg
|3rd sg
|1st pl
|2nd pl
|3rd pl
Now it would be a pain to closs off all the row definitions with “|” by hand. I could use a search and replace expression like “s#$#|#g” on the highlighted range, but I wrote a simple key-binding to do that search and replace for me. I saved this add on into a bundle I created ( HTML Editing for Latin Students ) and voilá. Thus i hi-lit the section, control + | and…
####Step 4: Close off newly-added column
|person|imperfect|future|
|1st sg|
|2nd sg|
|3rd sg|
|1st pl|
|2nd pl|
|3rd pl|
Now I needed to fill in the subsequent columns…I use control +n to go to the next line so that I don’t have to use the mouse or the arrow keys. It makes the vertical editing task much easier. This is an emacs convention. I close the process off with Control + | again.
####Step 5: Finish off the table
|person|imperfect|future|
|1st sg|bam|
|2nd sg|bas|
|3rd sg|bat|
|1st pl|bamus|
|2nd pl|batis|
|3rd pl|bant|
and the future…
|person|imperfect|future|
|1st sg|bam|b?|
|2nd sg|bas|bis|
|3rd sg|bat|bit|
|1st pl|bamus|bimus|
|2nd pl|batis|bitis|
|3rd pl|bant|bunt|
Now, to my eye, this is an intelligible table. Nevertheless, I will need to convert this to an HTML table as Markdown doesn’t natively support this conversion. Now, if I were in emacs here, I’d need to break out some eLisp code. In vim I’d have to go through the hell of using the scripting metalanguage. With Textmate, I just write a ruby script and then paste that in ( it’s pasted after the jump ) and then bound that to a key-binding. Thus I have “Turn Ascii table into HTML” bound to Command-Option-T
<table border="0" cellspacing="5" cellpadding="5" style="">
<tr>
<th>person</th>
<th>imperfect</th>
<th>future</th>
</tr>
<tr>
<td>1st sg</td>
<td>bam</td>
<td>b?</td>
</tr>
<tr>
...
</table>
And that was incredibly handy.
###Make styling with CSS easy
One of the things that made me choose HTML for my language of typing was the ease of styling. Per standard didactic purposes, there will be translation sections in exercises. I wanted to style the “given” one way and the answers another. Again, Textmate to the rescue.
Add a tab-trigger.
Typing: “pgiv(tab)”
<p class="sent_given">. </p>
I type a number (say, 11) then hit tab again and I’m inside the tag, typing the given.
Typing “pans(tab)”
<p class="sent_answer"></p>
Similar, but for answers. As both of these <p>-tag elements have classes associated with them, I can format them with CSS to get the look I want. Simple.
But wait, there’s more.
Doing ‘pans’ and ‘pgiv’ is inefficient. How about I type all the sentences at once, in paragraph form, start the paragraph with the question number to start at, and then have each of those set up as <p> tags with the “given” class associated with them?
11. This is sentence one. This is sentence two. This is sentences three.
Highlight run through Ruby script I added called “Line-ify as Given sentences..”
<p class="sent_given">11. This is sentence one.</p>
<p class="sent_given">12. This is sentence two.</p>
<p class="sent_given">13. This is sentence three.</p>
I’ve added other features like a corrections binding (corr-tab) to produce a span elemnent that’s colored red so that I can annotate errors, but I’ll stop here. You get the idea.
Textmate: Pretty, easy to extend with scripting languages you already know to key bindings you want in such a way that you don’t obliterate key bindings you don’t want to lose.
###Conclusion
I’ve been so impressed by the power of Textmate in the regard of making HTML so much easier to generate, that I’m thinking about extending these features to LaTeX to get the beautiful formatting power latent there. I hopes this has helped you see that Textmate isn’t just a wonderful editor for code-hackers, it’s great for classicists as well!
We must be living through the end of our Empire
On the Internet, things that are lost are occasionally regain’d
Week 2 of "Not Working"
End of the Semester
Latin I Test collection
Catch-up
[Ruby][Latin] Forget how to construct your passive voice indicative verbs in Latin? Ruby to rescue.
What language should my kids take?
I have created a Latin Web Site
[Ruby] Continued work around Latin Verb Conjugation Code
[Ruby] A tool to convert LaTeX-style macrons to macron characters, html entities, or UTF-8 escape codes
[Rails] [LaTeX] [Latin] Conjugate Verbs Fully* in Latin with Ruby
O Memnosyne!
Bliss Looks Like...
Procrasti-studying: Yak Shaving by another name
Nihil dicere
Latin II: Epic Win
Finished "I, CLAVDIVS"
Life, not blogging
LatinIRB
Product Announcement
Completionist OCD strikes again
The stunning brilliance that was Sir Isaac Newton
A Funny Thing Happened on the Way to the Forum
Presentation from Lone Star Ruby Conf V
Translating Giordano Bruno
Study Latin to Become a Better Programmer
This is a post I had sitting in my drafts folder, uhm, for about 2 years. I’m fishing it out now because I’m a completionist masochist.
A friend forwarded on to me this post entitled: “Don’t study latin if you want to become a better programmer” by Daniel Lemire, professor of Computer Science at the University of Quebec. His piece questions the wisdom of teaching Latin as a means of creating a better programmer. As a lover of the Classical world, Latin student, programmer, and teacher of programming, I found myself disagreeing with his conclusion: in my programming practice I definitely recognized competencies learned while studying Latin resurfacing again and again. I believe Lemire is missing some nuance to his description of learning and I think that they might explain how we come to different conclusions. Let me start with a usage where I agree with Lemire.
I Program, Should I Learn Latin to Get Better?
Let’s start with the obvious case. If you are, say, learning Python and then one fine day you think: “My goodness, I’d like to be better at this” and your solution is “I’m going to go buy a copy of Wheelock’s Latin and get to it,” you’re probably choosing a sub-optimal strategy. Your time would be better spent at one of the following
- Writing Python
- Reading Python
- Finding a Python mentor / meet-up, etc.
While I agree that there are individuals who, upon learning Latin with some background in programming probably found some way to have it drive their programming acumen forward — say, by writing a RubyGem ;) — this is probably a vanishingly small amount and not something I’d recommend as a general rule.
So let me concede the obvious use of this utterance and agree that you should not do task Y to become better at task X. However, I don’t think this is what the author’s post was intending to analyze. My interpretation of his post is that since he “believe[s] that knowledge is only weakly transferable, …[he favours] practical skills that are immediately useful.” And here’s where I think his model loses some of its nuanced understanding of learning and thus becomes less compelling.
Does Latin Study Contribute to Learning Programming More Easily?
I believe that there are transferable skills that come from broad-based learning and that they are worth the time and the effort of acquiring.
Specifically broad-based topics that train, enhance or instill facility with metacognitive competencies do transfer well to other studies. I would contend that learning Latin tends to force its students to acquire a series of metacognitive competencies that would prove highly useful in learning to program (a raw skill) and learning to be a programmer (a set of behaviors).
Is it guaranteed that other “practical, immediately useful” skills such as Karate or swimming would fail to offer these learnings — certainly not! And I should hope that learners of all ages and all disciplines experience the joy of finding these metacognitive competencies in new nooks and crannies as they learn more about their world. For me, that’s quite possibly the best part of learning and, as I approach mid-age, one of the great advantages I have in learning material over a 16 year old: I know that I have a battle-tested series of competencies that allow me to ascertain, interpret, and integrate learning in a way such that new facts feel natural versus foreign objects that must be toted about.
Nevertheless, I believe that the pedagogy of Latin has something special to it: something instructs both moral character (the noble sentiments of the ancients) as well as intellectual character, its metacognitive competencies. There’s a reason, after all, that the archetypal “teacher molds the mind of a future generation and is never forgotten” movie is Mr. Chips and Latin, long before Keating taught poetry in “Dead Poets Society” or Escalante taught calculus in Los Angeles in “Stand and Deliver.”
Let me try to list a few of these competencies.
Latin
Teatro Nuovo at the Church of the Heavenly Rest
Last week our neighbor invited Lauren and I to attend a performance by Teatro Nuovo at the fabulous Gothic, Episcopal Church of The Heavenly Rest on 5th of a restoration of a symphony by Donizetti and Rossini’s “Stabat Mater” (“The mother was standing”).
It had been a hot day so it was wonderful to arrive at the church and be welcomed into cool shade. We were lucky to hear introductory remarks by Mr. Gabriel Dotto, a scholar of Italian opera.
I was unacquainted with Donizetti, but found this symphonic piece to be very compelling and remarkably well-done. The fourth movement had not had its orchestration completed and, as part of the revival, was restored by scholar and our maestro, Will Crutchfield.
Queen Elizabeth, Latin Translator
Epic Manliness
In 2008, I took the “Æneid” class at the University of Texas. It was a great class where we used Clyde Pharr’s student edition of the text for the course. In one of annotations, I found one of the most fascinating descriptions of ancient masculinity I have ever read:
- frigiore: chilly fear; the ancient heroes were not ashamed to display their emotions, and often gave way to terror or grief. They weep copiously on occasion, and are no more dainty about the shedding of tears than the shedding of blood