Perl6 vs Ruby: reduce

Ruby: sum = (1..10).reduce {|x,y| x+y} or maybe sum = (1..10).reduce {:+} Perl6: my $sum = [+] 1..10; That has got to be some of the sexiest perl syntax ever!

Posted Wed, Jan 21, 2009


And now on a totally different subject: Bands I recommend: Sparkadia Snow Patrol CSS M83 Steely Dan The Do Pacifc! The Faint Astronautalis Gonzales Gotye Deastro Exit Clov Belle & Sebastian Mother Mother Jens Lekman LCD Soundsystem The Mountain Goats Goldfrapp Santogold The Republic Tigers

Posted Tue, Jan 20, 2009

Winter Wonderland

Ok, so this post is about my Christmas time of the year. The first major thing that happened was Catherine and I visited Los Angeles to see my friend J-Hay. It’s the second time we’ve gone to visit him in LA and it was a really good time. Last time we tried to fit a lot in so it was a little stressful. One major highlight was going backstage on The Office.

Posted Sat, Jan 17, 2009

Why it's OK that perl doesn't really have irb (ipl?)

Ok, so irb is totally great for testing out some syntax and general sanity checking, but we don’t really have that with perl…or do we? I am sure that all of the real perl hackers out there know this, but the best perl shell is your real shell. If I wanna do some cool stuff with perl I can do a lot of it directly from my shell with -e (I recommend -E as you can use ‘say’, which is helpful so that you can avoid quote issues.

Posted Sat, Jan 17, 2009

CGI::Application::Dispatch, optional paramters and optional runmodes

So I haven’t totally figured everything out about CGI::Application::Dispatch, but I am learning a lot. First off, here are two things that I learned today. package ACD::Dispatch; use base 'CGI::Application::Dispatch'; use warnings; sub dispatch_args { return { prefix => 'ACD', debug => 0, table => [ '/' => { app => 'Welcome', rm => 'index' }, # The rm must be optional if you want # /controller to go to the startrunmode.

Posted Wed, Jan 14, 2009

How to use DBIx::Class after it's installed and setup

This is how I think a lot of code probably looks. Although it should be in methods and stuff, here is at the very least how to do just the basics: #!/usr/bin/perl use strict; use feature ":5.10"; use MyApp; use MyApp::DB; use JSON; use Scalar::Andand; my $schema = MyApp::DB->connect(@MyApp::DBConnectData); #find a given shop my $shop = $schema->resultset('Shop')->find(51311); say $shop->ShopNo; say $shop->OrderNo; say $shop->AgentRequestedFirst; say $shop->AgentRequestedLast; say ''; #find all shops where the AgentRequestedLast starts with Dy my $rs = $schema->resultset('Shop')->search({ AgentRequestedLast => {'LIKE', 'Dy%'}, },{ rows => 10, order_by => ['AgentRequestedLast', 'AgentRequestedFirst', 'ShopNo DESC'] }); # output pages 1, 3, and 6 foreach (1,3,6) { say ''; say "Page: $_"; my $paged = $rs->page($_); while (my $shop = $paged->next() ) { #Note: I added this method to my Shop class say $shop->as_string; # Note: Andand is awesome.

Posted Sat, Jan 10, 2009

Using "Rails" wisdom in Perl

Ok so that may be a sensational title, but really the point is this: Rails people talk a lot, perl people just get stuff done. I am ok with getting stuff done, but I don’t know how perl people do it because they don’t talk about it as much. Anyway, with that in mind my company (MTSI) is starting a new project next week. I get to be a big part of the planning and I am pretty excited.

Posted Sat, Jan 10, 2009

Ruby style functional programming in Perl!

So recently I was asking if andand exists in perl (here and here) and someone implemented it! How awesome is that? See it here. Anyway, so I looked at the code and figured, “Well heck, if it’s that easy, I should do this for map and join on arrays!” It was already done! The autobox::Core module does it already! You have to use more javascript-y syntax instead of regular perl-ish, but I think it makes things more clear anyway.

Posted Fri, Jan 9, 2009

Migrating from IIS to Apache

At my job we use a combination of IIS, SQL Server, and Perl. In general it works pretty well. But there is one major problem: if we ever do a warn in perl, instead of printing the message to the log, it crashes the server. That’s a big deal since multiple people are using the server and fixing the issue means VNCing in and recycling the app pool. This doesn’t always happen, but it happens a lot; enough to make me consider setting up Apache on my personal computer so that I can get some serious logging.

Posted Wed, Dec 17, 2008

Two Months and 10 000 Miles Later...

As some of you may know, I just went on a long Road Trip for my last free summer. It was a really great trip. It is more or less over now, except for my travel back to Dallas. If you want to see pictures and various anecdotes related to the pictures, check out my flickr. The basic outline of the trip was as follows: Fly to PA for a Flaming Lips concert and some fast visiting.

Posted Sun, Jul 27, 2008

On Beam Travel

This is a treatise on why beam travel should be illegal. As it stands our current government does nothing against beam travel. In fact, it is not even mentioned in the law books. I do not think that beam travel should require a license or anything like that. I think that beam travel should just be entirely illegal for all time. Beam travel works like this: your body is analyzed by a LASER to the atomic level.

Posted Tue, Jul 22, 2008

Ruby 1.9 is out!

Exciting! It was apparently put up yesterday, on Christmas. What a cool gift right? I looked through the changed maintained my Mauricio and here are /my/ favorites. New literal hash syntax [Ruby2] {a: "foo"} # => {:a=>"foo"} .() and calling Procs without #call/#[] [EXPERIMENTAL] You can now do: a = lambda{|*b| b} a.(1,2) # => [1, 2] Multiple splats allowed 1.9 allows multiple splat operators when calling a method:

Posted Wed, Dec 26, 2007

Creation of Small, Simple Objects

Today I tried to make a diamond. I tried to make it both out of nothing and with a piece of wadded up paper. I couldn’t do it, sadly. So these things go right? The tests are going to get harder soon; I’ll need to try to control massive amounts of people somehow and whatnot. Wish me luck on such endeavours. In other news, the dentist said to brush my teeth and avoid drill happy dentists.

Posted Wed, Oct 3, 2007

Transforming into a Cat

Today I tried to morph into a cat. No luck! I think I need one of those cubes that they had in the Animorphs… If that were the case I would also need a cat. And a friend named Ax maybe? Who knows?! Not me! Now I have to leave to go to the dentist. What a bummer right? I think it’s because of all the acid that I had when I was in Honduras.

Posted Tue, Oct 2, 2007

Controlling dor Creating Wind

Today I tried to create or control wind. No luck at all actually. I attempted say wind, making windy noises, and making various appropriate gestures. Nice try I guess? In other news, yesterday I learned that you really should cut away from yourself. I chopped my finger pretty badly with my recently sharpened kershaw. Also: I did a presentation on Go today and I think it went well. Two people spoke to me after the presentation and one of them asked if we could play together some time.

Posted Mon, Oct 1, 2007

Walking Through Walls

I tried walking through walls and had no luck. I tried both cinder-block and wood. I also tried willing myself through, imagining walking through, “just doing it,” and probably others that I don’t remember. J-Dot was there which is why this gets his seal of approval. In other news, my laptop’s power plug slot thing got broken, so my whole laptop was broken. GOAT and I looked up the part online, bought it (thanks laptopjacks,) and soldered it in.

Posted Fri, Sep 28, 2007

Seeing through Walls

Today I tried to see through walls. J-Box stood on the other side of an eight-inch cinder block wall and made hand signals and I tried to see what the signals were. I tried looking through the wall, touching the wall with my hand and forehead, and guessing. I was wrong every single time. Guess not this time! In other news, I am having this tea my mom sent me called Crepe Faire and it is THE BEST HERBAL TEA I have ever had.

Posted Mon, Aug 27, 2007

Controlling the Weather

Today I tried to control the weather. I tried to create lightning, clouds, and a tornado. I tried the regular tricks of imagination, will, and word. Maybe there is a **power word** that I need to learn that will let me do these kind of things. Or maybe it’s more like a muscle and I just need to learn how to use the muscle. If only I had directions! Today was long.

Posted Fri, Aug 24, 2007

Reading Minds

Today I tried to read minds, numerous times. I had no success at all. I tried just casually trying to read both Edgar and J-Curly’s minds. I also tried physical touch, touching foreheads, imagining reading a book with their thought’s on it, and numerous other things. No luck at all my friends! Tomorrow the kiddies move in. Hopefully they are a quantifiable amount of awesome, right? What is the unit for quantifiable awesome you ask?

Posted Thu, Aug 23, 2007

Mind Control

Today I tried to tell J’ to get me a drink of water with my mind. I imagined him getting it, I told him in my mind to get it, I even told him out loud (but not loud enough for him to hear) to get me a glass of water. He claimed that he was thinking of escalators, but that’s not really the same at all, so you know, no mind control for me.

Posted Wed, Aug 22, 2007

Time Travel (Forward)

Yesterday I tried traveling forward in time. It was, as usual, unsuccessful. I tried saying how far forward I wanted to go, imagining the future in 5 minutes, willing myself to the future, and hoping for the future. Again, small increments for the same reason as last time I tried time stuff. In other, hopefully obvious, news, I changed drawing styles. I like it better. Also I hope to get back into once a day every day.

Posted Tue, Aug 21, 2007

Creation of Warmies

Last night I tried to create enough “warmies,” that is, energy in the form of heat, to be comfortably warm without any covers at all. It was a failure and I did not sleep very well. I also feel a little bad because the warmies I did create were just vanilla entropy, aka cosmic pollution. I hope that I did not contribute to a universal heat death. In other news I am back at school and somewhat moved in.

Posted Thu, Aug 16, 2007

Going Backwards in Time

Today I half-heartedly tried to go back in time. The thing is is that I am a little worried that it may actually be my super power. The problem is this: what if I went back too far? Does that mean that I have that much life less to live or does it mean I just have to be bored for that amount of time? Or worse, what if my power is only going forward in time?

Posted Wed, Aug 15, 2007

Controlling Fanblades

Yeah, I know that it’s not amazing, but it was the best I could come up with at the time. I tried the regular stuff, hand motions, verbal orders, imagination. No go. Also, it’s not Catherine’s super power either. Sorry for the lapse in super power testing; I’ve been busy and whatnot. Hopefully it will get awesomer soon (that is, hopefully I’ll find my super power.)

Posted Mon, Aug 13, 2007

Transform (into a car)

Today I tried to transform into a car. I ended up just kinda rolling into a little ball. What I need to do is figure out how to make that awesome transform sound. Also I need to learn how to draw cars maybe. Maybe to transform into something you have to know how it works and stuff…. Maybe I’ll try turning into a computer. Does anyone know if being a vampire is a super power?

Posted Fri, Aug 10, 2007

Controlling Water

Today I tried to *Control Water*. It was interesting because I was not really sure what to try (I really want to try flying, but I want to try out a lot before I attempt that one) and whilst wondering _what_ I should try the big bottled water thing at my house seemed to randomly bubble. I figured that that might have been a sign and that I might as well try controlling water.

Posted Thu, Aug 9, 2007


So I hope this picture makes it obvious that I tried to control a balloon with my MIND. Sadly I couldn’t control it. I tried from varying distances away, including extremely close; I tried such methods as imagining the balloon rising, willing the balloon to rise, making various had and finger gestures to get it to rise, and even telling it to rise. If anyone has any awesome super power ideas for me to try let me know; I doubt I’ll run out of ideas but it might be more fun to try yours.

Posted Wed, Aug 8, 2007

Creating dor Controlling Fire

Still no super power. Today I tried to make a match light without striking it. I told it to light, it snapped my fingers at it, I tried using my mind. All to no avail; it would not light. So I lit it and tried to control the flame. I had to light four matches in the hopes that one would stay lit long enough to for me to make the flame do anything but go out.

Posted Tue, Aug 7, 2007


Today I tried, unsuccessfully, to levitate off of a couch. I tried it both sitting and laying down. I must admit that I felt lighter, but certainly not lighter than air. It was the feeling often expressed as butterflies in one’s stomach. Anyway, I get that feeling when I learn a new secret, so I might have just been excited to possibly find my super power. In other news a man here in Honduras just killed a guy and someone called me on the radio to tell me that if I see a prowler, don’t go chasing his as I might get caught in the crossfire!

Posted Mon, Aug 6, 2007

Seeing in the Dark

Today the power was out from 9:30 am to 5:30 pm and I figured that it would be quite opportune to see if my latent super power was seeing in the dark. I agree that that would be a pretty boring super power, but who ever said it had to be awesome? Anyway, I took a shower for about half and hour in the pitch dark since the power was out and I never saw anything but my watch hands.

Posted Sun, Aug 5, 2007

Your Possible Super Powers

I was thinking about super powers the other day and I came to a realization; even if I do have super powers I rarely try to do things that require super powers so I might have some super powers and not even know it! This could be true of all of us! I mean, honestly, how often do you try to fly, or double jump, or breath underwater, or walk through walls?

Posted Fri, Aug 3, 2007

El Salvadorisimo

From Thursday the 19th to late Monday the 23rd I was on a trip to El Salvador. It was the best vacation that I have ever had in my life. The reason I went is that an LETU grad, Lee Shaver, is in the Peace Corps there and this is the best chance that I will ever have to visit him. So we planned it all out, which bus I would take there, etc etc.

Posted Tue, Jul 31, 2007

Friday Tips and Tricks

Time saving tips and tricks! This first tip is something that I use almost daily. Do you ever want to change a filename to something that is similar to the original name? For instance, maybe you just want to change/add/remove the extension? Well, if you are using a reasonable shell you can do the following: # Add .txt to the filename cp textfiel{,.txt} # change el to le cp textfi{el,le}.txt # remove extension cp textfile{.

Posted Fri, Jul 6, 2007

On the Validity of Taking Nine Credit Hours in Half a Summer

A lot of people thought that I was crazy to try to take nine hours in the first half of the summer. I even admit that in retrospect it was probably not the best idea in the world. But I do think that it was helpful in a number of areas. The most obvious area that I benefited in is the fact that in my senior year I will only need to take twelve hours a semester.

Posted Tue, Jul 3, 2007


This is actually NOT a website. This is a medium where every time you read it you voluntarily pay me in cheese. Paypal supports that, so you know, hook it up fat yo!

Posted Tue, Jul 3, 2007