Tim Cameron Ryan

Programmer / UX/Website Developer / Designer from the Boston area. Student at Olin College of Engineering, Needham.

You can reach me at contact@timcameronryan.com.

  • Content
    • Programming
    • Photos
    • Videos
    • Artwork
    • Music
  • Social
    • Twitter
    • LinkedIn
  • About
    • Resume
    • Contact
  • Dynamic Language Compilation on the JVM

    CoffeeScript is my favorite toy language at the moment. It’s a syntatically light preprocessor to JavaScript, influenced by Python and Ruby languages to expose the niceties of JS’s loose typing and lambdas without gaudy vars and (function () { ... })s littering your code. Once you start using its comprehensions and loop structures… it’s hard to go back to scripting Java-inspired syntax on the web.

    Perhaps what I enjoy most about Coffee is that it is a) still in development and b) isn’t bound by reference implementations, host objects, or committees; it simply defines a meta-syntax for getting stuff done. And for that reason, we can abuse it to do horrible, horrible things. Like compile it to vanilla Java source code. ;)

    A demonstration of this is Mug: A CoffeeScript-to-Java Compiler. (Cause it’s a coffee container. You’re drowning in wit.) It can take a subset of CoffeeScript code and compile it to valid (albeit gaudy) Java source. Mug is a static compiler, and the result—however verbose—is 1:1 with its input, accompanied by some generated structs and scope objects. The compiler maps dynamic property calls to hash-map style calls, and attempts to make explicit conversions between types. Some rough benchmarks: the compiled Java implementation runs about ~3-4x slower than V8 on my machine, but ~7x faster than Rhino, while still maintaining the flexibility of a dynamic language.

    We owe a lot to the HotSpot JIT for this speed. A post detailing JRuby and the dynamic nature of the JVM by Charles Nutter, JRuby lead developer, details how at a bytecode level, the JVM isn’t really that picky about static typing. And while Mug takes the lowest-common denominator approach (everything is an Object and every method call is named invoke), there’s no reason we couldn’t manipulate this at the bytecode-level and remove some boilerplate from the JVM.

    While Mug’s just a side project, dynamic languages on the JVM are legitimate, with JRuby, Jython, and even Rhino demonstrating that you don’t have to be Java to take advantage of the ubiquity of the JVM. Why not start your own?

    Posted at 6:56 am on June 14, 2010

  • Passion Pit Pursuits

    Olin has these nifty things called “Passionate Pursuits” where you get to take an (essentially) one-credit course per semester on a topic of your choosing. For example:

    • Ice Skating
    • Pottery
    • Clay Shooting
    • Glassblowing
    • Piano lessons
    • Slam poetry
    • Cooking for Singles

    …you get the idea. You write up a proposal and get it approved though the Passionate Pursuits Board. You can even get funding, up to about $200, for lessons or equipment. It’s pretty ballin’.

    Naturally Olin classes are workload enough and I’ve put it off first semester. But half-semester classes having just ended, I decided that starting a Passionate Pursuit midway through a semester (despite doubling the number of hours per week I’d need to work at it) would be better than nothing. I decided, ultimately, a good use of my time would be guitar lessons, since it’s been on my To-Do list for years.

    Of course, the very week applications are due, I discover there’s no funding left. I’m left in the same boat as every other-last minute applicant. Whoops.

    …until I realize, wait, I already have a guitar.

    …and I already have lessons. It’s the Internet.

    So paperwork be damned, I’m going to learn how to play guitar by summer. Just like Facebook, it needn’t be written down to still be official. (gg.)

    Don’t you hate it when the only thing holding you back is thinking you need a reason?

    Posted at 11:31 pm on March 10, 2010

  • LOAD "*",8,1

    Any professional web presence demands your wordly thoughts be serialized in words!

    But what I really want, is to serialize my wordy thoughts into worlds.

    Posted at 8:56 pm on March 2, 2010

© 2005–2010 (We're Not Hackers)