RSSAmplifier

Blog

My Point of View

Recent content on My Point of View

mpov.timmorgan.orgRSS feed ↗106 posts

Latest posts

I built a Ruby Interpreter

I love Ruby, but I don’t understand how it works. And my biggest character flaw is that I can’t just read the source, I have to build my own. You can see my previous posts on this subject: I Built a Ruby Parser I Built a Ruby Compiler Ideally the interpreter would have been in between those two. And before you get too far, here’s some required background reading:…

I Built a Ruby Compiler

Note: Please don’t share this on Hacker News – I don’t need the grief from gatekeepers telling me I don’t know how to write a compiler. This is an account for myself and for friends. /hugs I said in my previous post, I Built a Ruby Parser , that I would write about my ongoing compiler project Natalie , but I really wanted to finish the compiler rewrite first. I’m…

I Built a Ruby Parser

Sorry, this post will read like a “dear diary” entry rather than some life-changing HN -worthy guidance. Back in November 2020, almost on a whim I started work on a new parser for the Ruby programming language. It was almost exactly a year after I had started working on my compiler project (I hope to write a longer post about that someday soon), and in my frustration with the state of…

About Me

Hi! 👋 My name is Tim. I like to create stuff. You can follow me on the birdsite . Indeed, I have left Twitter at least once , but for now, I’m back. :-) In the day I work for a company called Planning Center , which builds really great software for churches. At night and on weekends I like to tinker with things that bend my mind, such as compilers and algorithm challenges. I often do…

Using a Raspberry Pi as a Planning Center Check-Ins Printer Station

First, some background 🔗 My church uses Planning Center Check-Ins to track attendance for churchgoers, and to help with security with little ones going to kids areas. It’s a great product. Yay! Check-Ins runs on iOS, Android, macOS, and Windows machines. Yay! Dymo label printers are cheap and plentiful. Yay! Check-Ins can print to a Dymo printer from macOS or Windows, but not from a tablet.…

I Built a Lisp Compiler

