Sunday, November 30, 2008

November school and research review

(I've decided to write a month in review for every month, to chart my progress in research and learning)

This month has been the month where I have really gotten down and dirty in the canon of programming language theory readings. Starting off with fairly little background in formal theory, i've worked up through Chapter 23 in TAPL which is approximately through the basics of pure System F (parametric polymorphism, or "generics" for you object oriented people). I'm no longer scared of small-step derivation rules in papers, although my chance of understanding everything is still fairly low.

Along the research front, things have rotated a bit, but overall little has been accomplished. We have decided to use a XMPP client library and application as a simple demo of the programming style, but it's not as simple as I thought at first. This requires we have XML parsing (since all XMPP communications are XML-based), and it requires sockets (which have not yet been implemented). This is concurrent to a new implementation of message-passing and isolation in the component model, so going too far down the sockets road may lead to a lot of debugging of the underlying component primitives and will have to rewrite a lot.

I started to write a DOM library wrapper for XML for the standard library, but I have run into a number of roadblocks as to the best way to implement things beyond the ECMA standard DOM. We would like to use extractors to simplify the syntax for matching on XPath, and dealing with nodes abstractly- but this requires some hard architecture decisions on the interaction between Thorn code and Java code. This has been complicated by hard-to-find bugs in the existing pattern-matching/extractor implementation.

Ideally, we'd like to have integrated XPath/regex support as described in Matchete: Paths through the Pattern Matching Jungle. I think for now though, actually having literals is something that can be deferred until more important things (like sockets!) are in a usable state.

As far as a project in the Kobayashi-Sumii lab, I have yet to really make any firm decisions as far as what project i'll be working on. I do not have many choices (between things that look both interesting and comprehensible). Early on, this indecision was compounded by the fact that I didn't know any basic type theory, which is what most of their research builds on top of. Lately, I've just been too busy with Thorn stuff and other classes to lay down a judgement.

---

On the Japanese front, I have nearly conquered the Kanji/Vocabulary book (40 lessons, 10 kanji and ~40 vocab per chapter). This has given me and average Anki load of 300 cards per day, roughly 40-80 new per day, which in total takes usually two to three hours to pound out. The rewards, however, make this a very good use of time. While I certainly have come a long way in my ears being able to keep up with fast native speakers (primarily, undergraduates and researchers), the injection of over a thousand explicitly studied vocabulary has made it a lot easier for my brain to parse all that my ear is hearing.

On the whole, my weekly classes have been frustrating. I had a poor showing for my Coding theory midterm, mostly because the midterm's questions were asked in a highly matrix/linear algebra style, while most of the lectures focused on the intuitive meaning of hamming codes and such. Worse, since the exam is done, the teacher is now teaching the more common way of approaching coding theory, through linear algebra and encode/decode.

Fortunately, most of the rest are only frustrating and have good grades to offset that. Listening class in particular has one of the most vindictive, petty teachers I've had since high school. The other day, I got chewed out in the front of class for writing too long of answers on the dictation quiz.

---

In the last month, i've also applied for several scholarships, such as the CRA Outstanding Undergraduate Award and the Goldwater Scholarship. The CRA is more of a practice run for next year, but I am very anxious to find out how the Goldwater selection goes. I felt that I had a very strong application this year (especially compared to last year), and my advisors seemed likewise optimistic.

In preparation for applying to graduate school and marketing myself once again, I've started to update my resume, begin work on a CV, and fill in a new web page design. None of these have been uploaded yet, but I think it's important to have an informative and timely homepage, neither of which describes the current incarnation.

---

As I write this post next month, I will be on my first vacation in a year with Steph. We will be spending the new year in Tokyo, followed by a few days in Kyoto then a week in the Sendai area. I hope to get through the remainder of the TAPL book and some graduate typing papers, and be able to begin the second volume. On the research side, my goal is to have a clear role in one of the lab's projects, and to be improving on a basic implementation of an XMPP client library.

Saturday, November 29, 2008

Musical homelands and journeys


It occurred to me today that everyone has a musical homeland. Whenever you want to be comforted by the known, familiar songs, you can always refer back to these tunes. As they flow out of the headphone, you catch yourself banging the drum lines on the desk, bobbing your head in the fashion of a rocker, and feel at home.

Musical journeys are when you venture out from this comfortable, known and defined canon of songs. Perhaps you are venturing to the dark, incognito sounds of a grime/dubstep rave in the seedy corners of south London, without any bearings around you and a steady sharp hiss of the pirate radio. Time travel, alternate lifestyles, or sublime moods can define other musical voyages.

For me, the homeland has always been bands such as Radiohead, and other formative music from the long and cold years of high school senior year. Lately, my voyages have taken me all over the world, from hip-hop, dubs, breaks, jazz, soul, funk, and many uncategorizable but beautiful musical modes. Along with my geographic journeys in Japan, I hope to detail on my blog some of the musical journeys I've made.

Tuesday, November 25, 2008

Simple explanation of gradual typing

I found a page on Jeremy Siek's website that simply explains the basics of gradual type systems. So if you know just a little bit about programming, you can get an idea of what I may be working on in the next few months.

http://ece-www.colorado.edu/~siek/gradualtyping.html

Saturday, November 15, 2008

Equality March Roundup

Here's some of my favorites from the nationwide marriage equality pool on Flickr. (Sadly, such things are not relevant in Japan so I couldn't hold signs- I rather spent my November 15 drinking and bowling)

