RSS Bruce Williams—Ruby, Rails, and Design - Home

http://codefluency.com/

Last checked 5 months ago.

17 people have subscribed to this feed.

Feed frequency

post frequency (last month)

PostRank™ filter

latest 15 posts

« older items




Tuesday May 20th, 2008

RTeX 2.0 Released

From Bruce Williams—Ruby, Rails, and Design - Home, 7 months ago, 0 comments Comment

I’m happy to finally release RTeX v2.0.

RTeX is a Ruby library for generating PDFs via the LaTeX typesetting system, and can be used as a standalone executable or Rails plugin for pdf.rtex files. If you need to generate complex (and well-typeset) documents dynamically, this might be the ticket.

This updated version of RTeX offers a number of improvements over previous versions, and has been a long time in making. For more details on the library, start here.

Saturday May 17th, 2008

RTeX on Lighthouse

From Bruce Williams—Ruby, Rails, and Design - Home, 7 months ago, 0 comments Comment

I’ve just opened up a Lighthouse project for RTeX you can find it here. This fills out the RTeX family of pages to be:

Wednesday April 30th, 2008

RTex Webby Filter

From Bruce Williams—Ruby, Rails, and Design - Home, 8 months ago, 0 comments Comment

Good news today. Webby, my favorite little static website generator that could, is now being developed on GitHub. This will make contributing to the project easier for those of a git persuasion, and hopefully take a bit of pressure off Tim’s shoulders in the long-term. I’ll be maintaining a fork for contribution.

I really enjoy playing with Webby, and my recent work with RTeX has tweaked my interest in integrating PDF generation. Here’s a walkthrough on how to add a quick filter to do just that.

Installing the Goods

First of all, some prerequisites:
  1. Get started on Webby, and create a project.
  2. Install RTeX
  3. Brush up on your LaTeX (see the RTeX FAQ for a pointer on resources).

If you’ve done all this, you’re ready… if you haven’t, you’re just skimming to see if this is interesting and/or simple, and that’s okay, too.

Creating a Document

Let’s create a file in your Webby content/ directory called example.tex and put the following in it:

---
extension: pdf
created_at: 2008-04-29 08:12:58.135564 -05:00
layout: false
filter: rtex
---
\documentclass[12pt]{article}
\begin{document}

\title{A simple RTeX-generated PDF}
\author{You \\ your-address@your-site.com}
\maketitle

\newpage

See, it's simple\ldots

\end{document}

Okay, LaTeX content aside (it can be a bit much to take in if you’re not used to it), this is a simple document.

The first portion of the file (the part that looks suspiciously like a YAML document) is the metadata. The first thing you should notice is the rtex filter we’re assigning, which we’ll work on shortly.

We also set some other bits; the extension so that the generated document is named correctly (ie, example.pdf), and layout, which we unset (you could use a nice, reusable LaTeX layout, but let’s skip that for this example).

A Simple Filter

Creating the filter for Webby is easy; it’s just the bit of glue that sticks RTeX and Webby together.

In your Webby project’s lib/ directory (create it if needed), add a file. You can call it whatever you like, but let’s use rtex_filter.rb for now.

Here’s the contents of the file:

require 'rtex'
Webby::Filters.register :rtex do |input, cursor|
  RTeX::Document.new(input).to_pdf
end

Not exactly rocket science, is it?

The Results

Now, regenerate your site. I commonly keep this running, as you can read about in the Webby documentation:

  rake autobuild

You should find example.pdf in the corresponding location under output/. Just link it from your normal Webby pages; and here’s mine, freshly generated.

Obviously this is a simple document, but don’t let that fool you. Much more complex documents can be generated, for example this fancy sample from an TeX Tutorial was also generated live.

With very few changes to the filter (eg, looking for additional processing options in a page’s metadata), arbitrarily complex documents can be created directly from Webby.

Not bad for a “runt with a special knack for transforming text” and a gem that’s a poor man’s binding.

