thehowev7.1

| blog

[x]
[x]

Posts tagged "geek"

Just a bit too much Oblivion

Mon May 19, 2008 01:23:51 AM by Travis

So, I was taking the garbage out yesterday, and I happened to walk past some dandelions. I kid you not, my first instinct was to harvest them for ingredients.

I think I've been playing too much Oblivion.

Gradumatation and also Webcomics

Wed Apr 30, 2008 12:36:21 AM by Travis

Hrm, yes, thoughts. Well.

For one, I'm gradumatated. Again. Like, for real this time, as in "see you later Ann Arbor, I'm off to the real world to get a job and stuff" for real. It feels.... good? I don't really think it's sunk in yet.

Also, entertainment. Over the past few weeks I've discovered not one, not two, but three incredibly awesome webcomics that have been around basically forever but nobody ever bothered to tell me about: The Adventures of Dr. McNinja, The Order of the Stick, and Questionable Content. You should read them. All of them, all their archives, in one sitting. Like I did. Totally worth losing 12+ hours of your life.

And yes, I realize that "Gradumatated" is not the correct spelling. It is, however, 327% funnier. How do I know this? Science.

MythTV Script to allow multiple Telnet connections

Sat Jan 12, 2008 11:41:08 PM by Travis

So, my roomate Brock has a MythTV box set up in our apartment, which we use as a free, open-source alternative to Tivo and other commercial DVR products.