http://www.flickr.com/photos/intrinsicchaos/3033164375/
http://www.flickr.com/photos/intrinsicchaos/3033141835/
http://www.flickr.com/photos/intrinsicchaos/3033135337/
http://www.flickr.com/photos/adriannelacy/3033162321/
http://www.flickr.com/photos/adriannelacy/3033990662/
http://www.flickr.com/photos/edensembers/3033948698/
http://www.flickr.com/photos/edensembers/3033943652/

Opted to link to the pages, since I don't own the photos and this blog has enough embedded already.

Tuesday, November 11, 2008

Traversal in the wrong order


Lately, i've been pounding away at Types and Programming Languages, the canonical textbook for a grad-level programming languages class. While it is very thick and a bit of a challenge for independent study, it is definitely easier than trying to learn the content in Japanese. It occurred to me on the way home today that students at Purdue had to be learning this stuff too, since it is the basis for PL research, right?

Turns out Prof. Vitek (my research advisor at Purdue) is teaching the graduate-level programming langauges class at Purdue this semester. If only I could have taken that before coming over here, I wouldn't be dawdling in the dark with the finer points of the typed lambda calculus! I suppose I can still use the class slides, but without accompanying lecture it is sometimes hard to make heads or tails of the more tricky parts. Also, that class only goes halfway through the book, and has a more practical bent with topics such as concurrency and garbage collection (the latter no doubt a result of Filip Pizlo being the TA for the class).

Lately, i've being pushed by lab members at Tohoku to see what everyone else is doing and find a project. The problems are twofold: aside from the extroverts (who talk about their work all of the time!), its very hard to approach/interrupt other students for an impromptu presentation. This is complicated by the fact that I am at a total loss when you combine type theory and Japanese. Secondly, many of the projects just do not look that interesting. Either they are doing things which have already been done to death (timing attack prevention by types? check. safe deallocation in single-thread programs? check), things which seem purely academic, or are well beyond the scope of my current (limited) grasp of theory (higher-order recursion schemes, multi-stage calculi).

If I could simply postpone doing any real work for another month or two and catch up on System F, Pi Calculus, and similar base theory, I might actually have a chance to make some contribution (or at least have an intelligent if awkward conversation). Even if I join someone else's project, without such base theory, I won't really know what's going on anyway. Similarly, I need to be able to read and understand papers on gradual typing (and the long line of literature such papers stand upon) if I want to have a realistic chance of adapting it to Thorn's type system at Purdue.

Time for catching up on Japanese (especially technical and speaking experience) is similar, although it's a shame I can't stop the world from spinning away so I can catch up.

Saturday, November 8, 2008

Scholarly Update


I've spent the last week or two putting together my application for the Goldwater scholarship, and as of Friday 1PM EST, it was submitted through CS Advising office. This time around, I was a bit more stressed to finish the essay in time, but I actually had some good ideas.