Monday April 28th, 2008

RTeX 2 Preview 1 Released

From Bruce Williams—Ruby, Rails, and Design - Home, 8 months ago, 0 comments Comment

I’m happy to release RTeX 2 Preview 1 (v1.99.0), now available as a gem from RubyForge. RTeX can be used as a plugin with Rails 2.0.1+.

History

In 2006 I released a Rails plugin, Rtex, used to generate PDFs via the LaTeX typesetting system. It became a popular choice for people looking for a more advanced alternative to PDF::Writer, especially for larger documents.

Wiebe Cazemier joined the project in 2007, helping to improve the plugin and fielding patches and bug reports.

RTeX 2

RTeX 2 isn’t just a Rails plugin; it’s distributed as a gem and includes a standalone executable that can be used to process documents outside a Rails process (for delayed processing or use in some other type of application) through a series of custom filters (eg, Textile).

For more details…

Saturday April 19th, 2008

RubyLearning Interview

From Bruce Williams—Ruby, Rails, and Design - Home, 8 months ago, 0 comments Comment

Satish Talim of RubyLearning.com just posted my responses to several questions he posed on Ruby as a language and my tips on mastering it.

It was a fun interview, and around a topic I really enjoy speaking about; Thanks Satish!

Monday April 14th, 2008

Migrating to Ruby 1.9

From Bruce Williams—Ruby, Rails, and Design - Home, 9 months ago, 0 comments Comment

Here’s the slides for the other talk I gave at Scotland on Rails, going over the syntax and language feature changes between Ruby 1.8 and Ruby 1.9.

This is a significantly updated and expanded version of a similar talk I gave at the Austin on Rails meeting in February.

Migrating to Ruby 1.9

Introduction to Ruby

From Bruce Williams—Ruby, Rails, and Design - Home, 9 months ago, 0 comments Comment

Here are the slides for the talk I gave at the Scotland on Rails charity workshop on April 3rd … to a group of very forgiving attendees who had graciously donated money only to see the first speaker arrive late and out-of-breath!

As you might imagine, the content of the talk is fairly elementary—but if you’re looking for a brief, code-centric overview of Ruby’s language features and syntax this might be the ticket.

Introduction to Ruby

Sunday April 13th, 2008

Playing Catch-Up

From Bruce Williams—Ruby, Rails, and Design - Home, 9 months ago, 0 comments Comment

It’s been a busy month, finishing up a big release at work and then escaping to hang out in the UK for a bit. Not that it’s an excuse to go dark, of course, but I have been preoccupied!

Scotland on Rails was a really excellent conference. A smallish regional event (even the regional conferences are getting big these days), it was a largely single-track event and had a very cohesive feel. I was lucky to be able to present twice during the conference; “Introduction to Ruby” for the charity workshop and a “Migrating to Ruby 1.9” plenary session (slides for both of these to be posted soon).

The conference covered a wide range of material; a good bit of pure Ruby (which always makes me happy), a suitable amount of Rails-centric sessions (it is Scotland on Rails, after all), and even an Erlang talk for good measure.

From an adoption standpoint, Scotland felt very US-in-late-2006 to me; a lot of individual passion and interest in the technology, a number of smaller companies actively using it, some large company/academic interest. It seems like there’s a lot of opportunity for growth, given the number of smart people around. It will be interesting to see what happens in the coming year or two; I definitely plan on returning to see for myself!

Thanks again to Alan, Paul, Abdel, and Graeme for all their hard work putting the conference together. This sort of thing is not a trivial undertaking!

To those I met over Ruby or a pint—let’s keep in touch!

Saturday February 23rd, 2008

Scotland on Rails, April 4th-5th

From Bruce Williams—Ruby, Rails, and Design - Home, 10 months ago, 0 comments Comment