One of the nifty things that myth provides is a Telnet interface for controlling the system: just telnet into a certain port, and you can enter in commands to control the system remotely. Works great if you don't have a remote control for the computer that's running myth. Brock and I both have GUI programs we can run on our laptops to provide a nice remote-control-esque interface to the Telnet connection (he uses one he found for Mac, I use one I developed in C# (but that's another blog post)).

It's a great setup, except for one problem: only one user can be connected to myth's telnet interface at a time. So, if Brock is using his remote control program, and I use mine, it automatically disconnects Brock. It's a stupid limitation, in my opinion, but that's the way it is.

Earlier this evening, Brock suggested a way to get around that problem: set up a simple telnet proxy server, which allows multiple clients to connect to it, and forwards all commands over a single connection to the myth telnet interface. Since I was in a mood to code, I decided I'd see if I could write up a simple Ruby program to do just that.

An hour and a half later, I had it working. Well, kinda - it's a little rough, and it doesn't forward the server's replies back to the clients, but it's enough to have multiple remotes simultaneously connected. I've pasted the code at the bottom of this post, as it's only about 90 lines. I'm really rather amazed that it was so easy, largely in part to the excellent gserver library, which may be my new favorite standard library class ever.

Edit 1/17: Updated the code to a cleaner, slightly more concise version.

I love ruby.

#!/usr/bin/ruby require "gserver" require "net/telnet" require "thread" class TelnetProxy < GServer def initialize(*args) super(*args) @@total_num_clients = 0 @cmds = Queue.new end def start(*args) start_myth_connection super(*args) end def serve(io) @@total_num_clients += 1 my_client_id = @@total_num_clients puts("New Client #{my_client_id} detected") # send the initial login msg welcome_msg = "MythFrontend Network Control\nType 'help' for usage information---------------------------------\n# " io.write(welcome_msg) loop do puts "Client #{my_client_id} is still alive" # every 2 seconds check for newly received commands if IO.select([io], nil, nil, 2) # retrieve the data cmd = io.gets puts "Client #{my_client_id} got cmd '#{cmd}'" # if the command was "exit", then disconnect the user, but not the main connection if cmd =~ /exit/ puts "Closing client #{my_client_id} connection..." break end # forward the command to myth @cmds << cmd puts "Client #{my_client_id} placed cmd on queue" # send the response to the user response = "OK\n# " io.write(response) end end end private def start_myth_connection @myth_thread = Thread.new do loop do myth = Net::Telnet::new("Host" => "myth", "Port" => 6545, "Timeout" => 10, "Prompt" => /# /) puts "Connected to myth" cmds_to_run = [] until myth.closed? # get command from the shared buffer (sleeps if none available) cmd = @cmds.pop # send the commands to myth puts "Sending command to myth: #{cmd}" myth.cmd(cmd) puts "Cmd sent" end # until myth.closed? puts "Lost connection to myth" end # loop do end end end proxy = TelnetProxy.new(6546, "myth") proxy.start proxy.join

Must - Resist - Temptation

Tue Sep 25, 2007 04:34:56 PM by Travis

Halo 3 launched today. So begins the war of attrition. My plan is to get a 360 & Halo 3 at Christmas. The question is: can my willpower hold out that long?

It just so happens that today is also the College of Engineering Career Fair here at U of M, which means Microsoft is here. And of course, they had Halo 3 at their booth. And of course, I played it for an hour after class. Tonight, I'm going to a special Halo 3 tournament.

So, can I hold out? This morning I sang the Halo theme song in the shower. Multiple times. Smart money's probably on no.

A reality show I actually like? Amazing!

Thu Feb 02, 2006 08:57:58 PM by Travis

I just got done watching an episode of "Beauty and the Geek 2." I know, it's a reality show. On the WB. Despite all of that, I actually like it. Here's why: one of the basic premises of the show is that, despite there being a cash prize at the end, the real goal is for the contestants to learn to look past stereotypes and in the process learn more about themselves. Now, let's take a step back: this is a reality show, and this is the WB, so we can't expect too much. That said, I think it does an admiral job of trying to do the idea justice. It's nice to see a television show giving a real look at how difficult supposedly "easy" activities like talking to someone or doing social activities can be for somebody like, well, me. You might think that the "geeks" on the show are fake or somehow unique in their social difficulties; I can assure you that they are not.

Also, from a purely entertainment standpoint, I enjoy watching people who could very easily be me, or the person sitting next to me, actually acting the way we act on TV, only without having to act. If that makes sense.

Delusions of Grandeur

Tue Nov 01, 2005 06:20:26 PM by Travis

Is it worrisome that, when I comment my code, I use the royal "we"?

Life Update

Tue Sep 20, 2005 09:14:36 PM by Travis

I've been told that I don't post often enough to satisfy my out-of-school-yet-jobless contemporaries (i.e. Tom). This is a natural consequence of having the TV and my computer in two separate rooms this year. The internet is an excellent window into reality, but the TV is a portal to the magical world of the imagination. When it comes down to a choice I'm going to choose the TV because, let's face it, my life is boring as hell - which brings us to the second reason I haven't been posting. Unless you'd like to hear about my troubles installing graphics libraries for 487 or how cool function pointers are in C, I really don't have all that much to talk about.

That all being said, I actually do have a fair amount of news. Amazon has formally extended me a job offer for after this year. I'll get more details from them at the career fair next week, but I'm pretty much set on sticking around for a Master's degree.

Living in the house has been going well. Brock's been on an exercise streak since his girlfriend broke up with him, so I've been tagging along with him to the pool to get some laps in whenever possible. Eric keeps on buying cheap meat whenever we go to the store, so he keeps on having to cook it before it goes bad, so I've had some breaks from frozen dinners. On the downside, he likes to use lard in his cooking. Frequently. So, I try not to eat his food too often. We were supposed to have another Eric living with us, but he didn't come back to Michigan this year. We're in the middle of trying to get him to pay us - hopefully all will end well in that regard.

Classes have been busy but manageable. Despite the fact that I'm taking two absolute blow-off classes (Cultural Anthropology 101 and Astronomy 102), this semester is shaping up to be my busiest one yet. That's due to my two EECS classes, 487 (Intro to Graphics), and 381 (Advanced and Object Oriented Programming), both of which have a pretty heavy workload. As a nice surprise this semester it turns out I'm in the same Astro 102 lecture as Gracie Byrnes, so that's good. It's nice to have an attractive female actually happy to see me again - that hasn't happened since Ashley visited me in Seattle. Well, Jess did stop by to see me on her way to Northern before school started, but she's basically like my little sister, so that doesn't count.

Lego Logic Gates? Awesome

Thu Dec 16, 2004 01:58:03 AM by Travis

It's official. I'm a computer science nerd. I was putting off bedtime just now, when I came across this - logic gates made out of Legos. I am so excited about this it's not even funny. He has here all of the logic gates necessary to build a simple computer - at least as functional as those ancient punch-card types, if not more. This is all stuff that I have an exam on tomorrow. Using just those couple gates he could build an adder and even memory! Well, in theory anyways. In reality the gears would start to slip before you could store more than a few lines of binary, and any useful implementation would fill up a warehouse. But still... maybe I should start stocking up on some of those pieces. I bet I could fit a basic 8-bit ALU on a kitchen table.

Gaim and Gimp, sitting in a tree

Wed Oct 13, 2004 01:17:31 AM by Travis

Whohoo! So the good news is, the new Gaim release uses gtk 2.4.1, which is the same version as the Gimp uses. For those not in the know, I had to give up Gaim over the summer so that I could use the Gimp. Now that they're compatible, though, I get to use both! Yipee!

I think I need help

Sun Oct 03, 2004 01:59:40 AM by Travis

Every time I visit ThinkGeek, I understand more and more of their T-Shirts. This isn't a good thing. My understanding has grown in a manner that is inversely proportional to my social awareness. I'm at the point now where I know what most of these shirts mean, but I don't even know what my neighbors look like.

I think I need help.

01010100 01101000 01101111 01110011 01100101 00100000 01110111 01101000 01101111 00100000 01100011 01100001 01101110 01101110 01101111 01110100 00100000 01110010 01100101 01101101 01100101 01101101 01100010 01100101 01110010 00100000 01110100 01101000 01100101 00100000 01110000 01100001 01110011 01110100 00100000 01100001 01110010 01100101 00100000 01100011 01101111 01101110 01100100 01100101 01101101 01101110 01100101 01100100 00100000 01110100 01101111 00100000 01110010 01100101 01110000 01100101 01100001 01110100 00100000 01101001 01110100 00101110