I’m very proud to announce the completion of my first programming language compiler! Malcc is an incremental and ahead-of-time lisp compiler written in C. This is the story of my progress over the years and what I learned in the process. An alternate title for this post is: “How to Write a Compiler in Ten Years or Less” (There’s a TL;DR at the bottom if you don’t care…

Clipboard History in Sway Window Manager

Recently I switched to the Sway window manager on my favorite laptop and realized that ClipIt does not work there. I was reminded of an old Ruby script I wrote way back in 2012 to serve this purpose. Time to dust that thing off and make it work with Wayland! I installed the excellent wl-clipboard by Sergey Bugaev and started hacking. Here is my script: Here’s how to use it: Save the script…

Church.IO

Recently I made the decision to shut down the church.io website (it’s now a redirect), delete the corresponding Slack community, and move the GitHub repositories back to my own personal account. Church.IO failed to build the community of software creators I dreamed of. Mistakes were made. This is a retrospective, and an explanation for anyone wondering where we went. What Was it? 🔗…

Leaving Twitter

Late in 2017, I politely said good-bye to Twitter and deleted my account. My Twitter account was 10 years old, and the anniversary, as anniversaries often do, prompted me to think about the value of a decade spent microblogging. I remember when Twitter was a quiet site for geeks, and my first tweets were about HTTP servers and Git and SliceHost (remember them?). And my geek friends replied…

Dymo Printer Agent for Linux

Note: We no longer use this. I have an updated post for the new setup. Our church uses iPads and Dymo printers for children check-in. Parents check in their child, a label prints on the printer, and they stick the label on the child’s shirt. We use Planning Center Check-ins of course, and it’s great! One downside to Dymo printers, however, is that their software only runs on Mac and…

Authority on Rails (Gem for Declaring User Authorization)

CanCan is a wonderful plugin for Rails that allows you to define all your authorization logic in one place. For small apps, it works well. But as my app’s authorization needs grew more complex, I realized I needed a different approach to declaring and testing authorization. So I went looking… It turns out that the Authority gem is exactly what I was looking for: Authority splits out…

Find photos on your hard drive to upload to Flickr.

If you’re like me , you have thousands of photos on Flickr, and thousands more scattered accross your laptop, external drive, and phone. What’s been uploaded to Flickr and what hasn’t? Who knows! I hacked up a quick solution in Ruby and called it Flickr Upload Set . It’s built as a web app with Sinatra, but it’s not meant to run on a server – just on your local…

What is Quality?

A lightning talk (5-minute) presentation I gave at TulsaWebDevs : What is Quality Note: I used to have this presentation embedded here, but it was scrolling the page and interfering, so now it’s just a link.

JavaScript Gotchas

Here are some common time sinks encountered when building a JavaScript app, along with some tips to avoid them. Note: these tips were originally shared as a part of my TulsaWebDevs presentation following 2012 Startup Weekend Tulsa . Bind 🔗 In JavaScript, scope is resolved during a function’s execution – not its definition. When working with classes, you expect that this will point to…

Migrate Posterous Blog to Jekyll

Posterous is set to shut down on April 30th. For the past month, I’ve been dreading the move from Posterous to whatever. Today I bit the bullet and decided to migrate my Posterous blog to Jekyll . There are many reasons I chose Jekyll – independence from free hosted services is probably the biggest reason. I chose to use Octopress , which extends Jekyll with a set of sane defaults and…

Super simple clipboard history for Linux.

I recently switched from Gnome to i3 on my main laptop. So far, I'm enjoying the simplicity of piecing together my own desktop environment from small, specialized tools. One thing I missed from Gnome was my clipboard history tool, Gpaste . I've come to expect that my previous dozen or more clipboard copies are a keystroke or two away and not lost forever. While tweaking my i3 setup, I realized it…

Hacking Well Underway

The Tulsa Hackathon is steaming ahead. The night is still young! People have gone from standing to sitting, staring intently at backlit screens and making things happen. Here are some more pics…

Midnight and Still Hacking

More pics!

Tulsa Hackathon Kick-off

So far the Tulsa Hackathon , an all-night programming drive benefiting needy Tulsa non-profits, is going underway and going well. We had an excellent catered meal, project presentations were made, and teams have been formed. People seem to be figuring out team member responsibilities and getting started on the various projects. I’ll write a couple more blog posts as the night progresses.…

Robots Chatting With Other Robots

I wanted my own Campfire-style web chat room, so I created on with node.js and socket.io that runs on Heroku . Robot images are thanks to robohash.org . Enjoy. github.com/seven1m/robots-chatting-with-other-robots

New Blog About Church Software

Oh Good Lord in heaven, forgive me: I've started a new blog. Many of you know I've long had a passion for churches and the software they use. I have plans to challenge the notion of what good church software should be doing . I have ideas for making better tools to aid management, shepherding and engagement. I want desperately to sit down and just start hacking on a new product, but the older and…

jQuery Template Attribute Language

Introducing jqtal , my tiny jQuery plugin that provides a different way of doing client side HTML templating. jqtal is different because it is a part of and lives alongside the HTML itself. An example might help: The plugin uses HTML5 data- attributes to embed data necessary for content insertion. Whereas in a normal template language, you might have something like: <input name="first_name"…

Backbone.js Talk at TulsaWebDevs May Meeting

Hey friends, I wanted to let you know I will be giving a presentation on Backbone.js at the next TulsaWebDevs meet-up. For any of you using more than the tiniest amount of JavaScript in your web-based applications, Backbone.js may be something to consider. Backbone brings structure and organization to the client-side that we've long had in MVC frameworks on the server. Here are some benefits:…

Red Dirt Ruby Conference II

Red Dirt Ruby Conference in nearby Oklahoma City was even better this year than last year , and that&rsquo;s saying a lot. The format of RDRC is unlike any other conference I&rsquo;ve attended. The key difference: each speaker (excepting keynote speakers) only talks for 18 minutes and that&rsquo;s it. Speakers are grouped, four at a time, into a theme. This year&rsquo;s themes (for day one, which…

Auto-Compile SASS with Jammit

I won&rsquo;t bother explaining to my regular readers what these two things are. If you need this, then you know&hellip; ;-) I know that both SASS and Compass can be setup to &ldquo;watch&rdquo; a directory and auto-compile when files are changed, but it seemed a waste to me to have another thing I have to remember to launch. This hack piggybacks on Jammit&rsquo;s include_stylesheets helper method…

David Brady Screencast with James Edward Gray II

Just got done watching this excellent discussion of Ruby hashes, associative arrays, testing, and Ruby culture. Link. James is an excellent force of enlightenment and encouragement in our little community, and I'm proud that he's also an Okie. Go watch this video.

Hanlon's razor

Never attribute to malice that which is adequately explained by stupidity. wikipedia.org/wiki/Hanlon's_razor

EC2 = Everything Cleared 2Day (FIXED)

I created a free micro instance on Amazon EC2 a few weeks ago. Today I remembered it and thought I would tinker around a little, only to find out that when I logged into AWS console, I had to "re-activate" my account using a phone number. Hmmm, that's weird. I distinctly remember doing that two weeks ago. So I jumped through the hoops and got logged in again to discover that my instance was gone,…

Winexe on Ubuntu

If you're running a Linux desktop in an otherwise Windows environment, winexe may be something you'll enjoy. Winexe allows you to execute commands from a Linux machine on a remote Windows machine, as if you're sitting at the Windows command prompt. Think of the possibilities! Recently, I found a way to get it to compile on my beloved Ubuntu Maverick (it broke when I dist-upgraded for some reason),…

Use a Proc with ActiveRecords' default_scope Method

Today, my small patch to Rails was applied by the core team. This is only my second contribution to Rails, so I&rsquo;m fairly stoked about it being accepted. This will allow you to pass a block to the default_scope method in ActiveRecord. It doesn&rsquo;t sound like much, but opens up some wonderful possibilities. First, a review of what default_scope does: The first call to Person.all applies…

Use rsync instead of cp

I tend to use rsync when others would typically use a simple cp for copying files. A few reasons: It can be canceled in the middle, and resumed later. It can show a progress bar that (while not perfect) is great for large files or lots of files. It will only copy the changed files and won&rsquo;t clobber already existing directories of files at the target. rsync is available on Linux, Mac, and…

Red Dirt Ruby Conf

Just some pics. :-)