I love Ruby (and Rails) conferences. I attend as many as I can each year, and I’m especially excited about Scotland on Rails coming up in early April. Sure, part of it might be that I haven’t been back to the UK since I was a teenager (and I plan to cool my heels in Edinburgh for a few extra days), but more than anything else, it’s about meeting new people and reconnecting with old friends. It looks like there will be a wide range of both present at Scotland on Rails, and hopefully plenty of hacking, too!

I’ll be speaking at about Ruby 1.9 at the conference, and there’s a great lineup of other talks about a wide range of subjects. If you can make it to Edinburgh April 4th-5th, register away ... hope to see you there!

Monday February 18th, 2008

Advice for a Java Developer

From Bruce Williams—Ruby, Rails, and Design - Home, 10 months ago, 0 comments Comment

The following is a slightly modified excerpt from an email I sent to a local Java developer interested in Ruby and Rails and looking for some advice. It includes a list of general purpose books I consider worth reading (though the list is by no means exhaustive) and basic tips I give people that are interested in pursuing an understanding of Ruby.

Over the last two years or so there’s definitely been an influx of people from Java, and that seems to be accelerating. Two of the developers I work with, in fact (Brian and Mike), are [somewhat] recent converts from Java; you’re definitely not alone.

With as much Java experience as you have, you probably don’t need a lot of hand-holding; but there are some concepts in Ruby might be somewhat foreign to you (depending on the rest of your background)—specifically concepts like block closures and the level of dynamicism present in the language. If you’re looking for books, I’d recommend you familiarize yourself with:

I think it’s important you get a firm grounding in the language before the framework, but here are some Rails (framework-level) books:

Make sure you’re spending time:

  • Reading code that highlights “best practices” (The Ruby Cookbook and Rails Recipes books above illustrate some examples); obviously like any community there are differences on opinion on what constitutes good, idiomatic Ruby, but I can give you some recommendations on specific projects
  • Spending some time with Ruby developers (Austin on Rails is certainly a good place to start if you’re in the Austin, TX area); collaborate on an actual project if you can, but there’s value in just chatting, as well
  • Following what’s going on in the Ruby community; there are a number of websites, mailing lists, and IRC channels that can help

I consider these steps far more important than a full bookshelf.

Wednesday February 6th, 2008

Ruby 1.9 Comparison App

From Bruce Williams—Ruby, Rails, and Design - Home, 11 months ago, 0 comments Comment

As a follow-up to my Ruby 1.9 presentation post: the Ruby 1.8/1.9 comparison app that I wrote for and demoed at the Austin on Rails meeting in January is now available via github.

Download Application

As you might imagine, the project was a quick hack and could use some work. Comment on, modify, and contribute at your leisure.

Monday February 4th, 2008

Ruby 1.9 Presentation

From Bruce Williams—Ruby, Rails, and Design - Home, 11 months ago, 0 comments Comment

At the most recent Austin on Rails meeting, I gave a talk on Ruby 1.9, highlighting some important syntax and language feature changes. Here’s a copy of that presentation, if you’d like a peek (sorry it’s taken so long, with the hosting switch).

Ruby 1.9

I’ll toss up the 1.8/1.9 comparison app in the next few days.

Monday January 28th, 2008

The Statesman on Rails

From Bruce Williams—Ruby, Rails, and Design - Home, 11 months ago, 0 comments Comment

At the January meeting of Austin on Rails, we had a couple visitors from the Austin American-Statesman newspaper (which everyone around here just calls “The Statesman”), covering Rails’ mindshare and market penetration in the city for an article published today.

The first thing you’ll probably notice, looking at the page, is the huge Rails logo; you can even enlarge it, if you’d like. Beyond that, there’s a fairly even-handed article to read, and even a couple pictures (thankfully, the one with me hunched over my MBP hastily cobbling together the last few slides on my presentation has disappeared). If you’re interested in Ruby/Rails from either a development or a business standpoint, it’s probably worth a read.

Crazy how this little language grew up.

Austin on Rails

