Posts Tagged “Ruby”
Mar
09
2008
Jan
19
2007
Haml: A new markup format for RailsPosted by: Kevin Ballard in Programming, Ruby, Web, tags: Haml, HTML, markup, Ruby, Ruby on Rails, XHTMLHaml is a new markup format for Ruby on Rails apps that just hit 1.0. At first glance it looks pretty odd, but it turns out to be really easy to write in, and it’s shorter and, actually, easier to read than the equivalent eRB. I think I’m going to convert Typo to use Haml for all its templates. I already did Azure’s layout file and it was pretty simple.
Jul
23
2006
Typo 4.0 is outPosted by: Kevin Ballard in Programming, Ruby, Site News, tags: rails, Ruby, site, typoTypo 4.0 is out! Many thanks to Scott Laird for his wonderful work on Akismet support and the new gem installer.
Apr
13
2006
Nearing 4.0Posted by: Kevin Ballard in Ruby, tags: milestone, Ruby, slaird, ticket, typoWell, it looks like we’re almost at the 4.0 milestone for Typo. Tonight I knocked off 7 tickets (a couple just got re-categorized, but others got fixed/closed). Now there’s just 1 left, and it’s slaird’s responsibility. Unfortunately I have no idea what the time frame is on finishing it. In any case, I’ll be pushing to get 4.0 out the door as soon as possible. BTW, anybody currently on trunk and Rails 1.1, I highly encourage you to upgrade to HEAD. Why? Because I squelched the exceedingly verbose logging of sidebar rendering (in a quick test, a single sidebar rendered on the front page shoved 70k into the log file). It’s a fairly ugly hack, but it’ll save you from having to wipe your logs every week. Well, Rails 1.1 is out now. And that is a problem for Typo. See, when we tried running it under Rails 1.1rc1 we discovered that this new version of Rails has certain problems with components. Basically, Rails isn’t setting up the component namespaces that we’re expecting it to. I guess this is what I’ll be spending tomorrow evening hammering on. Update: As of 10:57 AM this morning, Typo trunk now supports Rails 1.1 (and should work with Rails 1.0 too).
Mar
16
2006
Graph of all Universal Type IdentifiersPosted by: Kevin Ballard in Programming, Ruby, tags: graph, graphviz, omnigraffle, omnigroup, Ruby, utiAfter a couple hours of hacking I managed to come up with a ruby script that generated a GraphViz dot file that describes all of the Universal Type Identifiers on the system. I’ll release it later once I make it a bit more usable, but right now I have a dot file to hand out. If you don’t have GraphViz installed you can download the dmg, or you can use OmniGraffle. Just open up the file in Graphviz.app or OmniGraffle.app - note however, that OmniGraffle seems to screw up the border and widths of all the nodes, so if you don’t have a registered version (and thus cannot edit the file), you should stick with Graphviz. Download: utigraph.zip
Jan
15
2006
AJAX on RailsPosted by: Kevin Ballard in Programming, Ruby, tags: ajax, bug, lightbox, rails, Ruby, safari, typoJust a quick post about AJAX on Rails, to test out my latest feature, which is Lightbox support for Typo:
Jan
05
2006
RSS feed for crash reportsPosted by: Kevin Ballard in Programming, Ruby, Web, tags: crashreporter, NetNewsWire, rss, RubyInspired by a script mentioned on ranchero.com, I wrote a ruby script that generates an RSS feed for all the Crash Reporter logs on your machine. Just create a New Special Subscription in NetNewsWire, point it at the script, and you’re all set.
Sep
03
2005
MouseHole and JavaScriptPosted by: Kevin Ballard in Programming, Ruby, Web, tags: javascript, mousehole, proxy, Ruby, WebSo why has been talking about MouseHole lately. If you’re unaware, MouseHole is a ruby script that acts as a web proxy and filters HTML documents via ruby scripts. Or for a much better look at it, go look at what why wrote. Anyway, I wanted a way to do JavaScript cross-site AJAX tricks, like what Greasemonkey enables. Unfortunately, because MouseHole is a pre-processor, not a JavaScript extension, it’s not possible. So I spent a few hours and wrote a way for MouseHole scripts to provide content that doesn’t actually exist (as opposed to mutating existing content). This way JavaScript can do an AJAX call within the same domain (so it doesn’t hit the security limitations) but that call is intercepted by your script, so you could pull info from other sites and send it back, or whatever you wish. I haven’t actually done anything with this new capability yet aside from a rather silly example script which simply adds a button to Google that asks MouseHole for a random number. I’d really like to extend Google Maps, but that will require delving into how it works, and it’s far too late to do that now, as I need to get to bed. Anyhow, I put together a patch and sent it to the MouseHole Scripters mailing list. If you check out MouseHole from the CVS repository, you can apply my patch and test it. Or you can just wait to see if it gets added to MouseHole.
Aug
03
2005
Who owns the fish?Posted by: Kevin Ballard in Miscellaneous, Web, tags: cgi, fish, puzzle, RubyI ran across a link on SvN to an interesting logic puzzle called Whose Fish?. It purports to be a logic puzzle created by Albert Einstein, and claims Einstein said 98% of the population would not be able to solve it. So naturally, I was intrigued. The only problem was, the logic matrix for the puzzle doesn’t fit on a single piece of paper, and I don’t have Excel installed. So what did I do? I wrote a CGI script in Ruby that generated a logic matrix using a table of checkboxes, and I wrote some accompanying JavaScript to make it easier to use. Go try it! If you don’t want to solve the puzzle yourself, feel free to check out some of my steps. Just please, don’t submit this as your own answer. If you’re going to submit an answer, do the work yourself. So anyway, here are some of my steps: And here’s the final solution. |

Entries (RSS)