intertwingly

It’s just data

Technology behind Whimsy.apache.org


W

Slides for my ApacheCon talk.  Right/left goes to the next/previous section, up/down for navigating with a section.

The demo is unfortunately only available to ASF committers (for privacy reasons, as it exposes email addresses).

Angular.rb example


Tim Bray: If hating this is wrong, I don’t want to be right.

Perhaps you would like this better?  :-)

...

Time Warner Rate Hike


Backdrop:

With that context, today I got in the mail notification that my rates are set to go up by 60% as my “Promotional” rates (Seriously?  A twenty two year long promotion?) will be expiring.  After spoofing my User Agent as the chat function doesn’t recognize my browser/operating system combination, I verified this is indeed the plan with “Veronica”.  I was then provided a transcript and directed to an online survey when promptly logged me off without submitting my feedback once I had completed it.

I plan to follow up with @TWC_Help.

Wunderbar JQuery filter


W

I got a suggestion to look into React.js, a JavaScript library which is focused on the problemspace that Angular.js’s directive addresses.

One of the ways React.js facilitates the creation of web components is via JSX which mixes “XML” with JavaScript.  The “XML” is “desugared” into React.DOM calls.

Based on this idea, I created a Wunderbar jquery filter to “desugar” Wunderbar calls into JQuery calls.  The tests show some of the conversions.  I also updated my Bootstrap modal dialog directive to make use of this: before => after.

Ruby2js += underscore.js


When compared to Ruby, JavaScript doesn’t have as much functional support built in.  Underscore.js fills that gap for many.  Underscore.js, in turn, was inspired by Ruby’s Enumerable module.  A underscore filter (tests) completes the mapping.

In many cases, the resulting JavaScript is formed by applying a number of filter rules.

...

Ruby2JS Attribute=>Property support


Ruby2JS now maps Ruby attributes to JavaScript properties.

...

HTML5 Mode Links


Based on a suggestion by Tim Bray, I converted my board agenda Angular.js application to use html5 mode.  The process was straightforward:

1) add the following to your application configuration:

$locationProvider.html5Mode(true).hashPrefix('!')

2) Add a <base> element to my generated HTML, indicating which part of my path was “owned” by the server.

3) Convert my relative links.  Based on how my application was structured:

I’ve not yet tested it with Internet Explorer <= 9, but the Angular.js docs indicate that it should work there too.

Software in 2014


Tim Bray: We’re at an inflection point in the practice of constructing software. Our tools are good, our server developers are happy, but when it comes to building client-side software, we really don’t know where we’re going or how to get there.

While I agree with much of this post, I really don’t think the conclusion is as bad as Tim portrays things. I agree that there are good server side frameworks, and doing things like MVC is the way to go.

I just happen to believe that this is true on the client too – including MVC. Not perfect, perhaps, but more than workable. And full disclosure, I’m firmly on the HTML5-rocks side of the fence.

...

Wunderbar Tutorial


W

I’ve begun work on a Wunderbar tutorial.

Feedback welcome.

Angular.rb update


It does indeed turn out that language macros can reduce the amount of Angular.js boilerplate configuration to a minimum.  In the process I’ve spun off ruby2js is a standalone supporting library.

Angular.rb


I’m looking into what it would take to make it easier to produce Angular.JS client applications using a server coded in Ruby.  The approach I’m taking is to convert idiomatic Ruby into idiomatic AngularJS JavaScript.

Demo.  Corresponds roughly to tutorial step 4Example outputSpecs.

Mavericks


Did a clean install of Mavericks on my test mac-mini.  Things to be aware of for next time:

xcode-select --install

sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain

sudo mkdir -p /usr/local/lib; sudo ln -s /usr/local/mysql/lib/libmysql* /usr/local/lib

The Pile of Poo Test™


Mathias Bynens: Whenever you’re working on a piece of JavaScript code that deals with strings or regular expressions in some way, just add a unit test that contains a pile of poo (💩) in a string, and see if anything breaks. It’s a quick, fun, and easy way to see if your code supports astral symbols. Once you’ve found a Unicode-related bug in your code, all you need to do is apply the techniques discussed in this post to fix it.

Download RESTful Web Services


Leonard Richardson: Hey, folks, I got some pretty exciting news. Now that RESTful Web APIs has come out, there’s really no reason to buy 2007’s RESTful Web Services. So Sam Ruby and I and O’Reilly have gotten together and started giving the old book away. You can get a PDF from the RESTful Web APIs website or from my now-ancient RESTful Web Services site. The license is BY-NC-ND.

Opal looks very promising


W

Opal is a Ruby to JavaScript compiler.  The team working on it are not only working to bring access to JavaScript libraries (like jquery) but also to replicate Ruby library interfaces.  Walking through a simple example...

...

Time Warner Cable Update


I finally debugged why my cable service was so poor.  Long story short, an inexplicable 7dB drop in the incoming line, a bad arrangement of splitters, and another unexplained 7dB drop someplace in the house; , which leads to the following question:

If Time Warner Cable is moving towards digital only service, shouldn’t they be providing enough signal strength to drive all of the devices in the house?

...

Ruby bindings for Gumbo HTML5 parser


Jonathan Tang: We’re pleased to announce the open source release of the Gumbo HTML parser, a C implementation of the HTML5 parsing algorithm.

I’ve posted a proof of concept Ruby binding to github.

Prosody as a personal xmpp server


Nearly six years ago, I set up a personal Jabber server using ejabberd.  This setup survived the server migration to Ubuntu 8.04 and 10.04.  This past weekend, I attempted to migrate that to a server running 12.04 and all I could get out of it was an erlang crash dump.

A quick scan for successors turned up prosody. Configuration was as simple as adding a VirtualHost and setting allow_registration to true.

Cooking with Chef


It didn’t take long for me to outgrow using a shell script for deployment.  The new chef solo recipes are considerably more verbose, but can be updated and rerun many times.

My usage is undoubtedly more idiomatic Ruby than idiomatic Chef, and I’m not tapping into the vast Chef ecosystem, but I can now provision a new virtual machine for running tests in under 3 minutes.

Vagrant Rocks


Yesterday, I used vagrant for the first time.  Within a few hours, I had a reproducible bootstrap that can run my Agile Web Development with Rails tests.  For the short term, this is useful for regression testing the Installation chapter.  Longer term, hopefully it will make it easier for the rails-core team to reproduce problems.