What’s new?

May 8th, 2008

Lots.  Since the last time I posted, I got a full-time job, moved to California with a bunch of CSHers, and still haven’t graduated.

I started at a company called Truviso in April.  Basically, we have a product based off of PostgreSQL that allows our software to process copious amounts of aggregate data on the fly and have it ready when you need it.  I’m working on the engine in C and it’s good times.  It’s so nice not having to deal with writing web apps or desktop apps for once.  I really like working for a smallish start-up on a product I believe in.  It’s also nice living a mile away from work.

I’m also working on an independent study to implement HDR tone mapping in Quartz composer (it uses GLSL).  It’s an implementation of iCAM06.  It’s pretty fun when Quartz doesn’t crash.  HDR imaging is pretty awesome and the results it produces are great.  Doing it in Quartz composer/GLSL is pretty awesome because it offloads the processing onto the GPU so you can play around with it realtime.  It also allows you to visualize the whole flow of the image easily.

Speaking of imaging, I’m pretty uninspired as far as photography.  I haven’t really shot anything meaningful since ‘06 in the desert.  I’m not sure if it’s lack of time, ambition, or whatnot.  Perhaps I was just jaded in the desert and nothing will compare as far as natural beauty goes.  I need to go back.  I mean the last time I took some photos that were even acceptable to me was about 6 months ago in Germany.  And that happened once.  I’ve taken about 300 digital photos in the last year.  Shot maybe 1 or 2 rolls of 120 (and didn’t even get aroudn to processing them).  Maybe 3 sheets of 4×5s too (and haven’t processed them either).  Compare that to my 3 weeks in the desert.  I shot over 1500 digital photos, 20 or so rolls of 120, 50+ sheets of 4×5, and I loved doing it.  I don’t know what happened.

If I told myself I was going to shoot some 4×5s this weekend I would probably just walk around with 20lbs of gear for 3 hours, and take maybe 1 or 2 shots so I didn’t feel like a complete waste of time then go home.  I’d probably never get around to processing the film.  Maybe I need to fidn interest in some other subject matters, or maybe I just need a new thing to do.

Sorry for the rant.  Anyways I’ll post links to the HDR mapping stuff once I get it working.

Cometd and me

February 8th, 2008

I kind of go on tangents when I do personal projects. First my goal was to make a poker game for bots to play… then somehow it diverged to making an ajax client…. somehow it diverged after that to use comet/cometd to do it… and then finally I decided to rewrite the cometd-twisted for my own evil.

Basically, for games and such, the bayeux protocol is a good place to start, but all the publish/subscribe stuff is superfluous. I basically just wanted to use the heart of the protocol and the ability to use the existing JavaScript libraries.

I think what I did is pretty cool. Basically, I made it so when a client connects it spawns a new client class. Then when they subscribe to a channel it makes a ChannelSubscription class. The messages are routed through this. Each ChannelSubscription behaves as a logical connection to the client such as a Protocol class with Twisted would. In fact, there’s about 3 lines of difference between my TCP layer for my poker client and my comet layer now. It’s pretty cool.

I set it up so that authentication and such would happen one level on top of the Bayeux protocol to allow for more customizations. It doesn’t matter whether or not they connect.

I have half of an ajax poker client written for my server with this, but it’s basically just a proof of concept that this works. I think I’m going to write a blackjack server too to allow for easier testing, and a better demo for when there aren’t people to play against. It’s simpler, and I already have most of the code done in Ruby from a long time ago… I just need to port it over Python.

Anywho… I’m calling my cometd server ucommet. Why? I couldn’t think of anything better.

The source is here for all the stuff (you want ucommet.py and possibly tabled.tac to see how it’s used)

you can do a “svn co http://svn.lolrus.org/dpoker/trunk dpoker” to get my poker tree.

