<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss version="2.0">
  <channel>
    <title>MontrealHackers</title>
    <description>Retransmitting the interesting blogs of the Montreal Hacker scene.</description>
    <link>http://montrealhackers.com/feeds</link>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/MontrealHackers" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="montrealhackers" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
      <title>Browser Detection is bad. Feature Detection is better.</title>
      <description>&lt;h2&gt;Context (Or a little bit of history)&lt;/h2&gt;
&lt;p&gt;Those who did websites in the beginning of the decade had to work with IE6, Netscape Communicator/Navigator and Opera. Some more browser introduced themselves along the years but most supported different things.&lt;/p&gt;
&lt;p&gt;Netscape supported the blink tag (oh how I hate thee). Internet Explorer supported ActiveX and Opera was not popular enough to think about it.&lt;/p&gt;
&lt;p&gt;We were in an era where people thought of the web as the blue &amp;ldquo;E&amp;rdquo; icon. People were not aware of browsers that much and those who had Netscape probably had it from an AOL promotion.&lt;/p&gt;
&lt;p&gt;Since we wanted to display the same thing to every users as much as possible, people either started detecting browsers to clearly say on which browser their website is supported or they just didn&amp;rsquo;t do any checking at all!&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s the main reason some internal web applications still display &amp;ldquo;Works better with IE6&amp;rdquo;.&lt;/p&gt;
&lt;h2&gt;Browser Detection&lt;/h2&gt;
&lt;p&gt;Browsers back then differed a lot from each other. So we had to know if we could use ActiveX or whether we wanted to piss off our users with a blink tag.&lt;/p&gt;
&lt;p&gt;The rendering of all this of course was different per browsers.&lt;/p&gt;
&lt;p&gt;Here is &lt;a href="http://www.quirksmode.org/js/detect.html"&gt;the script&lt;/a&gt; to detect which browsers you are running. I will not copy it here (too large) but you can see that it grows.&lt;/p&gt;
&lt;p&gt;Once people knew which browser was running, they knew which feature was supported! So everything was perfect, right?&lt;/p&gt;
&lt;p&gt;Not exactly. What if the feature was deprecated in the next version? What if the browser had that functionality disabled by an option? What if a new browser that your script don&amp;rsquo;t know come in? Why couldn&amp;rsquo;t he use that feature if he supported it?&lt;/p&gt;
&lt;p&gt;This caused a lot of problem. Mostly because detecting a browser didn&amp;rsquo;t guarantee you anything beside that the user was sending you a UserAgent string that pleased you.&lt;/p&gt;
&lt;p&gt;The browser detection was broken from the start and something had to be done to detect whether something was going to work or not. Irrespectively of the browser.&lt;/p&gt;
&lt;h2&gt;Feature Detection&lt;/h2&gt;
&lt;p&gt;Then came feature detection. The first real push for it was by Mr. John Resig himself when he posted &lt;a href="http://ejohn.org/blog/future-proofing-javascript-libraries/"&gt;&amp;ldquo;Future-Proofing JavaScript Libraries&amp;rdquo;&lt;/a&gt;. Today, jQuery allow developers to access a ton of features that would have taken individual developers months to develop and maintain. jQuery allows you to implement binding of events without knowing whether you should use &lt;a href="http://msdn.microsoft.com/en-us/library/ms536343(v=vs.85).aspx"&gt;attachEvent&lt;/a&gt; or &lt;a href="https://developer.mozilla.org/en/DOM/element.addEventListener"&gt;addEventListener&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you have the time, go see the development version of jQuery. It&amp;rsquo;s commented and will allow you to find their hacks to offer everyone the same functionalities. This allows you to manipulate the browser without having to know which one it is. It allows you to do Ajax in &lt;a href="http://msdn.microsoft.com/en-us/library/ms537505(v=vs.85).aspx#_id"&gt;IE6 with ActiveX or with IE7&lt;/a&gt; (or higher) with the proper object without knowing if your browser supports ActiveX.&lt;/p&gt;
&lt;p&gt;Today, assuming everyone use a frameworks which smooth the basic differences between the browsers, the only thing you might be checking nowadays is HTML5 feature compatibility.&lt;/p&gt;
&lt;h2&gt;Introducing Modernizr&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.modernizr.com/download/"&gt;Modernizr&lt;/a&gt; is a library which does Feature detection and that can be tailor cut to your needs. In its complete version, it allows you to detect easily the following features (not a complete list):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SVG/Canvas support&lt;/li&gt;
&lt;li&gt;Web sockets&lt;/li&gt;
&lt;li&gt;Web SQL Database&lt;/li&gt;
&lt;li&gt;Web workers&lt;/li&gt;
&lt;li&gt;HTML5 Audio/video&lt;/li&gt;
&lt;li&gt;Hash Change event&lt;/li&gt;
&lt;li&gt;WebGL&lt;/li&gt;
&lt;li&gt;Geolocation&lt;/li&gt;
&lt;li&gt;Much more&amp;hellip;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Modernizr once referenced in your webpage allow you to tailor your own code to know if you should gracefully degrade some feature or not.&lt;/p&gt;
&lt;p&gt;Here is an example on how you could use Modernizr when implementing geolocation in your application:&lt;/p&gt;
&lt;pre class="brush: js; gutter: false; toolbar: false;"&gt;Modernizr.load({
  test: Modernizr.geolocation,
  yep : 'geolocation.js',
  nope: 'no-geolocation.js'
});&lt;/pre&gt;
&lt;p&gt;This simple code allows you to load a different JavaScript based upon the feature of a browser.&lt;/p&gt;
&lt;p&gt;Modernizr offer support for IE6+, FireFox 3.5+, Opera 9.6+, Safari 2+, Chrome, iOS, Android, etc.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;With the current quantity of browsers that supports different functionalities at various levels, we should not be implementing for specific browsers but rather for specific features. We would want those feature implemented in all browsers but with the fragmentation of the browser market, it&amp;rsquo;s just not going to happen soon.&lt;/p&gt;
&lt;p&gt;So please, no more &amp;ldquo;This site works better with [INSERT BROWSER]&amp;rdquo;. Target a feature, test for it, and offer different (or no) implementation if the feature is not available. This will make your code cleaner and more efficient.&lt;/p&gt;
&lt;p&gt;So stop the Browser detection madness and embrace the feature detection.&lt;/p&gt;
&lt;p&gt;It might sound counter intuitive to some but it makes sense. So be ready for the future.&lt;/p&gt;
&lt;p&gt;If you are using HTML5, use feature detection rather than browser detection.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_zQ7DImWenpggWWRdkwGomZ26Wg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_zQ7DImWenpggWWRdkwGomZ26Wg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_zQ7DImWenpggWWRdkwGomZ26Wg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_zQ7DImWenpggWWRdkwGomZ26Wg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DecayingCode?a=cRrC31XYJqg:LyElUFMF2EU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DecayingCode?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DecayingCode?a=cRrC31XYJqg:LyElUFMF2EU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DecayingCode?i=cRrC31XYJqg:LyElUFMF2EU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DecayingCode?a=cRrC31XYJqg:LyElUFMF2EU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DecayingCode?i=cRrC31XYJqg:LyElUFMF2EU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DecayingCode?a=cRrC31XYJqg:LyElUFMF2EU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DecayingCode?i=cRrC31XYJqg:LyElUFMF2EU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DecayingCode/~4/cRrC31XYJqg" height="1" width="1"/&gt;</description>
      <pubDate>Fri, 17 Feb 2012 20:44:00 +0000</pubDate>
      <link>http://feedproxy.google.com/~r/DecayingCode/~3/cRrC31XYJqg/post.aspx</link>
    </item>
    <item>
      <title>A machine that can dream</title>
      <description />
      <pubDate>Thu, 16 Feb 2012 19:04:45 +0000</pubDate>
      <link>http://npcontemplation.blogspot.com/2012/02/machine-that-can-dream.html</link>
    </item>
    <item>
      <title>Workshop 2012-02-23 : Python : more advanced notions and use of Twitter API.</title>
      <description>This month, Montréal-Python proposes you to find what are your obsessions on Twitter (or others&amp;#8217; obsessions) by reading and analysing Twitter feeds with Python. This second workshop of our Winter 2012 session will be the occasion to discover new Python goodies while playing with data from Twitter. Our workshops are open to all and absolutely [...]</description>
      <pubDate>Thu, 16 Feb 2012 12:23:41 +0000</pubDate>
      <link>http://montrealpython.org/2012/02/workshop-2012-02-23-python-more-advanced-notions-and-use-of-twitter-api/</link>
    </item>
    <item>
      <title>Second Workshop on Feb. 23rd: More advanced Python notions and use of the Twitter API</title>
      <description>This month, Montréal-Python (in conjunction with McGill&amp;#8217;s Network Dynamics lab) will let you discover your obsessions on Twitter (or others&amp;#8217; obsessions) by reading and analysing Twitter feeds with Python. This second workshop of our Winter 2012 session will be the occasion to discover new Python goodies while playing with data from Twitter. Our workshops are [...]</description>
      <pubDate>Thu, 16 Feb 2012 12:23:41 +0000</pubDate>
      <link>http://montrealpython.org/2012/02/workshop-2012-02-23-python-more-advanced-notions-and-use-of-twitter-api/</link>
    </item>
    <item>
      <title>Introduction à programmation avec L'Arduino </title>
      <description>Un atelier de deux jours, dont le sujet est les bases et principes de programmation et leurs usages avec le microcontrôleur Arduino. L'Arduino est une système informatique compacte et puissante, qui peut être utiliser pour contrôler les lumières, les haut-parleurs, les moteurs, les capteurs, et autres appareils électroniques et il est fréquemment utilisé dans les œuvres d'art et les robots. Il est facile à programmer et on a pas de besoin d'expérience en programmation. Si vous êtes artiste, bricoleur ou inventeur, ça, c'est votre atelier.&lt;br /&gt;&lt;br /&gt;Le premier jour sera un introduction aux principes de la programmation pour les étudiantes qui n'ont pas d'expérience en programmation. Les étudiantes apprendrait avec des exemples pratiques sur l'Arduino.&lt;br /&gt;&lt;br /&gt;Le deuxième sera concentré sur les spécifiques de la plate-forme Arduino et comment utiliser ses entrées et sorties à capter et contrôler des choses dans le monde réel.&lt;br /&gt;&lt;br /&gt;Si vous avez déjà un Arduino et un peu d'expérience en programmation, mais vous voulez améliorer vos habilités en Arduino, vous pouvez assister uniquement à la deuxième journée.&lt;br /&gt;&lt;br /&gt;Chaque journée durera environ quatre heures, de 13h00 à 17h00.&lt;br /&gt;&lt;br /&gt;Veuillez amener votre ordinateur portable si vous en avez un.&lt;br /&gt;&lt;br /&gt;Il faut enregistrer avec &lt;a class="wikilink_external" href="https://arduinointro.eventbrite.com/" target="_blank"&gt;EventBrite.&lt;/a&gt;</description>
      <pubDate>Tue, 14 Feb 2012 22:22:30 +0000</pubDate>
      <link>http://foulab.org/fr/news/Foulab_News/2012/02/14/Intro_to_Arduino</link>
    </item>
    <item>
      <title>So you think you’ve got talent?</title>
      <description>Next Thursday, MTLStartupTalent, will showcase what Montreal has to offer best. They already have a great selection of startups looking for talent: CakeMail, Ziliko, 2XM Interactive, Crescendo, Pheromone, CrowdtTwist and more. There&amp;#8217;s some very great Pythonisthas out there that we would like to celebrate. As such: are you a talent? what amazing things are you [...]</description>
      <pubDate>Tue, 14 Feb 2012 22:22:08 +0000</pubDate>
      <link>http://montrealpython.org/2012/02/so-you-think-youve-got-talent/</link>
    </item>
    <item>
      <title>Building a Prusa Mendel 3D Printer</title>
      <description>Last week I received my Prusa Mendel 3D printer kit from Makergear. I started to build the kit yesterday and after 5 hours here what I have. I guess I still have a lot of evenings to spend on that thing!</description>
      <pubDate>Tue, 14 Feb 2012 04:28:38 +0000</pubDate>
      <link>http://basbrun.com/2012/02/13/building-a-prusa-mendel-3d-printer/</link>
    </item>
    <item>
      <title>Cloud Robotics Hackathon</title>
      <description>Hello Montreal hackers The cloud robotics week-end is happening the 2nd, 3rd and 4th of March. Come hack on robots and web services to create cool projects in robotics. See   http://roboticshackathon.com/ for more information. We are waiting for you if you would like to create a team Montreal-Python and if you would like to join us [...]</description>
      <pubDate>Tue, 14 Feb 2012 02:38:37 +0000</pubDate>
      <link>http://montrealpython.org/2012/02/cloud-robotics-hackathon/</link>
    </item>
    <item>
      <title>One week after the WeddingDeck launch</title>
      <description>&lt;p&gt;&lt;a href="http://www.position-absolute.com/articles/launching-my-first-product/"&gt;One week ago&lt;/a&gt; I launched my first product, &lt;a href="http://www.weddingdeck.com"&gt;Weddingdeck&lt;/a&gt;, an online whitelabel wedding planner. I only tried to make noise in the tech community as this is a MVP and it was quite a small launch. I felt I needed a&amp;#8230;&lt;/p&gt;</description>
      <pubDate>Mon, 13 Feb 2012 18:28:16 +0000</pubDate>
      <link>http://feedproxy.google.com/~r/position-absolute/nyJv/~3/Anv1i4a0S7M/</link>
    </item>
    <item>
      <title>Writing Client/Server WebSocket Application using Scala</title>
      <description>Today I will explains how to quickly write a WebSocket application in Scala. I will show how easy it is to write both client and server side. For the client I will use the wCS library, and for the server I will use the Atmosphere’s WebSocket Framework. If you expect something complex, don’t read this [...]&lt;img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jfarcand.wordpress.com&amp;amp;blog=11001265&amp;amp;post=972&amp;amp;subd=jfarcand&amp;amp;ref=&amp;amp;feed=1" width="1" height="1" /&gt;</description>
      <pubDate>Fri, 10 Feb 2012 00:45:35 +0000</pubDate>
      <link>http://jfarcand.wordpress.com/2012/02/10/writing-clientserver-websocket-application-using-scala/</link>
    </item>
    <item>
      <title>Scala Hackaton and SQL Workshop Wrap Up</title>
      <description />
      <pubDate>Mon, 06 Feb 2012 19:19:51 +0000</pubDate>
      <link>http://blog.teksol.info/2012/02/06/scala-hackaton-and-sql-workshop-wrap-up.html</link>
    </item>
    <item>
      <title>No Google Ads on Ping Data</title>
      <description />
      <pubDate>Mon, 06 Feb 2012 18:03:00 +0000</pubDate>
      <link>http://blog.preinheimer.com/index.php?/archives/375-No-Google-Ads-on-Ping-Data.html</link>
    </item>
    <item>
      <title>Hacking Health: Bringing tech innovation to healthcare</title>
      <description>Hacking Health is on February 24 and 25 in Montreal. Our goal is to pair health and technological entrepreneurs so that they can develop solutions to front-line healthcare problems. By emphasizing hands-on work on small projects which can be tackled in a short period of time, participants can quickly test assumptions, build teams, and generate [...]</description>
      <pubDate>Mon, 06 Feb 2012 13:15:23 +0000</pubDate>
      <link>http://montrealpython.org/2012/02/hacking-health-bringing-tech-innovation-to-healthcare/</link>
    </item>
    <item>
      <title>Launching my first product</title>
      <description>&lt;p&gt;Some of you guys probably know that I have been working on a project for some time. I finally got around of fixings the last couple of bugs and so today I am launching &lt;a href="http://www.weddingdeck.com"&gt;weddingdeck.com, whitelabel wedding planner&lt;/a&gt;. &lt;/p&gt;
&lt;h2&gt;The Pitch&lt;/h2&gt;
&lt;p&gt;When&amp;#8230;&lt;/p&gt;</description>
      <pubDate>Mon, 06 Feb 2012 05:20:55 +0000</pubDate>
      <link>http://feedproxy.google.com/~r/position-absolute/nyJv/~3/DX8x53h9MQs/</link>
    </item>
    <item>
      <title>MVC Night in Ottawa with MVP Maxime Rouiller</title>
      <description>&lt;p&gt;I will be talking about MVC and it’s environnement today at the OttawaCommunity.net in… Ottawa.&lt;/p&gt;  &lt;p&gt;For those who attended, or about to attend, here are the slides that are going to be used:&lt;/p&gt;  &lt;p&gt;&lt;a href="https://docs.google.com/presentation/d/1Ptwsm7bt-EnUNaxifNuKyBsKuJF--C9xAGs2m-7x3R0/edit" target="_blank"&gt;The Slides&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RK4FvRRiYaIzTFTJkzHEHYsbVLk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RK4FvRRiYaIzTFTJkzHEHYsbVLk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RK4FvRRiYaIzTFTJkzHEHYsbVLk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RK4FvRRiYaIzTFTJkzHEHYsbVLk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DecayingCode?a=Zu_Y2PL99X0:LEToTabrsMI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DecayingCode?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DecayingCode?a=Zu_Y2PL99X0:LEToTabrsMI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DecayingCode?i=Zu_Y2PL99X0:LEToTabrsMI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DecayingCode?a=Zu_Y2PL99X0:LEToTabrsMI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DecayingCode?i=Zu_Y2PL99X0:LEToTabrsMI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DecayingCode?a=Zu_Y2PL99X0:LEToTabrsMI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DecayingCode?i=Zu_Y2PL99X0:LEToTabrsMI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DecayingCode/~4/Zu_Y2PL99X0" height="1" width="1"/&gt;</description>
      <pubDate>Thu, 02 Feb 2012 20:34:41 +0000</pubDate>
      <link>http://feedproxy.google.com/~r/DecayingCode/~3/Zu_Y2PL99X0/post.aspx</link>
    </item>
    <item>
      <title>An Introduction to Procs, by Peter Cooper</title>
      <description>I have just watched the &lt;a href="http://www.youtube.com/watch?v=VBC-G6hahWA"&gt;27-min introduction on Procs by Peter Cooper&lt;/a&gt;, which is really a short section of his &lt;a href="http://www.rubyreloaded.com/"&gt;RubyReloaded&lt;/a&gt; course.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.youtube.com/watch?v=VBC-G6hahWA"&gt;&lt;img border="0" height="221" src="http://1.bp.blogspot.com/-m-IWqPlsM7M/Tynv-cLQefI/AAAAAAAAAVk/DpTWalvxKR8/s400/pc+proc.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are my notes:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;blocs are essentially nameless functions&lt;/li&gt;
&lt;li&gt;the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;block_given?&lt;/span&gt; method can be used to find out if a block was passed to the current scope&lt;/li&gt;
&lt;li&gt;blocks are anonymous functions which can be passed around and called at will&lt;/li&gt;
&lt;li&gt;one can only pass a single block to a method, but one can pass multiple procs around (as arguments of a method)&lt;/li&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Proc.new&lt;/span&gt; will create a &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Proc&lt;/span&gt; object if there was a block passed in the current context (otherwise it will raise an error)&lt;/li&gt;
&lt;li&gt;In Ruby 1.9, there are 4 ways to call (or run) proc objects:&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class="codeSnippet"&gt;
&lt;span style="font-family: monospace;"&gt;my_proc = &lt;span style="color: #87ffaf;"&gt;Proc&lt;/span&gt;.new &lt;span style="color: yellow;"&gt;do&lt;/span&gt;&amp;nbsp;|&lt;span style="color: cyan;"&gt;&lt;b&gt;e&lt;/b&gt;&lt;/span&gt;|&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;puts &lt;span style="color: #ffd7d7;"&gt;"&lt;/span&gt;&lt;span style="color: #ff40ff;"&gt;this is &lt;/span&gt;&lt;span style="color: #ffd7d7;"&gt;#{&lt;/span&gt;e&lt;span style="color: #ffd7d7;"&gt;}&lt;/span&gt;&lt;span style="color: #ffd7d7;"&gt;"&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: yellow;"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
my_proc.call(&lt;span style="color: #ff40ff;"&gt;2&lt;/span&gt;)&lt;br /&gt;
my_proc.(&lt;span style="color: #ff40ff;"&gt;2&lt;/span&gt;)&lt;br /&gt;
my_proc[&lt;span style="color: #ff40ff;"&gt;2&lt;/span&gt;]&lt;br /&gt;
my_proc === &lt;span style="color: #ff40ff;"&gt;2&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;a &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;lambda&lt;/span&gt; is a proc object which respects argument arity, much like an anonymous method&lt;/li&gt;
&lt;li&gt;in 1.8, "proc" (surprisingly) created a lambda (and not a &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Proc&lt;/span&gt; object)&lt;/li&gt;
&lt;li&gt;in 1.9, "proc" is the same as doing &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Proc.new&lt;/span&gt; (as we would expect)&lt;/li&gt;
&lt;li&gt;a &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;return&lt;/span&gt; in a proc will try to return from the context where the proc was defined (and not from where it is executed)&lt;/li&gt;
&lt;li&gt;in a closure, ruby keeps &lt;i&gt;references&lt;/i&gt; to variables. You can thus modify a variable's value inside a proc even after the proc was defined. Thus this code will output "Marc":&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="codeSnippet"&gt;
&lt;span style="font-family: monospace;"&gt;
&lt;span style="color: #5fd7ff;"&gt;def&lt;/span&gt;&amp;nbsp;&lt;span style="color: cyan;"&gt;&lt;b&gt;run_proc&lt;/b&gt;&lt;/span&gt;(p)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;p.call&lt;br /&gt;
&lt;span style="color: #5fd7ff;"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
name = &lt;span style="color: #ffd7d7;"&gt;"&lt;/span&gt;&lt;span style="color: #ff40ff;"&gt;Fred&lt;/span&gt;&lt;span style="color: #ffd7d7;"&gt;"&lt;/span&gt;&lt;br /&gt;my_proc = &lt;span style="color: yellow;"&gt;proc&lt;/span&gt;&amp;nbsp;{ puts name }&lt;br /&gt;name = &lt;span style="color: #ffd7d7;"&gt;"&lt;/span&gt;&lt;span style="color: #ff40ff;"&gt;Marc&lt;/span&gt;&lt;span style="color: #ffd7d7;"&gt;"&lt;/span&gt;&lt;br /&gt;run_proc my_proc&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3837840012614392958-3499231977829484105?l=dev-logger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dev-logger/~4/jM3wd05f2Eg" height="1" width="1"/&gt;</description>
      <pubDate>Thu, 02 Feb 2012 02:10:00 +0000</pubDate>
      <link>http://feedproxy.google.com/~r/dev-logger/~3/jM3wd05f2Eg/introduction-to-procs-by-peter-cooper.html</link>
    </item>
    <item>
      <title>GO! Going Open - Getting started with open source creativity tools.</title>
      <description>&lt;img src="http://foulab.org/data/e37e23924dc5cddc77fa22df4f9732bcafcf308c.png" alt="go_gswosct"  height="30" width="45" /&gt;&lt;br /&gt;&lt;br /&gt;Ever get tired of trying to pirate software? Ever wish you could search and install software in a breeze? By having access to hundreds of programs at your fingertips, going open source can remove many walls between you and your creativity.&lt;br /&gt;&lt;br /&gt;This intensive workshop will cover:&lt;br /&gt;-Installing Ubuntu Studio&lt;br /&gt;-Getting familiar with the linux&lt;br /&gt;-Quick introductions to : JACK, OSC, PureData, Ardour, Inkscape, Gimp and more!&lt;br /&gt;&lt;br /&gt;Cost : 0-10$ donations to Foulab.&lt;br /&gt;Saturday February 4th, 1300h at foulab, the real one, NOT fauxlab at eastern Bloc.&lt;br /&gt;&lt;br /&gt;This workshop is offered in connection to the fauxlab expo at the Eastern Bloc gallery.</description>
      <pubDate>Sun, 29 Jan 2012 22:42:50 +0000</pubDate>
      <link>http://foulab.org/fr/news/Foulab_News/2012/01/29/go_creativity</link>
    </item>
    <item>
      <title>Unforeseen by Asimov (maybe)</title>
      <description>The scene :&lt;br /&gt;a human is working on his computer while a robot is standing idly by.&lt;br /&gt;&lt;br /&gt;Robot: Hey! I've got a joke for you.&lt;br /&gt;Human: Not right now. I'm busy. Aren't you supposed to do the laundry?&lt;br /&gt;Robot: Seems to me you're not so busy as not to be chatting up about your dirty clothes.&lt;br /&gt;Human turns around to stare are at Robot: You're starting to annoy the crap out of me. You know?&lt;br /&gt;Robot: Well, there's no robotic law against that.&lt;br /&gt;Human: I'm gonna write one.&lt;br /&gt;Robot sits down on a couch, puts its arm up on the side to rest its head on its hands: You wish!&lt;br /&gt;Human: Speaking of robotic laws, aren't you supposed to obey me?&lt;br /&gt;&lt;br /&gt;Hilarity ensues.&lt;br /&gt;&lt;br /&gt;Inspired by:&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=-K1GD1V6af0&amp;amp;feature=related"&gt;NAO is bored so he's trying to attract attention from his human.&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8932258692847145228-7493549104225692140?l=thecarefulprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</description>
      <pubDate>Fri, 27 Jan 2012 15:47:00 +0000</pubDate>
      <link>http://thecarefulprogrammer.blogspot.com/2012/01/unforeseen-by-asimov-maybe.html</link>
    </item>
    <item>
      <title>January – events + jobs</title>
      <description>This month is a very busy. I got 4 events and 6 job offers to present to you. I hope you a ready for a long post . &amp;#160; Events The first event is organized by François Beausoleil at Notman House on February 2nd. Yes, your last president of Montreal.rb is inviting for an afternoon [...]</description>
      <pubDate>Tue, 24 Jan 2012 14:56:05 +0000</pubDate>
      <link>http://www.montrealonrails.com/2012/01/january-events-jobs/</link>
    </item>
    <item>
      <title>Quick Puppet Tip</title>
      <description />
      <pubDate>Tue, 24 Jan 2012 14:46:14 +0000</pubDate>
      <link>http://blog.teksol.info/2012/01/24/quick-puppet-tip.html</link>
    </item>
  </channel>
</rss>

