<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Notas de un Peregrino &#187; English</title>
	<atom:link href="http://www.malditocrc.com.ar/peregrino/category/en/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.malditocrc.com.ar/peregrino</link>
	<description>Articulos varios sobre la web, mozilla y firebug</description>
	<lastBuildDate>Thu, 12 Aug 2010 04:51:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Jetpack and Code Portability</title>
		<link>http://www.malditocrc.com.ar/peregrino/2010/08/jetpack-and-code-portability/</link>
		<comments>http://www.malditocrc.com.ar/peregrino/2010/08/jetpack-and-code-portability/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 16:47:29 +0000</pubDate>
		<dc:creator>Peregrino</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Jetpack]]></category>

		<guid isPermaLink="false">http://www.malditocrc.com.ar/peregrino/?p=184</guid>
		<description><![CDATA[Yesterday I was tinkering with my Multitouch Simulator Jetpack wondering if I could take the code out of it and make it a standalone library. I expected some pain extracting the code and making it work on a webpage as it's a somewhat different environment... I couldn't be more wrong. From the beginning I wanted [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I was tinkering with my Multitouch Simulator Jetpack wondering if I could take the code out of it and make it a standalone library. I expected some pain extracting the code and making it work on a webpage as it's a somewhat different environment... I couldn't be more wrong.</p>
<p>From the beginning I wanted to code the extension's modules in a way that would allow me to take them away from the Jetpack extension. But that was it, just a wish, I didn't write each single line thinking on portability. Hopefully things ended up better than I expected.<br />
When it was time to take the code out, I just copied the events dispatcher and files parser modules, performed 2 or 3 global replaces because of conflicting names and... job done! You can see the results <a href="http://www.malditocrc.com.ar/peregrino/lab/multitouch/demos/library">in here</a> with Firefox Minefield.</p>
<p>I think this is a great feature, not only meaning that you can take your code <em>out </em>from a Jetpack extension, but also the possibility of <em>putting in</em> a Jetpack previously coded <em>"for the web"</em> JavaScript libraries!</p>
<p>If you know me a little,  you would guess that I couldn't leave that possibility without a try... And you would be quite right <img src='http://www.malditocrc.com.ar/peregrino/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  So I took some little bit of code that Marcio Galli showed me on twitter, a QR-Code maker done entirely in Canvas+Javascript (see <a href="http://www.cipherbrain.be/wp/posts/main/2010/05/canvas-qr-code.html">here</a>), and decided to stuff it in a Jetpack.<br />
Again, a very effort-less thing with great results. I ported that code to Jetpack in a blink, and created a <a href="https://builder.mozillalabs.com/library/1000872/latest/">qr-code library for jetpack</a>, and in 5 more minutes, I had this <a href="https://builder.mozillalabs.com/addon/1000869/latest/">Selection-To-QRcode</a> extension running.</p>
<p>So, in brief, these are some exciting new possibilities to expand and remix the web and your experience with it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.malditocrc.com.ar/peregrino/2010/08/jetpack-and-code-portability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New recording features for the MT-Simulator</title>
		<link>http://www.malditocrc.com.ar/peregrino/2010/08/new-recording-features-for-the-mt-simulator/</link>
		<comments>http://www.malditocrc.com.ar/peregrino/2010/08/new-recording-features-for-the-mt-simulator/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 22:24:35 +0000</pubDate>
		<dc:creator>Peregrino</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[Jetpack]]></category>

		<guid isPermaLink="false">http://www.malditocrc.com.ar/peregrino/?p=171</guid>
		<description><![CDATA[The end of the Google Summer of Code is approaching and the Simulator have reached the Feature Completion stage. From now on, only minor bugfixes will be made untill the end of the project (August 16) when I have to submit the final code. From that on coding won't stop, is just that the GSoC [...]]]></description>
			<content:encoded><![CDATA[<p>The end of the Google Summer of Code is approaching and the Simulator have reached the Feature Completion stage. From now on, only minor bugfixes will be made untill the end of the project (August 16) when I have to submit the final code. From that on coding won't stop, is just that the GSoC ends. Probably the way things are done will be different and more feedback will be seek, but this project will surely continue.<br />
And now the news about this release...</p>
<p style="text-align: center;"><em><strong><span style="text-decoration: underline;">Notice<br />
</span></strong> If you don't want to read the whole stuff and go right to the testing and trying fun stuff, just jump to the "Links! Links! Links!" section <a href="#linkslinkslinks">on the bottom</a></em></p>
<p><strong>The new Recording features</strong></p>
<p>Something that was very very needed was a more natural way to record the input files. Doing so programatically tends to be more dificoult and troublesome than moving your mouse around, so something had to be done. After some thinking and discussion with Felipe, I came up with a more comfortable way to record the files. I'll describe it briefly here, but you can alsgo skip it and see a demo after the break <img src='http://www.malditocrc.com.ar/peregrino/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>Basically the UI consists of a representation of the fingers on the screen. Moving them with the mouse represents the movement of the fingers on the multitouch surface.</p>
<p>First you click the Start Recording Button and choose where to save the final file. Once the file is specified, the number of fingers that will be on-screen has to be chosen. Pushing the Finger Button will add a finger to the screen, but beware because there's no way to remove a finger for now.</p>
<p>Doing the recording is pretty straight forward. All fingers are recorded in cycles, one at a time starting from the first one added and then going sequentially with the rest. The cycle starts again when the last finger is done.<br />
Before starting to record the actual moves, you have to set the starting position of each finger. Doing so is pretty easy, drag the black-bordered (active) finger and then click on the Accept Button, then the next finger will be activated and so on. Once all the fingers are set, the recordings can start.</p>
<p>You will notice when the fingers are being recorded because a trace of the finger movement will appear on screen. If a mistake happens, the finger movement can be undone, and this can go as far as the first finger of the cycle. The recording cycles can be repeated until you decide to hit the save button.</p>
<p>When the cycle is finished (last finger moved) it can be played back, triggering the multitouch events on the page, with the Play button. This is in case some actions are needed in order to continue recording. Keep in mind that this is a replay of just the previous recorded cycle: you cannot do it twice and cycles don't accumulate.</p>
<p>When you decide the recording is done and click on the save button, the file will be closed and saved. Also, every element added for the recording will be removed from the screen.</p>
<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=13944884&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=13944884&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object><br /></p>
<p><strong>Multitouch Landed on trunk!</strong></p>
<p>For those who are wondering what does this means: Multitouch support is now on <a href="http://nightly.mozilla.org/">Minefield</a> and will be included on the Firefox 4 Beta 3 that is going to be released soon. This also means that the custom build I had to upload on <a href="http://www.malditocrc.com.ar/peregrino/2010/07/first-stop-on-the-road-to-completion/">my previous post</a> is no longer needed to try the extension <img src='http://www.malditocrc.com.ar/peregrino/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Links! Links! Links!<a name="linkslinkslinks"> </a></strong></p>
<p>You can <em>download the multitouch simulator 0.4</em> from AMO <a href="https://addons.mozilla.org/en-US/firefox/addon/214783"><strong>here</strong></a>. <span style="text-decoration:line-through;">Remember to download the xpi and drag n' drop it on firefox, that will do for installation. In Firefox 3.6 you'll have to restart to see the efects, but</span> in <a href="http://www.mozilla.com/firefox/beta/">Firefox 4 betas</a> the extension will load without restart <img src='http://www.malditocrc.com.ar/peregrino/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  If you find the bottom bar annoying, it can be hidden pressing Ctrl+Shift+U (or in OSX Cmnd+Shif+U).</p>
<p>If you just want to<em> see this in action on a live demo</em>, you can see the <strong><a href="http://www.malditocrc.com.ar/peregrino/lab/multitouch/demos/library">JavaScript library version here</a></strong> with the <a href="http://www.mozilla.com/firefox/beta/">Firefox 4 beta 3</a> or greater. You don't need to install any addon, is a stand-alone version of the code running on a demo page <img src='http://www.malditocrc.com.ar/peregrino/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Also, here you have a list of available demos to try the multitouch support coded by Felipe Gomes:</p>
<ul>
<li><a href="http://www.malditocrc.com.ar/peregrino/lab/multitouch/demos/imagecrop.htm">Image Crop</a><br />
Draw a rectangle to potentially "crop" an image with a pinch gesture</li>
<li><a href="http://www.malditocrc.com.ar/peregrino/lab/multitouch/demos/resize.htm">Image Resize</a><br />
Shrink and Enlarge images with pinch gestures. With two simultaneous pinches you can resize two different images</li>
<li><a href="http://www.malditocrc.com.ar/peregrino/lab/multitouch/demos/touchcanvas.htm">Touch Canvas</a><br />
Simple canvas that tracks your fingers</li>
<li><a href="http://www.malditocrc.com.ar/peregrino/lab/multitouch/demos/trackingdivs.htm">Tracking Divs</a><br />
Two divs keep tracking of the fingers you have on the screen</li>
<li><a href="http://www.malditocrc.com.ar/peregrino/lab/multitouch/demos/fluid.htm">Fluids</a><br />
Fluid simulation following your fingers!</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.malditocrc.com.ar/peregrino/2010/08/new-recording-features-for-the-mt-simulator/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>First stop on the road to completion</title>
		<link>http://www.malditocrc.com.ar/peregrino/2010/07/first-stop-on-the-road-to-completion/</link>
		<comments>http://www.malditocrc.com.ar/peregrino/2010/07/first-stop-on-the-road-to-completion/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 21:16:45 +0000</pubDate>
		<dc:creator>Peregrino</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[Jetpack]]></category>

		<guid isPermaLink="false">http://www.malditocrc.com.ar/peregrino/?p=157</guid>
		<description><![CDATA[Some time has passed from the first post I made, and the extension now is more "usable". We showcased both the Firefox Multitouch and the Simulator project in the Mozilla 2010 Summit's Science Fair with my mentor, Felipe Gomes, and the people who passed by our booth were very interested in both projects! The input [...]]]></description>
			<content:encoded><![CDATA[<p>Some time has passed from the <a href="http://www.malditocrc.com.ar/peregrino/2010/06/first-steps-into-google-summer-of-code/">first post I made</a>, and the extension  now is more "usable". We showcased both the Firefox Multitouch and the  Simulator project in the Mozilla 2010 Summit's Science Fair with my  mentor, Felipe Gomes, and the people who passed by our booth were very  interested in both projects! The input and the comments from the  assistants were great!</p>
<p><strong>Protocol optimized</strong></p>
<p>After  some tinkering with the old protocol, Felipe and I thought it was over  sized and a little repetitive to work with, so we put it on a diet. Now  it's more compact and kind of easier to work with, I'll show you/</p>
<p>This would be a sample file written with the new version:</p>
<blockquote>
<pre>{
  "frames":[
     {
       "positions":[
            {"id":"1","x":300,"y":300}
        ],
       "events":[
           {"id":"1","type":"MozTouchDown"}
       ]
     },
     {
       "active_duration": 5
     },
     {
       "positions":[
           {"id":"1","x":400,"y":400}
       ],
       "events":[
          {"id":"1","type":"MozTouchRelease"}
       ]
     }
  ],
  "fps": 10
}</pre>
</blockquote>
<p>The new rules are even simpler:</p>
<ul>
<li><em>frames</em><br />
A collection of Frame-Objects</li>
<li>Frame-Object<br />
An object that has two properties to define the status of each frame:</p>
<ul>
<li><em>positions</em><br />
A collection of objects containing the finger ID that the position  belongs and x and y position: {ID, X_POS, Y_POS}</li>
<li><em>events</em><br />
Collection of objects containing finger ID and Event Type. Event Types   are to be designed, but inital ones are the same as the implementation:</p>
<ul>
<li>MozTouchDown</li>
<li>MozTouchUp</li>
<li>MozTouchRelease</li>
<li>MozTouchMove</li>
</ul>
</li>
</ul>
</li>
<li>Frame-Object Types<br />
There are three Frame-Object types now:</p>
<ul>
<li>Snapshot<br />
This is the type in where you define positions and events</li>
<li>Spacer Active<br />
A Frame-Object is of this kind when it's only property is "<em>active-duration</em>". This indicates that between two snapshots objects an animation should be done, and the duration is the value of "<em>activ-duration</em>"</li>
<li>Spacer Inactive<br />
This has the same structure as the active one, but instead the property  is "idle-duration". This indicates that no transition should be  calculated between two snapshots, it's a waiting time.</li>
</ul>
</li>
<li><em>fps<br />
</em>The framerate that will be used to play the file</li>
</ul>
<p>Changes:</p>
<ul>
<li>Frame-objects no longer have a <em>fingers</em> collection. This is now deduced from the positions IDs</li>
<li>Events  now are the same as the ones implemented in firefox. This is to  simplify naming, and probably they'll soon change to something more  "human" and less "techy".</li>
<li>The Frame-Objects have 3 subtypes now: Snapshot, Spacer Active, Spacer Idle.</li>
</ul>
<p><strong>Demo Available</strong></p>
<p>As I promised last time, the code is ready for some demoing!</p>
<p>As the multitouch part is not yet available on <a href="http://nightly.mozilla.org/">firefox latest builds</a> you'll have to use a special build of firefox to try this stuff. Here you'll find a compiled version for your system:</p>
<ul>
<li><a href="http://www.malditocrc.com.ar/peregrino/lab/multitouch/builds/firefox/firefox-4.0b2pre.en-US.osx.zip">Mac OSX</a> (tested on 10.6, should also work on 10.5)</li>
<li><a href="http://www.malditocrc.com.ar/peregrino/lab/multitouch/builds/firefox/firefox-4.0b2pre.en-US.win32.zip">Windows</a></li>
<li>Linux (not here yet, still have to compile this)</li>
</ul>
<p>Now  that you have the correct build to test the extension is time to  install it. I would strongly recommend you to create a new profile, it's  a good practice when you're trying new stuff that may explode <img src='http://www.malditocrc.com.ar/peregrino/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<p>You can <a href="http://www.malditocrc.com.ar/peregrino/lab/multitouch/builds/addon/mtsimulator.xpi">grab here the extension</a> compiled as an XPI, and here some good sutff: you won't need to restart  firefox to try it out! As a side-effect of coding the extension with  Jetpack, and having to use the latest firefox build for the multitouch  part, we end up having the best setup ever: <em>restartless addons enabled! </em>To install the addon, just download it and drag-n-drop it on firefox.</p>
<p>But we need some demos to try the addon, so here you have a list of available demos to try multitouch coded by Felipe Gomes:</p>
<ul>
<li><a href="http://www.malditocrc.com.ar/peregrino/lab/multitouch/demos/imagecrop.htm">Image Crop</a><br />
Draw a rectangle to potentially "crop" an image with a pinch gesture</li>
<li><a href="http://www.malditocrc.com.ar/peregrino/lab/multitouch/demos/resize.htm">Image Resize</a><br />
Shrink and Enlarge images with pinch gestures. With two simultaneous pinches you can resize two different images</li>
<li><a href="http://www.malditocrc.com.ar/peregrino/lab/multitouch/demos/marcio.htm">Marcio Drawing</a><br />
A demo that lets you draw with your fingers. Touching a color in the pallete, changes the drawing color.</li>
<li><a href="http://www.malditocrc.com.ar/peregrino/lab/multitouch/demos/pong.htm">Pong</a> (not much usefull in for this addon)<br />
A simple implementation of the classic Pong game.</li>
<li><a href="http://www.malditocrc.com.ar/peregrino/lab/multitouch/demos/touchcanvas.htm">Touch Canvas</a><br />
Simple canvas that tracks your fingers</li>
<li><a href="http://www.malditocrc.com.ar/peregrino/lab/multitouch/demos/trackingdivs.htm">Tracking Divs</a><br />
Two divs keep tracking of the fingers you have on the screen</li>
<li><a href="http://www.malditocrc.com.ar/peregrino/lab/multitouch/demos/fluid.htm">Fluids</a><br />
Fluid simulation following your fingers!</li>
</ul>
<p>And here are some sample input files:</p>
<ul>
<li><a href="http://www.malditocrc.com.ar/peregrino/lab/multitouch/builds/addon/test-input1.json">Sample 1</a>: A simple pinch gesture.</li>
<li><a href="http://www.malditocrc.com.ar/peregrino/lab/multitouch/builds/addon/test-input2.json">Sample 2</a>: Two simultaneous simple pinch gestures.</li>
<li><a href="http://www.malditocrc.com.ar/peregrino/lab/multitouch/builds/addon/test-input3.json">Sample 3</a>: Cross-drawing (this is designed for the Marcio Drawing Demo)</li>
</ul>
<p>Using the simulator is pretty simple, it just has three buttons:</p>
<p style="text-align: center;"><a href="http://www.malditocrc.com.ar/peregrino/wordpress/wp-content/uploads/2010/07/mtsimulator-buttons.jpg"><img class="aligncenter" title="Buttons Closeup" src="http://www.malditocrc.com.ar/peregrino/wordpress/wp-content/uploads/2010/07/mtsimulator-buttons.jpg" alt="" width="265" height="173" /></a></p>
<p>The  first one lets you load an input file (as the samples I'm providing) to  be processed. The second one opens a kind of "console" so you can write  a input file on the fly and then run it with the third button, as you  can see here:</p>
<p style="text-align: center;"><a href="http://www.malditocrc.com.ar/peregrino/wordpress/wp-content/uploads/2010/07/mtsimulator.png"><img class="aligncenter" title="Opened Console" src="http://www.malditocrc.com.ar/peregrino/wordpress/wp-content/uploads/2010/07/mtsimulator-300x223.png" alt="" width="300" height="223" /></a></p>
<p><strong>Where to go now</strong></p>
<p>The next steps I think will be the harder ones. What is pending to be added is a way to simulate multitouch input with just one pointer. That means, how to make the extension itself write the input files instead of doing it by hand. I still have to come up with a UI for that, and any suggestion/idea is welcome. If you think you can collaborate on that stuff, don't hesitate to contact me on <a href="http://twitter.com/peregrinogris">twitter</a> or leaving a comment.<strong><br />
</strong></p>
<p><strong>Feedback</strong></p>
<p>I would really appreciate if some (or all!) of you try this extension and reports issues/enhancements (you can do it <a href="http://bitbucket.org/peregrino/mt-simulator/issues">here</a>), that would be priceless. Of course any thing you want to ask you can  reach me in #jetpack on irc.mozilla.org,  I go by the name of  "peregrino", or by leaving a comment here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.malditocrc.com.ar/peregrino/2010/07/first-stop-on-the-road-to-completion/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>First steps into Google Summer of Code</title>
		<link>http://www.malditocrc.com.ar/peregrino/2010/06/first-steps-into-google-summer-of-code/</link>
		<comments>http://www.malditocrc.com.ar/peregrino/2010/06/first-steps-into-google-summer-of-code/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 20:44:09 +0000</pubDate>
		<dc:creator>Peregrino</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[GSoC]]></category>

		<guid isPermaLink="false">http://www.malditocrc.com.ar/peregrino/?p=143</guid>
		<description><![CDATA[Well just to let you know, facing a blank page is hard! As some of you may know by my twitter time-line, I've been accepted into the Google Summer of Code 2010 (GSoC) to develop a project for the Mozilla Foundation. The GSoC is a program in which Google funds students from all around the [...]]]></description>
			<content:encoded><![CDATA[<p>Well just to let you know, facing a blank page is hard!</p>
<p>As some of you may know by my <a href="http://twitter.com/peregrinogris">twitter time-line</a>, I've been accepted into the Google Summer of Code 2010 (GSoC) to develop a project for the Mozilla Foundation. The GSoC is a program in which Google funds students from all around the world to work on a project for an Open Source Organization in their Summer free time. In my case -and the same is for the ones who live in the Southern Hemisphere- is the Winter of Code, but is fun all the same!</p>
<p>My project is a <a href="http://socghop.appspot.com/gsoc/student_project/show/google/gsoc2010/mozilla/t127230761410">Multitouch Simulation Framework for Firefox</a>. As the name tells, the idea is to make an extension that lets you simulate multitouch input form firefox to test your web aplication. This will be cool, as it will let developers do multitouch interactions without actually having to own a multitouch device!</p>
<p><strong>Initial Considerations</strong></p>
<p>The idea is that you can write (and maybe later, record) a sequence of multitouch steps like:</p>
<blockquote><p>Drag finger1 from (100x, 100y) to (150x, 100y)<br />
Double-tap (150x, 100y)<br />
Pinch Zoom 30px centered in (75x, 30y)</p></blockquote>
<p>so one of the first issues I faced with this project was actually writing a protocol that let you do that. The first idea that came to my head was that the TUIO protocol would be a wonderful source of inspiration, with loads of useful info... Now I know it was a really naive thought.</p>
<p>The <a href="http://www.tuio.org">TUIO</a> (Table-Top User Interfaces Objects) project has a protocol for sending multitouch events through a network, something very similar to what I needed. So I read all the protocol versions (1.0, 1.1 and 2.0) to understand it fully, and just came to the conclusion that the TUIO protocol was to me like a bazooka to kill a mosquito. It defines things in a much more deeper detail that the one I need, is a lot more generic -I just need to track fingers, TUIO is able to track even custom shapes in 3D- and has nothing about timings. So... <em>no soup for you, come back one year</em>!</p>
<p>So if I couldn't get anything from TUIO I had to write it all by myself, those were good and bad news. Good because I could make the spec so that the final files were written in JSON -something way more JavaScript friendly!- and bad because I couldn't take advantage from TUIO.</p>
<p>After a while thinking, I came up with what I think can be called the 0.1 version of my protocol.  My idea is to do various iterations of the protocol while I implement the extension, that way I can tweak what I think is being troublesome to use, or implement suggestions. The most complicated thing I faced with my protocol is the timings and frame-rate.</p>
<p><strong>Timings and Frame-Rate</strong></p>
<p>The aim of this project is to replay actions, so the protocol should be focused on replaying more than mere message passing (as TUIO is) so timings are important. I don't know if it's the best decision, but I decided to put a global frame-rate property and to writean object defining each frame.</p>
<p>Taking something from TUIO the addition and deletion of fingers is not explicitly told, is deduced from the difference with the previous frame's active fingers. Having "frame-objects' can be a bit redundant sometimes, but is the most simple approach to a protocol to describe things for later replay: being explicit. Is like MPEG-1 and WebM, the former is heavier but simpler to read than the later optimized format.</p>
<p>Having a constant frame-rate makes easier to implement in the extension, so thas was the way to go. Although in some points it might make sense being able to temporarily reduce the framerate, or indicate that some frame-object spans for more than one frame, those are power-features that can be later considered.</p>
<p><strong>Velocity</strong></p>
<p>Other thing I had to consider was the velocity and acceleration of the finger movements. You may notice that when you move your mouse, or your finger on the trackpad, you don't make constant velocity movents. Usually you accelerate and then slow down to be more precise, doing the complete movement with constant velocity would seem like it was done by a robot... But this is hard to describe in a protocol, and when acceleration comes in timings are harder to implement, so the decision was to make all the movements with constant velocity first. In a later iteration accelerations could be implemented.</p>
<p><strong>The Protocol</strong></p>
<p>This would be a sample file written with this protocol:</p>
<blockquote>
<pre>{
    "frames":[
    {
        "fingers":['1','2','3'],
        "positions":[
            {'1',0,0},
            {'2',10,10},
            {'3',20,20}
        ],
        "events":[
            {'1', 'DOUBLE_TAP'}
        ]
    }
    ],
    "fps":20
}
</pre>
</blockquote>
<p>The rules are simple:</p>
<ul>
<li><em>frames</em><br />
A collection of Frame-Objects</li>
<li>Frame-Object<br />
An object that has three properties to define the status of each frame:</p>
<ul>
<li><em>fingers</em><br />
This is a collection of IDs to identify each finger. The IDs are strings</li>
<li><em>positions</em><br />
A collection of objects containing the finger ID that the position belongs and x and y position: {ID, X_POS, Y_POS}</li>
<li><em>events</em><br />
Collection of objects containing finger ID and Event Type. Event Types are to be designed, but inital ones are: TAP, DOUBLE_TAP, TAP_DOWN, TAP_UP</li>
</ul>
</li>
<li><em>fps<br />
</em>The framerate that will be used to play the file</li>
</ul>
<p><strong>Possible Issues</strong></p>
<p>Some issues may arise from the current protocol version, this are the ones I could think of<strong><br />
</strong></p>
<ul>
<li>If a user wants to have multiple fingers fixed and just a few moving, he has to copy several times the same info for the still fingers. This could be reduced, maybe</li>
<li>To code pauses between movements, the final frame-object has to be copied <em>fps x seconds </em>times...</li>
<li>Movements more complicated than just moving between two points in a straight line can be somewhat complicated to code manually...</li>
</ul>
<p>Well, that's all that I have for now, next post will hopefully have some piece of code to actually try the extension and a discussion about my progress with coding it in Jetpack.</p>
<p>Please, share your thoughts in the comments!</p>
<p>Hernán</p>
]]></content:encoded>
			<wfw:commentRss>http://www.malditocrc.com.ar/peregrino/2010/06/first-steps-into-google-summer-of-code/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Firebug &amp; Jetpack, make them work together</title>
		<link>http://www.malditocrc.com.ar/peregrino/2009/12/firebug-jetpack-make-them-work-together/</link>
		<comments>http://www.malditocrc.com.ar/peregrino/2009/12/firebug-jetpack-make-them-work-together/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 04:58:22 +0000</pubDate>
		<dc:creator>Peregrino</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Firebug]]></category>
		<category><![CDATA[Jetpack]]></category>

		<guid isPermaLink="false">http://www.malditocrc.com.ar/peregrino/?p=74</guid>
		<description><![CDATA[Lately I've been playing a lot with a new project from Mozilla Labs: Jetpack. I'll describe it briefly for those who don't know what this wonderful new project is, but you should check Jetpack's Site if you want to learn more about it. If you ever wondered how all those Firefox extensions are made, you [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I've been playing a lot with a new project from Mozilla Labs: Jetpack. I'll describe it briefly for those who don't know what this wonderful new project is, but you should check <a title="Jetpack Homepage" href="http://jetpack.mozillalabs.com">Jetpack's Site</a> if you want to learn more about it.</p>
<p>If you ever wondered how all those Firefox extensions are made, you probably discovered (maybe with some disappointment) that they're not <em>that</em> easy to code. You have to learn a language called XUL for the UI, assimilate a lot of new terms like Overlays, XPI, XPcom... But hey, I'm not telling this stuff is impossible to grasp (in fact, there's a lot of <a title="Add-on Developer Hub" href="https://addons.mozilla.org/en-US/developers">documentation and tutorials</a> available), just that you have to learn <em>something</em> new.<br />
So Mozilla thought about that for a while, and came up with a pretty cool idea: you are most likely to allready know JavaScript, CSS and HTML. Why you should have to learn something new? And thus born Jetpack, a new way to code Add-Ons in just a single file and entirely coded in JavaScript, CSS and HTML.</p>
<h3><strong>Firebug and Jetpack</strong></h3>
<p>And what has Jetpack to do with Firebug? Well, pretty much. As stated on Jetpack's site, "not wanting to reinvent the wheel" they used Firebug for debugging and logging purposes. So for now everything's great: a simple way to develop add-ons, and a nice debugger... what else could I ask for?<br />
Maybe for them to work together out of the box?</p>
<p>As some people has noticed, the latest versions of Firebug and Jetpack won't work together right after installing them. This is because the current version of Jetpack (0.6.2) uses an old API call to communicate with Firebug that changed in version 1.4.3. It seems that all the Firebug interaction was developed using Firebug 1.4.2, so they never noticed the change in the API. But don't panic! There is a way to fix this, and is as simple as changing a single word on a single file.</p>
<h3><strong>Making them play nice together again</strong></h3>
<p style="padding-left: 30px;"><strong>Important Notice:<br />
</strong><em>As I write this article <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=527647">the bug  opened for this issue</a> is already Verified and Fixed, so that means  that the fix will be on the next Jetpack release. Meanwhile, you'll have to do the following patch by hand to use Jetpack with  Firebug 1.4.3 or later.</em></p>
<p>First of all, you have to <a href="http://kb.mozillazine.org/Profile_folder_-_Firefox">locate your Firefox profile</a>. This depends on your system, but this are some of the most common locations:</p>
<ul>
<li><strong>Linux:</strong><br />
~/.mozilla/firefox/&lt;profile folder&gt;</li>
</ul>
<ul>
<li><strong>Mac OS X:</strong><br />
~/Library/Mozilla/Firefox/Profiles/&lt;profile folder&gt;<br />
OR<br />
~/Library/Application Support/Firefox/Profiles/&lt;profile folder&gt;</li>
</ul>
<ul>
<li><strong>Windows XP:</strong><br />
C:\Documents and Settings\<em>&lt;Windows login/user name&gt;</em>\Application Data\Mozilla\Firefox\Profiles\&lt;profile folder&gt;</li>
</ul>
<ul>
<li><strong>Windows 7:</strong><br />
C:\Users\<em>&lt;Windows login/user name&gt;</em>\AppData\Roaming\Mozilla\Firefox\Profiles\&lt;profile folder&gt;</li>
</ul>
<p>If you are using firefox 3.6, you can go to the address "about:support" and there's a link to your profile folder.</p>
<p>After finding your profile folder, you'll have to go to the following folder inside it.</p>
<blockquote>
<pre>extensions/jetpack@labs.mozilla.com/content/js/xul</pre>
</blockquote>
<p>and edit this file:</p>
<blockquote>
<pre>firebug-extension.js</pre>
</blockquote>
<p>Changing the line 19 from:</p>
<blockquote>
<pre class="bz_comment_text">Firebug.URLSelector.watchBrowser(browser);</pre>
</blockquote>
<p>To:</p>
<blockquote>
<pre>Firebug.Activation.watchBrowser(browser);</pre>
</blockquote>
<p>Save that file, restart Firefox, and <em>voilà</em>, Firebug and Jetpack are working together now!</p>
<h3>Testing if Firebug is now working</h3>
<p>If you want to test if Firebug is working as expected, then paste the following into the develop area of Jetpack:</p>
<blockquote>
<pre>jetpack.future.import("menu");</pre>
<pre>jetpack.menu.context.page.add({
    label: "LogThis!",
    command: function(){
        console.log("Firebug is Working OK");
    }
});</pre>
</blockquote>
<p>Now hit the "Try out this code" button, enable Firebug and refresh the page. If everything went right, you should have a new entry on the context menu of the webpage, called "LogThis!". If you click on that entry and the text "Firebug is Working OK" appears on the console, you have it working.</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 111px; width: 1px; height: 1px; overflow: hidden;">C:\Documents and Settings\<em>&lt;Windows login/user name&gt;</em>\Application  Data\Mozilla\Firefox\Profiles\&lt;profile folder&gt;</div>
]]></content:encoded>
			<wfw:commentRss>http://www.malditocrc.com.ar/peregrino/2009/12/firebug-jetpack-make-them-work-together/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Advanced Filters 0.2 Released</title>
		<link>http://www.malditocrc.com.ar/peregrino/2009/09/advanced-filters-0-2-released/</link>
		<comments>http://www.malditocrc.com.ar/peregrino/2009/09/advanced-filters-0-2-released/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 19:00:17 +0000</pubDate>
		<dc:creator>Peregrino</dc:creator>
				<category><![CDATA[Advanced Filters]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Firebug]]></category>
		<category><![CDATA[advfilters]]></category>

		<guid isPermaLink="false">http://www.malditocrc.com.ar/peregrino/?p=22</guid>
		<description><![CDATA[Advanced Filters 0.2 has been released! In this version the UI has changed a little. Now multiple filtering rules can be set, although the system for setting them is a little archaic.  As can be seen in this screenshot: The activation mechanism stays the same, and so the quick search in the net tab. But [...]]]></description>
			<content:encoded><![CDATA[<p>Advanced Filters 0.2 has been released!</p>
<p>In this version the UI has changed a little. Now multiple filtering rules can be set, although the system for setting them is a little archaic.  As can be seen in this screenshot:</p>
<div id="attachment_24" class="wp-caption alignnone" style="width: 310px"><a href="http://www.malditocrc.com.ar/peregrino/wordpress/wp-content/uploads/2009/09/advfilters-0.2-advfilters.PNG"><img class="size-medium wp-image-24 " title="advfilters-0.2-advfilters" src="http://www.malditocrc.com.ar/peregrino/wordpress/wp-content/uploads/2009/09/advfilters-0.2-advfilters-300x146.PNG" alt="Multiple Rules alowed" width="300" height="146" /></a><p class="wp-caption-text">Multiple Rules alowed</p></div>
<p>The activation mechanism stays the same, and so the quick search in the net tab. But now there are two buttons, to remove the applied filters (in case you want to view all the results) and one to apply the stored rules.</p>
<div id="attachment_23" class="wp-caption alignnone" style="width: 310px"><a href="http://www.malditocrc.com.ar/peregrino/wordpress/wp-content/uploads/2009/09/advfilters-0.2-net.PNG"><img class="size-medium wp-image-23 " title="advfilters-0.2-net" src="http://www.malditocrc.com.ar/peregrino/wordpress/wp-content/uploads/2009/09/advfilters-0.2-net-300x146.PNG" alt="New buttons in the net panel" width="300" height="146" /></a><p class="wp-caption-text">New buttons in the net panel</p></div>
<p>You can grab this release from the <a href="http://www.malditocrc.com.ar/peregrino/lab/firebug/advfilters/releases/" target="_blank">releases</a> folder. Also keep in mind that I'm trying to set up an upgrade channel in this webpage, so you can install once and then get the updates automatically.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.malditocrc.com.ar/peregrino/2009/09/advanced-filters-0-2-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First Release of Advanced Filters</title>
		<link>http://www.malditocrc.com.ar/peregrino/2009/08/first-release-of-advanced-filters/</link>
		<comments>http://www.malditocrc.com.ar/peregrino/2009/08/first-release-of-advanced-filters/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 00:29:00 +0000</pubDate>
		<dc:creator>Peregrino</dc:creator>
				<category><![CDATA[Advanced Filters]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[advfilters]]></category>
		<category><![CDATA[Firebug]]></category>

		<guid isPermaLink="false">http://www.malditocrc.com.ar/peregrino/?p=8</guid>
		<description><![CDATA[This is the first release of the Advanced Filters extension for Firebug. The aim of this extension is to let you add custom filters to the requests listed in the Net Panel. Right now this is the first... nightly. It isn't even an alpha, I just made it work, and then packed and uploaded it. [...]]]></description>
			<content:encoded><![CDATA[<p>This is the first release of the Advanced Filters extension for Firebug.</p>
<p>The aim of this extension is to let you add custom filters to the requests 					listed in the Net Panel. Right now this is the first... nightly. It isn't even an 					alpha, I just made it work, and then packed and uploaded it. So don't expect it 					to be a lot friendly, it just works.</p>
<p>To use this extension you should have Firebug 1.5.0a21, 1.5X.0a21	or the latest 					SVN revision, since it depends on a listener added in a21. Just go to 					<a href="http://www.malditocrc.com.ar/peregrino/lab/firebug/advfilters/releases">releases</a> and install the xpi.</p>
<p><strong>How to use it</strong></p>
<ul>
<li>Install the extension and make sure the dependencies are met</li>
<li>Go to the Net Panel</li>
<li>Press "Advanced Filters", a prompt should appear</li>
<li> Enter the desired RegExp pattern against you want the request's URL 						to be tested.</li>
<li> Reload the page, now as long as the "Advanced Filters" button is selected, 						your requests will be filtered. To disable the filtering, press again in 						"Advanced Filters".</li>
<li> You can change the applied filter pattern by disabling and then enabling the 						advanced filtering. Each time you enable the filtering, a prompt will show up 						in wich you can enter the new pattern. Then it'll be applied to the monitored 						requests.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.malditocrc.com.ar/peregrino/2009/08/first-release-of-advanced-filters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
