Mirah Office Hours

July 25th, 2011

Mirah Office Hours Prep Jul 24th 2011 I had my regular Mirah office hours on Sunday.

This week I focused on getting all the tests passing for the patches that were merged earlier in the week, which were among the things that fell out of this big thread on the mailing list. One of the other things was that a number of people became collaborators on the repository (like me :D).

When trying to get tests working, I ran into some issues with JRuby and NailGun. RVM latest starts up a nailgun server by default when using JRuby, which is cool because it’s faster, but I had some problems. Essentially, Mirah’s compile scripts were attempting to run in NailGun’s home directory, which didn’t work very well…

I fixed it by setting JRUBY_OPT=””, which told JRuby not to send requests to NailGun. Better would be to chmod -x .rvm/hooks/after_use_jruby, which would additionally avoid starting a NailGun server. The best thing would be to figure out what happened and fix it in JRuby’s NailGun integration. Unfortunately, after I got Mirah’s test suite working, I couldn’t reproduce the issue with NailGun reenabled.

In the end, I got all the tests passing except the one for the new loop macro, which still has an inference error.

The new addition of a top_level? method on AST nodes cleaned things up pretty nicely by not requiring a script class unless there are things defined in the top level scope. Most of my changes dealt with that–fewer classes were generated out of the compiled code (commit).

I had fun fixing things, even though it was frustrating that I couldn’t get to the more interesting things I wanted to work on (closures, Dubious, Shatner). Maybe I’ll get to them on my next set of office hours.

Brewed Some Beer On Saturday

May 19th, 2011

Brewed my second batch of homebrew ever. It was the same bbq wit as before, with fresher spices. I’m hoping it turns out as awesomely as the first batch. The second batch is harder though because sanitizing becomes that much more important. I’ll know in a week and a half.

I followed the basic outline for brewing an extract beer from beerdude, which worked really well last time.

Here’s it steeping some grain.

Summer BBQ Wit II: A New Beginning

Mirah Talk at Boulder Ruby Group

May 18th, 2011

Tonight I spoke about Mirah at Boulder Ruby Group. It went well and people had a lot of good questions for me. I found answering questions about Mirah to be really fun, especially now that I’m starting to get a better handle on the language and tool chain.

Here’s my slides.

Links

Rails BugMash This Saturday

May 6th, 2011

@_prakash and I are hosting a Rails BugMash at Gnip’s offices from 11-5. Hopefully it will be a lot of fun and we’ll mash some bugs. Squash them even. More seriously, it’s a good way to get involved with open source by getting together with a group of friendly people who know something about contributing or are interesting learning about it.

It’s registered on plancast at http://plancast.com/p/4yvw

You can read more about how bug mashes have been done in the past at RailsBridge’s Wiki page on them. Rails’ own contrib guide is also a fairly good resource for getting started.

Zounds!

See everybody tomorrow.

Mountain West Ruby Conf

March 22nd, 2011

Badge & Breakfast

Mountain West Ruby Conf last week rocked. It was well organized as always–props to Mike Moore(@blowmage) for putting it together and Confreaks for recording it and all the other people who made it the awesome conf that I like coming to every year(e.g. Jeremy Nicoll-Smashing Photographer).

CHE-UP my friends.

More seriously, Zed’s talk made me think more carefully about my open source contributions in terms of who benefits from my work. Am I just a sucker for working on stuff like Dubious or am I just doing it because I find it interesting and engaging. I think he crafted a really good talk and a good meme(CHE-UP) and made a good point about being aware of the motivations behind projects you contribute to. Now I just need to find some suckers/contributors to help me with my plans for world domination ;).

Mind Monkey Patching

David Brady’s talk about head hacking reminded me that I need to finish Pragmatic Thinking & Learning, a good book I’ve been reading off and on for more than 6 months now. I need to try using that crazy cat picture (the one with too many eyes) to trigger hardware interrupts at interesting times. Might be fun.

“Web” Development

Wayne Seguin’s talk was very topical as MWRC is my favorite conference to meet new and interesting Rubyists. I feel like I did some definite “web” development while I was there. I met new people and spent more time getting to know better some of the people in the community I’d met at other conferences.

I came away from the talk feeling inspired to do more looking at teaching and mentoring, something I looked at a little at RubyConf.

Concurrency

Concurrency was a big theme at the conference with Ilya Grigorick talking about more advanced concurrency models, and Preston Lee presenting about using the GPU and CUDA to solve embarrassingly parallel problems.

Ilya talked about the Actor model, which Erlang uses as well as Pi-Calculus/CSP which is what Go uses. Both deal with concurrency by providing constraints on what you can do within them. Interestingly, their constraints are very similar, but have different abstractions with regard to what is named.

In the Actor model,

  1. Name every process
  2. Every process has a mailbox
  3. Communicate via messages

In the CSP,

  1. Processes are anonymous
  2. Every channel has a name
  3. Processes communicate over channels

He wrote a gem that acts like CSP called agent

 

5K

I ran in the 5k. I slept through it last year and decided that I had to do it this year. There were 13 of us. It was very dramatic.

Rounding the last corner

Rounding the last corner (pic by smashingshots.com)

I think I was last.