MBP Upgrade

My 1st generation Macbook Pro is starting to show its age, but tonight I used my birthday money in an effort at rejuvenation. First, a new Seagate hard drive. 500gb, 7200rpm, $99 at Best Buy. It took about an hour to get my machine apart, with all its tiny screws, get the new drive in, and put it back together. Next, I said good-bye to Mac OS X. I installed the brand new Ubuntu 10.04 LTS, and man…

Whiteboard Icons

Back in 2005, I uploaded a bunch of crude little pictures to my Flickr account [edit 12 years later: this account is gone] and called them my &ldquo;Whiteboard Icons&rdquo; set. Hundreds of people have, over the years, found them to be useful on their blogs, flowcharts, and more. Today, I finally added a couple new icons to the set. Only took me five years. Enjoy. Update: Various sizes and…

csv2wufoo.com

csv2wufoo.com is a little side project I wrote using Sinatra, my WufooParty lib, and James Edward Gray's FasterCSV lib. After the tenth time my wife asked me to write a one-off script to import data into her Wufoo form, I decided to generalize it a bit, slap a Sinatra app around it, and give it a domain name (well, there was a little more to it than that, but ya know&hellip;) It hasn't quite been…

FacebookParty

I wanted to understand the Facebook REST API better, and decided I needed a simple wrapper for it. HTTParty to the rescue again! FacebookParty ( rdoc ) is along the same lines as my other _party style api wrappers. I can't take much credit for it though, since HTTParty is what makes this stuff so easy. Slap a pretty class on an api endpoint, and the rest is cake. And cake goes good with parties.

Updated Tarsnap Activity Graphs (Greasemonkey Script)

I just updated my Greasemonkey userscript that generates usage graphs for Tarsnap. The graphs are now prettier: The script lives here .

Flickr API for Ruby Using HTTParty

Continuing with my HTTParty, I've created a fairly simple Flickr API wrapper for Ruby: flickr_party . This one was a bit more difficult than the Campaign Monitor one , but still fun nonetheless. Why reinvent the wheel? It's fun. I always learn something. Sometimes I learn to not reinvent the wheel. But sometimes I learn so much more. The libraries out there I spent 10 minutes looking at didn't…

