Skip to content
Browse files

Site updated at 2013-11-13 05:54:13 UTC

  • Loading branch information...
1 parent 9e92a3c commit 8b6572af912e877526eab5c5e3a949e4356c05c4 @benhamill committed
Showing with 1,166 additions and 559 deletions.
  1. +4 −4 2008/12/13/new-blog/index.html
  2. +4 −4 2008/12/16/a-hub-for-gits/index.html
  3. +4 −4 2008/12/16/sudo-on-windows-xp-sort-of/index.html
  4. +4 −4 2008/12/23/otherinbox-is-for-email-from-computers/index.html
  5. +4 −4 2009/01/09/save-versus-github/index.html
  6. +4 −4 2009/02/10/my-twitter-project-atreply/index.html
  7. +4 −4 2009/02/12/version-control-your-computer/index.html
  8. +4 −4 2009/03/18/git-tutorials-suck-a-sucky-git-tutorial/index.html
  9. +4 −4 2009/04/30/bad-getting-away-with-it/index.html
  10. +4 −4 2009/05/07/concern-over-separation-of-concerns/index.html
  11. +4 −4 2009/06/05/the-happy-hacker/index.html
  12. +4 −4 2009/06/09/the-new-breed-of-hacker/index.html
  13. +4 −4 2009/07/31/breaking-expectations/index.html
  14. +4 −4 2009/09/14/new-side-project-heygovote/index.html
  15. +4 −4 2009/10/01/feedback-wanted-blog-topic/index.html
  16. +4 −4 2009/10/07/fyi-my-tastes-in-role-playing-games/index.html
  17. +4 −4 2009/11/17/new-roleplaying-blog/index.html
  18. +4 −4 2009/11/25/vi-improved/index.html
  19. +4 −4 2009/12/07/my-git-talk-at-austin-on-rails/index.html
  20. +4 −4 2009/12/22/thoughts-on-google-wave/index.html
  21. +4 −4 2010/03/02/efficiency-in-algorithms-everywhere/index.html
  22. +4 −4 2010/04/16/open-source-fail/index.html
  23. +4 −4 2010/05/06/final-post/index.html
  24. +4 −4 2010/05/07/my-first-ruby-gem/index.html
  25. +4 −4 2010/06/10/how-do-you-make-a-gem/index.html
  26. +4 −4 2010/10/22/modeling-dominion/index.html
  27. +4 −4 2011/01/14/release-twitter_atm-1-0/index.html
  28. +4 −4 2011/06/01/falsiness-and-null-objects/index.html
  29. +4 −4 2011/08/25/a-smarter-has_many-through/index.html
  30. +4 −4 2012/01/04/the-parameter-object-pattern/index.html
  31. +4 −4 2012/01/19/changems/index.html
  32. +4 −4 2012/02/03/install-ruby-enterprise-edition-with-ruby-install-on-arch-linux/index.html
  33. +4 −4 2012/08/31/lol-civil-liberties/index.html
  34. +4 −4 2013/04/28/social-justice-is-made-of-empathy/index.html
  35. +4 −4 2013/09/03/never-type-bundle-exec-again/index.html
  36. +4 −4 2013/09/18/bens-gem-maintainer-handbook/index.html
  37. +6 −4 2013/11/05/thinking-about-hal-clients/index.html
  38. +362 −0 2013/11/12/hal-client-update-cetacean/index.html
  39. +4 −4 about/index.html
  40. +110 −16 atom.xml
  41. +17 −7 blog/archives/index.html
  42. +142 −131 index.html
  43. +129 −47 page/2/index.html
  44. +47 −159 page/3/index.html
  45. +159 −5 page/4/index.html
  46. +45 −41 sitemap.xml
  47. +1 −1 stylesheets/screen.css
