Yomichan Update

Wednesday, December 24, 2014

As I'm spending more and more time enjoying Japanese novels, I've decided to purchase one of the newer models of the Amazon Kindle e-book reader. The price point was quite reasonable, and I was really looking forward to using the built-in dictionary functionality. In practice, although the dictionary does have some serious limitations (notably it does not handle Japanese deinflection), it keeps track of the words that were looked up for future review. I was happy to discover that the vocabulary is stored inside a simple sqlite3 database, which is easily accessible through Python.

With these facts in mind, I decided to add word list importing to Yomichan. I wanted to have the ability to automatically import the vocabulary and Kanji that I encountered while reading on the Kindle into Anki just like when using Yomichan directly. The result was me releasing a new version of this Anki extension (version 0.14b). In addition to this new vocabulary/Kanji import feature, there are a couple of smaller changes which were not significant enough to warrant a release by themselves:

Writing My First Vim Extension

Sunday, December 07, 2014

Although I have been using Vim on a daily basis for several years now, I have avoided Viml (this Vim scripting language) like the plague. The idea of having to learn a new programming language just to make some customizations to a text editor did not seem appealing to me at first. With that being said, upon thinking about it more I realized that learning to customize Vim on deeper level is really a time investment in a tool that I will continue using for many years to come.

Even though there are Vim extensions written for nearly every situation, I could not find one that wraps and unwraps function arguments to my satisfaction. There is a module with similar functionality available on GitHub titled argumentrewrap, but I found it lacking as it does not allow the unwrapping of arguments and periodically spews errors during normal use (but I appreciate the effort). Before going further, I should probably explain what exactly I want to be able to do.

Basically, I want to take a definition that looks like this:

Foo(wibble, wobble, wubble)

And automatically turn it into this:


After spending the better part of a week reading online tutorials and Vim documentation, I wrote what I feel is a "correct" implementation titled argwrap.vim. Although there were various caveats in the Vim scripting language that I ended up getting snagged by (such as strings auto-converting to zero), I was pleasantly surprised that Viml wasn't as terrible of a programming language as I had imagined it to be. It actually has a lot in common with languages such as Python and JavaScript (particularly with respect to arrays and dictionaries).

The following sites are good reference materials for those who want to dive into Vim scripting themselves:

Updating Projects

Friday, October 24, 2014

I'm currently in the process of updating the projects section of this site to include some of the older applications that I developed in the past but am no longer maintaining. Even though they were written quite a long time ago, they are interesting from a historical point of view and are sometimes useful as reference. The newly added projects are:

Enoshima Fireworks

 Sunday, October 19, 2014

Firework shows in Japan tend to be very crowded; if you want to have any chance to sit down at all, you have to arrive several hours in advance. Last night we went to one in Enoshima, a local tourist spot within cycling distance of Shonandai. This was fortunate, as trying to get on the same train as everyone else to go back home can be a challenge. I took some pictures of the fireworks during the show, which lasted about 45 minutes. As most of these shows happen during the summer, it is likely that this is was the last chance to see fireworks this year.

Thoughts on the TOEIC

Saturday, October 18, 2014

Seeing as the TOEIC (Test of English for International Communication) is all the rage here in Japan amongst professionals and seeing that my girlfriend is studying to improve her score on it, I decided to see what kind of challenge it would present to a semi-native speaker of the English language.

Although I have never taken it, the TOEIC is considered to be easier than its cousin the TOEFL (Test of English is a Foreign Language). Unlike the TOEFL, which is said to focus on skills needed in everyday conversation, the TOEIC is supposed to be all about "Business English" (read: Dilbert English). This is somewhat counter-intuitive as I would expect the English used in a corporate environment to be more difficult to master for foreign speakers than the casual expressions and vocabulary we use everyday.

The test consists of 200 questions total, divided evenly into listening and reading sections, and takes two hours to complete. The difficulty of questions varies a lot, but for the most part it did not pose a significant challenge and I was able to complete it with about half an hour to spare. My final score was 100/100 on listening and 97/100 on the reading sections; this translates to an overall score of 980 out of a possible 990.

While two of the mistakes I made were due to lack of concentration, one reason for the last error remains hard to grasp:

The plans are motivated by increased demand for Dixon products in several
markets. In addition to the Slough facility, Dixon has a smaller production
plant in Cardiff, Wales, where a similar project commenced early last year.
The work at Cardiff ______ within seven months.

A. has been completed
B. will be completed
C. was completed
D. will have been completed

The correct answer is C, but the reason for why the other options (especially A and B) are incorrect remains unclear to me. This goes to show that textbook grammar is not something that even native speakers can treat lightly.