Mirah & Dubious

Mirah and Dubious were represented. I did a lightning talk on Dubious Thursday and Joe O’Brien showed off what is going on with Pindah as part of his Ruby on Android talk. I got to introduce a few people to Mirah and Dubious which was pretty cool. It seems like people are getting more interested in Mirah and projects written in it, which I think is pretty awesome.

Some other thoughts

Redis is a pretty cool project that I’d like to look at more than I have.

Wood cuts make for nifty slides.

Figs are killer.

 

Thanks again everybody for a great conference.

 

 

 

It’s That Time of Year Again: Mountain West Ruby Conf Time.

March 15th, 2011

I’m going to Mountain West Ruby Conf again this year. The talks look great, the venue, as always is awesome and this year I might even run the 5k(in my VFFs of course).

I’m hoping to get some hacking done on Dubious and introduce some more people to it. You can do some really cool things with it, even in its current, limited state, and I’d like to see it played with and used more.

If you see me there, I’ll probably be wearing my black fedora and sporting a nice beard. Not as big as last year’s though(exhibit A).

Matz & me at last year's MWRC
Matz & me at last year’s MWRC

Snowshoeing With Dog near Brainard Lake

March 2nd, 2011

The Dog and I in Our Snow Shoes
Sara and the dog and I went snowshoeing last Sunday near Brainard Lake. The day started out really windy and I was worried it would be even worse on the trail. Getting to the trailhead confirmed my worries. The wind blew hard and the snow around the parking lot was contoured into low drifts.

It was windy and cold and we were worried that once we got our ‘shoes on and started up the trail that it was going to royally suck. I’d read that the way to the lake went along the road in my trail book and I figured that we’d be exposed to the wind the whole time.

But after we got out of the parking lot, we found the start of the snowshoeing trail somewhat hidden behind the the big map of the area, going up into the trees. Once we got into the trees we were protected from the wind. The trail itself wasn’t too bad, though it did get steep in a few places.

There were a fair number of cars parked at the trail head and we were worried that we’d run into a lot of people. Once we were on the trail though, we didn’t see many at all. I guess because there were enough different trails to take people just spread out.

In the end we didn’t make it to the lake, only about half way. We did however, successfully test our new snowshoes and Ada’s new boots. I’m not sure she liked them, but they did stay on pretty well as far as that goes.

If you’re going to go, you might want to check out the nearby  Snow levels.


Map

View Larger Map

JRuby, Can’t Find File in Classpath (You Needed a Slash, in

January 10th, 2011

Update: this is no longer valid as of the release of 1.6.0.

I was debugging this Dubious problem where a class I was sure was on the class path couldn’t be found(link). First, I tried compiling on my local checkout, and it worked oddly. Then I realized I was dumb, because the class was being picked up from the finished jar. So, I clobbered my build artifacts and then my local copy didn’t compile either.

I did some digging and found out why.

In the end it was because of how JRuby implements $CLASSPATH–the way you can modify the classpath from within JRuby. JRuby uses a subclass of URLClassLoader to implement it which gives it some possibly unexpected behavior. In particular, URLClassLoader treats anything that does not end in a slash as a jar. That’s why the class files in my build directory were not being picked up properly.

Lessons Learned:

Combat “It Works on My Machine™”. Clobber local generated files every now and again, and checkout a fresh tree from time to time to reduce the chance something local is weird.

Look for and ask for help when you don’t know something. First time I tried to figure out the problem, I just tinkered and compiled and tinkered and compiled. A little research would have saved some time.

TL;DR

If JRuby can’t find your classes and you think they should have been added to $CLASSPATH, make sure you have trailing slashes on your directory names.

Update:

This has actually been fixed, but not released yet: https://github.com/jruby/jruby/commit/8740a6b3ea946a1442dd7fa833aed3c30d82e23f

Cupping It Up at The Cup

November 22nd, 2010

I brought my cup to The Cup, so I could drink my cup of latte from The
Cup
in my own cup that I got from the Museum of Science and
Industry
. It’s got the periodic table on it. I fancy it looks quite spiffy.

2010-10-29_14-38-23_921

Food of the Last Few Weeks

November 21st, 2010

Cook’s Illustrated, who I have a love-hate relationship with, has a
seriously awesome cookie recipe. Just look at these suckers.

Cookies In Rows

Sara made these a while back and they turned out so good, we had to
make a second batch. I took it to work. Sorry, I don’t have any pics
of the bounty there–the morsels were eaten too quickly. Here’s the
best I can do:

Cookies, Eaten

I roasted some venison, which turned out a bit bloody and was too gamey
for Sara. But me and the dog liked it a lot. I really like roasting
things; I’m a little obsessive about it(ask anybody whose had my chicken). And, my favorite roasting
author is Barbara Kafka. If you stick large hunks of meat into ovens
from time to time, you should really check out her philosophy. I’m a
convert.

DSC06172

Also, I did some stir fry from frozen veggies + bacon, because bacon makes everything better. Sara cooked some gyoza to go along with it. It was really easy.

DSC06211

The next morning I made fried rice with the leftover rice, I think it turned out rather well. And, the smily face out of sriracha hot sauce, gives it that extra oomph.

Happy Fried Rice