CampaignMonitor API Wrapper

Update: This was renamed to campaign_monitor_party. First of all, HTTParty is simply amazing. That is all. Second, Ruby never ceases to amaze me regarding its power and tools for meta-programming. "method_missing" is just too cool. Third, I created a 20-line wrapper class for the Campaign Monitor API this weekend (using HTTParty). The code and the gem is over on GitHub:…

CascadingRubies - Ruby DSL for generating CSS

I&rsquo;ve been working on a little experiment lately&hellip; a Ruby domain-specific language for generating Cascading Style Sheets called CascadingRubies . It&rsquo;s an internal DSL, meaning it uses plain Ruby syntax, like this: Output: Being just Ruby, of course, you can mix in variables, arithmetic, require external code, hit the database, or whatever. The guys on the Tulsa.rb mailing list…

Install the Ruby gem "dnssd" on Ubuntu

sudo aptitude install libavahi-compat-libdnssd-dev sudo gem install technomancy-dnssd -s http://gems.github.com require 'rubygems' require 'dnssd'

ShrinkSafe with Prototype 1.6

I didn&rsquo;t find this information anywhere, so here it is for the Google archives&hellip; To get Prototype to run after squeezing it through ShrinkSafe , you need to put back every instance of the variable $super. ShrinkSafe replaces variable names with shortened versions, and because of some Prototype voodoo, it breaks on this one name. There are about 8 places you&rsquo;ll find it, and…

Ditch Pagination

I build web apps. Almost every one has a screen or two somewhere that shows a listing, and at the bottom it has pagination links, e.g. next page, page 3, etc. For a recent app I&rsquo;ve been working on, the interface is very search-driven, i.e. the user enters some criteria the results are displayed. As an experiment, I left off the pagination links. In this app, there is no &ldquo;next…

SliceHost Affiliate Link

Just posting this for any friends getting ready to sign up for a SliceHost account. This my referral link - I get a discount on my slices if you use this. Help a poor developer, please. https://manage.slicehost.com/customers/new?referrer=198350528

Tulsa Ruby Workshop

We&rsquo;re gearing up for the upcoming, very first Tulsa Ruby Workshop . Of course, all you need to know is on the website , but in short, it&rsquo;s a beginner&rsquo;s conference all about Ruby and Rails. If you&rsquo;re new to Ruby and/or Rails, this is for you (if you&rsquo;re in or near enough to Tulsa, Oklahoma that is). Tell everyone you know!

FireFox 3 Beta

Oooo I really like the new Firefox 3 beta. It&rsquo;s zippy and it looks great. My only beef was the new fancy address bar&hellip; Being an uber web geek, I tend to recognize things by their URLs instead of page titles, so this was slowing me down to much: So, to get things back all barebones FF2 style, I installed this and set browser.urlbar.matchOnlyTyped in about:config to true . Much better.

OneBody: Using Git

I still plan on writing the final part in the Git series on this blog, but in the meantime, on a related note, we now have a page up on the OneBody wiki about Using Git . It includes some instructions for using Git on Windows and some other commands that may be helpful to noobs.

Rails Routes Weirdness

Just to save you a half-hour of your life, I thought I&rsquo;d share that you should never create a named route called &ldquo;directory&rdquo; &ndash; it will break Rails migrations and other rake tasks in mysterious and hard-to-track-down ways.

Git For People Who Know Svn, Part 2

For Part 2 of our 60-second Git tutorial , we&rsquo;ll look at some super simple branching and merging. git branch tells you which branch you&rsquo;re on. git branch -a lists all branches, even remote ones. git checkout mybranch checks out the branch you want. git checkout -b newbranch creates a new branch from the one you&rsquo;re on, and checks it out for you. git checkout master && git merge…

Git For People Who Know Svn (Things I've Learned, Part 1)

First, the mental hurdles:You don&rsquo;t need a server to have a git repository. All your commit history is available locally and quickly, with simple commands. Same with branches and tags. Git &ldquo;checkout&rdquo; and &ldquo;commit&rdquo; are commands you run locally. Svn &ldquo;checkout&rdquo; and &ldquo;commit&rdquo; are really more like &ldquo;pull&rdquo; and &ldquo;push&rdquo; with git.…