A lot of credit needs to go to Damon Clinkscales and the others who were around when the group first started. There’s a lot of value in actual, face-to-face, cross-company technical and social interaction for developers, and I’ve been really happy to hang around with these guys this year. This type of thing makes for a tighter knit community, a better support network, and opportunities for collaboration. If you’re a developer and you’re not taking a couple hours out of every month (or every week, with a Cafe Bedouin or ARCTAN style meeting) getting to know like-minded developers in your community, you’re shooting yourself in the foot, period.

Anyhow, a bit of code and beer never hurt anyone. Theoretically.

Welcome Back, Codefluency

From Bruce Williams—Ruby, Rails, and Design - Home, 11 months ago, 0 comments Comment

A couple weeks ago I moved hosts, and while doing so put up a parking page. Life interceded, and I was down a bit longer than I would have liked, but codefluency is back up and running.

Some temporary shortcomings at the moment are, in order of importance:
  1. -The atom feed (which seems to be the way a good percentage of people pick this up)- This should be working now; it’s up at its old location.
  2. -The need to rewrite incoming links (tag articles/ on the front of those old links at the moment)- This should also be working. Let me know if you run into any bad links.
Notably, and possibly permanently missing are:
  1. Search. Most browser-based readers come here directly for a specific article, and search has been essentially unused. Google does a better job of indexing the site in any case, so if it’s needed just tack site:codefluency.com onto the front of your query, and voila .
  2. Comments. I love an active community just as much as the next guy (likely more, in fact), but I’ve always found the best type of communication of a more active (live, if possible) nature. I’ve had some great comments in the past, but the signal-to-noise ratio hasn’t been very compelling, even counting out spam. I’ve had a much better experience with those people who send a direct email, tweet, or IM (even if it’s just to say ‘hi’). If something’s said that’s worth an update to an article, it’ll happen. I’ve wrestled a bit with this, but that’s my conclusion; at least for the time being.

Now the obligatory comments on the current incarnation. Those of you that have known me for any length of time know how I feel about this website; it’s a playground, and it changes often. I had the previous design up for well over six months, which is likely a record for me. I’ll probably keep it that way.

So this time, a bit darker and content-focused. I’ve added a bit of vector art… which I’ve alternately heard called Rock Star and Maoist this time; an interesting stylistic overlap, I suppose. I’d heard comments that my old artwork looked dated, especially as it related to my hair (I’m growing it out for charity, so it’s obviously not short and spiky anymore), so this is a bit more accurate.

A quick note on the technologies used this go. I’ve opted for static pages, which is pretty refreshing for a guy who’s been up to his eyeballs in web frameworks, most notably Rails, for the past few years. I’m using Webby for generation; Tim Pease is both a good friend and a wickedly smart guy, and I really like what he’s put together. It’s built in Ruby, of course, and reminds me of the type of generation framework I wanted to write coming off of bloxsom years ago, but could never get quite right; Tim has done a much better job than I ever could. Webby comes with a rake autobuild task, which integrated with Jeremy Hinegardner’s heel and launchy projects makes on-the-fly generation a snap. Use Webby for static pages if you want something simple and straightforward.

Git and Nginx make up the rest of the toolkit; the website is actually a master repo that gets reset on update (thanks to ReinH’s suggestion and this script called in a post-update hook).

So, quick and simple is the callword for this version.

Okay, enough meta for now.

Tuesday December 18th, 2007

1.0

Taming Your Views

From Bruce Williams—Ruby, Rails, and Design - Home, 1 year ago, 0 comments Comment

Here’s a note I should have posted a couple weeks ago..

The Taming Your Views talk I gave at the Charity Workshop for the Lone Star Ruby Conference is available at MindBites (along with the other talks filmed that night), with proceeds going to charity.

MindBites has some interesting videos (and you get some free credits when you sign up), so go have a look. Many thanks to Damon Clinkscales for putting the workshop together and handing video QA.

« older items