View
8 2008/12/13/new-blog/index.html
@@ -182,6 +182,10 @@ <h1 class="entry-title">New Blog</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -197,10 +201,6 @@ <h1 class="entry-title">New Blog</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2008/12/16/a-hub-for-gits/index.html
@@ -184,6 +184,10 @@ <h1 class="entry-title">A Hub for Gits</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -199,10 +203,6 @@ <h1 class="entry-title">A Hub for Gits</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2008/12/16/sudo-on-windows-xp-sort-of/index.html
@@ -178,6 +178,10 @@ <h1 class="entry-title">Sudo on Windows XP... Sort Of</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -193,10 +197,6 @@ <h1 class="entry-title">Sudo on Windows XP... Sort Of</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2008/12/23/otherinbox-is-for-email-from-computers/index.html
@@ -194,6 +194,10 @@ <h1 class="entry-title">OtherInbox Is for Email From Computers</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -209,10 +213,6 @@ <h1 class="entry-title">OtherInbox Is for Email From Computers</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2009/01/09/save-versus-github/index.html
@@ -190,6 +190,10 @@ <h1 class="entry-title">Save Versus GitHub!</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -205,10 +209,6 @@ <h1 class="entry-title">Save Versus GitHub!</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2009/02/10/my-twitter-project-atreply/index.html
@@ -250,6 +250,10 @@ <h1 class="entry-title">My Twitter Project: Atreply</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -265,10 +269,6 @@ <h1 class="entry-title">My Twitter Project: Atreply</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2009/02/12/version-control-your-computer/index.html
@@ -192,6 +192,10 @@ <h1 class="entry-title">Version Control Your Computer</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -207,10 +211,6 @@ <h1 class="entry-title">Version Control Your Computer</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2009/03/18/git-tutorials-suck-a-sucky-git-tutorial/index.html
@@ -290,6 +290,10 @@ <h1 class="entry-title">Git Tutorials Suck, a Sucky Git Tutorial</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -305,10 +309,6 @@ <h1 class="entry-title">Git Tutorials Suck, a Sucky Git Tutorial</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2009/04/30/bad-getting-away-with-it/index.html
@@ -192,6 +192,10 @@ <h1 class="entry-title">Bad & Getting Away With It</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -207,10 +211,6 @@ <h1 class="entry-title">Bad & Getting Away With It</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2009/05/07/concern-over-separation-of-concerns/index.html
@@ -178,6 +178,10 @@ <h1 class="entry-title">Concern Over Separation of Concerns</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -193,10 +197,6 @@ <h1 class="entry-title">Concern Over Separation of Concerns</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2009/06/05/the-happy-hacker/index.html
@@ -178,6 +178,10 @@ <h1 class="entry-title">The Happy Hacker</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -193,10 +197,6 @@ <h1 class="entry-title">The Happy Hacker</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2009/06/09/the-new-breed-of-hacker/index.html
@@ -180,6 +180,10 @@ <h1 class="entry-title">The New Breed of Hacker</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -195,10 +199,6 @@ <h1 class="entry-title">The New Breed of Hacker</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2009/07/31/breaking-expectations/index.html
@@ -186,6 +186,10 @@ <h1 class="entry-title">Breaking Expectations</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -201,10 +205,6 @@ <h1 class="entry-title">Breaking Expectations</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2009/09/14/new-side-project-heygovote/index.html
@@ -208,6 +208,10 @@ <h1 class="entry-title">New Side Project: HeyGoVote</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -223,10 +227,6 @@ <h1 class="entry-title">New Side Project: HeyGoVote</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2009/10/01/feedback-wanted-blog-topic/index.html
@@ -181,6 +181,10 @@ <h1 class="entry-title">Feedback Wanted: Blog Topic</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -196,10 +200,6 @@ <h1 class="entry-title">Feedback Wanted: Blog Topic</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2009/10/07/fyi-my-tastes-in-role-playing-games/index.html
@@ -198,6 +198,10 @@ <h1 class="entry-title">FYI: My Tastes in Role Playing Games</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -213,10 +217,6 @@ <h1 class="entry-title">FYI: My Tastes in Role Playing Games</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2009/11/17/new-roleplaying-blog/index.html
@@ -174,6 +174,10 @@ <h1 class="entry-title">New Roleplaying Blog</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -189,10 +193,6 @@ <h1 class="entry-title">New Roleplaying Blog</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2009/11/25/vi-improved/index.html
@@ -178,6 +178,10 @@ <h1 class="entry-title">Vi Improved</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -193,10 +197,6 @@ <h1 class="entry-title">Vi Improved</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2009/12/07/my-git-talk-at-austin-on-rails/index.html
@@ -232,6 +232,10 @@ <h1 class="entry-title">My Git Talk at Austin on Rails</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -247,10 +251,6 @@ <h1 class="entry-title">My Git Talk at Austin on Rails</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2009/12/22/thoughts-on-google-wave/index.html
@@ -194,6 +194,10 @@ <h1 class="entry-title">Thoughts on Google Wave</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -209,10 +213,6 @@ <h1 class="entry-title">Thoughts on Google Wave</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2010/03/02/efficiency-in-algorithms-everywhere/index.html
@@ -192,6 +192,10 @@ <h1 class="entry-title">Efficiency in Algorithms Everywhere</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -207,10 +211,6 @@ <h1 class="entry-title">Efficiency in Algorithms Everywhere</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2010/04/16/open-source-fail/index.html
@@ -178,6 +178,10 @@ <h1 class="entry-title">Open Source Fail</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -193,10 +197,6 @@ <h1 class="entry-title">Open Source Fail</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2010/05/06/final-post/index.html
@@ -174,6 +174,10 @@ <h1 class="entry-title">Final Post</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -189,10 +193,6 @@ <h1 class="entry-title">Final Post</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2010/05/07/my-first-ruby-gem/index.html
@@ -212,6 +212,10 @@ <h1 class="entry-title">My First Ruby Gem</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -227,10 +231,6 @@ <h1 class="entry-title">My First Ruby Gem</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2010/06/10/how-do-you-make-a-gem/index.html
@@ -178,6 +178,10 @@ <h1 class="entry-title">How Do You Make a Gem?</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -193,10 +197,6 @@ <h1 class="entry-title">How Do You Make a Gem?</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2010/10/22/modeling-dominion/index.html
@@ -199,6 +199,10 @@ <h1 class="entry-title">Modeling Dominion</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -214,10 +218,6 @@ <h1 class="entry-title">Modeling Dominion</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2011/01/14/release-twitter_atm-1-0/index.html
@@ -232,6 +232,10 @@ <h1 class="entry-title">Release: Twitter_atm 1.0</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -247,10 +251,6 @@ <h1 class="entry-title">Release: Twitter_atm 1.0</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2011/06/01/falsiness-and-null-objects/index.html
@@ -260,6 +260,10 @@ <h1 class="entry-title">Falsiness and Null Objects</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -275,10 +279,6 @@ <h1 class="entry-title">Falsiness and Null Objects</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2011/08/25/a-smarter-has_many-through/index.html
@@ -300,6 +300,10 @@ <h1 class="entry-title">A Smarter Has_many :through?</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -315,10 +319,6 @@ <h1 class="entry-title">A Smarter Has_many :through?</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2012/01/04/the-parameter-object-pattern/index.html
@@ -182,6 +182,10 @@ <h1 class="entry-title">The Parameter Object Pattern</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -197,10 +201,6 @@ <h1 class="entry-title">The Parameter Object Pattern</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2012/01/19/changems/index.html
@@ -180,6 +180,10 @@ <h1 class="entry-title">Changems</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -195,10 +199,6 @@ <h1 class="entry-title">Changems</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2012/02/03/install-ruby-enterprise-edition-with-ruby-install-on-arch-linux/index.html
@@ -328,6 +328,10 @@ <h1 class="entry-title">Install Ruby Enterprise Edition With Ruby-build on Arch
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -343,10 +347,6 @@ <h1 class="entry-title">Install Ruby Enterprise Edition With Ruby-build on Arch
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2012/08/31/lol-civil-liberties/index.html
@@ -266,6 +266,10 @@ <h1 class="entry-title">LOL Civil Liberties</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -281,10 +285,6 @@ <h1 class="entry-title">LOL Civil Liberties</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2013/04/28/social-justice-is-made-of-empathy/index.html
@@ -244,6 +244,10 @@ <h1 class="entry-title">Social Justice Is Made of Empathy</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -259,10 +263,6 @@ <h1 class="entry-title">Social Justice Is Made of Empathy</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2013/09/03/never-type-bundle-exec-again/index.html
@@ -287,6 +287,10 @@ <h1 class="entry-title">Never Type Bundle Exec Again</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -302,10 +306,6 @@ <h1 class="entry-title">Never Type Bundle Exec Again</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
8 2013/09/18/bens-gem-maintainer-handbook/index.html
@@ -282,6 +282,10 @@ <h1 class="entry-title">Ben's Gem Maintainer Handbook</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -297,10 +301,6 @@ <h1 class="entry-title">Ben's Gem Maintainer Handbook</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
10 2013/11/05/thinking-about-hal-clients/index.html
@@ -306,6 +306,8 @@ <h1 class="entry-title">Thinking About HAL Clients</h1>
<a class="basic-alignment left" href="/2013/09/18/bens-gem-maintainer-handbook/" title="Previous Post: Ben's Gem Maintainer Handbook">&laquo; Ben's Gem Maintainer Handbook</a>
+ <a class="basic-alignment right" href="/2013/11/12/hal-client-update-cetacean/" title="Next Post: HAL Client Update: Cetacean">HAL Client Update: Cetacean &raquo;</a>
+
</p>
</footer>
</article>
@@ -336,6 +338,10 @@ <h1 class="entry-title">Thinking About HAL Clients</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -351,10 +357,6 @@ <h1 class="entry-title">Thinking About HAL Clients</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
362 2013/11/12/hal-client-update-cetacean/index.html
@@ -0,0 +1,362 @@
+
+<!DOCTYPE html>
+<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
+<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
+<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
+<head>
+ <meta charset="utf-8">
+ <title>HAL Client Update: Cetacean - Garbled</title>
+ <meta name="author" content="Ben Hamill">
+
+
+ <meta name="description" content="After writing my last post, I used the code presented therein in production a
+few more days and realized I wanted just a smidge more power. &hellip;">
+
+
+ <!-- http://t.co/dKP3o1e -->
+ <meta name="HandheldFriendly" content="True">
+ <meta name="MobileOptimized" content="320">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+
+
+ <link rel="canonical" href="http://garbled.benhamill.com/2013/11/12/hal-client-update-cetacean">
+ <link href="/favicon.png" rel="icon">
+ <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
+ <link href="/atom.xml" rel="alternate" title="Garbled" type="application/atom+xml">
+ <script src="/javascripts/modernizr-2.0.js"></script>
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
+ <script>!window.jQuery && document.write(unescape('%3Cscript src="./javascripts/lib/jquery.min.js"%3E%3C/script%3E'))</script>
+ <script src="/javascripts/octopress.js" type="text/javascript"></script>
+ <!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
+<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
+<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
+
+
+
+</head>
+
+<body >
+ <header role="banner"><hgroup>
+ <h1><a href="/">Garbled</a></h1>
+
+</hgroup>
+
+</header>
+ <nav role="navigation"><div>
+ <ul class="subscription" data-subscription="rss">
+ <li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
+
+ </ul>
+
+ <form action="http://google.com/search" method="get">
+ <fieldset role="search">
+ <input type="hidden" name="q" value="site:garbled.benhamill.com" />
+ <input class="search" type="text" name="q" results="0" placeholder="Search"/>
+ </fieldset>
+ </form>
+
+ <ul class="main-navigation">
+ <li><a href="/">Blog</a></li>
+ <li><a href="/blog/archives">Archives</a></li>
+ <li><a href="/about">About</a></li>
+</ul>
+
+<div>
+</nav>
+ <div id="main-wrapper">
+ <div id="main">
+ <div id="content">
+ <div>
+<article class="hentry" role="article">
+
+ <header>
+
+ <h1 class="entry-title">HAL Client Update: Cetacean</h1>
+
+
+ <p class="meta">
+
+
+
+
+
+
+
+
+
+
+
+
+<time datetime="2013-11-12T22:35:00-06:00" pubdate data-updated="true">Nov 12<span>th</span>, 2013</time>
+
+ </p>
+
+ </header>
+
+
+<div class="entry-content"><p>After writing my last post, I used the code presented therein in production a
+few more days and realized I wanted just a <em>smidge</em> more power. Specifically, I
+wanted it to handle HAL&#39;s embedded resources. So I added that and then the other
+night, I pulled it out of that project, broke it up into files, named it after
+sea animals and pushed it to RubyGems.org. Introducing:
+<a href="https://rubygems.org/gems/cetacean">Cetacean</a>.</p>
+
+<p>Now, I realize my last post was all, &quot;Do we need HAL clients?&quot; and shit. But
+let&#39;s be real, even 42 lines is a HAL client. Or&#8230; whatever, depending on what
+your definition of &quot;client&quot;. In fact, the design of Cetacean is basically driven
+by thinking about what &quot;client&quot; means and what I felt like I needed a tool for
+with respect to HAL documents.</p>
+
+<p>Basically, Cetacean helps you deal with HAL documents, it doesn&#39;t really help
+you with hypermedia APIs. The general work flow is that you make a Faraday
+client (configured however seems best to you) and make a request to some URI.
+You feed the response to Cetacean and then operate on it. You might get a URI
+out of it (from a link, say), which you can then feed back to your Faraday
+client, which response you can feed to Cetacean, again, etc.</p>
+
+<p>Perhaps an example would be helpful:</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="n">api</span> <span class="o">=</span> <span class="no">Faraday</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="s1">&#39;https://api.example.com/&#39;</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">faraday</span><span class="o">|</span>
+</span><span class='line'> <span class="n">faraday</span><span class="o">.</span><span class="n">headers</span><span class="o">[</span><span class="s1">&#39;Accept&#39;</span><span class="o">]</span> <span class="o">=</span> <span class="s1">&#39;application/hal+json&#39;</span>
+</span><span class='line'><span class="k">end</span>
+</span><span class='line'>
+</span><span class='line'><span class="n">root</span> <span class="o">=</span> <span class="no">Cetacean</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">get</span><span class="p">)</span>
+</span></code></pre></td></tr></table></div></figure>
+
+<p>At this juncture, you can ask <code>root</code> about some stuff. It&#39;s an instance of
+<code>Cetacean::Responce</code>. It proxies some methods back to the <code>Faraday::Response</code>,
+and otherwise is mostly sugar for getting things out of the HAL document.</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+<span class='line-number'>6</span>
+<span class='line-number'>7</span>
+<span class='line-number'>8</span>
+<span class='line-number'>9</span>
+</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">success?</span> <span class="c1"># =&gt; true</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">status</span> <span class="c1"># =&gt; 200</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">response</span> <span class="c1"># =&gt; The `Faraday::Response` you passed in.</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">body</span> <span class="c1"># =&gt; &#39;{&quot;foo&quot;:&quot;bar&quot;,&quot;_links&quot;:{&quot;self&quot;:{&quot;href&quot;:&quot;/&quot;},&quot;users&quot;:{&quot;href&quot;:&quot;...&quot;}}}&#39;</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">hal?</span> <span class="c1"># =&gt; true</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">attributes</span> <span class="c1"># =&gt; { &#39;foo&#39; =&gt; &#39;bar&#39; }</span>
+</span><span class='line'><span class="n">root</span><span class="o">[</span><span class="s1">&#39;foo&#39;</span><span class="o">]</span> <span class="c1"># =&gt; &#39;bar&#39;</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">links</span> <span class="c1"># =&gt; { &#39;self&#39; =&gt; { &#39;href&#39; =&gt; &#39;/&#39; } }</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">get_uri</span><span class="p">(</span><span class="ss">:self</span><span class="p">)</span> <span class="c1"># =&gt; A `URITemplate` object for you to manipulate.</span>
+</span></code></pre></td></tr></table></div></figure>
+
+<p>So if you want to follow the &#39;self&#39; rel, you use <code>get_uri</code> method to get a
+template, do whatever you want with it (probably <code>to_s</code> and <code>expand</code> are the
+most common cases). And then&#8230; do whatever you want with that. Make another
+HTTP request? Get it tattooed on your stomach? Cetacean doesn&#39;t really care.</p>
+
+<p>Continuing on, imagine further interactions with an API. Notice that at each
+stage, Cetacean deals with the HAL, and then gets out of the way.</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="n">users</span> <span class="o">=</span> <span class="no">Cetacean</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">root</span><span class="o">.</span><span class="n">get_uri</span><span class="p">(</span><span class="ss">:users</span><span class="p">)</span><span class="o">.</span><span class="n">to_s</span><span class="p">))</span>
+</span><span class='line'><span class="n">user</span> <span class="o">=</span> <span class="n">users</span><span class="o">.</span><span class="n">embedded</span><span class="p">(</span><span class="ss">:users</span><span class="p">)</span><span class="o">.</span><span class="n">first</span>
+</span></code></pre></td></tr></table></div></figure>
+
+<p>Assuming that the &#39;users&#39; rel was some document that embedded an array of
+documents under the &#39;users&#39; rel, <code>user</code> is an instance of
+<code>Cetacean::EmbeddedResource</code>. It behaves mostly like a <code>Cetacean::Response</code>
+except is doesn&#39;t have a request object to proxy or refer to. Ideally, you
+shouldn&#39;t have to keep track of which came from where once you&#39;re dealing with a
+document.</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="n">important_blog_post</span> <span class="o">=</span> <span class="no">Cetacean</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">user</span><span class="o">.</span><span class="n">get_uri</span><span class="p">(</span><span class="ss">:post</span><span class="p">)</span><span class="o">.</span><span class="n">expand</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="mi">2</span><span class="p">)))</span>
+</span><span class='line'><span class="n">interesting_blog_posts</span> <span class="o">=</span> <span class="no">Cetacean</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">root</span><span class="o">.</span><span class="n">get_uri</span><span class="p">(</span><span class="ss">:search_posts</span><span class="p">)</span><span class="o">.</span><span class="n">expand</span><span class="p">(</span><span class="ss">q</span><span class="p">:</span> <span class="s1">&#39;interesting&#39;</span><span class="p">)))</span>
+</span></code></pre></td></tr></table></div></figure>
+
+<p>Just another couple of examples of following different links, both of these
+requiring expansion.</p>
+
+<p>This is certainly more wordy than using a more featureful library like
+Hyperclient or whatever. I feel that this gives you a lot more control over how
+you deal with the documents you get back. If you unexpectedly get back an
+invalid body, Cetacean won&#39;t barf trying to parse it like JSON, if you get back
+<code>&#39;image/jpeg&#39;</code> instead of <code>&#39;application/hal+json&#39;</code>, Cetacean makes it easy to
+deal with that however is most appropriate. If you need to do some fancy,
+weird-ass configuration of Faraday that&#39;s super specific to your use-case, then
+you don&#39;t have to worry about what a middle-man library might do to your
+connection configuration.</p>
+
+<p>Anyway, I guess I wrote another gem. If you use it, I&#39;d be interested to hear
+about it. If you want to help, feel free. It&#39;s
+<a href="https://github.com/benhamill/cetacean">on Github</a>.</p>
+</div>
+
+
+ <footer>
+ <p class="meta">
+
+
+
+<span class="byline author vcard">Posted by <span class="fn">Ben Hamill</span></span>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<time datetime="2013-11-12T22:35:00-06:00" pubdate data-updated="true">Nov 12<span>th</span>, 2013</time>
+
+
+
+ </p>
+ <p class="no-comments meta">
+ There's not a comments section on this blog any more. If you<br>
+ want, tweet at me or write your own post and send me the link.
+ </p>
+
+ <div class="sharing">
+
+ <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://garbled.benhamill.com/2013/11/12/hal-client-update-cetacean/" data-via="benhamill" data-counturl="http://garbled.benhamill.com/2013/11/12/hal-client-update-cetacean/" >Tweet</a>
+
+
+
+</div>
+
+
+ <p class="meta">
+
+ <a class="basic-alignment left" href="/2013/11/05/thinking-about-hal-clients/" title="Previous Post: Thinking About HAL Clients">&laquo; Thinking About HAL Clients</a>
+
+
+ </p>
+ </footer>
+</article>
+
+</div>
+
+<aside class="sidebar">
+
+
+<section>
+ <h1>About Me</h1>
+ <div id="twitter-profile">
+ <div id="author-card">
+ <img src="http://www.gravatar.com/avatar/4938b4569f1366168b705ce9c774ea5e" alt="Gravatar of Ben Hamill " title="Gravatar of Ben Hamill" />
+ <p id="name">Ben Hamill</p>
+ <p id="handle">@<a href="http://twitter.com/benhamill">benhamill</a></p>
+ <p id="liame">
+ <span id="obf"><script>document.getElementById("obf").innerHTML="<n uers=\"znvygb:ora@oraunzvyy.pbz\" gnetrg=\"_oynax\">ora@oraunzvyy.pbz</n>".replace(/[a-zA-Z]/g,function(c){return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);});</script>
+ <noscript><span style="unicode-bidi:bidi-override;direction:rtl;">moc.llimahneb@neb</span></noscript></span>
+ </p>
+ </div>
+ <p>Rubyist, hacker, gamer (video, board, role-playing), fanboy (Linux, git, vim, Firefly, Dr Pepper), language pedant. Nerd.</p>
+ </div>
+</section>
+
+<section>
+ <h1>Recent Posts</h1>
+ <ul id="recent_posts">
+
+ <li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
+ <a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
+ </li>
+
+ <li class="post">
+ <a href="/2013/09/18/bens-gem-maintainer-handbook/">Ben's Gem Maintainer Handbook</a>
+ </li>
+
+ <li class="post">
+ <a href="/2013/09/03/never-type-bundle-exec-again/">Never Type bundle exec Again</a>
+ </li>
+
+ <li class="post">
+ <a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
+ </li>
+
+ </ul>
+</section>
+
+<section>
+ <h1>GitHub Repos</h1>
+ <ul id="gh_repos">
+ <li class="loading">Status updating...</li>
+ </ul>
+
+ <a href="https://github.com/benhamill">@benhamill</a> on GitHub
+
+ <script type="text/javascript">
+ $(document).ready(function(){
+ if (!window.jXHR){
+ var jxhr = document.createElement('script');
+ jxhr.type = 'text/javascript';
+ jxhr.src = '/javascripts/libs/jXHR.js';
+ var s = document.getElementsByTagName('script')[0];
+ s.parentNode.insertBefore(jxhr, s);
+ }
+
+ github.showRepos({
+ user: 'benhamill',
+ count: 5,
+ skip_forks: true,
+ target: '#gh_repos'
+ });
+ });
+ </script>
+ <script src="/javascripts/github.js" type="text/javascript"> </script>
+</section>
+
+
+
+</aside>
+
+
+ </div>
+ </div>
+ </div>
+ <footer role="contentinfo"><p>
+ Copyright &copy; 2013 - Ben Hamill -
+ <span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
+</p>
+
+</footer>
+
+
+
+
+
+
+
+
+ <script type="text/javascript">
+ (function(){
+ var twitterWidgets = document.createElement('script');
+ twitterWidgets.type = 'text/javascript';
+ twitterWidgets.async = true;
+ twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
+ document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
+ })();
+ </script>
+
+
+
+
+
+</body>
+</html>
View
8 about/index.html
@@ -120,6 +120,10 @@ <h1 class="entry-title">About</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -135,10 +139,6 @@ <h1 class="entry-title">About</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
126 atom.xml
@@ -4,7 +4,7 @@
<title><![CDATA[Garbled]]></title>
<link href="http://garbled.benhamill.com/atom.xml" rel="self"/>
<link href="http://garbled.benhamill.com/"/>
- <updated>2013-11-06T09:53:16-06:00</updated>
+ <updated>2013-11-12T23:54:11-06:00</updated>
<id>http://garbled.benhamill.com/</id>
<author>
<name><![CDATA[Ben Hamill]]></name>
@@ -14,6 +14,115 @@
<entry>
+ <title type="html"><![CDATA[HAL Client Update: Cetacean]]></title>
+ <link href="http://garbled.benhamill.com/2013/11/12/hal-client-update-cetacean/"/>
+ <updated>2013-11-12T22:35:00-06:00</updated>
+ <id>http://garbled.benhamill.com/2013/11/12/hal-client-update-cetacean</id>
+ <content type="html"><![CDATA[<p>After writing my last post, I used the code presented therein in production a
+few more days and realized I wanted just a <em>smidge</em> more power. Specifically, I
+wanted it to handle HAL&#39;s embedded resources. So I added that and then the other
+night, I pulled it out of that project, broke it up into files, named it after
+sea animals and pushed it to RubyGems.org. Introducing:
+<a href="https://rubygems.org/gems/cetacean">Cetacean</a>.</p>
+
+<p>Now, I realize my last post was all, &quot;Do we need HAL clients?&quot; and shit. But
+let&#39;s be real, even 42 lines is a HAL client. Or&#8230; whatever, depending on what
+your definition of &quot;client&quot;. In fact, the design of Cetacean is basically driven
+by thinking about what &quot;client&quot; means and what I felt like I needed a tool for
+with respect to HAL documents.</p>
+
+<p>Basically, Cetacean helps you deal with HAL documents, it doesn&#39;t really help
+you with hypermedia APIs. The general work flow is that you make a Faraday
+client (configured however seems best to you) and make a request to some URI.
+You feed the response to Cetacean and then operate on it. You might get a URI
+out of it (from a link, say), which you can then feed back to your Faraday
+client, which response you can feed to Cetacean, again, etc.</p>
+
+<p>Perhaps an example would be helpful:</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="n">api</span> <span class="o">=</span> <span class="no">Faraday</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="s1">&#39;https://api.example.com/&#39;</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">faraday</span><span class="o">|</span>
+</span><span class='line'> <span class="n">faraday</span><span class="o">.</span><span class="n">headers</span><span class="o">[</span><span class="s1">&#39;Accept&#39;</span><span class="o">]</span> <span class="o">=</span> <span class="s1">&#39;application/hal+json&#39;</span>
+</span><span class='line'><span class="k">end</span>
+</span><span class='line'>
+</span><span class='line'><span class="n">root</span> <span class="o">=</span> <span class="no">Cetacean</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">get</span><span class="p">)</span>
+</span></code></pre></td></tr></table></div></figure>
+
+<p>At this juncture, you can ask <code>root</code> about some stuff. It&#39;s an instance of
+<code>Cetacean::Responce</code>. It proxies some methods back to the <code>Faraday::Response</code>,
+and otherwise is mostly sugar for getting things out of the HAL document.</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+<span class='line-number'>6</span>
+<span class='line-number'>7</span>
+<span class='line-number'>8</span>
+<span class='line-number'>9</span>
+</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">success?</span> <span class="c1"># =&gt; true</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">status</span> <span class="c1"># =&gt; 200</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">response</span> <span class="c1"># =&gt; The `Faraday::Response` you passed in.</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">body</span> <span class="c1"># =&gt; &#39;{&quot;foo&quot;:&quot;bar&quot;,&quot;_links&quot;:{&quot;self&quot;:{&quot;href&quot;:&quot;/&quot;},&quot;users&quot;:{&quot;href&quot;:&quot;...&quot;}}}&#39;</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">hal?</span> <span class="c1"># =&gt; true</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">attributes</span> <span class="c1"># =&gt; { &#39;foo&#39; =&gt; &#39;bar&#39; }</span>
+</span><span class='line'><span class="n">root</span><span class="o">[</span><span class="s1">&#39;foo&#39;</span><span class="o">]</span> <span class="c1"># =&gt; &#39;bar&#39;</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">links</span> <span class="c1"># =&gt; { &#39;self&#39; =&gt; { &#39;href&#39; =&gt; &#39;/&#39; } }</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">get_uri</span><span class="p">(</span><span class="ss">:self</span><span class="p">)</span> <span class="c1"># =&gt; A `URITemplate` object for you to manipulate.</span>
+</span></code></pre></td></tr></table></div></figure>
+
+<p>So if you want to follow the &#39;self&#39; rel, you use <code>get_uri</code> method to get a
+template, do whatever you want with it (probably <code>to_s</code> and <code>expand</code> are the
+most common cases). And then&#8230; do whatever you want with that. Make another
+HTTP request? Get it tattooed on your stomach? Cetacean doesn&#39;t really care.</p>
+
+<p>Continuing on, imagine further interactions with an API. Notice that at each
+stage, Cetacean deals with the HAL, and then gets out of the way.</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="n">users</span> <span class="o">=</span> <span class="no">Cetacean</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">root</span><span class="o">.</span><span class="n">get_uri</span><span class="p">(</span><span class="ss">:users</span><span class="p">)</span><span class="o">.</span><span class="n">to_s</span><span class="p">))</span>
+</span><span class='line'><span class="n">user</span> <span class="o">=</span> <span class="n">users</span><span class="o">.</span><span class="n">embedded</span><span class="p">(</span><span class="ss">:users</span><span class="p">)</span><span class="o">.</span><span class="n">first</span>
+</span></code></pre></td></tr></table></div></figure>
+
+<p>Assuming that the &#39;users&#39; rel was some document that embedded an array of
+documents under the &#39;users&#39; rel, <code>user</code> is an instance of
+<code>Cetacean::EmbeddedResource</code>. It behaves mostly like a <code>Cetacean::Response</code>
+except is doesn&#39;t have a request object to proxy or refer to. Ideally, you
+shouldn&#39;t have to keep track of which came from where once you&#39;re dealing with a
+document.</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="n">important_blog_post</span> <span class="o">=</span> <span class="no">Cetacean</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">user</span><span class="o">.</span><span class="n">get_uri</span><span class="p">(</span><span class="ss">:post</span><span class="p">)</span><span class="o">.</span><span class="n">expand</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="mi">2</span><span class="p">)))</span>
+</span><span class='line'><span class="n">interesting_blog_posts</span> <span class="o">=</span> <span class="no">Cetacean</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">root</span><span class="o">.</span><span class="n">get_uri</span><span class="p">(</span><span class="ss">:search_posts</span><span class="p">)</span><span class="o">.</span><span class="n">expand</span><span class="p">(</span><span class="ss">q</span><span class="p">:</span> <span class="s1">&#39;interesting&#39;</span><span class="p">)))</span>
+</span></code></pre></td></tr></table></div></figure>
+
+<p>Just another couple of examples of following different links, both of these
+requiring expansion.</p>
+
+<p>This is certainly more wordy than using a more featureful library like
+Hyperclient or whatever. I feel that this gives you a lot more control over how
+you deal with the documents you get back. If you unexpectedly get back an
+invalid body, Cetacean won&#39;t barf trying to parse it like JSON, if you get back
+<code>&#39;image/jpeg&#39;</code> instead of <code>&#39;application/hal+json&#39;</code>, Cetacean makes it easy to
+deal with that however is most appropriate. If you need to do some fancy,
+weird-ass configuration of Faraday that&#39;s super specific to your use-case, then
+you don&#39;t have to worry about what a middle-man library might do to your
+connection configuration.</p>
+
+<p>Anyway, I guess I wrote another gem. If you use it, I&#39;d be interested to hear
+about it. If you want to help, feel free. It&#39;s
+<a href="https://github.com/benhamill/cetacean">on Github</a>.</p>
+]]></content>
+ </entry>
+
+ <entry>
<title type="html"><![CDATA[Thinking About HAL Clients]]></title>
<link href="http://garbled.benhamill.com/2013/11/05/thinking-about-hal-clients/"/>
<updated>2013-11-05T22:17:00-06:00</updated>
@@ -1363,19 +1472,4 @@ Notice the gap between 4 and 5. It&#39;s spending those two turns buying Gold ,
]]></content>
</entry>
- <entry>
- <title type="html"><![CDATA[Vi Improved]]></title>
- <link href="http://garbled.benhamill.com/2009/11/25/vi-improved/"/>
- <updated>2009-11-25T00:00:00-06:00</updated>
- <id>http://garbled.benhamill.com/2009/11/25/vi-improved</id>
- <content type="html"><![CDATA[<p>I recently started using vim on my Linux machines for development (actually gvim and I just haven&#39;t gotten around to installing it on my Windows partition). I&#39;d tried to learn it some time ago with the understanding that it&#39;s awesome, but it didn&#39;t catch on. I know a lot of smart people who use it and it was always one of those things that I felt would be really valuable for me to learn, but&#8211;it was hard.</p>
-
-<p>Well, now it&#39;s easy. @<a href="http://twitter.com/adambair">adambair</a> mentioned <a href="http://www.derekwyatt.org/vim/vim-tutorial-videos/vim-novice-tutorial-videos/">this blog post</a> by <a href="http://www.derekwyatt.org/">Derek Wyatt</a>. It&#39;s a collection of videos he made introducing you to the most basic commands in vim. Enough to get your feet under you so that further research on your own has something to stick to. They&#39;re awesome.</p>
-
-<p>However, the reason they&#39;re awesome is not just that he takes you step by step through the most important stuff or that he&#39;s lighthearted and friendly-sounding. The awesome part is that he <em>shows</em> you why it is that vim is so raved about. If you try to learn vim thinking that it&#39;s like TextMate or NotePad or something, you won&#39;t get it. And until you get it, there&#39;s very little impetus to get over the learning hump (or through the dip, depending on which way you chart things in your head).</p>
-
-<p>The key to understanding, for me, was realizing this: You should not be spending most of your time with vim in insert mode. You should not be typing and selecting in the sense that Word teaches. You should be doing finds and replaces and yanks. You should be operating on your code with macros. If you&#39;re writing new code, great. You&#39;ll be in insert mode for a while, but even then, you&#39;ll want to invoke something that&#39;ll set up your class structure with maybe some default methods in it or something. And as soon as you&#39;re done, you&#39;ll want to be jumping around by line number, moving to a specific character in a line, replacing a segment of a line with two keystrokes. Really, just the movement possibilities blew my mind. So, <a href="http://vimeo.com/6999927">go watch the introduction</a>.</p>
-]]></content>
- </entry>
-
</feed>
View
24 blog/archives/index.html
@@ -9,10 +9,10 @@
<meta name="author" content="Ben Hamill">
- <meta name="description" content="Blog Archive 2013 Thinking About HAL Clients
+ <meta name="description" content="Blog Archive 2013 HAL Client Update: Cetacean
+Nov 12 2013 Thinking About HAL Clients
Nov 05 2013 Ben&#8217;s Gem Maintainer Handbook
-Sep 18 2013 Never Type bundle exec Again
-Sep 03 2013 &hellip;">
+Sep 18 2013 &hellip;">
<!-- http://t.co/dKP3o1e -->
@@ -85,6 +85,16 @@ <h1 class="entry-title">Blog Archive</h1>
<article>
+<h1><a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a></h1>
+<time datetime="2013-11-12T22:35:00-06:00" pubdate><span class='month'>Nov</span> <span class='day'>12</span> <span class='year'>2013</span></time>
+
+
+</article>
+
+
+
+<article>
+
<h1><a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a></h1>
<time datetime="2013-11-05T22:17:00-06:00" pubdate><span class='month'>Nov</span> <span class='day'>05</span> <span class='year'>2013</span></time>
@@ -497,6 +507,10 @@ <h1 class="entry-title">Blog Archive</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a>
+ </li>
+
+ <li class="post">
<a href="/2013/11/05/thinking-about-hal-clients/">Thinking About HAL Clients</a>
</li>
@@ -512,10 +526,6 @@ <h1 class="entry-title">Blog Archive</h1>
<a href="/2013/04/28/social-justice-is-made-of-empathy/">Social Justice is Made of Empathy</a>
</li>
- <li class="post">
- <a href="/2012/08/31/lol-civil-liberties/">LOL Civil Liberties</a>
- </li>
-
</ul>
</section>
View
273 index.html
@@ -9,9 +9,8 @@
<meta name="author" content="Ben Hamill">
- <meta name="description" content="More and more, at work, we&#39;re talking about service
-oriented architectures. Mostly, these are very small apps that deal with just a
-few concerns &hellip;">
+ <meta name="description" content="After writing my last post, I used the code presented therein in production a
+few more days and realized I wanted just a smidge more power. &hellip;">
<!-- http://t.co/dKP3o1e -->
@@ -75,6 +74,142 @@
<header>
+ <h1 class="entry-title"><a href="/2013/11/12/hal-client-update-cetacean/">HAL Client Update: Cetacean</a></h1>
+
+
+ <p class="meta">
+
+
+
+
+
+
+
+
+
+
+
+
+<time datetime="2013-11-12T22:35:00-06:00" pubdate data-updated="true">Nov 12<span>th</span>, 2013</time>
+
+ </p>
+
+ </header>
+
+
+ <div class="entry-content"><p>After writing my last post, I used the code presented therein in production a
+few more days and realized I wanted just a <em>smidge</em> more power. Specifically, I
+wanted it to handle HAL&#39;s embedded resources. So I added that and then the other
+night, I pulled it out of that project, broke it up into files, named it after
+sea animals and pushed it to RubyGems.org. Introducing:
+<a href="https://rubygems.org/gems/cetacean">Cetacean</a>.</p>
+
+<p>Now, I realize my last post was all, &quot;Do we need HAL clients?&quot; and shit. But
+let&#39;s be real, even 42 lines is a HAL client. Or&#8230; whatever, depending on what
+your definition of &quot;client&quot;. In fact, the design of Cetacean is basically driven
+by thinking about what &quot;client&quot; means and what I felt like I needed a tool for
+with respect to HAL documents.</p>
+
+<p>Basically, Cetacean helps you deal with HAL documents, it doesn&#39;t really help
+you with hypermedia APIs. The general work flow is that you make a Faraday
+client (configured however seems best to you) and make a request to some URI.
+You feed the response to Cetacean and then operate on it. You might get a URI
+out of it (from a link, say), which you can then feed back to your Faraday
+client, which response you can feed to Cetacean, again, etc.</p>
+
+<p>Perhaps an example would be helpful:</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="n">api</span> <span class="o">=</span> <span class="no">Faraday</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="s1">&#39;https://api.example.com/&#39;</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">faraday</span><span class="o">|</span>
+</span><span class='line'> <span class="n">faraday</span><span class="o">.</span><span class="n">headers</span><span class="o">[</span><span class="s1">&#39;Accept&#39;</span><span class="o">]</span> <span class="o">=</span> <span class="s1">&#39;application/hal+json&#39;</span>
+</span><span class='line'><span class="k">end</span>
+</span><span class='line'>
+</span><span class='line'><span class="n">root</span> <span class="o">=</span> <span class="no">Cetacean</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">get</span><span class="p">)</span>
+</span></code></pre></td></tr></table></div></figure>
+
+<p>At this juncture, you can ask <code>root</code> about some stuff. It&#39;s an instance of
+<code>Cetacean::Responce</code>. It proxies some methods back to the <code>Faraday::Response</code>,
+and otherwise is mostly sugar for getting things out of the HAL document.</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+<span class='line-number'>6</span>
+<span class='line-number'>7</span>
+<span class='line-number'>8</span>
+<span class='line-number'>9</span>
+</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">success?</span> <span class="c1"># =&gt; true</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">status</span> <span class="c1"># =&gt; 200</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">response</span> <span class="c1"># =&gt; The `Faraday::Response` you passed in.</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">body</span> <span class="c1"># =&gt; &#39;{&quot;foo&quot;:&quot;bar&quot;,&quot;_links&quot;:{&quot;self&quot;:{&quot;href&quot;:&quot;/&quot;},&quot;users&quot;:{&quot;href&quot;:&quot;...&quot;}}}&#39;</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">hal?</span> <span class="c1"># =&gt; true</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">attributes</span> <span class="c1"># =&gt; { &#39;foo&#39; =&gt; &#39;bar&#39; }</span>
+</span><span class='line'><span class="n">root</span><span class="o">[</span><span class="s1">&#39;foo&#39;</span><span class="o">]</span> <span class="c1"># =&gt; &#39;bar&#39;</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">links</span> <span class="c1"># =&gt; { &#39;self&#39; =&gt; { &#39;href&#39; =&gt; &#39;/&#39; } }</span>
+</span><span class='line'><span class="n">root</span><span class="o">.</span><span class="n">get_uri</span><span class="p">(</span><span class="ss">:self</span><span class="p">)</span> <span class="c1"># =&gt; A `URITemplate` object for you to manipulate.</span>
+</span></code></pre></td></tr></table></div></figure>
+
+<p>So if you want to follow the &#39;self&#39; rel, you use <code>get_uri</code> method to get a
+template, do whatever you want with it (probably <code>to_s</code> and <code>expand</code> are the
+most common cases). And then&#8230; do whatever you want with that. Make another
+HTTP request? Get it tattooed on your stomach? Cetacean doesn&#39;t really care.</p>
+
+<p>Continuing on, imagine further interactions with an API. Notice that at each
+stage, Cetacean deals with the HAL, and then gets out of the way.</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="n">users</span> <span class="o">=</span> <span class="no">Cetacean</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">root</span><span class="o">.</span><span class="n">get_uri</span><span class="p">(</span><span class="ss">:users</span><span class="p">)</span><span class="o">.</span><span class="n">to_s</span><span class="p">))</span>
+</span><span class='line'><span class="n">user</span> <span class="o">=</span> <span class="n">users</span><span class="o">.</span><span class="n">embedded</span><span class="p">(</span><span class="ss">:users</span><span class="p">)</span><span class="o">.</span><span class="n">first</span>
+</span></code></pre></td></tr></table></div></figure>
+
+<p>Assuming that the &#39;users&#39; rel was some document that embedded an array of
+documents under the &#39;users&#39; rel, <code>user</code> is an instance of
+<code>Cetacean::EmbeddedResource</code>. It behaves mostly like a <code>Cetacean::Response</code>
+except is doesn&#39;t have a request object to proxy or refer to. Ideally, you
+shouldn&#39;t have to keep track of which came from where once you&#39;re dealing with a
+document.</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="n">important_blog_post</span> <span class="o">=</span> <span class="no">Cetacean</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">user</span><span class="o">.</span><span class="n">get_uri</span><span class="p">(</span><span class="ss">:post</span><span class="p">)</span><span class="o">.</span><span class="n