You’ll need twisted.web2. If you have twisted 2.5, actually might have to get the SVN version. The apt-get seemed to get a working version for me in Ubuntu, but on my Gentoo server it was a whole different story :(.

I’m going to be in Prague with some friends for the next three days (my last days in Europe before I come home). Then once I get back to the states, I’m going out to Cali for a day or two for an interview. It’s been too long since I’ve had a burrito or a double-double. So what this means is I probably won’t have time to work on this for the next week or two.

If you’re not aware of the “Add Keyword for this Search” try going to google and right-click on the search box, and click “Add Keyword for this Search” and just put a keyword as “test” for now. Now, hit ctrl+l (or cmd+l on a Mac) and enter “test election” and it will take you to a search page as if you searched google for “election.” Basically, you can do this with any search box. It’s really great, actually. I much prefer this method to the search box because I only like using one hotkey.

Anyways, since I frequent Wikipedia a lot, I have one set up for Wikipedia. Unfortunately, Wikipedia isn’t all that good at catching your typos or knowing where you really want to go like Google does.

Solution: Set up a quicksearch to use google’s are you feeling lucky to search wikipedia.org. Here’s how you do it:

  • Go to Bookmarks->Organize Bookmarks
  • Create new bookmark
  • Add a name and appropriate keyword (I chose “wiki” for mine)
  • For the location use:
    http://www.google.com/search?hl=en&q=site%3Awikipedia.org+%s&btnI=745

I found a nice little tip on what to add to the search to “feel lucky”.

dPoker Progress

February 3rd, 2008

So most of my finals here are done.  I have a week before head out to Prague for a few days before flying back to the U.S.  I think I’m going to put on about 10 pounds the first week I am back because I miss all the delicious food.

This means I might get my dPoker server working.  I have a bit of the Twisted stuff in place.  I’m currently working on the gameflow logic right now and trying to engineer a good abstraction for it.  Right now I am just doing a TCP implementation, but since the whole protocol is in JSON it should be easy for me to make an HTTP thing for it too, and be able to hook up to JS.  I’m thinking perhaps a widget?  I’ll keep y’all posted.

simplejson vs. python-cjson

January 25th, 2008

I needed a package that decodes JSON into dictionaries/lists etc.  I’ve used simplejson in the past and it’s worked fairly well.  I came across another package today that claims to be at least a hundred times faster than the other JSON implementations for python called cjson.  I was a bit skeptical because simplejson has C extensions too.

I decided to run some quick benchmarks.  The code I ran can be found here.

benchmark data:
processor: Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz
x86_64 Linux.
simplejson 1.7.3 (I assume the c extensions are enabled because I used emerge to get it)
python-cjson 1.0.5
Python 2.5.1

simplejson results:
% time ./simplejsonbench.py
./simplejsonbench.py 38.97s user 0.00s system 99% cpu 38.968 total
% time ./simplejsonbench.py
./simplejsonbench.py 39.17s user 0.01s system 99% cpu 39.187 total

cjson results:
% time ./cjsonbenchmark.py
./cjsonbenchmark.py 0.77s user 0.01s system 99% cpu 0.784 total
% time ./cjsonbenchmark.py
./cjsonbenchmark.py 0.77s user 0.03s system 100% cpu 0.794 total

simplejson average: 39.07s
cjson average: 0.77s

verdict: cjson 50.74x faster in this benchmark

I’d run more, but I don’t really think I have to. Simplejson actually seems to have a more robust interface than cjson, and is more portable because it doesn’t require a C compiler.

The cjson website has some other numbers that measure actual measured throughput of cjson vs. simplejson. The versions of simplejson is older, and it states there’s no C extensions compiled in.

Website Stats

January 25th, 2008

My blog gets very little traffic.  Actually, about 60% of it is people searching for the word “lolrus”, coming here, and being quickly disappointed then leaving right away.  I’ve been using awstats for a long time now, and recently just tried Google Analytics.  Google Analytics is soooo much more intuitive to use than awstats.  It also seems to have less noise in the data.  For example, /wp-admin is shown as one of the top things visited in awstats.  I don’t really care how many times I visit /wp-admin.  Google Analytics filters that out.  It’s interface is pretty slick too.

Aside from that, the job hunt continues.  Have a phone interview tomorrow.  I’m hoping to find a job before spring quarter starts so I can concentrate on my studies and finish on a good note.  It’s going to be a rough quarter.  I’m pretty psyched though because I’m probably doing an independent study implementing the iCAM image appearance model in Quartz Composer.

New Project: dPoker

January 24th, 2008

I started a new project a few days ago. It’s one I’ve been pondering over for a long time, and it’s about time I did something about it. I’m bad at naming projects, so I chose dPoker, the d is for donkey.  Donkeys are cool either in poker, on waffles, or on waffles on VT200s in Sysprog class. Basically, the core of the project is just a poker server. It’s purpose is for bots to play, compete, and learn, not really humans. Of course, humans will be able to play too, once somebody writes a client. I have a few friends interested in working on this too, but I need to get a proof of concept together first.

I set up a trac for it here.

Here’s a few technologies I’ll be using and design decisions (for the proof of concept at least) and why:

  • The server will be written in Python.
    • it’s relatively fast and small in memory (compared to Ruby)
    • good libraries
    • readable
    • native thread support
    • I find it fun to write
  • Probably using Twisted framework.
    • It seems nice and supports a variety of protocols.
    • Eventually want to make a javascript client
    • Don’t want to reinvent the wheel
  • SQLAlchemy for data logging and account
    • I really like it
    • Sadly, there’s no recent updates to Asynchronous wrappers for for like a year, so I will probably have to roll my own :(.

I’ll be using a very simple protocol so people can easily write their own clients/bots in any language.  I’m trying to design it to scale well over multiple processes and servers.  It will also be modular so it can extend to different card games or non-card games.  The primary reason i want it to be scalable is because if computer learning is to be done, it has to either go really fast, or support hundreds of games at once.  There’s latency over the internet, so that would be the bottleneck for how fast a game finishes.  So my solution for networked games would be to have say maybe 10-100 instances of a bot running in that many different game rooms.  Although, there would still be latency, it would still increase the game’s played/time period.

Me or a friend will write a JS or even a flash client  so people can easily play over the internet against bots or each other.  I’d still have to work out a way to get people to try instead of going all-in all the time, but I think this would be important to add a bit of supervised learning to the mix and see how these bots evolve.

iPhone Native SMS Archiver

January 20th, 2008

A while ago I mentioned going to BarCampBerlin. While I was there I met the creators of a website, Treasuremytext. They provide a service for people to archive their SMS’s to the website and then share them if they desire. Typically, one would forward their SMSs to a number, and then they would appear on the site. Unfortunately, there is no forward capability on the iPhone. So, they were interested in me writing a native application to archive the SMSs over the internet from the iPhone.

And that’s what I did. It was actually an interesting process. Treasuremytext didn’t have an API set up at the time, so I wrote a REST api with authentication, tokens, and keys to the one Flickr uses. I did this in my sandbox web application that I use in Pylons. To communicate with it, I used code from MobilePushr because it was already proven and GPLed. The author of MobilePushr, Chris, was very helpful in resolving some issues that I had (they were my fault though).

So after that, I spent a few days over my holiday working with the owners of Treasuremytext helping them set up their API and ironing out a few last issues with my app.

The source is GPLed. Feel free to use it. You can find the source and install instructions here. Also, if you find bugs or have feature requests, post an issue there. I don’t really SMS more than a couple times a month, so I won’t be doing too much testing.

Here’s some screen shots (click for full view):

iPhone screen 1

iPhone screen 3

And working on an archive/delete all feature that will be released once I figure out why NSThread is blocking my main thread:
iPhone screen 2

As some of you might know, I’ve been in Osnabrück, Germany since the beginning of October. Well, one of the biggest joys in life to me is food. I wouldn’t be able to live in a place my whole life in a place that had bad eats.

Basically, right now I am sick of most food they have here to offer. Here’s a list of what I liked and am now sick of, should have liked, or too po’ for.

So, for Germany:

  • Döner Kebab - Alright, so this is one of the few foods I can still tolerate more than once a week. It has been my replacement for the burrito when I was in California, which was then my replacement for the Garbage Plate when I was in Rochester. Basically, it’s meat in a pita for 3 euros. You even have a choice between Lamb meat and Chicken meat. What else could I wish for? Cheap, warm, and scrumptious. I’m getting kind of sick of it now, but when I am hungry and/or a wee bit tipsy, there’s nothing else.
  • Pizza - In Germany it’s pretty weak… compared to what I’m used to at least. The cheese is pretty good, but it’s just not the same, sadly. Also they use salami instead of pepperoni. Not much a loss, but just different. You generally buy whole, smaller pizzas in Germany, usually at a Turkish owned restaurant as well, that most likely sells Döner too. You can even get a pizza with döner meat at some places. It’s pretty tasty, but just not the same as a nice New York style slice of pizza. Usually between 3 and 5 euros for a pizza that will even fill me up.
  • Brotwurst - Quite delicious compared to hot dogs. Comes in a Brötchen (a little roll, also called Semmeln in Bavaria). Too greasy for me now. I also don’t find them that filling either. Usually about 1.70-2.00 euros. At festivals you can get comically large ones. I’ve seen meter long ones at Oktoberfest, and half meter ones in Berlin for new years eve.
  • Potatoes - Pretty decent. Come prepared a few different ways. The boiled ones are pretty bland I think though.
  • Schnitzel - Only had a few time. Not bad, but a bit greasy to eat regularly.
  • Fish - Had some good fish, had some bad fish. The salmon is generally fresh.
  • Chinese Food - A bit disappointing. Not the type of dishes I am used to. They mostly have just noodle dishes or fried meat with a crust on sauce dishes. And curry. It’s more indonesian cuisine. I know what is “Chinese” food in the U.S. isn’t traditional, but that doesn’t mean General Tsao’s chicken isn’t 100% delicious.
  • What I make - Lately I’ve been adventurous. I’ve made some Thai Curry, some Sushi (surprisingly good), Ramen, potatoes. For a while I was making Brotwurst, but got sick of it. Also, I’ve made some not too bad steaks and fish.
  • The Bier - German beer is good. I’ve only had one or two bad beers. Most people drink Becks which is pretty good. The other common ones where I am are Warsteiner, Herforder, etc. You don’t get a lot of the good Bavarian German beers, or the Belgian beers that I love so much (will elaborate more later). You really have two choices. Weizen (wheat) beer, pilsners, or dunkels (which nobody except old people really enjoy). It gets a bit boring. I found a place about 2 km away from me which has Augustiner which is pretty much one of my favorite German beers. Justin and I hauled a carton which had about 10 liters back the other day and I was a bit sore after. We get Budweiser (the Czech one) here which is really good actually. I’ve been drinking that because it’s not a Pilsner and I am just tired of Pilsners. In Berlin there’s also Berliner Pils, and Berliner Kindl which I think is also a Pilsner. Boring. Beer at bars and clubs are usually between 1.50 euros to 3.00 euros for a half liter or .33 liter.

So I will go cronologically now. Here’s the highlights and lowlights of when I was living in San Jose:

  • In-N-Out Burger - Amazing! My friends in the bay had always talked about how delicious it was. When I crossed the border into Cali for the first time, when I saw an In-N-Out Burger, I immediately got off the highway. Needless to say, I was far from disappointed. Double-Doubles with grilled onions only are pretty much the best fast food burger I have ever had in my honest opinion. Everything at In-N-Out is fresh, and delicious, from the burger patties, to the freshly cut fries, to the lightly toasted buns. Not bad shakes either.
  • Burritos- Absolutely delicious. I like mine with carnitas, black beans, and light on the salsa. The best are most definitely in the Mission District in San Francisco. As far as local to where I was in San Jose, La Victoria’s Taqueria was pretty good, along with some other places. Haven’t experience burritos anything like it elsewhere. A regular burrito generally runs between $4 and $5. Not bad I believe!
  • Mongolian BBQ - Also one of my more favorite meals. Su’s Mongolian BBQ was the best. So good. All you can eat. Under 10 dollars. You make a couple bowls, the spicier the better because you know there’s a soft serve machine waiting for you after you packed the last bowl into your belly. I like lots of garlic, chili, and chili oil. King’s Mongolian BBQ wasn’t so bad either, but it was always empty and had not the best vibe.
  • Pizza - The only good pizza I ever had in San Jose was Amici’s. It was hella expensive though. Over $20 for a large that wasn’t even that large or something obscene like that. It was super good though. There was a decent Chicago style pizza place, but I don’t dig the deep dish. I had a couple pretty good slices in North Beach in SF. They weren’t too pricey either.
  • Korean - Had a few times, pretty good.
  • Vietnamese - I had it once, but didn’t really dig it. Maybe I will try again someday.
  • Thai - Pretty good. I discovered my love for red, green, and panang curry in SJ. There’s some cheap eats too.
  • Jamba Juice - Excellent smoothies. So good. Had a Jamba Juice for lunch sometimes, or for dinner.
  • Italian food in North Beach in SF - Amazing. I went to a couple nice places with Marisa. Really good. Once we ended up at this really kitschy place because all the other restaurants were packed. We were really skeptical, but it turned out to be excellent food nevertheless. The seafood is out of this world.
  • The Beer - Ehh it was mediocre. BevMo had a moderate selection, but it was really pricey and far out of the way. I usually stuck to Heinekin (FYI, Heinekin tastes WAY better in the Netherlands. Not a hint of skunkiness). Bars were really expensive. Even the dives. The cheapest beer in a bar around was $2 Pabst Blue Ribbons. Gag.

Now time for the Rochester portion. It’s been a year since I’ve been there, so bear with me if things have changed. I actually miss the food in Rochester a lot. It’s good and cheap.

I mention “plates” a lot here and they refer to garbage plates.

  • California Rollin’ - My favorite Sushi place. It’s usually super good. I’ve had a not-so-good roll or two there in the past, but when you go every week, there has to bee some off days. $12 for 3 roll Sundays is the best. It’s right in the Village Gate mall, so you can go get some records or piercings then get some sushi. How fun is that? Tuscany roll and Rainbow rolls are my favorites. Louisiana roll is pretty good. I also like the eel rolls, but I forget their names.
  • Piatzas - I was living on University Ave for 6 months. Piatzas is so good. HUGE slices for like $1.50. Usually really good. Nice thin crust. It’s like a little shack on Park Ave and Oxford intersection. Probably not the best pizza, but some of the best.
  • KC Tea and Noodle - This was closed for a couple months then reopened before I left. It has the only bubble tea that I know of in Rochester. They also have super good noodles! It’s a fun place to go and will make you feel good and happy inside.
  • Dogtown Hots - It’s only been around for a year or so now. Even if you don’t like hot dogs it’s worth checking out. Their hotdogs are amazing. They put them on buttered french bread instead of rolls and there’s 20 or so different toppings you can get. I also had a plate there once, and you can get onion rings on it. One of my favorite places. The people that work there are really nice. They also have vegi dogs, chili, and plates incase you’re a vegetarian or have one as a boy/girlfriend.
  • Mark’s Texas Hots - Open 24-7. Some of the craziest stuff that I’ve seen in Rochester has happened to me here, such as a girl passing out from alcohol poisoning and her friends fighting over who’s fault it is instead of helping her or calling 911. Once some guy sat next to me and a group of friends and told us how he once blew the kneecaps off a guy and said he’s lucky we weren’t lizard people. As far as the food goes, it’s pretty damn good. I prefer plates from other places, but their omelettes are top notch. If you can get there for breakfast they also have really good egg sandwiches. Really good service and nice waitresses. Sometimes you even get the honor of seeing Mark kick rude guests out.
  • Henrietta Hots - Honestly, a lot of people give this place crap, but I think they have the best plates. They use nutmeg or cinnamon in their hot sauce to make it taste oh so good. I go back there even though some friends and I got food poisoning there once. It’s closer to RIT than Mark’s or Nick’s.
  • Ming’s - Favorite chinese restaurant ever. It’s a hole in the wall place on Clinton Ave (I think). Justin introduced me to it. Since then I can’t get enough. Amazing General Tsao’s, dumplings, spring rolls. Good lunch special too. If you eat there you will smell a bit greasy after, but it’s worth it. They kind of deliver to some areas too.
  • Dibellas - Really good subs. Personally, I enjoy their hot roast beef or steak and cheese subs.
  • Old Toad - Pretty good British style pub. Good selection of beers. Free meal on your birthday. People speak with a British accent too.
  • MacGreggors - Right near RIT. Cheap specials. Huge beer menu. Definitely a mix crowd goes there.
  • Wegmans - There’s nothing like it anywhere I’ve been. They have a great selection of food, open 24-7, and treat their employees well.
  • Beers of the World - This is a specialty beer store. They have an amazing selection of beer from Treppist beer to African beer. I’m probably going to buy some brewing equipment from there when I get back to the U.S.

Anyways, I think I am going to call it a night. I plan on taking a trip to Belgium (either Gent or Brugges) before I leave, as well as Prague, and I will be sure to fill in the details of their beer, as well as some Dutch beer too.

[Edit: added some places I missed]

Never Seen This One Before

November 17th, 2007

…randomly in all my terminals
Message from syslogd@loltop at Sat Nov 17 20:07:51 2007 ...
loltop kernel: [123903.232000] Disabling IRQ #18

And now sound won’t work.