After reaching my goal of skiing 50 days during the 2010-2011 season, I’ve been having a hard time motivating myself to go anymore. I still think about going, and I keep telling myself I’ll go again, but I really don’t know when. The super nice weather isn’t helping much – 75 degree bluebird days just aren’t skiing weather. I’ve been dying to go camping or on a backpacking trip, but unfortunately there’s still too much snow in the mountains.
That means it’s the perfect time to spend the weekends mountain biking. The last few weekends I’ve been doing some variation of this loop.
It’s a really great loop because it can be as long as I want it to be, and it covers all kinds of terrain, from the road to single track. Maybe best of all, I don’t have to drive to get to it. Sunday’s ride was the longest variation I’ve done, and is shown in the GPS track above; a 51 mile loop with ~3000 feet of elevation gain that took about 4.5 hours. the only thing that would make the ride better is if there were more trails and fewer roads. I’ve been looking for ways to do that, but haven’t had much luck.
Also over this last weekend, I rode out-and-back on Westminster’s Big Dry Creek trail, from my apartment to I-25, and back. It’s only ~18 miles, so I added a loop around Standley lake. It’s not a very exciting ride, but I get so bored riding on the street to and from work, it’s a nice change to ride any kind of trail.
The next few weekends I may actually drive out to the foothills and do some biking there. Usually, I don’t like driving to go for a bike ride, but I’m really anxious to get out on singletrack this spring. I think next weekend I’ll head over to the Walker Ranch Loop. A friend and I hiked around it a couple years ago, and it looks like a great place to ride. I might even go crazy and ride all the way to the trailhead, do the loop, and ride home, but that’d be a pretty long day. Guess I’ll see how I feel next weekend..
Today I skinned up A-Basin from the parking lot to the upper section of East Wall, then skied down North Chute, back to the parking lot. To get a feel for backcountry skiing, I was wore a full pack, including my avalanche beacon, probe and shovel.
It was my first time skiing with a pack on, and in retrospect, it was probably a mistake to ski a 45Â° slope right off the bat. It went okay, though, and once I got to more mellow terrain everything went great. Tomorrow I’ll try without the pack.
This video isn’t the greatest, but it shows the view well enough:
And the GPS track of the skin up and ski down…
A couple weeks ago I bought a new helmet cam to use while skiing and biking. I haven’t made anything interesting yet, but I created a Vimeo account, and uploaded a couple videos to try it out:
I’ve never done any video editing, but Rob suggested Kdenlive, and so far it’s working out pretty well, but it’s taking a little time to figure everything out. The two clips I’ve posted so far didn’t really take much editing skill…
In any case, I’m working on some tree skiing footage that should be a little more interesting to watch, but it’ll probably be a few days before I get it good enough to upload.
I’ve been thinking this over for a while, and finally made up my mind to start my own company. I don’t think it’ll make me rich, but if I’m going to write software in my free time, I might as well make money from it if I can.
So far I’ve registered as an LLC, got the company blog up and running, and upgraded my Github account to get some “private” repos.
Next up I need to figure out what to do for the company website, and research online payment systems. I think I can just use PayPal, but I don’t really know what that entails. Should be interesting.
When I climbed Mt. Sherman first time I also climbed Mt. Sheridan and White Ridge. I wanted to get Gemini Peak, too, but didn’t get a chance.
Two years later, I finally got back around to it. It was weird trip in a way, because it was my first time up Gemini Peak, second time up Mt. Sheridan, and third time up Mt. Sherman. It was also the first time I hiked Mt. Sherman when it wasn’t snowy.
Other than that, it was a typical 14er/13er hike. I took a few pictures, but I don’t think they add much to the collection I took the last time I was up Sherman.
Here’s the GPS track.
I recently bought a book on computational geometry, and have been working my way through it, implementing some of the algorithms as I go. Eventually I’d like to implement all of the algorithms in the book, and get them working on made up sample data. For some of them, however, I’d like to implement more practical projects.
The first algorithm in the book is the convex hull. The convex hull algorithm takes a set of points and computes the smallest convex polygon that contains every point in the set.
I tried to think of where I could get some interesting “real life” point data and one thing that came to mind was the track points from GPS tracks. I’m not sure how useful it is, but the results are kinda neat.
The picture above is the result of running the code on some ski tracks from A Basin. The green polygon is the convex hull. The white lines are the ski tracks.
The code could use some polishing, but its mostly straightforward. It basically just reads the track points from a GPX file, calculates the convex hull, and spits out some KML that can be loaded into Google Earth.
The next chapter focuses on finding all of the intersections in a set of line segments and various applications of that. The algorithms are a bit more complicated, but I’m hoping to have it implemented in the next few days, and hopefully I’ll be posting something about it in the next few days.
I’m keeping all of the CG code in GitHub.
This is the second time I’ve meant to hike Mt. Powell, and the second time I’ve ended up hiking something else instead. This time I made a wrong turn and ended up on Pt. 12709, “Corner Peak”.
Here’s the GPS track
And here’s the route I should have taken, in green:
The mixup that led to the wrong turn is kinda funny. I lost track of the trail, so I started following this couple (the only 2 people I saw all day) ahead of me. I caught up to them before too long, and asked if they were on their way up Powell, just to double check. They told me I missed the turn off, and that we were headed up Peak C. I figured instead of backtracking, I might as well just climb Peak C instead, so I thanked them and kept going. It wasn’t until I looked at the summit register that I realized they were just as lost as I was. Oh well, Mt. Powell will be there next weekend…
Hiked my first 14ers in the Elk range this weekend with Castle and Conundrum Peaks. It was a really long day (14.8 miles and almost 5000 ft of elevation gain), but I had a great time. The Elks have amazing views.
The rest of the pictures are up on Flickr.
And here’s the GPS track.
I was planning to hike Mt. Powell up in the Gore Range this weekend, but once I got up there I had kind of a bad vibe about it, and I couldn’t find a camp site, so after driving all the way past Vail, I called it off and rushed over to Mt. Elbert. It’s not the most exciting hike, but I was pretty sure I’d get a campsite, and I hadn’t done a 14er in like 4 or 5 weeks.
It was pretty close finding a campsite. I think I got the last one in the entire area, but I DID get one, so it worked out.
The hike itself was a lot of fun. It was crowded, but could have been a lot worse. Since this was a repeat and it was crowded, I didn’t waste much time or take many pictures. Basically just some random summit pics, and this panorama:
The 9.35 mile round trip took 3:09, including 15 minutes to eat lunch and take pics at the summit. So far it’s my fastest time on a 14er, but I think I could do better if I had brought my running shoes and a smaller pack. Maybe next time…
In anycase, here’s the GPS track.
I realized the other day that I’ve only made one post in the “coding” category. I don’t spend as much of my free time writing code as I used to, but I figured I still do enough that it deserves more than one post. So here’s a quick write up about the latest mini-project I’ve been working on.
I’ve been implementing a (very) simple regular expression library in Python. It doesn’t really compare to the standard library’s ‘re’ module or to Perl’s regular expressions, but I’m mainly doing it to learn the underlying algorithms, and those are similar in the more powerful implementations.
To be honest, the project is mostly a rewrite of Haskell code I wrote and forgot about a few years back. I wanted to add new features, but I didn’t want to use Haskell, so I thought I’d rewrite the whole thing in Python. I got a little ahead of myself, though, and started adding new regex syntax before all of the old features were done. The table below (from the Github project Wiki) shows the supported regex syntax in both version:
|Zero or one
|Closure (zero or more)
|One or more
|POSIX named character classes
|Negative character classes
For most people, the only remotely interesting part of the project are probably the neat finite automata graphs it can produce using GraphViz:
The Wikipedia page for finite automata does a pretty good job explaining what the graph actually means.
There’s only one part of the Haskell code I still need to rewrite: the NFA to DFA conversion routine. I’m embarrassed to admit it, but I’ve been putting it off because my original Haskell code is so bad. I’m tempted to say it’s the worst code I’ve ever written:
-- Convert an Nfa to a Dfa using the algorithms from section 3.7.1 of the "Dragon book"
toDfa :: Nfa -> Dfa
toDfa nfa =
dstrt = e_closure nfa (n_start nfa)
init = Map.fromList [(dstrt, genStates dstrt)]
dfa = getps init
stateNames = genStateMap dfa
partial = Map.mapKeys (\x -> lookupDefault x 0 stateNames) dfa
dfaTrans = Map.map (\x -> Map.map (\y -> (lookupDefault y 0 stateNames)) x) partial
accepting = Set.fromList
(\k x ->
(Set.size (Set.intersection (n_accepting nfa) k)) > 0
Dfa dfaTrans (n_start nfa) accepting (n_rgx nfa)
getps old =
if (new == old)
else (getps new)
new = generateProductions old
generateProductions :: Map.Map (StateSet) (Map.Map NfaChar (StateSet))
-> Map.Map (StateSet) (Map.Map NfaChar (StateSet))
generateProductions fad = foldl
(\acc x ->
gt = (genStates x)
Map.insert x gt acc
) fad (getProductionStates fad)
genStateMap :: Map.Map (StateSet) (Map.Map NfaChar (StateSet))
-> Map.Map (StateSet) Int
genStateMap dfa = foldl
(\acc x ->
(y, sm) = mapState acc x
) Map.empty (Map.keys dfa)
getProductionStates fad = (concat
(\x -> Map.elems x)
mapState sm set = case Map.lookup set sm of
Just y -> (y, sm)
Nothing -> let ms = Map.size sm
in (ms, Map.insert set ms sm)
genStates set = Map.fromList (filter (\(x,y) -> not (Set.null y))
(\ch -> (ch, e_closure_set nfa (nfa_move nfa set ch)))
inSyms = Set.delete Epsilon (Set.fromList (Map.fold (\x acc -> acc ++ Map.keys x)  (n_transitions nfa)))
I’m actually a bit disappointed in myself for turning the compiler book’s 10 lines of psuedo-code into that mess. All I know is that when I finally get around to writing the Python version, it will be nothing like that.
The latest code is available at GitHub.