The essay part of the Goldwater application is 2 pages, 11pt font or larger, with the purpose of you telling the reviewers something that you would like to research. Typically in this spot, you are supposed to implicitly talk about the research you've already done, the people you've collaborated with, and a new project you want to undertake. I simply wrote about Gradual Typing for Thorn, added a handful of references, and had a well-researched essay done! The best part is that this "research proposal in an essay" can also serve as a blueprint for my research projects this semester (and perhaps beyond?).

Some people may wonder if the irony is lost on me, for a queer liberal to be applying for the Goldwater scholarship, the namesake of which is after Senator Barry Goldwater, "Mr Conservative" and the hero of the modern conservative movement. Why would I have the audacity to list "Queer Student Union" in my leadership and community section?

Well, last year I was afraid of this too. Then I discovered this old-school gem. No more worries, because Goldwater predates the religious right, and is more of a libertarian. He went so far as to be a gay rights activist in 1994 (he left public life in 1996 after a massive stroke). I guess I can fit into this scholarship foundation's ideals after all :)

Saturday, November 1, 2008

How do Japanese classes compare?


When I was just a mere Sophomore, I had heard many differing rumors as to the structure and difficulty of the major curriculum courses in Japan. Advisors were afraid of me bombing out, and people who had been there were telling me it was the longest vacation I'll ever have. Here's my take, a month into the semester.

The typical course format at Tohoku University is a 90-minute lecture, which meets once a week. Typically the division of grades is along the lines of 20% attendance, participation, and reports, and 80% decided by the final exam. The idea of a report here is that you write an essay near the end of the semester to summarize what you had learned. In many classes, there is little to no homework, and textbooks are almost always optional in classes that do not involve reading comprehension.

The lecture style is more similar to that of Purdue; technical classes are dominated by Powerpoint presentations and overheads, while language classes and the like are very handout/worksheet-oriented. Unlike at Purdue, I appreciate presentation slides here because it is much easier for me to decipher a slide with kanji than to struggle to decode high-velocity Japanese lecturing. There is also a very minimal amount of interaction; most of it takes form of randomly calling out students to answer quick comprehension check questions.

As for the individual classes, i'll summarize quickly here.
  • Japanese grammar class (level 3): Almost entirely review, so I do not have to pay much attention in this class. There's a weekly worksheet, which I can easily do over coffee the morning its due while half asleep. Still, they cover more variations and subleties than grammar class at Purdue, and it forces you to learn the boring parts. Nobody likes to study alone out of a grammar book.
  • Japanese listening/dictation class (level 3): The teacher in this class is a huge drama queen, and routinely fusses about tiny mistakes and gets annoyed when students don't know the answer. Thankfully there is no homework, and the reward is also good: almost every class I walk out, muttering "so THAT'S what they said that one time.."
  • Japanese reading class (level 3): I went to this class one time, and it was not a very good use of my time. They used a lower-level reading book, and spent the whole 90 minute lecture on a passage that I could read on my own in 5-10 minutes, at the most.
  • Technical Japanese III: This is among my favorite classes, mostly because there is no attendance, grades, or even registration. It is held by the Engineering school's international office, and covers technical Japanese. The best part is the class size: the most that have ever been in this class at once is 5 students including myself. Essentially, a 90 minute free tutoring session.
  • Artificial Intelligence: Very slow, so I usually just doodle in my notebook, study kanji on my phone, or similar things. I even have the option to take the final in English, so as long as I keep up in the english textbook I'll be totally fine.
  • Coding Theory: This class is the wildcard, because I have no background at all in it. Okay, that's a lie: I haven't learned anything yet, because all of it was covered in the ECE270 (Digital Design) textbook's first two chapters. I think eventually though it will get hard, as I'll have to parse the Japanese to get further ahead in the material. Thankfully the slides are online and free :)
One thing I noticed in the Computer Science classes is that it takes a lot more words to explain technical concepts in Japanese. Probably on the order of 1.5x as many. This is to my advantage, because I have about 5 chances to understand what they are explaining due to the repetition. (Perhaps it doesn't actually take that long, but they have to repeat themselves to wake up the ever-sleepy undergraduate students).

All in all, I'm able to concentrate on more important things (like research! and foundation reading!) to a much greater extent than at Purdue. I think I will enjoy this "intellectual vacation".. in that I will be freed from the enormous time sink that i'm strapped into at Purdue.