intertwingly

It’s just data

New Toy

New laptop for work: MBP 15.4/2.6/16GB/1TBFlash.  First time I ever went the Apple route.  I did so as I figured with those specs, I could run multiple operating systems simultaneously.  So far, so good.  I’m using VirtualBox to do so.

Notes:

First, Mac OS X 10.9.  My biggest problem with previous versions of this operating system is that they always appeared to me to be fairly hostile to installing open source scripting languages and tools.  For example, each time I updated my Rails book, I would update the instructions on how to install the necessary software.  This now appears to be a thing of the past.  In fact, the only problem I’ve encountered so far is with mod_suexec.  That problem looks easy to address, and if it isn’t addressed by the team managing the brew recipe, I’ll simply compile the suexec bin myself.

Overall, much improved.  This is also my first experience with Apple’s trackpad; and I must say I’m a fan.

Next up, Ubuntu 14.04.  Installation was straightforward.  One only needs to be mindful to install dkms.  Enabling 3D acceleration is also worthwhile, but doesn’t quite get you to native graphics speeds on lesser hardware.  The end result is fully functional, though it is worth while to do most web browsing on the host operating system.

Then Windows 8.1.  This was by far the easiest as Microsoft provides time bombed VMs which you can easily import and use for up to 90 days.  When the 90 days are up, you can import again and start over.  I’ve now done this with both Ubuntu and Mac hosts.

Finally, Red Hat Enterprise Linux 6.5.  There were a few more steps to get this running, and even after doing so the result wasn’t fully functional in that it would not use the full display even after installing guest additions.  The solution ended up being to delete (or simply move elsewhere) the following files in the /etc/X11 directory: xorg.conf xorg.conf.d xorg.conf-vm.  I use this VM to access the IBM VPN and to run Lotus Notes.


Travisizing My Projects.

Today, I got a pull request from Ryan Grove to make nokogumbo work on Ruby 2.1 and add Travis support.  Very cool.  I was surprised how easy it was to set up.

A few hours later I got ruby2js to work on Ruby 2.0 and 2.1 and added Travis supportWunderbar worked right out of the box.


Frameworks as Stepping Stones

Joe Gregorio: But something else has happened over the past ten years; browsers got better. Their support for standards improved, and now there are evergreen browsers: automatically updating browsers, each version more capable and standards compliant than the last. With newer standards like HTML Imports, Object.observe, Promises, and HTML Templates I think it’s time to rethink the model of JS frameworks. There’s no need to invent yet another way to do something, just use HTML+CSS+JS.

I’m curious as to where Joe believes that these features came from.

...


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.