Managed latest blog post automatically

This commit is contained in:
Yann Esposito (Yogsototh) 2012-01-20 11:16:02 +01:00
parent 73e0db0d22
commit badfe7c1db
176 changed files with 2853 additions and 2820 deletions

View file

@ -0,0 +1,4 @@
---
layout: latest
isHidden: true
---

View file

@ -0,0 +1,4 @@
---
layout: latest
isHidden: true
---

20
layouts/latest.html Normal file
View file

@ -0,0 +1,20 @@
-----
-----
<% language, languages, blog, article = setItemConf %>
<%
last_article = @items.select do |a|
a.reps[0].path =~ /\/#{language}\// && a[:kind] == 'article'
end.sort { |x,y| y[:created_at] <=> x[:created_at] }[0]
targetUrl = last_article.path
%>
<html>
<head>
<title>Redirect to the right page.</title>
<meta http-equiv="refresh" content="0;url=<%= targetUrl %>">
<style> body { font: sans-serif; color: #333333; font-size: 18px; position: absolute; text-align: center; font-weight: bold; top: 50%; left: 50%; width: 460px; height: 100px; margin-left: -230px; margin-top: -50px; line-height: 2em; } a,a:hover,a:visited,a:active { color: #C53; } </style>
</head>
<body>
<p>You should be redirected to</p>
<div><a href="<%= targetUrl %>"><%= targetUrl %></a></div>
</body>
</HTML>

4
multi/latest.md Normal file
View file

@ -0,0 +1,4 @@
---
layout: latest
isHidden: true
---

File diff suppressed because one or more lines are too long

View file

@ -60,7 +60,7 @@
<p><img src="/Scratch/img/about/avatar.png" alt="Avatar" class="left" /></p>
<p><a href="&#109;&#097;&#105;&#108;&#116;&#111;:&#121;&#097;&#110;&#110;&#046;&#101;&#115;&#112;&#111;&#115;&#105;&#116;&#111;&#064;&#103;&#109;&#097;&#105;&#108;&#046;&#099;&#111;&#109;">&#121;&#097;&#110;&#110;&#046;&#101;&#115;&#112;&#111;&#115;&#105;&#116;&#111;&#064;&#103;&#109;&#097;&#105;&#108;&#046;&#099;&#111;&#109;</a><br />
<p><a href="&#109;&#097;&#105;&#108;&#116;&#111;:&#121;&#097;&#110;&#110;&#046;&#101;&#115;&#112;&#111;&#115;&#105;&#116;&#111;&#064;&#103;&#109;&#097;&#105;&#108;&#046;&#099;&#111;&#109;">yann.esposito@gmail.com</a><br />
Follow me on <a href="http://twitter.com/yogsototh">twitter</a><br />
My preferred bookmarks <a href="http://pinboard.in/u:yogsototh">pinboard</a><br />
Open Source <a href="http://github.com/yogsototh">github</a><br />

View file

@ -104,7 +104,7 @@
<li>Computer Security: <a href="http://yann.esposito.free.fr/enseignement/rez0.php#projet">I designed a secure web protocol (similar to TOR)</a>, <a href="/YBlog/Computer/Entries/2008/7/30_Easy,_secure_and_portable_password_management_system.html">a method to securely remember strong passwords</a> (<a href="/YBlog/YPassword.html">programmed a dashboard widget</a> and a shell script to use this method). </li>
</ul>
<p>But before all, I love to learn. For example, I learned many programming languages: <code>C</code>, <code>C++</code>, <code>Objective-C</code>, <code>Python</code>, <code>Java</code>, <code>Perl</code>, <code>awk</code>, <code>bash</code>, <code>zsh</code>, <code>LaTeX</code>, <code>Metapost</code>, <code>camL</code>&hellip; And Ive got the same passion about computer science research, computer security, philosophy and many other things.</p>
<p>But before all, I love to learn. For example, I learned many programming languages: <code>C</code>, <code>C++</code>, <code>Objective-C</code>, <code>Python</code>, <code>Java</code>, <code>Perl</code>, <code>awk</code>, <code>bash</code>, <code>zsh</code>, <code>LaTeX</code>, <code>Metapost</code>, <code>camL</code> And Ive got the same passion about computer science research, computer security, philosophy and many other things.</p>
</div>
@ -118,7 +118,7 @@
<p>Then I had a post Ph. D. Degree position in the Hubert Curien Laboratory at St-Etienne. My mission consisted to develop a scientific application (SEDiL). This application should be used by biologist and should have a simple and nice user interface.</p>
<p>Today I work for AirFrance<small>&copy;</small> via Astek. This job need many differents skills, CMS and Web technologies, Perl, JSP, meta-programming&hellip;</p>
<p>Today I work for AirFrance<small>&copy;</small> via Astek. This job need many differents skills, CMS and Web technologies, Perl, JSP, meta-programming</p>
<div class="return"><a href="#entete" onclick="fastShowMenu()">&uarr;</a></div>

View file

@ -59,11 +59,11 @@
But a Framework to generate static web pages.</p>
<p>You have to program yourself webpages, the code
to generate the menu&hellip;</p>
to generate the menu</p>
<p>I added feature to make my website multilingual for example</p>
<p>You&rsquo;ll can find many informations on the
<p>Youll can find many informations on the
<a href="http://nanoc.stoneship.org">official nanoc website</a>.</p>
</div>

View file

@ -54,11 +54,11 @@
<div class="corps">
<h1 class="first" id="update">update</h1>
<p>As <a href="http://www.theworkinggeek.com">Andy Lester</a> told me <a href="http://betterthangrep.com"><code>ack</code></a> is a simple file you only have to copy in your <code>~/bin</code> folder. Now I&rsquo;ve got <code>ack</code> on my professional server.</p>
<p>As <a href="http://www.theworkinggeek.com">Andy Lester</a> told me <a href="http://betterthangrep.com"><code>ack</code></a> is a simple file you only have to copy in your <code>~/bin</code> folder. Now Ive got <code>ack</code> on my professional server.</p>
<p>Go on <a href="http://betterthangrep.com">http://betterthangrep.com</a> to download it.</p>
<p>Sincerely, I don&rsquo;t understand <code>ack</code> don&rsquo;t become a common command on all UNIX systems. I can no more live without. For me it is as essential as <code>which</code> or <code>find</code>.</p>
<p>Sincerely, I dont understand <code>ack</code> dont become a common command on all UNIX systems. I can no more live without. For me it is as essential as <code>which</code> or <code>find</code>.</p>
</div>
@ -79,7 +79,7 @@ grep <span class="String"><span class="String">'</span>pattern<span class="Strin
<p>Most of time it is enough.
But it is far better with colored output.
<code>ack-grep</code> in Ubuntu does that.
As I couldn&rsquo;t install it on my &lsquo;Evil Company Server&rsquo;,
As I couldnt install it on my Evil Company Server,
I had done one myself in very few lines:</p>
<div>

View file

@ -56,7 +56,7 @@
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<h1 class="first" id="movies-keys">Movie&rsquo;s keys</h1>
<h1 class="first" id="movies-keys">Movies keys</h1>
<div class="encadre" style="text-align: center">
<strong>
@ -64,32 +64,32 @@
</strong>
</div>
<p>In a first, it is clear for me, it is not a fantastic movie. If you follow this line, you&rsquo;ll face many problem explaining some scenes.</p>
<p>In a first, it is clear for me, it is not a fantastic movie. If you follow this line, youll face many problem explaining some scenes.</p>
<p>My hypothesis is the movie describe the Fred&rsquo;s representation of reality.
<p>My hypothesis is the movie describe the Freds representation of reality.
Each of his tries to escape reality will fail.</p>
<p>Fred had commited an horrible act, a murder, and try to <em>repair</em> his memory to accepts it. He&rsquo;ll then create alternative realities.</p>
<p>Fred had commited an horrible act, a murder, and try to <em>repair</em> his memory to accepts it. Hell then create alternative realities.</p>
<ul>
<li>In a first time he kills his wife (Renee) because he believes she cheated at him.</li>
<li>In the second part, he&rsquo;s weaker and will be manipulated by the blond equivalent of Renee to kill Dick Laurent.</li>
<li>In the second part, hes weaker and will be manipulated by the blond equivalent of Renee to kill Dick Laurent.</li>
<li>In a third part, he kills Dick Laurent</li>
</ul>
<h2 id="why-this-interpretation-can-be-valid">Why this interpretation can be valid?</h2>
<p>Because of the dialog at the begining of the movie. Cops ask Fred if he&rsquo;s own a video camera:</p>
<p>Because of the dialog at the begining of the movie. Cops ask Fred if hes own a video camera:</p>
<blockquote>
<p>&ldquo;Do you own a video camera?&rdquo;<br />
&ldquo;No, Fred hates them.&rdquo;<br />
&ldquo;I like to remember things my own way.&rdquo;<br />
&ldquo;What do you mean by that?&rdquo;<br />
&ldquo;How I remember them, not necessarily the way they happened.&rdquo; </p>
<p>“Do you own a video camera?”<br />
“No, Fred hates them.”<br />
“I like to remember things my own way.”<br />
“What do you mean by that?”<br />
“How I remember them, not necessarily the way they happened.” </p>
</blockquote>
<p>Then, what we see is not reality but the Fred&rsquo;s perception. Fred is the God of the reality we see. This is why some God/Devil interpretation of the movie works not so bad.</p>
<p>Then, what we see is not reality but the Freds perception. Fred is the God of the reality we see. This is why some God/Devil interpretation of the movie works not so bad.</p>
</div>

View file

@ -60,15 +60,15 @@
<p><img alt="l'homme mystérieux" src="/Scratch/img/blog/03_losthighway/03_losthighway_2/mysteryman.jpg" class="left" /></p>
<p>Who&rsquo;s this mysterious man? He tells Fred it&rsquo;s him who invited him in his house. He&rsquo;s present at the party and in the house of Fred in the same time. Eyes wide open, looking everything Fred&rsquo;s doing?</p>
<p>Whos this mysterious man? He tells Fred its him who invited him in his house. Hes present at the party and in the house of Fred in the same time. Eyes wide open, looking everything Freds doing?</p>
<p>It&rsquo;s a key of the movie. In my humble opinion, I believe it represents the bad part of Fred. Certainly jalousy. If I was catholic, I&rsquo;ll said he&rsquo;s Satan. He observe, film but don&rsquo;t act. He helps Fred to kill Dick Laurent.
<p>Its a key of the movie. In my humble opinion, I believe it represents the bad part of Fred. Certainly jalousy. If I was catholic, Ill said hes Satan. He observe, film but dont act. He helps Fred to kill Dick Laurent.
Fred had let him enter and cannot let him go.
As <em>Iago</em> of Shakespeare is imprisonned by its own jalousy.
The Mysterious Man help Fred doing the acts of violence.
It also force Fred to remember the reality.</p>
<p>When he makes love to his wife (Renee), he sees the face of the Mysterious Man instead of his wife&rsquo;s face. In reality, it&rsquo;s the same person for Fred. It should be her who&rsquo;s the origin of his interior badness.</p>
<p>When he makes love to his wife (Renee), he sees the face of the Mysterious Man instead of his wifes face. In reality, its the same person for Fred. It should be her whos the origin of his interior badness.</p>
</div>

View file

@ -56,9 +56,9 @@
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<h2 class="first" id="whos-at-the-origin-of-the-video-tapes">Who&rsquo;s at the origin of the video tapes?</h2>
<h2 class="first" id="whos-at-the-origin-of-the-video-tapes">Whos at the origin of the video tapes?</h2>
<p>Certainly it&rsquo;s the mysterious man (Fred himself) who makes them.
<p>Certainly its the mysterious man (Fred himself) who makes them.
Their reason should be:</p>
<ul>

View file

@ -71,7 +71,7 @@
<h2 id="which-one-then">which one then?</h2>
<p>The second hypothesis seems better. We can make much more interpretation with it. It explain in most part the strange phone call from Dick Laurent to Pete.
But the first hypothesis remain coherent. And, we should probably make an in depth explanantion using the first hypothesis. And I&rsquo;m not sure it would be better.</p>
But the first hypothesis remain coherent. And, we should probably make an in depth explanantion using the first hypothesis. And Im not sure it would be better.</p>
<p>One of the strength of this movie is to understand there is many other coherent hypothesis. It is an expression of the <a href="http://en.wikipedia.org/wiki/Rashomon_effect">Rashomon effect</a>. Many different persons could describe in a coherent manner what they saw. But each description contradicts the others.</p>
@ -85,9 +85,9 @@ But the first hypothesis remain coherent. And, we should probably make an in dep
<p>There is much to tell about this movie. But I believe I put all essential keys here. It is a proof this movie is not a random one.</p>
<p>I believe it is essential to remember the &ldquo;test of Rorschach effet&rdquo; when watching this movie.</p>
<p>I believe it is essential to remember the “test of Rorschach effet” when watching this movie.</p>
<p>I&rsquo;d like to know or opinion&nbsp;; is my interpration wrong?</p>
<p>Id like to know or opinion&nbsp;; is my interpration wrong?</p>
</div>

View file

@ -72,10 +72,10 @@ Here some of explanations of Lost Highway I found on the Internet:</p>
<ul>
<li>Fred make a pact with the devil incarnated by the <em>Mysterious Man</em>,</li>
<li><em>Mysterious Man</em> is a video camera,</li>
<li>Just the first part of the story is real. The rest is in the Fred&rsquo;s imagination,</li>
<li>Just the first part of the story is real. The rest is in the Freds imagination,</li>
</ul>
<p>and I don&rsquo;t speak about many point of view found in forums.</p>
<p>and I dont speak about many point of view found in forums.</p>
<p>I finished to find two good site talking about this movie. But none of them still totally convinced me:</p>
@ -84,7 +84,7 @@ Here some of explanations of Lost Highway I found on the Internet:</p>
<li>the second which state almost the same interpretation about the movie and explain with even more details is on <a href="http://www.jasonsweb.com/LostHighway/main.htm">jasonweb</a></li>
</ul>
<p>Nonetheless, this movie must be watched knowing you&rsquo;ll cannot resolve the solution. At his best you&rsquo;ll can suggest an interpretation close to the one of David Lynch.</p>
<p>Nonetheless, this movie must be watched knowing youll cannot resolve the solution. At his best youll can suggest an interpretation close to the one of David Lynch.</p>
<p>I believe I had found a coherent interpretation which allow to follow the movie <strong>without being totally lost</strong>. I believed it can give the keys necessary to make its own idea of the movie.</p>
@ -92,16 +92,16 @@ Here some of explanations of Lost Highway I found on the Internet:</p>
<p><img alt="test de Rorschach" src="/Scratch/img/blog/03_losthighway/rorschach.gif" class="left" /></p>
<p>Like the protagonist, everybody see what he want to see in this movie. It is an invitation to think. Watch this movie is a little like watch a Rorschach&rsquo;s test. What do we see in it? Everybody put its own personnality in the interpretation of the movie.</p>
<p>Like the protagonist, everybody see what he want to see in this movie. It is an invitation to think. Watch this movie is a little like watch a Rorschachs test. What do we see in it? Everybody put its own personnality in the interpretation of the movie.</p>
<ul>
<li>If you are mystic, you&rsquo;ll see in the mysterious man a devil,</li>
<li>If you are more psychanalytics, you&rsquo;ll see an inconscient part of the protagonist&hellip;</li>
<li>If you are mystic, youll see in the mysterious man a devil,</li>
<li>If you are more psychanalytics, youll see an inconscient part of the protagonist…</li>
</ul>
<p>Generally, we stay in this movie and we fail explaining everything. There is almost always a point that don&rsquo;t fit within the interpretation of the movie. This is why trying to find a unique good interpretation of this movie is a mistake.</p>
<p>Generally, we stay in this movie and we fail explaining everything. There is almost always a point that dont fit within the interpretation of the movie. This is why trying to find a unique good interpretation of this movie is a mistake.</p>
<h2 id="interprtation-ne-explanation">Interprétation&nbsp;&ne; Explanation</h2>
<h2 id="interprtation-ne-explanation">Interprétation Explanation</h2>
<p>I give an <strong>interpretation</strong> and not an <strong>explanation</strong>. Just to tell my vision of the movie should be very different from yours.
There is certainly many coherent explanations.</p>

View file

@ -66,7 +66,7 @@
<p style="text-align: center; font-size: 5em"><strong>WTF?</strong></p>
</div>
<p>Result, my wife would never buy any TV show on iTunes. She don&rsquo;t like DVD because it is not as easy to buy and to use than to simply download episodes.</p>
<p>Result, my wife would never buy any TV show on iTunes. She dont like DVD because it is not as easy to buy and to use than to simply download episodes.</p>
<div class="encadre">
@ -74,8 +74,8 @@ Therefore far less money for you EVIL Copyrighter!!!!!
</div>
<p>My wife won&rsquo;t see these episodes.<br />
This is a <strong>&lsquo;LOSE-LOSE&rsquo;</strong> cooperation.</p>
<p>My wife wont see these episodes.<br />
This is a <strong>LOSE-LOSE</strong> cooperation.</p>
</div>

View file

@ -58,7 +58,7 @@
<p>I use <a href="http://www.git-scm.org/">Git</a> to manage my personnal projects.
I have a centralized repository which all my computer should synchronize with.
Unfortunately I didn&rsquo;t find clearly what I needed on the official Git documentation.</p>
Unfortunately I didnt find clearly what I needed on the official Git documentation.</p>
<p>In two words, if you want to use an SVN workflow with Git (and all its advantages) here is how to proceed.</p>
@ -70,7 +70,7 @@ Unfortunately I didn&rsquo;t find clearly what I needed on the official Git docu
<h2 class="first" id="initialisation">Initialisation</h2>
<p>Suppose I&rsquo;ve got a directory on my local computer containing a project I want to manage via Git. Here what to do: </p>
<p>Suppose Ive got a directory on my local computer containing a project I want to manage via Git. Here what to do: </p>
<div>
<pre class="twilight">

View file

@ -56,15 +56,15 @@
<div class="corps">
<h1 class="first" id="how-to-recompile-your-screensaver-to-be-snow-leopardc-compatible">How to recompile your screensaver to be Snow Leopard<small>&copy;</small> compatible</h1>
<p>I upgraded to Mac OS X 10.6 Snow Leopard<small>&copy;</small>, and my <a href="/YBlog/YClock.html">YClock</a> screensaver didn&rsquo;t work on it. After searching on google, the problem seems to be just a recompilation away.
Unfortunately, even recompiling it in 64 bit it didn&rsquo;t work either.
<p>I upgraded to Mac OS X 10.6 Snow Leopard<small>&copy;</small>, and my <a href="/YBlog/YClock.html">YClock</a> screensaver didnt work on it. After searching on google, the problem seems to be just a recompilation away.
Unfortunately, even recompiling it in 64 bit it didnt work either.
After a bit more research (thanks to <a href="http://community.electricsheep.org/node/236">ElectricSheep</a> ).</p>
<p>I discovered the good parameters for compilation.</p>
<p><img alt="XCode configuration" src="/Scratch/img/blog/07_Screensaver_compilation_option_for_Snow_Leopard/xcodeConfig.png" /></p>
<p>For now I didn&rsquo;t compiled it to work also on Tiger and Leopard. I don&rsquo;t know XCode enought to know how to make the Garbage collector to be disabled on 32 bits version and enabled on 64 bits version.</p>
<p>For now I didnt compiled it to work also on Tiger and Leopard. I dont know XCode enought to know how to make the Garbage collector to be disabled on 32 bits version and enabled on 64 bits version.</p>
<p>It was a bit difficult to discover these informations. Hope this post helped someone.</p>

View file

@ -72,7 +72,7 @@ ssh -p 443 -D 9050 username@host
<h1 id="ssh-and-snow-leopardc">Ssh and Snow Leopard<small>&copy;</small></h1>
<p>Here I don&rsquo;t want to talk about how great <span class="sc">socks</span> proxy via ssh tunneling is but how to configure my local server.</p>
<p>Here I dont want to talk about how great <span class="sc">socks</span> proxy via ssh tunneling is but how to configure my local server.</p>
<p>I have Mac with Snow Leopard<small>&copy;</small> at home and it is far from enough to modify the <code>/etc/sshd.config</code> file. The system use <code>launchd</code> to launch starting daemons.</p>

View file

@ -83,13 +83,13 @@
<p>The idea are: </p>
<ul>
<li>synchronize to a temporary folder then swap the name therefore the website isn&rsquo;t accessible only during the swap time. It takes only the time of two rename.</li>
<li>synchronize to a temporary folder then swap the name therefore the website isnt accessible only during the swap time. It takes only the time of two rename.</li>
<li>reiterate all operations until they work (for example, renaming).</li>
</ul>
<p>For now I use <code>rsync</code> which in fact is no more efficient than a simple <code>cp</code> with WebDav. And I should use a method to keep track of elements who have changed. before the publication.</p>
<p>In fact when I&rsquo;m on a Mac, I use <a href="http://www.panic.com/transmit">Transmit</a> which is very cool and far more efficient than the Finder to synchronize files. After the synchronization, I swap the directories.</p>
<p>In fact when Im on a Mac, I use <a href="http://www.panic.com/transmit">Transmit</a> which is very cool and far more efficient than the Finder to synchronize files. After the synchronization, I swap the directories.</p>
<p>My script take a <code>-s</code> option in order to make only the swap option. It also take a <code>-a</code> in order to put the new <code>index.html</code> which should point to the new homepage (not the iWeb one).</p>

View file

@ -58,7 +58,7 @@
<p>In fact this method works for old threads. But it fails to create new post threads. This is why I tried and be conquered by <a href="http://intensedebate.com">intensedebate</a>, as you can see in the bottom of this page.</p>
<p>Remark I didn&rsquo;t have any comment on my blog when I switched. Therefore my lack of influence was a good thing&nbsp;:-).</p>
<p>Remark I didnt have any comment on my blog when I switched. Therefore my lack of influence was a good thing&nbsp;:-).</p>
</div>
@ -72,7 +72,7 @@
<p>I also know there is a jQuery plugin to make just that. Unfortunately I had some issue with CSS.</p>
<p><em>Now let&rsquo;s begin.</em></p>
<p><em>Now lets begin.</em></p>
</div>
@ -85,7 +85,7 @@
<p>Why should I want to load the disqus javascript asynchronously?</p>
<ul>
<li>Efficiency: I don&rsquo;t want my page to wait the complete execution of disqus script to load.</li>
<li>Efficiency: I dont want my page to wait the complete execution of disqus script to load.</li>
<li>More independance: when disqus is down, my page is blocked!</li>
</ul>
@ -97,7 +97,7 @@
<h1 class="first" id="how">How?</h1>
<p>I give a solution with jQuery, but I&rsquo;m certain it will work with many other js library.</p>
<p>I give a solution with jQuery, but Im certain it will work with many other js library.</p>
<h3 id="javascript">Javascript</h3>
@ -127,7 +127,7 @@
<p>But with this option you still need to provide a CSS. This is why you have to copy the css code from the <code>embed.js</code> file and rewrite it in a CSS file. You can <a href="/Scratch/en/blog/11_Load_Disqus_Asynchronously/code/original_disqus.css">download the CSS</a> I obtained.</p>
<hr />
<p>Now it&rsquo;s done. I believe all should be fine but I just finished the manip for my own site only 1 hour ago. Therefore there should be some error, tell me if it is the case.</p>
<p>Now its done. I believe all should be fine but I just finished the manip for my own site only 1 hour ago. Therefore there should be some error, tell me if it is the case.</p>
</div>

View file

@ -56,7 +56,7 @@
<div class="corps">
<h1 class="first" id="disqushttpdisquscom-vs-intense-debatehttpintensedebatecom"><a href="http://disqus.com/">Disqus</a> <em>vs.</em> <a href="http://intensedebate.com/">Intense Debate</a></h1>
<p>I made a blog entry about how I tried to integrate <a href="http://disqus.com">Disqus</a>. I had to wait Disqus comment to be displayed before loading correctly my page. This is why I tried to include it in a &ldquo;non-blocking&rdquo; way. Unfortunately, I had <a href="/Scratch/en/blog/11_Load_Disqus_Asynchronously/">difficulties to make it works correctly</a>. </p>
<p>I made a blog entry about how I tried to integrate <a href="http://disqus.com">Disqus</a>. I had to wait Disqus comment to be displayed before loading correctly my page. This is why I tried to include it in a “non-blocking” way. Unfortunately, I had <a href="/Scratch/en/blog/11_Load_Disqus_Asynchronously/">difficulties to make it works correctly</a>. </p>
<p>Furthermore, it was not trivial to make comment to be shared between multiple version of the same page (each page has three differents representations, one for each language and one more for the multi-language version).</p>
@ -64,7 +64,7 @@
<p>During the time I tried to integrate <a href="http://disqus.com/">Disqus</a> I never tried <a href="http://intensedebate.com">Intense Debate</a>. Now that I have tried, i must confess it does exactly what I needed. </p>
<p>In order to make it fully asynchronous, you&rsquo;ve just to download their common js and replace the following line:</p>
<p>In order to make it fully asynchronous, youve just to download their common js and replace the following line:</p>
<div>
<pre class="twilight">
@ -87,8 +87,8 @@
<p>To conclude, main advantages (for me) of <a href="http://intensedebate.com/">Intense Debate</a> over <a href="http://disqus.com/">Disqus</a>: </p>
<ul>
<li>Load Asynchronously&nbsp;; don&rsquo;t block my website</li>
<li>Add for free buttons like &ldquo;share to any&rdquo; and load them <strong>asynchronously</strong>.</li>
<li>Load Asynchronously&nbsp;; dont block my website</li>
<li>Add for free buttons like “share to any” and load them <strong>asynchronously</strong>.</li>
</ul>
<p>Voilà.</p>

File diff suppressed because one or more lines are too long

View file

@ -56,7 +56,7 @@
<div class="corps">
<p>My problem is simple:</p>
<p>I want to filter a text except some part of it. I can match easily the part I don&rsquo;t want to be filtered. For example</p>
<p>I want to filter a text except some part of it. I can match easily the part I dont want to be filtered. For example</p>
<div>
<pre class="twilight">

View file

@ -58,22 +58,22 @@
<p>Here is my new script, it first create a map which associate to each file its hash. After that it compare this file to the remote one. Then for each different file, update the content.</p>
<p>Even with this script I also have some problem. Mostly due to &lsquo;webdav&rsquo; issues. For example, renaming a folder work really badly (on Linux at least). I use webdavfs. For example:</p>
<p>Even with this script I also have some problem. Mostly due to webdav issues. For example, renaming a folder work really badly (on Linux at least). I use webdavfs. For example:</p>
<div><pre class="twilight">
mv folder folder2
</pre></div>
<p>It returns OK and I&rsquo;ve got: </p>
<p>It returns OK and Ive got: </p>
<div><pre class="twilight">
$ ls
folder folder2
</pre></div>
<p>Booh&hellip;.</p>
<p>Booh.</p>
<p>In order to handle most webdav issues I use a <em>framework</em> in zsh. It handle almost all except the correct renaming of folder. Working on it&hellip; Anyway here is the code I use.</p>
<p>In order to handle most webdav issues I use a <em>framework</em> in zsh. It handle almost all except the correct renaming of folder. Working on it Anyway here is the code I use.</p>
<div><div class="code"><div class="file"><a href="/Scratch/en/blog/2009-10-28-custom-website-synchronisation-with-mobileme--2-/code/webdav-framework"> &#x27A5; webdav-framework </a></div><div class="withfile">
<pre class="twilight">
@ -314,7 +314,7 @@ print -- <span class="String"><span class="String">&quot;</span>Dest = <span cla
</div></div></div>
<p>This is my way to replace <code>rsync</code> with filesystem not handling it.
Hope it is usefull. I&rsquo;ll be happy to hear a way to handle the webdav rename folder problem. This is really annoying.</p>
Hope it is usefull. Ill be happy to hear a way to handle the webdav rename folder problem. This is really annoying.</p>
</div>

View file

@ -87,7 +87,7 @@
</pre>
</div></div></div>
<p>That&rsquo;s it.</p>
<p>Thats it.</p>
</div>

View file

@ -54,9 +54,9 @@
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<p>I believe the goal researched by minimalism is <strong>Focus</strong>. But I don&rsquo;t believe minimalism should be the goal. Focus should be the goal, and I believe minimalism isn&rsquo;t necessary to reach it.</p>
<p>I believe the goal researched by minimalism is <strong>Focus</strong>. But I dont believe minimalism should be the goal. Focus should be the goal, and I believe minimalism isnt necessary to reach it.</p>
<p>This is why my design is not minimalist, but I decided to remove most of the navigation stuff of all pages of my website. May be I&rsquo;ll prefer to hide the menu only when you are on blog article. For now, I hide the menu everywhere on the website.</p>
<p>This is why my design is not minimalist, but I decided to remove most of the navigation stuff of all pages of my website. May be Ill prefer to hide the menu only when you are on blog article. For now, I hide the menu everywhere on the website.</p>
</div>

View file

@ -79,7 +79,7 @@
</script>
</div>
<p>I first tried to integrate <a href="http://www.gayadesign.com/diy/queryloader-preload-your-website-in-style/">queryLoader</a>, but it didn&rsquo;t fill my needs.</p>
<p>I first tried to integrate <a href="http://www.gayadesign.com/diy/queryloader-preload-your-website-in-style/">queryLoader</a>, but it didnt fill my needs.</p>
<p>The plugin add a black div to hide all the content. But as the script had to be launched at the end of the source code my website show for a small time.</p>

View file

@ -135,7 +135,7 @@
</pre></div>
<p>Simple and lightweight. No timer (almost), no memory leak, no Date&hellip;</p>
<p>Simple and lightweight. No timer (almost), no memory leak, no Date</p>
</div>

View file

@ -54,7 +54,7 @@
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<p>Here is a tip, I don&rsquo;t know why, but I almost always forgot how to do that.</p>
<p>Here is a tip, I dont know why, but I almost always forgot how to do that.</p>
<p>When you want to launch a command and this command should not be killed after you close your terminal. Here is how to accomplish that from command line: </p>

View file

@ -54,9 +54,9 @@
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<p><small> <em>I explain why I had so much difficulties to use Git. There is an &ldquo;untaught rule&rdquo; that make hard to work without. Until I read the good document. </em></small></p>
<p><small> <em>I explain why I had so much difficulties to use Git. There is an “untaught rule” that make hard to work without. Until I read the good document. </em></small></p>
<p><small> <em> &ldquo;Cheap branches&rdquo; aren&rsquo;t designed to be totally isolated branches but rather should follow a &ldquo;Master Branch&rdquo;. There is a </em>Standard Workflow<em> to follow. If you don&rsquo;t follow it, you prepare yourself with some hard time with Git.</em> </small></p>
<p><small> <em> “Cheap branches” arent designed to be totally isolated branches but rather should follow a “Master Branch”. There is a </em>Standard Workflow<em> to follow. If you dont follow it, you prepare yourself with some hard time with Git.</em> </small></p>
</div>
@ -72,7 +72,7 @@
<p>I must say I was completely convinced. And the more you learn about <abbr title="Decentralized Concurrent Versioning System">DCVS</abbr> the more you see good reason to use them.</p>
<p>I then needed a versioning system for my team. As they were not used to open source versioning system except those heavy, with a GUI and with and administrator<sup><a href="#note1">&dagger;</a></sup></p>
<p>I then needed a versioning system for my team. As they were not used to open source versioning system except those heavy, with a GUI and with and administrator<sup><a href="#note1"></a></sup></p>
<p>After some web searches, I founded three main choices:</p>
@ -82,7 +82,7 @@
<li><a href="http://selenic.com/mercurial">Mercurial</a></li>
</ul>
<p>After trying each other I chosen Bazaar. It has the simplest User Interface<sup><a href="#note2">&#42;</a></sup>. My choice was done.</p>
<p>After trying each other I chosen Bazaar. It has the simplest User Interface<sup><a href="#note2">*</a></sup>. My choice was done.</p>
<h3 id="from-bazaar-to-git">From Bazaar to Git</h3>
@ -91,21 +91,21 @@
<p>After some times, reading on many blogs, I realize Git is far more popular and by influent people. </p>
<p>I then decide to use Git in particular to <em>version</em> this current website.
But after trying it, I found it difficult and couter intuitive (I&rsquo;ll speak a work about it later).</p>
But after trying it, I found it difficult and couter intuitive (Ill speak a work about it later).</p>
<p>After calling for some help, when I say Bazaar is much simpler to learn, some people answer me that Git:</p>
<blockquote>
<p>&mdash; <em>SO-MUCH-EASY my 12 year old daughter uses it to version its school documents. She has no difficulties at all, creating branches, blah, blah, blah&hellip;</em></p>
<p> <em>SO-MUCH-EASY my 12 year old daughter uses it to version its school documents. She has no difficulties at all, creating branches, blah, blah, blah</em></p>
</blockquote>
<p>If a 12 years old girl has no problem with Git and I (with my Computer Science Ph.D.) have difficulties to uses it like I want, it is frustrating and humiliating. But what makes Git natural for some people and confusing for me? </p>
<p>I finally understood why reading a document I didn&rsquo;t read before. It was the <em>untaught</em> part of the conception. The part every developer found so <em>natural</em> it is not necessary to say a word about it. But it was not <em>natural</em> for me.</p>
<p>I finally understood why reading a document I didnt read before. It was the <em>untaught</em> part of the conception. The part every developer found so <em>natural</em> it is not necessary to say a word about it. But it was not <em>natural</em> for me.</p>
<p><small><a name="note1">&dagger;</a> - I speak about <em>ClearCase<small>&copy;</small></em>. I know there exists command line tools. But it was not the way my team used it.</small></p>
<p><small><a name="note1"></a> - I speak about <em>ClearCase<small>&copy;</small></em>. I know there exists command line tools. But it was not the way my team used it.</small></p>
<p><small><a name="note2">&#42;</a> - I never really given its chance to Mercurial. The terminology they chosen was too far from the svn one. And I was used to it.</small></p>
<p><small><a name="note2">*</a> - I never really given its chance to Mercurial. The terminology they chosen was too far from the svn one. And I was used to it.</small></p>
</div>
@ -113,7 +113,7 @@ But after trying it, I found it difficult and couter intuitive (I&rsquo;ll speak
<div class="corps">
<p>When you see explanation about <em>branches</em> and <abbr title="Decentralized Concurrent Versioning System">DCVS</abbr> we imagine each branch is totally uncorrelated to each other, except when <em>merging</em>. Everything is magic. This is the &ldquo;<em>Parallel World</em>&rdquo; explanation. This way of seeing is explained more in depth in the <a href="http://betterexplained.com/articles/a-visual-guide-to-version-control/">real good article about branches</a> on betterexplained. </p>
<p>When you see explanation about <em>branches</em> and <abbr title="Decentralized Concurrent Versioning System">DCVS</abbr> we imagine each branch is totally uncorrelated to each other, except when <em>merging</em>. Everything is magic. This is the <em>Parallel World</em> explanation. This way of seeing is explained more in depth in the <a href="http://betterexplained.com/articles/a-visual-guide-to-version-control/">real good article about branches</a> on betterexplained. </p>
<p>Git was designed to manage the Linux Kernel. Git was designed using the concept of <em>Patch</em> instead of <em>Parallel Worlds</em>.</p>
@ -124,11 +124,11 @@ But after trying it, I found it difficult and couter intuitive (I&rsquo;ll speak
<li>While Git seem base on the <em>Patch</em> model which will implie the creation of <em>Parallel Worlds</em>.</li>
</ul>
<p>I will not argument about which is the best. Just tell my vision of DCVS come from the <em>Parallel World</em> vision and Git was designed the other way<sup><a href="#note3">&Dagger;</a></sup>.</p>
<p>I will not argument about which is the best. Just tell my vision of DCVS come from the <em>Parallel World</em> vision and Git was designed the other way<sup><a href="#note3"></a></sup>.</p>
<h2 id="from-theory-to-real-life-usage">From Theory to Real Life Usage</h2>
<p>I believe I understood conceptual mechanism under Git. But I had some difficulties with real usage. The worst point, the one I didn&rsquo;t get before long was because I didn&rsquo;t get really well the notion of <em>Cheap Branching</em>.</p>
<p>I believe I understood conceptual mechanism under Git. But I had some difficulties with real usage. The worst point, the one I didnt get before long was because I didnt get really well the notion of <em>Cheap Branching</em>.</p>
<p>What is a <em>Cheap Branch</em>? If like me you come from Bazaar, it is a totally new notion. It is in fact the ability to create a branches all of them using the same directory.</p>
@ -136,10 +136,10 @@ But after trying it, I found it difficult and couter intuitive (I&rsquo;ll speak
<p>In theory, <em>Cheap Branches</em> are exactly like Bazaar branches. The word used is <em>Branch</em> and not <em>Cheap Branch</em>. But there is a slight difference between them. A slight difference between a <em>Cloned Branch</em> and a <em>Cheap Branch</em>.</p>
<p>A &ldquo;Standard branch&rdquo; is what is theoretically a kind of new <em>Parallel World</em>.
<p>A “Standard branch” is what is theoretically a kind of new <em>Parallel World</em>.
But <em>Cheap branch</em> was designed to be future <em>Patch</em> for the main branch of the directory/Cloned branch.</p>
<p>Of course, I know anybody can state you can totally use <em>Cheap branches</em> as <em>Cloned branches</em>. But they weren&rsquo;t designed for that. On daily usage, it is a bit uneasy to use it like this.</p>
<p>Of course, I know anybody can state you can totally use <em>Cheap branches</em> as <em>Cloned branches</em>. But they werent designed for that. On daily usage, it is a bit uneasy to use it like this.</p>
<p>Here how Git <em>cheap branches</em> should be used (for more details see <a href="http://hoth.entp.com/output/git_for_designers.html">Git for Designers</a>):</p>
@ -148,11 +148,11 @@ But <em>Cheap branch</em> was designed to be future <em>Patch</em> for the main
<li>creation of a <em>Cheap branch</em> containing differences which <strong>have</strong> to be patched somewhere in the future into <strong><span class="sc">The Great Repository</span></strong></li>
</ul>
<p>Here&rsquo;s how you should <strong>not</strong> use Git:</p>
<p>Heres how you should <strong>not</strong> use Git:</p>
<ul>
<li>Get or creation of a repository</li>
<li>Create a <em>cheap branch</em> which will never push it&rsquo;s modification to the main repository.</li>
<li>Create a <em>cheap branch</em> which will never push its modification to the main repository.</li>
</ul>
<p>This simple minor difference of point of view confused me a lot.</p>
@ -232,15 +232,15 @@ With Bazaar it is:</p>
<blockquote>
<ul>
<li>&mdash; Try to find the good keyword for this operation</li>
<li>&mdash; Wrong! Try again!</li>
<li>&mdash; False, it is not yet right!</li>
<li> Try to find the good keyword for this operation</li>
<li> Wrong! Try again!</li>
<li> False, it is not yet right!</li>
</ul>
</blockquote>
<p>That were the Git bad side. But It has many advantages. Once you&rsquo;ve understood the <em>cheap branching</em> paradigm. All became clearer for me after. Even if there is also some difficulties with the edit of the <code>.git/config</code> files (not user friendly at all).</p>
<p>That were the Git bad side. But It has many advantages. Once youve understood the <em>cheap branching</em> paradigm. All became clearer for me after. Even if there is also some difficulties with the edit of the <code>.git/config</code> files (not user friendly at all).</p>
<p><small><a name="note3">&Dagger;</a> I must precise that I worked a lot with multi-modal logic and particularly about &ldquo;Temporal Logics&rdquo; (linear or not). This is why I was more inclined to see things this way. &ldquo;Ah&nbsp;! Just to remember my firsts love with computer science&nbsp;!&rdquo;</small></p>
<p><small><a name="note3"></a> I must precise that I worked a lot with multi-modal logic and particularly about “Temporal Logics” (linear or not). This is why I was more inclined to see things this way. “Ah&nbsp;! Just to remember my firsts love with computer science&nbsp;!”</small></p>
</div>
@ -257,15 +257,15 @@ Such as working on a fix on a totally isolated branches.</p>
<h3 id="is-git-better-than-bazaar">Is Git better than Bazaar?</h3>
<p>Speaking about <em>features</em> I&rsquo;ll tell Git is the best.
But Git was too much in my way. Is was exactly what I didn&rsquo;t want for my first DCVS.</p>
<p>Speaking about <em>features</em> Ill tell Git is the best.
But Git was too much in my way. Is was exactly what I didnt want for my first DCVS.</p>
<p>I shouldn&rsquo;t have had those difficulties about understanding <em>cheap branching which must be a patch</em>. In reality, Git make a difference between the Tree and the Branch. Which is obviously not the case for Bazaar. Conceptually, bazaar is simpler to understand.</p>
<p>I shouldnt have had those difficulties about understanding <em>cheap branching which must be a patch</em>. In reality, Git make a difference between the Tree and the Branch. Which is obviously not the case for Bazaar. Conceptually, bazaar is simpler to understand.</p>
<h3 id="finally">Finally</h3>
<p>In conclusion, I use Git more often than Bazaar and I must say, that I have some preferences for Git. However, Git lack hardly clear commands name like <code>revert</code>.
For now I don&rsquo;t made alias to correct that. But may be one day I should do that.</p>
For now I dont made alias to correct that. But may be one day I should do that.</p>
</div>

View file

@ -70,20 +70,20 @@
</div>
<p><a href="http://git-scm.org" title="Git">Git</a> is a <abbr title="Decentralized Concurent Versions System">DCVS</abbr>, which means a Decentralized Concurrent Versions System. Let&rsquo;s analyze each part of this long term:</p>
<p><a href="http://git-scm.org" title="Git">Git</a> is a <abbr title="Decentralized Concurent Versions System">DCVS</abbr>, which means a Decentralized Concurrent Versions System. Lets analyze each part of this long term:</p>
<h3 id="versions-system">Versions System</h3>
<p>Firstly, versions system manage files.
When somebody work with files without a versions system, the following happens frequently:</p>
<p>When you modify a somehow critical file you don&rsquo;t want to loose. You copy naturally this file with another name. For example:</p>
<p>When you modify a somehow critical file you dont want to loose. You copy naturally this file with another name. For example:</p>
<div><pre class="twilight">$ cp fichier_important.c fichier_important.c.bak
</pre></div>
<p>In consequence of what, the new file, play the role of <em>backup</em>. If you break everything, you can always return in the last state by overwriting your modifications.
Of course, this method is not very professional and is a bit limited. If you make many modifications, you&rsquo;ll end with many files with strange names like:</p>
Of course, this method is not very professional and is a bit limited. If you make many modifications, youll end with many files with strange names like:</p>
<div>
<pre class="twilight">
@ -97,7 +97,7 @@ old.fichier_important.c
</pre>
</div>
<p>If you want to make it works correctly, you&rsquo;ll have to use naming convention. Files take many place even if you modify most of time only some lines.</p>
<p>If you want to make it works correctly, youll have to use naming convention. Files take many place even if you modify most of time only some lines.</p>
<p><em>Fortunately, versions system are here to help.</em></p>
@ -105,13 +105,13 @@ old.fichier_important.c
<p>Once upon a time versions were managed for each file separately. I think about CVS. Then it naturally appears projects are a coherent set of files. Recover each file separately was a tedious work. This is why versions number passed from files to the entire project.</p>
<p>It is therefore possible to say, &ldquo;I want to get back three days earlier&rdquo;.</p>
<p>It is therefore possible to say, “I want to get back three days earlier”.</p>
<div class="black">
<p><em>What gives versions system?</em> (I didn&rsquo;t mention everything at all)</p>
<p><em>What gives versions system?</em> (I didnt mention everything at all)</p>
<ul>
<li>automatic backups: <em>back in time</em>,</li>
@ -128,7 +128,7 @@ old.fichier_important.c
<p>Version Systems are already useful to manage its own projects. They help to organize and resolve partially backup problems. I say partially because you have to backup your repository on a decent file system. But versions system are really interesting is on projects done by many people.</p>
<p>Let&rsquo;s begin by an example, a two person project&nbsp;; Alex and Beatrice. On a file containing a <em>Lovecraft</em>&rsquo;s gods list:</p>
<p>Lets begin by an example, a two person project&nbsp;; Alex and Beatrice. On a file containing a <em>Lovecraft</em>s gods list:</p>
<div style="width: 10em; margin-left: auto; margin-right: auto">
<pre class="twilight">
@ -187,7 +187,7 @@ Yogsototh
<ul>
<li>get without any problem others modifications,</li>
<li>send without any problem its own modifications to others,</li>
<li>manage conflicts. I didn&rsquo;t speak about it, but sometimes a conflict can occur (when two different people modify the same line on a file for example). SVC help to resolve such problem. More on that later,</li>
<li>manage conflicts. I didnt speak about it, but sometimes a conflict can occur (when two different people modify the same line on a file for example). SVC help to resolve such problem. More on that later,</li>
<li>help to know who done what and when.</li>
</ul>
@ -199,7 +199,7 @@ Yogsototh
<p>This word became popular only recently about CVS. And it mainly means two things:</p>
<p>First, until really recently (SVN), you&rsquo;ll have to be connected to the distant server to get informations about a project. Like get the history. New decentralized systems work with a local <em>REPOSITORY</em> (directory containing backups and many informations linked to the versions system functionalities). Hence, one can view the history of a project without the need of being connected.</p>
<p>First, until really recently (SVN), youll have to be connected to the distant server to get informations about a project. Like get the history. New decentralized systems work with a local <em>REPOSITORY</em> (directory containing backups and many informations linked to the versions system functionalities). Hence, one can view the history of a project without the need of being connected.</p>
<p>All instances of a project can live <em>independently</em>.</p>
@ -212,7 +212,7 @@ Yogsototh
<p>Typical example:</p>
<blockquote>
<p>I develop my project. I&rsquo;m ameliorating something. An urgent bug is reported.</p>
<p>I develop my project. Im ameliorating something. An urgent bug is reported.</p>
<p>With a DCVS I can easily, get back to the version with the bug. Fix it. Send the fix. Get back to my feature work. And even, use the fix for the new version with my new feature.</p>
@ -237,7 +237,7 @@ Yogsototh
<h2 id="to-resume">To resume</h2>
<p>Let&rsquo;s resume what we can easily do with DCVS:</p>
<p>Lets resume what we can easily do with DCVS:</p>
<p><strong>Versions Systems</strong></p>
@ -263,7 +263,7 @@ Yogsototh
<li>Easily manipulate branches</li>
</ul>
<p>Now let&rsquo;s see how to obtain all these things easily with <a href="http://git-scm.org" title="Git">Git</a>.</p>
<p>Now lets see how to obtain all these things easily with <a href="http://git-scm.org" title="Git">Git</a>.</p>
</div>

View file

@ -84,7 +84,7 @@
<h3 id="conflicts-management">Conflicts management</h3>
<p>Conflicts can arise when you change the same line of code on the same file from another branch you&rsquo;re merging. It can seems a bit intimidating, but with <a href="http://git-scm.org" title="Git">Git</a> this kind of thing is really simple to handle.</p>
<p>Conflicts can arise when you change the same line of code on the same file from another branch youre merging. It can seems a bit intimidating, but with <a href="http://git-scm.org" title="Git">Git</a> this kind of thing is really simple to handle.</p>
<h4 id="example">example</h4>
@ -158,8 +158,8 @@ git commit -a -m <span class="String"><span class="String">&quot;</span>conflict
</pre>
</div>
<p>Now you&rsquo;re ready to use <a href="http://git-scm.org" title="Git">Git</a>.
<a href="http://git-scm.org" title="Git">Git</a> provide many other functionnalities. Now we&rsquo;ll see some <a href="http://git-scm.org" title="Git">Git</a> usages older CVS couldn&rsquo;t handle.</p>
<p>Now youre ready to use <a href="http://git-scm.org" title="Git">Git</a>.
<a href="http://git-scm.org" title="Git">Git</a> provide many other functionnalities. Now well see some <a href="http://git-scm.org" title="Git">Git</a> usages older CVS couldnt handle.</p>
</div>

View file

@ -70,9 +70,9 @@
<p>All was done to code and decide how to organize your versions after. In other VCS it is not as natural as in <a href="http://git-scm.org" title="Git">Git</a>.</p>
<p>With <a href="http://git-scm.org" title="Git">Git</a> you can depend of many different sources. Then, there is not necessarily a &lsquo;master&rsquo; repository where everybody puts its modifications.</p>
<p>With <a href="http://git-scm.org" title="Git">Git</a> you can depend of many different sources. Then, there is not necessarily a master repository where everybody puts its modifications.</p>
<p>What changes the most with <a href="http://git-scm.org" title="Git">Git</a> when you come from SVN, it&rsquo;s the idea of a centralized project on one server. With <a href="http://git-scm.org" title="Git">Git</a> many people could work on the same project but not necessarily on the same <em>repository</em> as main reference. One can easily fix a bug and send a patch to many different versions of a project.</p>
<p>What changes the most with <a href="http://git-scm.org" title="Git">Git</a> when you come from SVN, its the idea of a centralized project on one server. With <a href="http://git-scm.org" title="Git">Git</a> many people could work on the same project but not necessarily on the same <em>repository</em> as main reference. One can easily fix a bug and send a patch to many different versions of a project.</p>
</div>

View file

@ -127,7 +127,7 @@ $ cd <span class="Keyword">~</span>/Projets
$ git clone git://main.server/path/to/file
</pre></div>
<p>If there is no git server but you&rsquo;ve got an <code>ssh</code> access. Just replace the <code>git://host</code> by <code>ssh://user@host</code>. In order not to type your password each time, use:</p>
<p>If there is no git server but youve got an <code>ssh</code> access. Just replace the <code>git://host</code> by <code>ssh://user@host</code>. In order not to type your password each time, use:</p>
<div><pre class="twilight">
$ ssh-keygen -t rsa
@ -151,7 +151,7 @@ me@main.server$ rm id_rsa.pub
me@main.server$ logout
</pre></div>
<p>Now you don&rsquo;t need to write your password to access the <code>main.server</code>.</p>
<p>Now you dont need to write your password to access the <code>main.server</code>.</p>
<h2 id="creating-a-new-project">Creating a new project</h2>
@ -164,7 +164,7 @@ $ git add .
$ git commit -m <span class="String"><span class="String">&quot;</span>Initial commit<span class="String">&quot;</span></span>
</pre></div>
<p>Let do a small remark. If you don&rsquo;t want to <em>version</em> every file. Typically intermediate compilation file, swap files&hellip; Then you need to exclude them. Just before launching the <code>git add .</code> command. You need to create a <code>.gitignore</code> file in the root directory of your project. This file will contain all exclude <em>pattern</em>. For example:</p>
<p>Let do a small remark. If you dont want to <em>version</em> every file. Typically intermediate compilation file, swap files Then you need to exclude them. Just before launching the <code>git add .</code> command. You need to create a <code>.gitignore</code> file in the root directory of your project. This file will contain all exclude <em>pattern</em>. For example:</p>
<div><pre class="twilight">
*.o

View file

@ -62,7 +62,7 @@
<div class="intro">
<p>A detailed tutorial of <a href="http://git-scm.org">Git</a> for people knowing very few about versions systems. You&rsquo;ll understand utility of such program and how we use modern version control system. I try to stay as pragmatic as possible.</p>
<p>A detailed tutorial of <a href="http://git-scm.org">Git</a> for people knowing very few about versions systems. Youll understand utility of such program and how we use modern version control system. I try to stay as pragmatic as possible.</p>
</div>
@ -110,7 +110,7 @@ git commit -a -m <span class="String"><span class="String">&quot;</span>Fix bug
git push
</pre></div>
<p>This article is written for people knowing very few about versionning systems. It is also written for those who had didn&rsquo;t followed progress since CVS or subversion (SVN). This is why, in a first time I&rsquo;ll explain quickly which are the goal of such systems. Secondly, I&rsquo;ll explain how to install and configure <a href="http://git-scm.org" title="Git">Git</a>. Then, I give the command for each feature a <abbr title="Decentralized Concurent Versions System">DCVS</abbr> must have.</p>
<p>This article is written for people knowing very few about versionning systems. It is also written for those who had didnt followed progress since CVS or subversion (SVN). This is why, in a first time Ill explain quickly which are the goal of such systems. Secondly, Ill explain how to install and configure <a href="http://git-scm.org" title="Git">Git</a>. Then, I give the command for each feature a <abbr title="Decentralized Concurent Versions System">DCVS</abbr> must have.</p>
</div>

View file

@ -56,7 +56,7 @@
<div class="corps">
<p>It is unbelievable you cannot filter your call with an iPhone! The only reason I see for that is a negotiation with phone operator to force users to get phone advertising. It is simple unacceptable.</p>
<p>I&rsquo;m a λ iPhone&rsquo;s user. The only way to filter your call and to manage blacklist is to <em>jailbreak</em> your iPhone. And I don&rsquo;t want to do that. Then, if like me you find it unacceptable, just write a line to Apple: <a href="http://www.apple.com/feedback/iphone.html">http://www.apple.com/feedback/iphone.html</a></p>
<p>Im a λ iPhones user. The only way to filter your call and to manage blacklist is to <em>jailbreak</em> your iPhone. And I dont want to do that. Then, if like me you find it unacceptable, just write a line to Apple: <a href="http://www.apple.com/feedback/iphone.html">http://www.apple.com/feedback/iphone.html</a></p>
</div>

View file

@ -62,7 +62,7 @@
<div class="intro">
<p>Why even if I believe <code>git</code> has many bad point I believe it is the best DCVS around to work with. This is why I first tell why I prefer <a href="http://bazaar-vcs.org">Bazaar</a> over <a href="http://git-scm.org">Git</a>. Secondly I&rsquo;ll talk about the only advantage of git against Bazaar which lead me to prefer it.</p>
<p>Why even if I believe <code>git</code> has many bad point I believe it is the best DCVS around to work with. This is why I first tell why I prefer <a href="http://bazaar-vcs.org">Bazaar</a> over <a href="http://git-scm.org">Git</a>. Secondly Ill talk about the only advantage of git against Bazaar which lead me to prefer it.</p>
</div>
@ -74,7 +74,7 @@
<p>There is two way of perceive version control system. Either you think in term of branches (see the really good article on <a href="http://betterexplained.com/articles/a-visual-guide-to-version-control/">betterexplained</a>) or think in term of patches. Another way to say that, is weather you concentrate on vertices or on transitions of the graph of possible states of your project.</p>
<p>This is the second approach who was behind <code>git</code> and this is the first behind Bazaar. <code>git</code> was created by Linus Torvald in order to close some gap in the version system used to develop the Linux kernel. And patches is a term which is more present than &lsquo;state&rsquo; in the development community.</p>
<p>This is the second approach who was behind <code>git</code> and this is the first behind Bazaar. <code>git</code> was created by Linus Torvald in order to close some gap in the version system used to develop the Linux kernel. And patches is a term which is more present than state in the development community.</p>
<p>I first was convinced by Bazaar. Why? Argument in favor of Bazaar were: user friendly, terminology close to the subversion one. And I tried a bit the two, and it was clearly more natural for me to use Bazaar. But after seeing so many people using <code>git</code> I decided to give it a serious try.</p>
@ -102,11 +102,11 @@ git checkout pipo
git checkout ./pipo
</pre></div>
<p>Yes, hum&hellip;</p>
<p>Yes, hum</p>
<p>It works, but it is clearly not really user friendly. Furthermore, checkout had a complete different signification in older CSV like <code>cvs</code> et <code>svn</code>. <code>checkout</code> was used to get a distant project locally.</p>
<p>Bazaar terminology is far more natural, because there is no command to change the current branch as there is only one branch per directory. Changing a branch in Bazaar is changing the current directory. I also believe it is the biggest problem of Bazaar, I&rsquo;ll tell you why. And to undo things in Bazaar:</p>
<p>Bazaar terminology is far more natural, because there is no command to change the current branch as there is only one branch per directory. Changing a branch in Bazaar is changing the current directory. I also believe it is the biggest problem of Bazaar, Ill tell you why. And to undo things in Bazaar:</p>
<div><pre class="twilight">
bzr revert pipo
@ -159,7 +159,7 @@ git commit -m <span class="String"><span class="String">&quot;</span>reverted 3
<p>The rule is simple: <em>NEVER use the <code>git reset</code> command on a version somebody else could have <code>fetched</code></em></p>
<p>It was said. Discover the best method took me some time. I&rsquo;d made many different tries. The safer and best way of reverting back your tree is to use this method. If you want to make it automatic just had the following alias in your <code>~/.gitconfig</code>. Of course this alias will work only on environment having <code>zsh</code> installed. Which is the cas for most UNIX (Ubuntu, Mac OS X&hellip;).</p>
<p>It was said. Discover the best method took me some time. Id made many different tries. The safer and best way of reverting back your tree is to use this method. If you want to make it automatic just had the following alias in your <code>~/.gitconfig</code>. Of course this alias will work only on environment having <code>zsh</code> installed. Which is the cas for most UNIX (Ubuntu, Mac OS X).</p>
<div><div class="code"><div class="file"><a href="/Scratch/en/blog/2009-12-14-Git-vs--Bzr/code/gitconfig"> &#x27A5; gitconfig </a></div><div class="withfile">
<pre class="twilight">
@ -170,7 +170,7 @@ git commit -m <span class="String"><span class="String">&quot;</span>reverted 3
<h1 id="what-make-git-by-far-the-best-dcvs-today">What make <code>git</code> by far the best DCVS today</h1>
<p>After talking about the negatives points of <code>git</code>, now it&rsquo;s time to speak about the very positive feature that make <code>git</code> the best DCVS in my humble opinion.</p>
<p>After talking about the negatives points of <code>git</code>, now its time to speak about the very positive feature that make <code>git</code> the best DCVS in my humble opinion.</p>
<h2 id="cheap-branching">Cheap branching</h2>

View file

@ -66,7 +66,7 @@
But, there exists a major problem: the complementary of a regular language might not be regular.
Then, for some expression it is absolutely impossible to negate a regular expression.</p>
<p>But sometimes with some simple regular expression it should be possible<sup><a href="#note1">&dagger;</a></sup>. Say you want to match everything containing the some word say <code>bull</code> but don&rsquo;t want to match <code>bullshit</code>. Here is a nice way to do that:</p>
<p>But sometimes with some simple regular expression it should be possible<sup><a href="#note1"></a></sup>. Say you want to match everything containing the some word say <code>bull</code> but dont want to match <code>bullshit</code>. Here is a nice way to do that:</p>
<div><pre class="twilight">
<span class="Comment"><span class="Comment">#</span> match all string containing 'bull' (bullshit comprised)</span>
@ -122,7 +122,7 @@ There certainly exists many other methods. But the important lesson is
it is not straightforward to exclude something of a regular expression.</p>
<hr />
<p><small><a name="note1">&dagger;</a>
<p><small><a name="note1"></a>
It can be proved that any regular set minus a finite set is also regular.
</small></p>

View file

@ -54,7 +54,7 @@
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<p>In my <a href="previouspost">previous post</a> I had given some trick to match all except something. On the same idea, the trick to match the smallest possible string. Say you want to match the string between &lsquo;a&rsquo; and &lsquo;b&rsquo;, for example, you want to match:</p>
<p>In my <a href="previouspost">previous post</a> I had given some trick to match all except something. On the same idea, the trick to match the smallest possible string. Say you want to match the string between a and b, for example, you want to match:</p>
<pre class="twilight">
a.....<span class="Constant"><strong>a......b</strong></span>..b..a....<span class="Constant"><strong>a....b</strong></span>...
@ -75,7 +75,7 @@ a.....<span class="Constant"><strong>a......b</strong></span>..b..a....<span cla
</pre>
<p>The next natural way, is to change the <em>greediness</em>. But it is not enough as you will match from the first <code>a</code> to the first <code>b</code>.
Then a simple constatation is that our matching string shouldn&rsquo;t contain any <code>a</code> nor <code>b</code>. Which lead to the last elegant solution.</p>
Then a simple constatation is that our matching string shouldnt contain any <code>a</code> nor <code>b</code>. Which lead to the last elegant solution.</p>
<pre class="twilight">
/a[^ab]*b/
@ -105,7 +105,7 @@ For example:</p>
&lt;li&gt;...&lt;li&lt;/li&gt;
</pre></div>
<p>That string should not match. This is why if we really want to match it correctly<sup><a href="#note1">&dagger;</a></sup> we need to add:</p>
<p>That string should not match. This is why if we really want to match it correctly<sup><a href="#note1"></a></sup> we need to add:</p>
<div><pre class="twilight">
&lt;li&gt;([^&lt;]|&lt;[^l]|&lt;l[^i]|&lt;li[^&gt;])*(|&lt;|&lt;l|&lt;li)&lt;/li&gt;
</pre></div>
@ -142,7 +142,7 @@ For example:</p>
<p>And it works in only 9 lines for any beginning and ending string. This solution should look less <em>I AM THE GREAT REGEXP M45T3R, URAN00B</em>, but is more convenient in my humble opinion. Further more, using this last solution prove you master regexp, because you know it is difficult to manage such problems with only a regexp.</p>
<hr />
<p><small><a name="note1"><sup>&dagger;</sup></a> I know I used an HTML syntax example, but in my real life usage, I needed to match between <code>en:</code> and <code>::</code>. And sometimes the string could finish with <code>e::</code>.</small></p>
<p><small><a name="note1"><sup></sup></a> I know I used an HTML syntax example, but in my real life usage, I needed to match between <code>en:</code> and <code>::</code>. And sometimes the string could finish with <code>e::</code>.</small></p>
</div>

View file

@ -54,7 +54,7 @@
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<p>Strangely enough, I didn&rsquo;t find any built-in tool to split a file by keyword. I made one myself in <code>awk</code>. I put it here mostly for myself. But it could also helps someone else.
<p>Strangely enough, I didnt find any built-in tool to split a file by keyword. I made one myself in <code>awk</code>. I put it here mostly for myself. But it could also helps someone else.
The following code split a file for each line containing the word <code>UTC</code>.</p>
<div><pre class="twilight">

View file

@ -72,7 +72,7 @@ git clone git+ssh://git@github.com:443/yogsototh/project.git
<p><code>git clone</code> can only fetch the master branch.</p>
<p>If you don&rsquo;t have much branches, you can simply use clone your project and then use the following command:</p>
<p>If you dont have much branches, you can simply use clone your project and then use the following command:</p>
<div><pre class="twilight">
git branch --track local_branch remote_branch

View file

@ -128,7 +128,7 @@ git co clientB <span class="Keyword">&amp;&amp;</span> git merge client
<span class="Constant"><span class="Constant">:</span>dev</span> =&gt; [ <span class="Constant"><span class="Constant">:</span>master</span> ],
<span class="Constant"><span class="Constant">:</span>client</span> =&gt; [ <span class="Constant"><span class="Constant">:</span>clientA</span>, <span class="Constant"><span class="Constant">:</span>clientB</span> ] }
<span class="Keyword">def</span> <span class="Entity">get_current_branch</span>(<span class="Variable"></span>)
<span class="Keyword">def</span> <span class="Entity">get_current_branch</span>(<span class="Variable" />)
(<span class="String"><span class="String">`</span>git branch --no-color | awk '$1 == &quot;*&quot; {print $2}'<span class="String">`</span></span>).<span class="Entity">chop</span>.<span class="Entity">intern</span>
<span class="Keyword">end</span>

View file

@ -60,14 +60,14 @@
<p>The more you wait to do something, the more difficult it is to start doing it.</p>
</blockquote>
<p>I had to write another post for this blog. I had added many article idea in my todolist. But, I made many other things, and I&rsquo;ve always said (until now), I&rsquo;ll do this later. What changed my mind is the haunt of this simple remark about how to be productive in programming.
<p>I had to write another post for this blog. I had added many article idea in my todolist. But, I made many other things, and Ive always said (until now), Ill do this later. What changed my mind is the haunt of this simple remark about how to be productive in programming.
&gt; Stop write <code>TODO</code> in your code and make it now!<br />
&gt; You&rsquo;ll be surprised by the results.</p>
&gt; Youll be surprised by the results.</p>
<p>In short:
&gt; <strong>Just do it!</strong> ou <strong>Juste fait le</strong> comme auraient dit les nuls.</p>
<p>Finally I&rsquo;ll certainly write blog post more often for a short period of time.</p>
<p>Finally Ill certainly write blog post more often for a short period of time.</p>
<h3 id="what-did-i-do">What did I do?</h3>
@ -77,7 +77,7 @@
<p>I also have a <em>real</em> life. I enjoyed some vacancies with my family. </p>
<p>I work with <a href="http://www.lucarea.net">Luc</a> on a simple ruby REST/JSON/API oriented framework. It works fairly well, with really few bug until now. We planify to make a simple todolist tutorial. May be in two to three blog posts. This framework is not public for now. It will certainly be after we&rsquo;ll create some simple web service with it and made a nice website for it.</p>
<p>I work with <a href="http://www.lucarea.net">Luc</a> on a simple ruby REST/JSON/API oriented framework. It works fairly well, with really few bug until now. We planify to make a simple todolist tutorial. May be in two to three blog posts. This framework is not public for now. It will certainly be after well create some simple web service with it and made a nice website for it.</p>
<p>Then what I plan to do from now:</p>
@ -89,7 +89,7 @@
<li>provide the sources of this website on <a href="http://github.com">github</a></li>
</ul>
<p>There is some random in some of these achivement mostly because they don&rsquo;t depend totally on me.</p>
<p>There is some random in some of these achivement mostly because they dont depend totally on me.</p>
</div>

View file

@ -86,7 +86,7 @@
<p>Argh! In the middle of an <code>&lt;img&gt;</code> tag.</p>
<p>In fact, it is not as difficult as it should sound first. The secret is, you don&rsquo;t need to keep the complete tree structure to repair it, but only the list of not closed parents.</p>
<p>In fact, it is not as difficult as it should sound first. The secret is, you dont need to keep the complete tree structure to repair it, but only the list of not closed parents.</p>
<p>Given with our example, when we are after the first paragraph. we only have to close the <code>div</code> for class <code>corps</code> and the XML is repaired. Of course, when you cut inside a tag, you sould go back, as if you where just before it. Delete this tag and all is ok.</p>
@ -159,7 +159,7 @@ for each tag in the stack, pop it, and write:
</pre>
</div></div>
<p>I don&rsquo;t know if the code can help you, but the raisonning should definitively be known.</p>
<p>I dont know if the code can help you, but the raisonning should definitively be known.</p>
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View file

@ -71,7 +71,7 @@
<li>Used a pen and a sheet of paper</li>
<li>Made some math.</li>
<li>Crushed the problem in 10 minutes</li>
<li>Conclusion: The pragmatism shouldn&rsquo;t mean &ldquo;never use theory&rdquo;.</li>
<li>Conclusion: The pragmatism shouldnt mean “never use theory”.</li>
</ul>
@ -86,10 +86,10 @@ I entered in the <em>infernal</em>: <em>try &amp; repair loop</em>.
Each step was like:</p>
<blockquote>
<p>&ndash; Just this thing to repair and that should be done.<br />
&ndash; OK, now that should just work.<br />
&ndash; Yeah!!!<br />
&ndash; Oops! I forgotten that&hellip;<br />
<p> Just this thing to repair and that should be done.<br />
OK, now that should just work.<br />
Yeah!!!<br />
Oops! I forgotten that…<br />
<code>repeat until death</code></p>
</blockquote>
@ -173,7 +173,7 @@ I had to face a problem of the same kind at my job. The problem was simple to th
</ol>
<p>You can try if you want. If you attack the problem directly opening an editor, I assure you, it will certainly be not so simple.
I can tell that, because it&rsquo;s what I&rsquo;ve done. And I must say I lost almost a complete day at work trying to resolve this. There was also, many small problems around that make me lose more than two days for this problem.</p>
I can tell that, because its what Ive done. And I must say I lost almost a complete day at work trying to resolve this. There was also, many small problems around that make me lose more than two days for this problem.</p>
<p>Why after two days did I was unable to resolve this problem which seems so simple?</p>
@ -194,14 +194,14 @@ I thought about how to resolve the problem but with the eyes of a <em>pragmatic
<blockquote>
<p>That should be a simple perl search and replace program.<br />
Let&rsquo;s begin to write code</p>
Lets begin to write code</p>
</blockquote>
<p>This is the second sentence that was plainly wrong. I started in the wrong direction. And the workflow did not work from this entry point.</p>
<h2 id="think">Think</h2>
<p>After some times, I just stopped to work. Tell myself <em>&ldquo;it is enough, now, I must finish it!&rdquo;</em>.
<p>After some times, I just stopped to work. Tell myself <em>“it is enough, now, I must finish it!”</em>.
I took a sheet of paper, a pen and began to draw some trees.</p>
<p>I began by make by removing most of the verbosity.
@ -307,7 +307,7 @@ M - V - M - V - tag2 tag1
<p>can be done using the following one state deterministic tree transducer:</p>
<blockquote>
<p>C &rarr; &epsilon;<br />
<p>C &rarr; ε<br />
E &rarr; M<br />
R &rarr; V </p>
</blockquote>
@ -338,10 +338,10 @@ M - V - M - V - tag2 tag1
<hr/><div class="footnotes">
<ol>
<li id="fn:1">
<p>Hopefully I am in the 10% who had given a bug free implementation.<a href="#fnref:1" rel="reference">&#8617;</a></p>
<p>Hopefully I am in the 10% who had given a bug free implementation.<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>
<li id="fn:nb">
<p>I did a program which generate automatically the weight in a matrix of each edit distance from data.<a href="#fnref:nb" rel="reference">&#8617;</a></p>
<p>I did a program which generate automatically the weight in a matrix of each edit distance from data.<a href="#fnref:nb" rev="footnote">&#8617;</a></p>
</li>
</ol>
</div>

View file

@ -73,7 +73,7 @@ here is an example of english text.
<p>This way of handling translations force you to write completely an article in one language, copy it, and translate it.</p>
<p>However, most of time, there are common parts like images, source code, etc&hellip;
<p>However, most of time, there are common parts like images, source code, etc
When I want to correct some mistake on these parts, I have to make twice the work. With sometimes adding another mistake in only one language.</p>
<p>This is why I preferred to handle it differently.
@ -89,7 +89,7 @@ Finally my files looks like:</p>
[image](url)
</pre>
<p>As I edit my files with <a href="http://vim.org">vim</a>, it is really easy to add <code>fr:</code> or <code>en:</code> at some line&rsquo;s beginning using the useful <code>C-v</code>.
<p>As I edit my files with <a href="http://vim.org">vim</a>, it is really easy to add <code>fr:</code> or <code>en:</code> at some lines beginning using the useful <code>C-v</code>.
However <a href="http://nanoc.stoneship.org">nanoc</a> was conceived to be used for one language only. Or to be used with the first method. I tried to adapt nanoc to my usage. But after a while, I found it easier to pre-filter the nanoc work by a simple script. My script transform my file into two new files. And all work like a charm.</p>
<p>You can get my blog code source (without most of articles) at <a href="http://github.com/yogsototh/Scratch">github.com/yogsototh/Scratch</a>.</p>

View file

@ -66,7 +66,7 @@ You can get it on <a href="http://github.com/yogsototh/nanoc3_blog">github.com</
<li><a href="http://intensedebate.org">intenseDebate</a> comments integration (asynchronous)&nbsp;;</li>
<li>Portable with and without javascript, XHTML Strict 1.0 / CSS3,</li>
<li>Write in markdown format (no HTML editing needed),</li>
<li>Typographic ameliorations (no &lsquo;:&rsquo; starting a line in French for example),</li>
<li>Typographic ameliorations (no : starting a line in French for example),</li>
<li><a href="http://graphviz.org">Graphviz</a> graph generation integration.</li>
</ul>
@ -104,9 +104,9 @@ $ ./task/recompile
<h3 id="multi-language">Multi-language</h3>
<p>All files in <code>multi</code> are processed and copied in the <code>content</code> directory.
For each file in multi, each line starting by &lsquo;<code>fr: </code>&rsquo; are copied (without the <code>fr: </code> into the <code>content/html/fr/</code> tree, but not into the <code>content/html/en</code> tree. File not starting by <code>fr: </code> or <code>en: </code> are copied in each destinations.</p>
For each file in multi, each line starting by <code>fr: </code> are copied (without the <code>fr: </code> into the <code>content/html/fr/</code> tree, but not into the <code>content/html/en</code> tree. File not starting by <code>fr: </code> or <code>en: </code> are copied in each destinations.</p>
<p>If you want to add another language, you&rsquo;ll have to modify <code>tasks/config</code>, and <code>config.yaml</code>, create a <code>content/html/xx</code> where <code>xx</code> is the language code.</p>
<p>If you want to add another language, youll have to modify <code>tasks/config</code>, and <code>config.yaml</code>, create a <code>content/html/xx</code> where <code>xx</code> is the language code.</p>
<h3 id="edition--rendering">Edition &amp; Rendering</h3>
@ -120,7 +120,7 @@ For each file in multi, each line starting by &lsquo;<code>fr: </code>&rsquo; ar
<h4 id="typography">Typography</h4>
<p>In French all &lsquo;:&rsquo;, &lsquo;;&rsquo;, &lsquo;!&rsquo; and &lsquo;?&rsquo; are preceded automatically by <code>&amp;nbsp</code>. This enable not to have a line starting by a single special character.</p>
<p>In French all :, ;, ! and ? are preceded automatically by <code>&amp;nbsp</code>. This enable not to have a line starting by a single special character.</p>
<p>You can use small caps using <code>&lt;sc&gt;</code> tags. </p>

View file

@ -119,7 +119,7 @@ _gaq.<span class="SupportFunction">push</span>([<span class="String"><span class
</pre>
</div></div>
<p>Replace the: <code>UA-XXXXXXXX-1</code> by your google analytics code and you&rsquo;re done.</p>
<p>Replace the: <code>UA-XXXXXXXX-1</code> by your google analytics code and youre done.</p>
<p>To see what occurs, simply go in <code>Content</code> and <code>Event Tracking</code> as shown in the following screenshot:</p>

View file

@ -64,7 +64,7 @@
<li>Tried to make <a href="http://yannesposito.com/Softwares/YPassword.html">YPassword</a> in jQuery and with Cappuccino.</li>
<li>Cappuccino nice in desktop browser but 1.4MB, not compatible with iPhone.</li>
<li>jQuery not as nice as the Cappuccino version but 106KB. iPhone compatible.</li>
<li>I&rsquo;ll give a try to Dashcode 3.</li>
<li>Ill give a try to Dashcode 3.</li>
</ul>
@ -97,7 +97,7 @@ I then made a second version with the <a href="http://cappuccino.org">Cappuccino
<div class="intro">
<p>If you don&rsquo;t mind about what does my widget and just want to know how the two frameworkcompare, you should go
<p>If you dont mind about what does my widget and just want to know how the two frameworkcompare, you should go
directly to the <a href="#cappuccino">next part</a>.</p>
@ -137,7 +137,7 @@ hash<span class="Keyword">=</span><span class="Entity">sha1</span>( masterPasswo
<li>maximal length,</li>
<li>must not contain a special character, </li>
<li>must contain a special character, </li>
<li>etc&hellip;</li>
<li>etc</li>
</ul>
<p>And if you want to change your password the <em>leak number</em> is here for that.
@ -153,14 +153,14 @@ All informations such as user name, maximal length can be stored in a public fil
<h2 id="cappuccino">Cappuccino</h2>
<p>First, I&rsquo;d like to say Cappuccino applications look simply awesome.
<p>First, Id like to say Cappuccino applications look simply awesome.
It is like having a Cocoa application in your web browser.
And this is <em>great</em>.</p>
<p>I also must admit I enjoyed making my application with Cappuccino.
It is like programming for an iPhone application.
If you are a bit familiar with Cocoa, you feel at home.
If you don&rsquo;t know anything about Cocoa, I suggest you to look at it.
If you dont know anything about Cocoa, I suggest you to look at it.
This is a really <em>great</em> framework to make User Interface.
I am not a specialist, but I have done some MFC, java Swing<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup> and WXWindows User Interfaces (some years ago).
And I must say, Cocoa is far better than those.</p>
@ -177,45 +177,45 @@ But there was also some drawbacks</p>
<li>I could have done the User Interface using <a href="http://developer.apple.com/technologies/tools/xcode.html">Interface Builder</a>.</li>
</ul>
<p>Some things I didn&rsquo;t like:</p>
<p>Some things I didnt like:</p>
<ul>
<li>I made some time to understand how to handle the <code>onChange</code> on the text fields.</li>
<li>Documentation lacked a bit of organisation.</li>
<li>It doesn&rsquo;t work on iPhone.</li>
<li>It doesnt work on iPhone.</li>
<li>It weighted 11MB to deploy.</li>
<li>It weight 1.3MB to load.</li>
</ul>
<p>I didn&rsquo;t use bindings because I believe they are not ready by now.</p>
<p>I didnt use bindings because I believe they are not ready by now.</p>
<h2 id="jquery">jQuery</h2>
<p>The jQuery version of YPassword is not as finished as the Cappuccino one. Because, there is no <em>slider</em> directly with jQuery. I&rsquo;d have to use jQueryUI. And I believe, using it will make the application weight far more than the today 106KB.</p>
<p>The jQuery version of YPassword is not as finished as the Cappuccino one. Because, there is no <em>slider</em> directly with jQuery. Id have to use jQueryUI. And I believe, using it will make the application weight far more than the today 106KB.</p>
<p>To make this version I simply copied my widget source code and adapted it. It was straightforward. But jQuery is not an <em>application oriented framework</em>. It is more a &ldquo;<em>dark side</em> javascript animation framework&rdquo;<sup id="fnref:2"><a href="#fn:2" rel="footnote">2</a></sup>.</p>
<p>To make this version I simply copied my widget source code and adapted it. It was straightforward. But jQuery is not an <em>application oriented framework</em>. It is more a <em>dark side</em> javascript animation framework<sup id="fnref:2"><a href="#fn:2" rel="footnote">2</a></sup>.</p>
<p>I don&rsquo;t have too much to say about the jQuery version. But this was way more <em>low level</em> programming than Cappuccino.</p>
<p>I dont have too much to say about the jQuery version. But this was way more <em>low level</em> programming than Cappuccino.</p>
<h2 id="my-conclusion">My conclusion</h2>
<p>If you want to make an iPhone compatible web application just don&rsquo;t use Cappuccino yet.
<p>If you want to make an iPhone compatible web application just dont use Cappuccino yet.
If you want to make <em>simple</em> application like mine, I also believe, Cappuccino is a bit too much.</p>
<p>If you want to make a complex web oriented application, Cappuccino is a great choice.
But you may have some difficulties to begin programming with it.</p>
<p>Finally, to terminate my web version of my widget, I&rsquo;ll give a try to Dashcode 3.
<p>Finally, to terminate my web version of my widget, Ill give a try to Dashcode 3.
It seems to be a good alternative to create web widgets.
I don&rsquo;t know if Dashcode 3 is portable on non webkit browser.
I dont know if Dashcode 3 is portable on non webkit browser.
But if it is, it could be the end of projects like Cappuccino and Sproutcore.</p>
<hr/><div class="footnotes">
<ol>
<li id="fn:1">
<p>If you are interested you can take a look at <a href="http://labh-curien.univ-st-etienne.fr/informatique/SEDiL/">SEDiL</a>. I am proud of the tree drawing view made from scratch.<a href="#fnref:1" rel="reference">&#8617;</a></p>
<p>If you are interested you can take a look at <a href="http://labh-curien.univ-st-etienne.fr/informatique/SEDiL/">SEDiL</a>. I am proud of the tree drawing view made from scratch.<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>
<li id="fn:2">
<p>I don&rsquo;t want to feel like a <em>troll</em> I use jQuery to make some <em>dark side</em> animation on this blog. But the javascript on my blog is not needed except for commenting.<a href="#fnref:2" rel="reference">&#8617;</a></p>
<p>I dont want to feel like a <em>troll</em> I use jQuery to make some <em>dark side</em> animation on this blog. But the javascript on my blog is not needed except for commenting.<a href="#fnref:2" rev="footnote">&#8617;</a></p>
</li>
</ol>
</div>

View file

@ -55,7 +55,7 @@
<div id="afterheader">
<div class="corps">
<p>Some <a href="http://reddit.com">Reddit</a> users reported my website was really long to load and to scroll.
They thinks it was because of the &lsquo;1px shadow&rsquo; I apply on all the text.
They thinks it was because of the 1px shadow I apply on all the text.
I was a bit surprised, because I make some test into a really <em>slow</em> virtual machine. And all have always worked fine. In fact, what slow down so much are by order of importance:</p>
<ol>
@ -69,7 +69,7 @@ I was a bit surprised, because I make some test into a really <em>slow</em> virt
<p>Safari and Chrome use webkit, when you access my website with javascript enabled, an additionnal browser specific CSS is loaded. Until now I switched only between: IE, Mozilla and Webkit. Now I added one more special case for Chrome. Now I continue to use gradient for Safari but no more on Chrome.</p>
<p>I didn&rsquo;t tried to verify the efficiency of all new CSS 3 features. But I advise you not to use <strong><code>-webkit-gradient</code></strong> on Chrome. At least when the host is a Linux.</p>
<p>I didnt tried to verify the efficiency of all new CSS 3 features. But I advise you not to use <strong><code>-webkit-gradient</code></strong> on Chrome. At least when the host is a Linux.</p>
<h2 id="box-shadows">Box Shadows</h2>
@ -77,7 +77,7 @@ I was a bit surprised, because I make some test into a really <em>slow</em> virt
<h2 id="text-shadows">Text Shadows</h2>
<p>Many tell me to use text-shadows sparingly. But I believe it was not the real reason of the slow down. This is why I&rsquo;ll get them back.</p>
<p>Many tell me to use text-shadows sparingly. But I believe it was not the real reason of the slow down. This is why Ill get them back.</p>
<h2 id="conclusion">Conclusion</h2>

View file

@ -85,10 +85,10 @@
<p>If a demiurge made our world, he certainly had a great sense of humor.
After this read, you should be convinced.
I&rsquo;ll pretend to be him.
I&rsquo;ll create a simplified world.
Ill pretend to be him.
Ill create a simplified world.
A world that obey to simple mathematical rules.
And I&rsquo;ll tell you about one of the curse on this world: the <em>undecidability</em>.
And Ill tell you about one of the curse on this world: the <em>undecidability</em>.
The inability to know if we had find the <em>truth</em>.
The inability to predict many things that should be natural.
Here begin the story.</p>
@ -102,9 +102,9 @@ Here begin the story.</p>
<p>In the beginning there was only void.
Then a blog post beginning to be written.
I breath profoundly to feel the weight of the act I will accomplish.
A last tense moment and&hellip; I <em>create</em> the <em>Universe</em>.
A last tense moment and I <em>create</em> the <em>Universe</em>.
An incredible <em>Universe</em> which will exists only the time of this read.
I&rsquo;m the <em>demiurge</em> of this universe and you are its observer.</p>
Im the <em>demiurge</em> of this universe and you are its observer.</p>
<p>I construct this world using only simples rules.
I decide that <em>real</em> rules of this world will be the one we believe are <em>true</em> for our world.
@ -113,7 +113,7 @@ For their world, everything we <em>believe</em> today is <em>true</em> for them.
Their world is then probably <em>simpler</em> than our.
Particularly, we can describe this world with axioms and mathematic rules.
It is not so sure for our Universe.
But we&rsquo;ll talk about that later.</p>
But well talk about that later.</p>
<p>Lets the work begin.
I create an <em>Earth</em>.
@ -123,14 +123,14 @@ In particular they try to understand their world.
They believe that if they know the rules of their world they will be able to predict the consequences of most of their acts.
They are so naive.
If only they knew.
But I&rsquo;m here to help them.</p>
But Im here to help them.</p>
<p>I am a God who likes jokes.
The first joke I make to Ys is to make their sense imperfect.
Furthermore it is not possible to make perfect precise measure in my world.
I let Ys ameliorate their technology but there is a theoretical limit to the best precision they can reach.</p>
<p>I&rsquo;d like to precise that these people believe their world is flat.
<p>Id like to precise that these people believe their world is flat.
Some believe it is possible to find the rules of their Universe.
Now, let the game begins.</p>
@ -157,14 +157,14 @@ The proof is based on rules and axioms.
How to be certain these rules and axioms are right in their world?
They will try to measure again and again the sum of the angles of triangles.
The measure will never fail.
But they&rsquo;ll never be certain the rules and axioms are right.
But theyll never be certain the rules and axioms are right.
Because then only way to verify all axioms depends of observation.
And as a facetious god, I forbid perfect measure in observation.</p>
<p>Of course, they prey, they call me to help.
And as any respectful god, I don&rsquo;t answer.
Ah ah ah! I&rsquo;ve always loved to make these kind of thing.
Let&rsquo;s act as if I don&rsquo;t exists.
And as any respectful god, I dont answer.
Ah ah ah! Ive always loved to make these kind of thing.
Lets act as if I dont exists.
What a good joke!</p>
<p>They feel sad. But they have some hope:</p>
@ -180,7 +180,7 @@ What a good joke!</p>
<p><img alt="no name" src="/Scratch/img/blog/2010-07-09-Indecidabilities/3_corps.png" class="left" /></p>
<p>Unfortunately, the three bodies problem will crush this <em>hope</em>.
Using Newton&rsquo;s Universal Law of gravitation with two bodies, we can predict with precision what will be their position and speed in the future.
Using Newtons Universal Law of gravitation with two bodies, we can predict with precision what will be their position and speed in the future.
Until there all seems OK.
But now, add another body.
All errors will grow.
@ -198,13 +198,13 @@ Errors will grow at a point that any prediction will be unusable.</p>
<p><img alt="no name" src="/Scratch/img/blog/2010-07-09-Indecidabilities/mandelbrot.png" class="left" /></p>
<p>Consider some GPS coordinates on a point around the cost of the &ldquo;Bretagne&rdquo; in France.
<p>Consider some GPS coordinates on a point around the cost of the “Bretagne” in France.
The coordinates are 3 feet precise.
Is the point in the water or on Earth?</p>
<p>For some coordinates it is not possible to know.
Even if we are authorize to move a bit to dodge the borders.
Because there are some zone in which all point could be a &ldquo;border&rdquo; for any size of the zone.</p>
Because there are some zone in which all point could be a “border” for any size of the zone.</p>
<p>We can even imagine some mathematical structure where <em>all</em> points are at the border[^2].
[^2]: The set R\Q has this property.</p>
@ -215,7 +215,7 @@ Because there are some zone in which all point could be a &ldquo;border&rdquo; f
<p>Until there all problem were undecidable because of measure <em>errors</em>.
May be in a controlled world without any <em>error</em> we should be able to predict anything.<br />
I&rsquo;m sorry to say no.
Im sorry to say no.
Even in a self-contained mathematical world it can be possible to create object with an unpredictable behaviour.</p>
<p>It is the <em>halting problem</em>.</p>
@ -231,8 +231,8 @@ More precisely:</p>
<p>Hypothesis: there exists a program <code>P</code> such that:</p>
<ul>
<li><code>P(x,y)</code> return &ldquo;stop&rdquo; in a finite amount of time if <code>x(y)</code><sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup> will stop running.</li>
<li><code>P(x,y)</code> return &ldquo;loop&rdquo; in a finite amount of time if <code>x(y)</code> will never stop running.</li>
<li><code>P(x,y)</code> return “stop” in a finite amount of time if <code>x(y)</code><sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup> will stop running.</li>
<li><code>P(x,y)</code> return “loop” in a finite amount of time if <code>x(y)</code> will never stop running.</li>
</ul>
<p>Remark: Any program can be represented as a string. Therefore, a program can be used as the input of another program.
@ -241,15 +241,15 @@ It is authorized to write <code>P(x,x)</code>.</p>
<p>Let <code>Q</code> be the following program using the return value of <code>P</code>.
&lt;pre class="twilight"&gt;
Q(x)&nbsp;:
if P(x,x)=&rdquo;stop&rdquo; then I enter in an infinite loop
if P(x,x)=&rdquo;loop&rdquo; then I stop
if P(x,x)=”stop” then I enter in an infinite loop
if P(x,x)=”loop” then I stop
&lt;/pre&gt;</p>
<p>Now, what is the value of <code>P(Q,Q)</code>?</p>
<ul>
<li>if <code>P(Q,Q)</code> returns &ldquo;stop&rdquo; that imply by construction of <code>Q</code> that <code>P(Q,Q)</code> returns &ldquo;loop&rdquo;.</li>
<li>if <code>P(Q,Q)</code> returns &ldquo;loop&rdquo; that means by construction of <code>Q</code> that <code>P(Q,Q)</code> return &ldquo;stop&rdquo;.</li>
<li>if <code>P(Q,Q)</code> returns “stop” that imply by construction of <code>Q</code> that <code>P(Q,Q)</code> returns “loop”.</li>
<li>if <code>P(Q,Q)</code> returns “loop” that means by construction of <code>Q</code> that <code>P(Q,Q)</code> return “stop”.</li>
</ul>
<p>Therefore there is a contradiction the only way to handle is by the non existence of the program <code>P</code>.</p>
@ -257,7 +257,7 @@ Q(x)&nbsp;:
<p>I am the demiurge of this imaginary world.
And I cannot know the future of this world.
Therefore, creative power isn&rsquo;t equivalent to omnipotence.</p>
Therefore, creative power isnt equivalent to omnipotence.</p>
</div>
@ -267,11 +267,11 @@ Therefore, creative power isn&rsquo;t equivalent to omnipotence.</p>
<p>After all this, it becomes difficult to know what we can believe.
But it would be another error to throw away all our knowledge.
In a future next part, I&rsquo;ll explain what we can hope and what attitude we should have once we&rsquo;ve realized most of truth are unaccessible.</p>
In a future next part, Ill explain what we can hope and what attitude we should have once weve realized most of truth are unaccessible.</p>
<hr/><div class="footnotes">
<ol>
<li id="fn:1">
<p>Meaning <code>x</code> taking <code>y</code> as input.<a href="#fnref:1" rel="reference">&#8617;</a></p>
<p>Meaning <code>x</code> taking <code>y</code> as input.<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>
</ol>
</div>

View file

@ -135,12 +135,12 @@ heroku create
git push heroku master
</pre>
<p>Now I&rsquo;ll should be able to redirect properly to my own 404 page for example.
<p>Now Ill should be able to redirect properly to my own 404 page for example.
I hope it is helpful.</p>
<hr/><div class="footnotes">
<ol>
<li id="fn:1">
<p>I was inspired by this <a href="http://gmarik.info/blog/2010/05/10/blogging-with-jekyll-and-heroku-for-free">article</a>. <a href="#fnref:1" rel="reference">&#8617;</a></p>
<p>I was inspired by this <a href="http://gmarik.info/blog/2010/05/10/blogging-with-jekyll-and-heroku-for-free">article</a>. <a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>
</ol>
</div>

View file

@ -55,8 +55,8 @@
<div id="afterheader">
<div class="corps">
<p>I had to send a mail using only command line.
I was surprised it isn&rsquo;t straightforward at all.
I didn&rsquo;t had <code>pine</code> nor <code>mutt</code> or anything like that.
I was surprised it isnt straightforward at all.
I didnt had <code>pine</code> nor <code>mutt</code> or anything like that.
Just <code>mail</code> and <code>mailx</code>.</p>
<p>What Internet say (via google) is</p>
@ -67,7 +67,7 @@ uuencode fic.jpg fic.jpg <span class="Keyword">|</span> mail -s <span class="Str
<p>I tried it.
And it works almost each times.
But for my file, it didn&rsquo;t worked.
But for my file, it didnt worked.
I compressed it to <code>.gz</code>, <code>.bz2</code> and <code>.zip</code>.
Using <code>.bz2</code> format it worked nicely, but not with other formats.
Instead of having an attached file I saw this in my email.</p>
@ -87,7 +87,7 @@ After some research I found the solution.
Use MIME instead of <code>uuencode</code>.</p>
<p>Finally I made it manually using <code>sendmail</code>.
I didn&rsquo;t dare to use <code>telnet</code>.
I didnt dare to use <code>telnet</code>.
The command to use is:</p>
<pre class="twilight">
@ -118,7 +118,7 @@ H4sICB6Ke0wAA2Rjcl93aXRob3V0X2tleXdvcmQuY3N2ANSdW5ubOJPH7/e7
...
</pre>
<p>And to obtain the &ldquo;encoded&rdquo; file in base64 I used:</p>
<p>And to obtain the “encoded” file in base64 I used:</p>
<p><code classs="zsh">
uuencode -m fic.jpg fic.jpg

View file

@ -57,7 +57,7 @@
<p>You can remark at the bottom of each page I provide a last modification date.
This label was first calculated using the <code>mtime</code> of the file on the file system.
But many times I modify this date just to force some recompilation.
Therefore the date wasn&rsquo;t a date of <em>real</em> modification.</p>
Therefore the date wasnt a date of <em>real</em> modification.</p>
<p>I use <a href="http://git-scm.org">git</a> to version my website.
And fortunately I can know the last date of <em>real</em> change of a file.

View file

@ -60,7 +60,7 @@ here are two functions to add to your code to have <code>base64</code> and <code
<p>To use it, simply copy the code in your class and use as this:</p>
<pre class="twilight">
<span class="CCCPreprocessorLine">#<span class="CCCPreprocessorDirective">import</span> <span class="String"><span class="String">&lt;</span>CommonCrypto/CommonDigest.h<span class="String">&gt;</span></span></span>
#import &lt;CommonCrypto/CommonDigest.h&gt;
...
<span class="Support">NSString</span> *b64_hash = [<span class="Variable">self</span> <span class="SupportFunction">b64_sha1<span class="SupportFunction">:</span></span><span class="String"><span class="String">@&quot;</span>some NSString to be sha1'ed<span class="String">&quot;</span></span>];
...
@ -72,46 +72,46 @@ here are two functions to add to your code to have <code>base64</code> and <code
<div class="code"><div class="file"><a href="/Scratch/en/blog/2010-09-02-base64-and-sha1-on-iPhone/code/iphone_base64_sha1.c"> &#x27A5; iphone_base64_sha1.c </a></div><div class="withfile">
<pre class="twilight">
- (<span class="Storage">unsigned</span> <span class="Storage">char</span> *)sha1:(NSString *)baseString result:(<span class="Storage">unsigned</span> <span class="Storage">char</span> *)result {
<span class="Storage">char</span> *c_baseString=(<span class="Storage">char</span> *)[baseString UTF8String];
CC_SHA1(c_baseString, <span class="SupportFunction">strlen</span>(c_baseString), result);
<span class="Keyword">return</span> result;
- (unsigned char *)sha1:(<span class="Support">NSString</span> *)baseString result:(unsigned char *)result {
char *c_baseString=(char *)[baseString <span class="SupportFunction">UTF8String</span>];
CC_SHA1(c_baseString, strlen(c_baseString), result);
return result;
}
- (NSString *)base64:(<span class="Storage">unsigned</span> <span class="Storage">char</span> *)result {
NSString *password=[[NSString alloc] init];
<span class="Storage">static</span> <span class="Storage">const</span> <span class="Storage">unsigned</span> <span class="Storage">char</span> cb64[<span class="Constant">65</span>]=<span class="String"><span class="String">&quot;</span>ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/<span class="String">&quot;</span></span>;
<span class="Keyword">for</span> (<span class="Storage">int</span> i=<span class="Constant">0</span>; i&lt;CC_SHA1_DIGEST_LENGTH; i+=<span class="Constant">3</span>) {
password=[password stringByAppendingFormat:@<span class="String"><span class="String">&quot;</span><span class="StringConstant">%c</span><span class="StringConstant">%c</span><span class="StringConstant">%c</span><span class="StringConstant">%c</span><span class="String">&quot;</span></span>,
cb64[(result[i] &amp;<span class="Constant">0xFC</span>)&gt;&gt;<span class="Constant">2</span>],
cb64[((result[i] &amp; <span class="Constant">0x03</span>) &lt;&lt; <span class="Constant">4</span>)
| ((result[i + <span class="Constant">1</span>] &amp; <span class="Constant">0xF0</span>) &gt;&gt; <span class="Constant">4</span>)],
cb64[((result[i + <span class="Constant">1</span>] &amp; <span class="Constant">0x0F</span>) &lt;&lt; <span class="Constant">2</span>)
| ((result[i + <span class="Constant">2</span>] &amp; <span class="Constant">0xC0</span>) &gt;&gt; <span class="Constant">6</span>)],
cb64[result[i+<span class="Constant">2</span>]&amp;<span class="Constant">0x3F</span>]
- (<span class="Support">NSString</span> *)base64:(unsigned char *)result {
<span class="Support">NSString</span> *password=[[<span class="Support">NSString</span> <span class="SupportFunction">alloc</span>] <span class="SupportFunction">init</span>];
static const unsigned char cb64[65]=&quot;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/&quot;;
for (int i=0; i&lt;CC_SHA1_DIGEST_LENGTH; i+=3) {
password=[password <span class="SupportFunction">stringByAppendingFormat<span class="SupportFunction">:</span></span><span class="String"><span class="String">@&quot;</span>%c%c%c%c<span class="String">&quot;</span></span>,
cb64[(result[i] &amp;0xFC)&gt;&gt;2],
cb64[((result[i] &amp; 0x03) &lt;&lt; 4)
| ((result[i + 1] &amp; 0xF0) &gt;&gt; 4)],
cb64[((result[i + 1] &amp; 0x0F) &lt;&lt; 2)
| ((result[i + 2] &amp; 0xC0) &gt;&gt; 6)],
cb64[result[i+2]&amp;0x3F]
];
}
<span class="Keyword">return</span> password;
return password;
}
- (NSString *)hexadecimalRepresentation:(<span class="Storage">unsigned</span> <span class="Storage">char</span> *)result {
NSString *password=[[NSString alloc] init];
<span class="Keyword">for</span> (<span class="Storage">int</span> i=<span class="Constant">0</span>; i&lt;CC_SHA1_DIGEST_LENGTH; i++) {
password=[password stringByAppendingFormat:@<span class="String"><span class="String">&quot;</span><span class="StringConstant">%02x</span><span class="String">&quot;</span></span>, result[i]];
- (<span class="Support">NSString</span> *)hexadecimalRepresentation:(unsigned char *)result {
<span class="Support">NSString</span> *password=[[<span class="Support">NSString</span> <span class="SupportFunction">alloc</span>] <span class="SupportFunction">init</span>];
for (int i=0; i&lt;CC_SHA1_DIGEST_LENGTH; i++) {
password=[password <span class="SupportFunction">stringByAppendingFormat<span class="SupportFunction">:</span></span><span class="String"><span class="String">@&quot;</span>%02x<span class="String">&quot;</span></span>, result[i]];
}
<span class="Keyword">return</span> password;
return password;
}
- (NSString *)b64_sha1:(NSString *)inputString {
<span class="Storage">unsigned</span> <span class="Storage">char</span> result[CC_SHA1_DIGEST_LENGTH+<span class="Constant">1</span>];
[self sha1:inputString result:result];
<span class="Keyword">return</span> [self base64:result];
- (<span class="Support">NSString</span> *)b64_sha1:(<span class="Support">NSString</span> *)inputString {
unsigned char result[CC_SHA1_DIGEST_LENGTH+1];
[<span class="Variable">self</span> <span class="SupportFunction">sha1<span class="SupportFunction">:</span></span>inputString <span class="SupportFunction">result<span class="SupportFunction">:</span></span>result];
return [<span class="Variable">self</span> <span class="SupportFunction">base64<span class="SupportFunction">:</span></span>result];
}
- (NSString *)hex_sha1:(NSString *)inputString {
<span class="Storage">unsigned</span> <span class="Storage">char</span> result[CC_SHA1_DIGEST_LENGTH+<span class="Constant">1</span>];
[self sha1:inputString result:result];
<span class="Keyword">return</span> [self hexadecimalRepresentation:result];
- (<span class="Support">NSString</span> *)hex_sha1:(<span class="Support">NSString</span> *)inputString {
unsigned char result[CC_SHA1_DIGEST_LENGTH+1];
[<span class="Variable">self</span> <span class="SupportFunction">sha1<span class="SupportFunction">:</span></span>inputString <span class="SupportFunction">result<span class="SupportFunction">:</span></span>result];
return [<span class="Variable">self</span> <span class="SupportFunction">hexadecimalRepresentation<span class="SupportFunction">:</span></span>result];
}
</pre>
</div></div>

View file

@ -64,7 +64,7 @@ But the major problem came from, <code>font-shadow</code> and gradients.
Then my new design obey to the following rules:</p>
<ul>
<li>no CSS element begining by &lsquo;-moz&rsquo; or &lsquo;-webkit&rsquo;, etc&hellip;,</li>
<li>no CSS element begining by -moz or -webkit, etc…,</li>
<li>no text shadow,</li>
<li>clean (I mean delete) most javascript.</li>
</ul>

View file

@ -75,10 +75,10 @@
</div>
<p>I&rsquo;ve (re)discovered how to become S/MIME compliant.
<p>Ive (re)discovered how to become S/MIME compliant.
I am now suprised how easy it was.
Some years ago it was far more difficult.
Now I&rsquo;m able to sign and encrypt my emails.</p>
Now Im able to sign and encrypt my emails.</p>
<h2 id="why-is-it-important">Why is it important?</h2>

View file

@ -60,7 +60,7 @@
<p><span class="sc"><abbr title="Too long; didn't read">tl;dr</abbr>: </span> Played to process a <code>wav</code> file. <code>C</code> was easier and cleaner than Ruby.</p>
<p>edit: I wanted this program to work only on one specific machine (a x86 on a 32 bit Ubuntu). Therefore I didn&rsquo;t had any portability consideration. This is only a <em>hack</em>.</p>
<p>edit: I wanted this program to work only on one specific machine (a x86 on a 32 bit Ubuntu). Therefore I didnt had any portability consideration. This is only a <em>hack</em>.</p>
</div>
@ -69,7 +69,7 @@
<p>I had to compute the sum of the absolute values of data of a <code>.wav</code> file.
For efficiency (and fun) reasons, I had chosen <code>C</code> language.</p>
<p>I didn&rsquo;t programmed in <code>C</code> for a long time.
<p>I didnt programmed in <code>C</code> for a long time.
From my memory it was a pain to read and write to files.
But in the end I was really impressed by the code I get.
It was really clean.
@ -81,27 +81,27 @@ The header is then a block of packed bytes.</p>
<ul>
<li>The 4<sup>th</sup> first bytes must contains <code>RIFF</code> in ASCII,</li>
<li>the following 4<sup>th</sup> Bytes is an 32 bits integer giving the size of the file minus 8, etc&hellip;</li>
<li>the following 4<sup>th</sup> Bytes is an 32 bits integer giving the size of the file minus 8, etc</li>
</ul>
<p>Surprisingly, I believe that reading this kind of file is easier in <code>C</code> than in most higher level language.
Proof: I only have to search on the web the complete header format and write it in a struct.</p>
<pre class="twilight">
<span class="Storage">struct</span> wavfile
struct wavfile
{
<span class="Storage">char</span> id[<span class="Constant">4</span>]; <span class="Comment"><span class="Comment">//</span> should always contain &quot;RIFF&quot;</span>
<span class="Storage">int</span> totallength; <span class="Comment"><span class="Comment">//</span> total file length minus 8</span>
<span class="Storage">char</span> wavefmt[<span class="Constant">8</span>]; <span class="Comment"><span class="Comment">//</span> should be &quot;WAVEfmt &quot;</span>
<span class="Storage">int</span> format; <span class="Comment"><span class="Comment">//</span> 16 for PCM format</span>
<span class="Storage">short</span> pcm; <span class="Comment"><span class="Comment">//</span> 1 for PCM format</span>
<span class="Storage">short</span> channels; <span class="Comment"><span class="Comment">//</span> channels</span>
<span class="Storage">int</span> frequency; <span class="Comment"><span class="Comment">//</span> sampling frequency</span>
<span class="Storage">int</span> bytes_per_second;
<span class="Storage">short</span> bytes_by_capture;
<span class="Storage">short</span> bits_per_sample;
<span class="Storage">char</span> data[<span class="Constant">4</span>]; <span class="Comment"><span class="Comment">//</span> should always contain &quot;data&quot;</span>
<span class="Storage">int</span> bytes_in_data;
char <span class="Storage">id</span>[4]; // should always contain &quot;RIFF&quot;
int totallength; // total file length minus 8
char wavefmt[8]; // should be &quot;WAVEfmt &quot;
int format; // 16 for PCM format
short pcm; // 1 for PCM format
short channels; // channels
int frequency; // sampling frequency
int bytes_per_second;
short bytes_by_capture;
short bits_per_sample;
char data[4]; // should always contain &quot;data&quot;
int bytes_in_data;
};
</pre>
@ -109,7 +109,7 @@ Proof: I only have to search on the web the complete header format and write it
But in <code>C</code> I simply written:</p>
<pre class="twilight">
<span class="SupportFunction">fread</span>(&amp;header,<span class="Keyword">sizeof</span>(header),<span class="Constant">1</span>,wav)
fread(&amp;header,sizeof(header),1,wav)
</pre>
<p>Only one step to fill my data structure. Magic!</p>
@ -118,9 +118,9 @@ But in <code>C</code> I simply written:</p>
In <code>C</code>, to read a sequence of 2 Bytes numbers I only had to write:</p>
<pre class="twilight">
<span class="Storage">short</span> value=<span class="Constant">0</span>;
<span class="Keyword">while</span>( <span class="SupportFunction">fread</span>(&amp;value,<span class="Keyword">sizeof</span>(value),<span class="Constant">1</span>,wav) ) {
<span class="Comment"><span class="Comment">//</span> do something with value</span>
short value=0;
while( fread(&amp;value,sizeof(value),1,wav) ) {
// do something with value
}
</pre>
@ -128,63 +128,63 @@ In <code>C</code>, to read a sequence of 2 Bytes numbers I only had to write:</p
<div class="code"><div class="file"><a href="/Scratch/en/blog/2010-10-14-Fun-with-wav/code/wavsum.c"> &#x27A5; wavsum.c </a></div><div class="withfile">
<pre class="twilight">
<span class="CCCPreprocessorLine">#<span class="CCCPreprocessorDirective">include</span> <span class="String"><span class="String">&lt;</span>stdio.h<span class="String">&gt;</span></span></span>
<span class="CCCPreprocessorLine">#<span class="CCCPreprocessorDirective">include</span> <span class="String"><span class="String">&lt;</span>stdlib.h<span class="String">&gt;</span></span></span>
<span class="CCCPreprocessorLine">#<span class="CCCPreprocessorDirective">include</span> <span class="String"><span class="String">&lt;</span>stdint.h<span class="String">&gt;</span></span></span>
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;stdint.h&gt;
<span class="Storage">struct</span> wavfile
struct wavfile
{
<span class="Storage">char</span> id[<span class="Constant">4</span>]; <span class="Comment"><span class="Comment">//</span> should always contain &quot;RIFF&quot;</span>
<span class="Storage">int</span> totallength; <span class="Comment"><span class="Comment">//</span> total file length minus 8</span>
<span class="Storage">char</span> wavefmt[<span class="Constant">8</span>]; <span class="Comment"><span class="Comment">//</span> should be &quot;WAVEfmt &quot;</span>
<span class="Storage">int</span> format; <span class="Comment"><span class="Comment">//</span> 16 for PCM format</span>
<span class="Storage">short</span> pcm; <span class="Comment"><span class="Comment">//</span> 1 for PCM format</span>
<span class="Storage">short</span> channels; <span class="Comment"><span class="Comment">//</span> channels</span>
<span class="Storage">int</span> frequency; <span class="Comment"><span class="Comment">//</span> sampling frequency</span>
<span class="Storage">int</span> bytes_per_second;
<span class="Storage">short</span> bytes_by_capture;
<span class="Storage">short</span> bits_per_sample;
<span class="Storage">char</span> data[<span class="Constant">4</span>]; <span class="Comment"><span class="Comment">//</span> should always contain &quot;data&quot;</span>
<span class="Storage">int</span> bytes_in_data;
char <span class="Storage">id</span>[4]; // should always contain &quot;RIFF&quot;
int totallength; // total file length minus 8
char wavefmt[8]; // should be &quot;WAVEfmt &quot;
int format; // 16 for PCM format
short pcm; // 1 for PCM format
short channels; // channels
int frequency; // sampling frequency
int bytes_per_second;
short bytes_by_capture;
short bits_per_sample;
char data[4]; // should always contain &quot;data&quot;
int bytes_in_data;
};
<span class="Storage">int</span> <span class="Entity">ma<span class="Entity">in</span></span>(<span class="Storage">int</span> argc, <span class="Storage">char</span> *argv[]) {
<span class="Storage">char</span> *filename=argv[<span class="Constant">1</span>];
FILE *wav = <span class="SupportFunction">fopen</span>(filename,<span class="String"><span class="String">&quot;</span>rb<span class="String">&quot;</span></span>);
<span class="Storage">struct</span> wavfile header;
int main(int argc, char *argv[]) {
char *filename=argv[1];
FILE *wav = fopen(filename,&quot;rb&quot;);
struct wavfile header;
<span class="Keyword">if</span> ( wav == <span class="Constant">NULL</span> ) {
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span>Can't open input file <span class="StringConstant">%s</span><span class="String">&quot;</span></span>, filename);
<span class="SupportFunction">exit</span>(<span class="Constant">1</span>);
if ( wav == NULL ) {
fprintf(stderr,&quot;Can't open input file %s&quot;, filename);
exit(1);
}
<span class="Comment"><span class="Comment">//</span> read header</span>
<span class="Keyword">if</span> ( <span class="SupportFunction">fread</span>(&amp;header,<span class="Keyword">sizeof</span>(header),<span class="Constant">1</span>,wav) &lt; <span class="Constant">1</span> )
// read header
if ( fread(&amp;header,sizeof(header),1,wav) &lt; 1 )
{
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span>Can't read file header<span class="StringConstant">\n</span><span class="String">&quot;</span></span>);
<span class="SupportFunction">exit</span>(<span class="Constant">1</span>);
fprintf(stderr,&quot;Can't read file header\n&quot;);
exit(1);
}
<span class="Keyword">if</span> ( header.id[<span class="Constant">0</span>] != <span class="String"><span class="String">'</span>R<span class="String">'</span></span>
|| header.id[<span class="Constant">1</span>] != <span class="String"><span class="String">'</span>I<span class="String">'</span></span>
|| header.id[<span class="Constant">2</span>] != <span class="String"><span class="String">'</span>F<span class="String">'</span></span>
|| header.id[<span class="Constant">3</span>] != <span class="String"><span class="String">'</span>F<span class="String">'</span></span> ) {
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span>ERROR: Not wav format<span class="StringConstant">\n</span><span class="String">&quot;</span></span>);
<span class="SupportFunction">exit</span>(<span class="Constant">1</span>);
if ( header.<span class="Storage">id</span>[0] != 'R'
|| header.<span class="Storage">id</span>[1] != 'I'
|| header.<span class="Storage">id</span>[2] != 'F'
|| header.<span class="Storage">id</span>[3] != 'F' ) {
fprintf(stderr,&quot;ERROR: Not wav format\n&quot;);
exit(1);
}
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span>wav format<span class="StringConstant">\n</span><span class="String">&quot;</span></span>);
fprintf(stderr,&quot;wav format\n&quot;);
<span class="Comment"><span class="Comment">//</span> read data</span>
<span class="Storage">long</span> sum=<span class="Constant">0</span>;
<span class="Storage">short</span> value=<span class="Constant">0</span>;
<span class="Keyword">while</span>( <span class="SupportFunction">fread</span>(&amp;value,<span class="Keyword">sizeof</span>(value),<span class="Constant">1</span>,wav) ) {
<span class="Comment"><span class="Comment">//</span> fprintf(stderr,&quot;%d\n&quot;, value);</span>
<span class="Keyword">if</span> (value&lt;<span class="Constant">0</span>) { value=-value; }
// read data
long sum=0;
short value=0;
while( fread(&amp;value,sizeof(value),1,wav) ) {
// fprintf(stderr,&quot;%d\n&quot;, value);
if (value&lt;0) { value=-value; }
sum += value;
}
<span class="SupportFunction">printf</span>(<span class="String"><span class="String">&quot;</span><span class="StringConstant">%ld</span><span class="StringConstant">\n</span><span class="String">&quot;</span></span>,sum);
<span class="SupportFunction">exit</span>(<span class="Constant">0</span>);
printf(&quot;%ld\n&quot;,sum);
exit(0);
}
</pre>
</div></div>
@ -213,7 +213,7 @@ __attribute__((__packed__))
<p>Therefore this implementation should for big and little endian architecture.
However, it must be compiled with <code>gcc</code>.
The new code make more tests but still don&rsquo;t use <code>mmap</code>.
The new code make more tests but still dont use <code>mmap</code>.
Here it is:</p>
@ -222,111 +222,111 @@ Here it is:</p>
<div class="code"><div class="file"><a href="/Scratch/en/blog/2010-10-14-Fun-with-wav/code/wavsum2.c"> &#x27A5; wavsum2.c </a></div><div class="withfile">
<pre class="twilight">
<span class="CCCPreprocessorLine">#<span class="CCCPreprocessorDirective">include</span> <span class="String"><span class="String">&lt;</span>stdio.h<span class="String">&gt;</span></span></span>
<span class="CCCPreprocessorLine">#<span class="CCCPreprocessorDirective">include</span> <span class="String"><span class="String">&lt;</span>stdlib.h<span class="String">&gt;</span></span></span>
<span class="CCCPreprocessorLine">#<span class="CCCPreprocessorDirective">include</span> <span class="String"><span class="String">&lt;</span>string.h<span class="String">&gt;</span></span> </span><span class="Comment"><span class="Comment">//</span> for memcmp</span>
<span class="CCCPreprocessorLine">#<span class="CCCPreprocessorDirective">include</span> <span class="String"><span class="String">&lt;</span>stdint.h<span class="String">&gt;</span></span> </span><span class="Comment"><span class="Comment">//</span> for int16_t and int32_t</span>
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;string.h&gt; // for memcmp
#include &lt;stdint.h&gt; // for int16_t and int32_t
<span class="Storage">struct</span> wavfile
struct wavfile
{
<span class="Storage">char</span> id[<span class="Constant">4</span>]; <span class="Comment"><span class="Comment">//</span> should always contain &quot;RIFF&quot;</span>
<span class="Support">int32_t</span> totallength; <span class="Comment"><span class="Comment">//</span> total file length minus 8</span>
<span class="Storage">char</span> wavefmt[<span class="Constant">8</span>]; <span class="Comment"><span class="Comment">//</span> should be &quot;WAVEfmt &quot;</span>
<span class="Support">int32_t</span> format; <span class="Comment"><span class="Comment">//</span> 16 for PCM format</span>
<span class="Support">int16_t</span> pcm; <span class="Comment"><span class="Comment">//</span> 1 for PCM format</span>
<span class="Support">int16_t</span> channels; <span class="Comment"><span class="Comment">//</span> channels</span>
<span class="Support">int32_t</span> frequency; <span class="Comment"><span class="Comment">//</span> sampling frequency</span>
<span class="Support">int32_t</span> bytes_per_second;
<span class="Support">int16_t</span> bytes_by_capture;
<span class="Support">int16_t</span> bits_per_sample;
<span class="Storage">char</span> data[<span class="Constant">4</span>]; <span class="Comment"><span class="Comment">//</span> should always contain &quot;data&quot;</span>
<span class="Support">int32_t</span> bytes_in_data;
char <span class="Storage">id</span>[4]; // should always contain &quot;RIFF&quot;
int32_t totallength; // total file length minus 8
char wavefmt[8]; // should be &quot;WAVEfmt &quot;
int32_t format; // 16 for PCM format
int16_t pcm; // 1 for PCM format
int16_t channels; // channels
int32_t frequency; // sampling frequency
int32_t bytes_per_second;
int16_t bytes_by_capture;
int16_t bits_per_sample;
char data[4]; // should always contain &quot;data&quot;
int32_t bytes_in_data;
} __attribute__((__packed__));
<span class="Storage">int</span> is_big_endian(<span class="Storage">void</span>) {
<span class="Storage">union</span> {
<span class="Support">uint32_t</span> i;
<span class="Storage">char</span> c[<span class="Constant">4</span>];
} bint = {<span class="Constant">0x01000000</span>};
<span class="Keyword">return</span> bint.c[<span class="Constant">0</span>]==<span class="Constant">1</span>;
int is_big_endian(void) {
union {
uint32_t i;
char c[4];
} bint = {0x01000000};
return bint.c[0]==1;
}
<span class="Storage">int</span> <span class="Entity">ma<span class="Entity">in</span></span>(<span class="Storage">int</span> argc, <span class="Storage">char</span> *argv[]) {
<span class="Storage">char</span> *filename=argv[<span class="Constant">1</span>];
FILE *wav = <span class="SupportFunction">fopen</span>(filename,<span class="String"><span class="String">&quot;</span>rb<span class="String">&quot;</span></span>);
<span class="Storage">struct</span> wavfile header;
int main(int argc, char *argv[]) {
char *filename=argv[1];
FILE *wav = fopen(filename,&quot;rb&quot;);
struct wavfile header;
<span class="Keyword">if</span> ( wav == <span class="Constant">NULL</span> ) {
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span>Can't open input file <span class="StringConstant">%s</span><span class="StringConstant">\n</span><span class="String">&quot;</span></span>, filename);
<span class="SupportFunction">exit</span>(<span class="Constant">1</span>);
if ( wav == NULL ) {
fprintf(stderr,&quot;Can't open input file %s\n&quot;, filename);
exit(1);
}
<span class="Comment"><span class="Comment">//</span> read header</span>
<span class="Keyword">if</span> ( <span class="SupportFunction">fread</span>(&amp;header,<span class="Keyword">sizeof</span>(header),<span class="Constant">1</span>,wav) &lt; <span class="Constant">1</span> ) {
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span>Can't read input file header <span class="StringConstant">%s</span><span class="StringConstant">\n</span><span class="String">&quot;</span></span>, filename);
<span class="SupportFunction">exit</span>(<span class="Constant">1</span>);
// read header
if ( fread(&amp;header,sizeof(header),1,wav) &lt; 1 ) {
fprintf(stderr,&quot;Can't read input file header %s\n&quot;, filename);
exit(1);
}
<span class="Comment"><span class="Comment">//</span> if wav file isn't the same endianness than the current environment</span>
<span class="Comment"><span class="Comment">//</span> we quit</span>
<span class="Keyword">if</span> ( is_big_endian() ) {
<span class="Keyword">if</span> ( <span class="SupportFunction">memcmp</span>( header.id,<span class="String"><span class="String">&quot;</span>RIFX<span class="String">&quot;</span></span>, <span class="Constant">4</span>) != <span class="Constant">0</span> ) {
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span>ERROR: <span class="StringConstant">%s</span> is not a big endian wav file<span class="StringConstant">\n</span><span class="String">&quot;</span></span>, filename);
<span class="SupportFunction">exit</span>(<span class="Constant">1</span>);
// if wav file isn't the same endianness than the current environment
// we quit
if ( is_big_endian() ) {
if ( memcmp( header.<span class="Storage">id</span>,&quot;RIFX&quot;, 4) != 0 ) {
fprintf(stderr,&quot;ERROR: %s is not a big endian wav file\n&quot;, filename);
exit(1);
}
} <span class="Keyword">else</span> {
<span class="Keyword">if</span> ( <span class="SupportFunction">memcmp</span>( header.id,<span class="String"><span class="String">&quot;</span>RIFF<span class="String">&quot;</span></span>, <span class="Constant">4</span>) != <span class="Constant">0</span> ) {
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span>ERROR: <span class="StringConstant">%s</span> is not a little endian wav file<span class="StringConstant">\n</span><span class="String">&quot;</span></span>, filename);
<span class="SupportFunction">exit</span>(<span class="Constant">1</span>);
} else {
if ( memcmp( header.<span class="Storage">id</span>,&quot;RIFF&quot;, 4) != 0 ) {
fprintf(stderr,&quot;ERROR: %s is not a little endian wav file\n&quot;, filename);
exit(1);
}
}
<span class="Keyword">if</span> ( <span class="SupportFunction">memcmp</span>( header.wavefmt, <span class="String"><span class="String">&quot;</span>WAVEfmt <span class="String">&quot;</span></span>, <span class="Constant">8</span>) != <span class="Constant">0</span>
|| <span class="SupportFunction">memcmp</span>( header.data, <span class="String"><span class="String">&quot;</span>data<span class="String">&quot;</span></span>, <span class="Constant">4</span>) != <span class="Constant">0</span>
if ( memcmp( header.wavefmt, &quot;WAVEfmt &quot;, 8) != 0
|| memcmp( header.data, &quot;data&quot;, 4) != 0
) {
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span>ERROR: Not wav format<span class="StringConstant">\n</span><span class="String">&quot;</span></span>);
<span class="SupportFunction">exit</span>(<span class="Constant">1</span>);
fprintf(stderr,&quot;ERROR: Not wav format\n&quot;);
exit(1);
}
<span class="Keyword">if</span> (header.format != <span class="Constant">16</span>) {
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span><span class="StringConstant">\n</span>ERROR: not 16 bit wav format.<span class="String">&quot;</span></span>);
<span class="SupportFunction">exit</span>(<span class="Constant">1</span>);
if (header.format != 16) {
fprintf(stderr,&quot;\nERROR: not 16 bit wav format.&quot;);
exit(1);
}
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span>format: <span class="StringConstant">%d</span> bits<span class="String">&quot;</span></span>, header.format);
<span class="Keyword">if</span> (header.format == <span class="Constant">16</span>) {
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span>, PCM<span class="String">&quot;</span></span>);
} <span class="Keyword">else</span> {
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span>, not PCM (<span class="StringConstant">%d</span>)<span class="String">&quot;</span></span>, header.format);
fprintf(stderr,&quot;format: %d bits&quot;, header.format);
if (header.format == 16) {
fprintf(stderr,&quot;, PCM&quot;);
} else {
fprintf(stderr,&quot;, not PCM (%d)&quot;, header.format);
}
<span class="Keyword">if</span> (header.pcm == <span class="Constant">1</span>) {
<span class="SupportFunction">fprintf</span>(stderr, <span class="String"><span class="String">&quot;</span> uncompressed<span class="String">&quot;</span></span> );
} <span class="Keyword">else</span> {
<span class="SupportFunction">fprintf</span>(stderr, <span class="String"><span class="String">&quot;</span> compressed<span class="String">&quot;</span></span> );
if (header.pcm == 1) {
fprintf(stderr, &quot; uncompressed&quot; );
} else {
fprintf(stderr, &quot; compressed&quot; );
}
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span>, channel <span class="StringConstant">%d</span><span class="String">&quot;</span></span>, header.pcm);
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span>, freq <span class="StringConstant">%d</span><span class="String">&quot;</span></span>, header.frequency );
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span>, <span class="StringConstant">%d</span> bytes per sec<span class="String">&quot;</span></span>, header.bytes_per_second );
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span>, <span class="StringConstant">%d</span> bytes by capture<span class="String">&quot;</span></span>, header.bytes_by_capture );
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span>, <span class="StringConstant">%d</span> bits per sample<span class="String">&quot;</span></span>, header.bytes_by_capture );
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span><span class="StringConstant">\n</span><span class="String">&quot;</span></span> );
fprintf(stderr,&quot;, channel %d&quot;, header.pcm);
fprintf(stderr,&quot;, freq %d&quot;, header.frequency );
fprintf(stderr,&quot;, %d bytes per sec&quot;, header.bytes_per_second );
fprintf(stderr,&quot;, %d bytes by capture&quot;, header.bytes_by_capture );
fprintf(stderr,&quot;, %d bits per sample&quot;, header.bytes_by_capture );
fprintf(stderr,&quot;\n&quot; );
<span class="Keyword">if</span> ( <span class="SupportFunction">memcmp</span>( header.data, <span class="String"><span class="String">&quot;</span>data<span class="String">&quot;</span></span>, <span class="Constant">4</span>) != <span class="Constant">0</span> ) {
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span>ERROR: Prrroblem?<span class="StringConstant">\n</span><span class="String">&quot;</span></span>);
<span class="SupportFunction">exit</span>(<span class="Constant">1</span>);
if ( memcmp( header.data, &quot;data&quot;, 4) != 0 ) {
fprintf(stderr,&quot;ERROR: Prrroblem?\n&quot;);
exit(1);
}
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span>wav format<span class="StringConstant">\n</span><span class="String">&quot;</span></span>);
fprintf(stderr,&quot;wav format\n&quot;);
<span class="Comment"><span class="Comment">//</span> read data</span>
<span class="Storage">long</span> <span class="Storage">long</span> sum=<span class="Constant">0</span>;
<span class="Support">int16_t</span> value;
<span class="Storage">int</span> i=<span class="Constant">0</span>;
<span class="SupportFunction">fprintf</span>(stderr,<span class="String"><span class="String">&quot;</span>---<span class="StringConstant">\n</span><span class="String">&quot;</span></span>, value);
<span class="Keyword">while</span>( <span class="SupportFunction">fread</span>(&amp;value,<span class="Keyword">sizeof</span>(value),<span class="Constant">1</span>,wav) ) {
<span class="Keyword">if</span> (value&lt;<span class="Constant">0</span>) { value=-value; }
// read data
long long sum=0;
int16_t value;
int i=0;
fprintf(stderr,&quot;---\n&quot;, value);
while( fread(&amp;value,sizeof(value),1,wav) ) {
if (value&lt;0) { value=-value; }
sum += value;
}
<span class="SupportFunction">printf</span>(<span class="String"><span class="String">&quot;</span><span class="StringConstant">%lld</span><span class="StringConstant">\n</span><span class="String">&quot;</span></span>,sum);
<span class="SupportFunction">exit</span>(<span class="Constant">0</span>);
printf(&quot;%lld\n&quot;,sum);
exit(0);
}
</pre>
</div></div>

View file

@ -58,7 +58,7 @@
<div class="intro">
<p><span class="sc"><abbr title="Too long; didn't read">tl;dr</abbr>: </span> I made a simple macro system for my blog. Now I juste have to write %<span></span>latex and it show as <span style="text-transform: uppercase">L<sup style="vertical-align: 0.15em; margin-left: -0.36em; margin-right: -0.15em; font-size: .85em">a</sup>T<sub style="vertical-align: -0.5ex; margin-left: -0.1667em; margin-right: -0.125em; font-size: 1em">e</sub>X</span>.</p>
<p><span class="sc"><abbr title="Too long; didn't read">tl;dr</abbr>: </span> I made a simple macro system for my blog. Now I juste have to write %<span />latex and it show as <span style="text-transform: uppercase">L<sup style="vertical-align: 0.15em; margin-left: -0.36em; margin-right: -0.15em; font-size: .85em">a</sup>T<sub style="vertical-align: -0.5ex; margin-left: -0.1667em; margin-right: -0.125em; font-size: 1em">e</sub>X</span>.</p>
</div>
@ -78,8 +78,8 @@ In the header of my files I simply write:</p>
<p>In the body it will replace every occurrence of:</p>
<ul>
<li>%<span></span>test by <em>This is a macro test</em>,</li>
<li>and %<span></span>latex by <em><span style="text-transform: uppercase">L<sup style="vertical-align: 0.15em; margin-left: -0.36em; margin-right: -0.15em; font-size: .85em">a</sup>T<sub style="vertical-align: -0.5ex; margin-left: -0.1667em; margin-right: -0.125em; font-size: 1em">e</sub>X</span></em>.</li>
<li>%<span />test by <em>This is a macro test</em>,</li>
<li>and %<span />latex by <em><span style="text-transform: uppercase">L<sup style="vertical-align: 0.15em; margin-left: -0.36em; margin-right: -0.15em; font-size: .85em">a</sup>T<sub style="vertical-align: -0.5ex; margin-left: -0.1667em; margin-right: -0.125em; font-size: 1em">e</sub>X</span></em>.</li>
</ul>
<p>The source code is really simple.

View file

@ -62,7 +62,7 @@
<p><em>Update</em>: I might change my mind now. Why?
I just discovered a <a href="https://github.com/rstacruz/js2coffee">js2coffee converter</a>. Furthermore Denis Knauf told me about a <code>CoffeeScript.eval</code> function.
And as Denis said: &ldquo;it is time to use Coffeescript as a javascript with Ruby-like syntax not a Ruby-like programming language&rdquo;.</p>
And as Denis said: it is time to use Coffeescript as a javascript with Ruby-like syntax not a Ruby-like programming language.</p>
</div>
@ -85,30 +85,30 @@ Recently I used <em>a lot</em> of javascript. After trying
<a href="http://cappuccino.org">Cappuccino</a>, looking at
<a href="documentcloud.github.com/backbone/">backbone.js</a> <em class="pala">&amp;</em>
<a href="javascriptmvc.com">javascriptMVC</a>,
I&rsquo;ve finally decided to make my own minimal javascript MVC framework.<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></p>
Ive finally decided to make my own minimal javascript MVC framework.<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></p>
<p>I had to fight the horrible syntax of javascript. It was like experiencing a back-in-time travel: </p>
<ul>
<li>Verbose Java-like syntax, </li>
<li>Strange and insanely Verbose Object Oriented Programming,</li>
<li>No easy way to refer to current instance of a class (<code>this</code> doesn&rsquo;t work really well),</li>
<li>etc&hellip; </li>
<li>No easy way to refer to current instance of a class (<code>this</code> doesnt work really well),</li>
<li>etc </li>
</ul>
<p>It was so annoying at a point, I had thinked about creating my <em>own</em> CoffeeScript.</p>
<p>I&rsquo;d finished a first draft of my MVC javascript framework.
<p>Id finished a first draft of my MVC javascript framework.
Just after I learned about the existence of CoffeeScript, I immediately created a new git branch to try it.</p>
<p>Here is my experience:</p>
<ol>
<li>I had to install <code>node.js</code> and use <code>npm</code> just to use CoffeeScript. It wasn&rsquo;t a big deal but it wasn&rsquo;t as straightfoward as I expected either.</li>
<li>I had to install <code>node.js</code> and use <code>npm</code> just to use CoffeeScript. It wasnt a big deal but it wasnt as straightfoward as I expected either.</li>
<li>Existing javascript file are not coffee compatible.
I <em>had</em> to translate them by hand.
There were no script to help me in this process.
Thanks to <a href="http://vim.org">vim</a>, it wasn&rsquo;t too hard to translate 90% of the javascript using some regexp.
Thanks to <a href="http://vim.org">vim</a>, it wasnt too hard to translate 90% of the javascript using some regexp.
The <code>--watch</code> option of coffee was also really helpful to help in the translation.
But I had to write my own shell script in order to follow an entire directory tree.</li>
<li>An unexpected event. I made some meta-programming in javascript using <code>eval</code>. But in order to work, the string in the eval must be written in pure javascript not in coffee. It was like writing in two different languages. Really not so good.</li>
@ -141,7 +141,7 @@ Just after I learned about the existence of CoffeeScript, I immediately created
<p>The last two point were definitively really problematic for me.</p>
<p>But even if I&rsquo;ll have to work alone, I certainly won&rsquo;t use CoffeeScript either.
<p>But even if Ill have to work alone, I certainly wont use CoffeeScript either.
CoffeeScript is a third party and any of their update can break my code.
I experienced this kind of situation many times, and it is very annoying.
Far more than coding with a bad syntax.</p>
@ -185,10 +185,10 @@ But I believe it would be a really hard task just to simulate the access of curr
<hr/><div class="footnotes">
<ol>
<li id="fn:1">
<p>I know it may not be the best nor productive decision, but I&rsquo;d like to start from scratch and understand how things works under the hood.<a href="#fnref:1" rel="reference">&#8617;</a></p>
<p>I know it may not be the best nor productive decision, but Id like to start from scratch and understand how things works under the hood.<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>
<li id="fn:2">
<p>I know there is <code>rb2js</code>, but it doesn&rsquo;t handle the problem I talk about.<a href="#fnref:2" rel="reference">&#8617;</a></p>
<p>I know there is <code>rb2js</code>, but it doesnt handle the problem I talk about.<a href="#fnref:2" rev="footnote">&#8617;</a></p>
</li>
</ol>
</div>

View file

@ -69,7 +69,7 @@ main = <span class="Entity">putStrLn</span> $ im 0 <span class="Keyword">where</
</pre>
</div></div>
<p>To launch it, you&rsquo;ll need to have <a href="http://haskell.org">haskell</a> installed and to run:</p>
<p>To launch it, youll need to have <a href="http://haskell.org">haskell</a> installed and to run:</p>
<pre class="twilight">ghc --make animandel.hs <span class="Keyword">&amp;&amp;</span> animandel
</pre>

View file

@ -71,7 +71,7 @@ Simply because, the more I programmed with zsh the more I tended to work using f
<p>The minimal to have better code are the functions <code>map</code>, <code>filter</code> and <code>fold</code>.</p>
<p>Let&rsquo;s compare.
<p>Lets compare.
First a program which convert all gif to png in many different directories of different projects.</p>
<p>Before ⇒</p>
@ -90,8 +90,8 @@ First a program which convert all gif to png in many different directories of di
</pre>
<ul>
<li>The <code>(/N)</code> means to select only directory and not to crash if there isn&rsquo;t any.</li>
<li>The <code>(.N)</code> means to select only files and not to crash if there isn&rsquo;t any.</li>
<li>The <code>(/N)</code> means to select only directory and not to crash if there isnt any.</li>
<li>The <code>(.N)</code> means to select only files and not to crash if there isnt any.</li>
<li>The <code>:t</code> means tail; if <code>toto=/path/to/file.ext</code> then <code>${toto:t}=file.ext</code>.</li>
</ul>
@ -106,7 +106,7 @@ map handle_resources /path/to/projects/*(/N)
</pre>
<p>No more bloc!
It might be a little bit harder to read if you&rsquo;re not used to functional programming notation.
It might be a little bit harder to read if youre not used to functional programming notation.
But it is more concise and robusts.</p>
<p>Another example with some tests.</p>
@ -146,7 +146,7 @@ map verify_file_name <span class="String"><span class="String">$(</span> filter
<p>Also, the first verstion is a bit easier to read.
But the second one is clearly far superior in architecture.
I don&rsquo;t want to argue why here.
I dont want to argue why here.
Just believe me that the functional programming approach is superior.</p>
<p>Actually I lack the lambda operator.

View file

@ -73,7 +73,7 @@
</blockquote>
<p>Learn <a href="http://www.vim.org">vim</a> and it will be your last text editor.
There isn&rsquo;t any better text editor I know.
There isnt any better text editor I know.
Hard to learn, but incredible to use.</p>
<p>I suggest you to learn it in 4 steps:</p>
@ -85,16 +85,16 @@ Hard to learn, but incredible to use.</p>
<li>Use vim superpowers</li>
</ol>
<p>By the end of this journey, you&rsquo;ll become a vim superstar. </p>
<p>By the end of this journey, youll become a vim superstar. </p>
<p>But before we start, just a warning.
Learning vim will be painful at first.
It will take time.
It will be a lot like playing a music instrument.
Don&rsquo;t expect to be more efficient with vim than with another editor in less than 3 days.
Dont expect to be more efficient with vim than with another editor in less than 3 days.
In fact it will certainly take 2 weeks instead of 3 days.</p>
<h2 id="st-level----survive">1<sup>st</sup> Level &ndash; Survive</h2>
<h2 id="st-level----survive">1<sup>st</sup> Level Survive</h2>
<ol>
<li>Install <a href="http://www.vim.org">vim</a></li>
@ -105,7 +105,7 @@ In fact it will certainly take 2 weeks instead of 3 days.</p>
<p>In a standard editor, typing on the keyboard is enough to write something and see it on the screen.
Not this time.
Vim is in <em>Normal</em> mode.
Let&rsquo;s get in <em>Insert</em> mode.
Lets get in <em>Insert</em> mode.
Type on the letter <code>i</code>.</p>
<p>You should feel a bit better.
@ -127,7 +127,7 @@ And now, the list of command you can use in <em>Normal</em> mode to survive:</p>
<p>Recommended:</p>
<ul>
<li><code>hjkl</code> (highly recommended but not mandatory) → basic cursor move (&larr;&darr;&uarr;→). Hint: <code>j</code> look like a down arrow.</li>
<li><code>hjkl</code> (highly recommended but not mandatory) → basic cursor move (&larr;↓↑→). Hint: <code>j</code> look like a down arrow.</li>
<li><code>:help &lt;command&gt;</code> → Show help about <code>&lt;command&gt;</code>, you can start using <code>:help</code> without anything else.</li>
</ul>
</blockquote>
@ -143,14 +143,14 @@ With vim in Normal mode, it is a bit like if your <code>Ctrl</code> key is alway
<p>A last word about notations: </p>
<ul>
<li>instead of writing <code>Ctrl-λ</code>, I&rsquo;ll write <code>&lt;C-λ&gt;</code>.</li>
<li>instead of writing <code>Ctrl-λ</code>, Ill write <code>&lt;C-λ&gt;</code>.</li>
<li>command staring by <code>:</code> will must end by <code>&lt;enter&gt;</code>. For example, when I write <code>:q</code> it means <code>:q&lt;enter&gt;</code>.</li>
</ul>
<h2 id="nd-level----feel-comfortable">2<sup>nd</sup> Level &ndash; Feel comfortable</h2>
<h2 id="nd-level----feel-comfortable">2<sup>nd</sup> Level Feel comfortable</h2>
<p>You know the commands required for survival.
It&rsquo;s time to learn a few more commands.
Its time to learn a few more commands.
I suggest:</p>
<ol>
@ -217,17 +217,17 @@ I suggest:</p>
<p>Take the time to integrate all of these command.
Once done, you should be able to do every thing you are able to do on other editors.
But until now, it is a bit awkward. But follow me to the next level and you&rsquo;ll see why.</p>
But until now, it is a bit awkward. But follow me to the next level and youll see why.</p>
<h2 id="rd-level----better-stronger-faster">3<sup>rd</sup> Level &ndash; Better. Stronger. Faster.</h2>
<h2 id="rd-level----better-stronger-faster">3<sup>rd</sup> Level Better. Stronger. Faster.</h2>
<p>Congratulation reaching this far!
We can start the interesting stuff.
At level 3, we&rsquo;ll only talk about command which are compatible with the old vi.</p>
At level 3, well only talk about command which are compatible with the old vi.</p>
<h3 id="better">Better</h3>
<p>Let&rsquo;s look at how vim could help you to repeat yourself: </p>
<p>Lets look at how vim could help you to repeat yourself: </p>
<ol>
<li><code>.</code> → (dot) will repeat the last command,</li>
@ -240,16 +240,16 @@ At level 3, we&rsquo;ll only talk about command which are compatible with the ol
<ul>
<li><code>2dd</code> → will delete 2 lines</li>
<li><code>3p</code> → will paste the text 3 times</li>
<li><code>100idesu [ESC]</code> → will write &ldquo;desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu &ldquo;</li>
<li><code>.</code> → Just after the last command will write again the 100 &ldquo;desu &ldquo;. </li>
<li><code>3.</code> → Will write 3 &ldquo;desu&rdquo; (and not 300, how clever).</li>
<li><code>100idesu [ESC]</code> → will write desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu desu </li>
<li><code>.</code> → Just after the last command will write again the 100 “desu “. </li>
<li><code>3.</code> → Will write 3 “desu” (and not 300, how clever).</li>
</ul>
</blockquote>
<h3 id="stronger">Stronger</h3>
<p>Knowing how to move efficiently with vim is <em>very</em> important.
Don&rsquo;t skip this section.</p>
Dont skip this section.</p>
<ol>
<li>N<code>G</code> → Go to line N</li>
@ -265,7 +265,7 @@ Don&rsquo;t skip this section.</p>
</ol>
<p>By default, word are composed of letter and the underscore character.
Let&rsquo;s call a WORD a group of letter separated by blank characters.
Lets call a WORD a group of letter separated by blank characters.
If you want to consider WORDS, then just use uppercases:</p>
<ol>
@ -278,7 +278,7 @@ If you want to consider WORDS, then just use uppercases:</p>
</li>
</ol>
<p>Now let&rsquo;s talk about very efficient moves:</p>
<p>Now lets talk about very efficient moves:</p>
<blockquote>
<ul>
@ -306,12 +306,12 @@ Most commands can be used using the following general format:</p>
</ul>
<p>We also can do things like <code>ye</code>, yank from here to the end of the word.
But also <code>y2/foo</code> yank up to the second occurrence of &ldquo;foo&rdquo;.</p>
But also <code>y2/foo</code> yank up to the second occurrence of “foo”.</p>
<p>But what was true for <code>y</code> (yank),
is also true for <code>d</code> (delete), <code>v</code> (visual select), <code>gU</code> (uppercase), <code>gu</code> (lowercase), etc&hellip;</p>
is also true for <code>d</code> (delete), <code>v</code> (visual select), <code>gU</code> (uppercase), <code>gu</code> (lowercase), etc</p>
<h2 id="th-level----vim-superpowers">4<sup>th</sup> Level &ndash; Vim Superpowers</h2>
<h2 id="th-level----vim-superpowers">4<sup>th</sup> Level Vim Superpowers</h2>
<p>With all preceding commands you should be comfortable to use vim.
But now, here are the killer features.
@ -368,7 +368,7 @@ Typically: <code>0&lt;C-v&gt;&lt;C-d&gt;I-- [ESC]</code></p>
<ul>
<li><code>^</code> → go to start of the line</li>
<li><code>&lt;C-v&gt;</code> → Start block selection</li>
<li><code>&lt;C-d&gt;</code> → move down (could also be <code>jjj</code> or <code>%</code>, etc&hellip;)</li>
<li><code>&lt;C-d&gt;</code> → move down (could also be <code>jjj</code> or <code>%</code>, etc)</li>
<li><code>I-- [ESC]</code> → write <code>-- </code> to comment each line</li>
</ul>
@ -378,7 +378,7 @@ Typically: <code>0&lt;C-v&gt;&lt;C-d&gt;I-- [ESC]</code></p>
<h3 id="completion-c-n-and-c-p">Completion: <code>&lt;C-n&gt;</code> and <code>&lt;C-p&gt;</code>.</h3>
<p>In Insert mode, just type the start of a word, then type <code>&lt;C-p&gt;</code>, magic&hellip;
<p>In Insert mode, just type the start of a word, then type <code>&lt;C-p&gt;</code>, magic
<img alt="Completion" src="/Scratch/img/blog/Learn-Vim-Progressively/completion.gif" /> </p>
<h3 id="macros--qa-do-something-q-a-">Macros&nbsp;: <code>qa</code> do something <code>q</code>, <code>@a</code>, <code>@@</code></h3>
@ -429,7 +429,7 @@ Once the selection made, you can:</p>
<ul>
<li><code>&lt;C-v&gt;</code> </li>
<li>go to desired line (<code>jjj</code> or <code>&lt;C-d&gt;</code> or <code>/pattern</code> or <code>%</code> etc&hellip;)</li>
<li>go to desired line (<code>jjj</code> or <code>&lt;C-d&gt;</code> or <code>/pattern</code> or <code>%</code> etc)</li>
<li><code>$</code> go to the end of line</li>
<li><code>A</code>, write text, <code>ESC</code>.</li>
</ul>
@ -443,7 +443,7 @@ Once the selection made, you can:</p>
<blockquote>
<ul>
<li><code>:split</code> → create a split (<code>:vsplit</code> create a vertical split)</li>
<li><code>&lt;C-w&gt;&lt;dir&gt;</code>&nbsp;: where dir is any of <code>hjkl</code> or &larr;&darr;&uarr;→ to change split.</li>
<li><code>&lt;C-w&gt;&lt;dir&gt;</code>&nbsp;: where dir is any of <code>hjkl</code> or &larr;↓↑→ to change split.</li>
<li><code>&lt;C-w&gt;_</code> (resp. <code>&lt;C-w&gt;|</code>)&nbsp;: maximise size of split (resp. vertical split)</li>
<li><code>&lt;C-w&gt;+</code> (resp. <code>&lt;C-w&gt;-</code>)&nbsp;: Grow (resp. shrink) split</li>
</ul>
@ -455,7 +455,7 @@ Once the selection made, you can:</p>
<p>That was 90% of commands I use every day.
I suggest you to learn no more than one or two new command per day.
After two to three weeks you&rsquo;ll start to feel the power of vim in your hands.</p>
After two to three weeks youll start to feel the power of vim in your hands.</p>
<p>Learning Vim is more a matter of training than plain memorization.
Fortunately vim comes with some very good tools and an excellent documentation.
@ -463,7 +463,7 @@ Run vimtutor until you are familiar with most basic commands.
Also, you should read carefully this page: <code>:help usr_02.txt</code>.</p>
<p>Then, you will learn about <code>!</code>, folds, registers, the plugins and many other features.
Learn vim like you&rsquo;d learn piano and all should be fine.</p>
Learn vim like youd learn piano and all should be fine.</p>
<script>
// Style the keywords

View file

@ -70,9 +70,9 @@ I use a different password on all website.</p>
<p>Disclamer, this is an unashamed attempt to make you download my iPhone app&nbsp;;-).
You&rsquo;re always here?
Even if you won&rsquo;t download my app, you should read more.
My method doesn&rsquo;t necessitate my app.
Youre always here?
Even if you wont download my app, you should read more.
My method doesnt necessitate my app.
It is both safe and easy to use everyday.</p>
<p>If you just want to <em>use</em> the tools without searching to understand why it is safe, just jump at the <a href="#in-practice">end of this article by clicking here</a>.</p>
@ -83,7 +83,7 @@ It is both safe and easy to use everyday.</p>
<p>Even paranoid could have ennemies.</p>
</blockquote>
<p>Imagine you find a really good password. You use it on GMail, Amazon, PayPal, Twitter, Facebook&hellip;
<p>Imagine you find a really good password. You use it on GMail, Amazon, PayPal, Twitter, Facebook
One day you see a nice online game you want to try.
They ask you your email and a password.
Some week passes, and the host machine of this online game is hacked.
@ -156,7 +156,7 @@ This is why, for each website I need some other parameters:</p>
<ul>
<li>the login name</li>
<li>the password&rsquo;s length,</li>
<li>the passwords length,</li>
<li>the password number (in order to change it),</li>
<li>The output format: hexadecimal or base64.</li>
</ul>

View file

@ -80,13 +80,13 @@ Then some believed it would be a good idea to invent many <span class="sc">xml</
<p>Unfortunately, <span class="sc">xml</span> was made to transfert structured data.
Not a format a human should see or edit directly.
The sad reality is <span class="sc">xml</span> syntax is simply verbose and ugly.
Most of the time it shouldn&rsquo;t be a problem, as nobody should see it.
Most of the time it shouldnt be a problem, as nobody should see it.
In a perfect nice world, we should never deal directly with <span class="sc">xml</span> but only use software which deal with it for us.
Guess what?
Our world isn&rsquo;t perfect. Too sad, a bunch of developer have to deal directly with this ugly <span class="sc">xml</span>.</p>
Our world isnt perfect. Too sad, a bunch of developer have to deal directly with this ugly <span class="sc">xml</span>.</p>
<p>Unfortunately <span class="sc">xml</span> isn&rsquo;t the only case of misused format I know.
You have many format for which it would be very nice to add variables, loops, functions&hellip;</p>
<p>Unfortunately <span class="sc">xml</span> isnt the only case of misused format I know.
You have many format for which it would be very nice to add variables, loops, functions</p>
<p>If like me you hate with passion <span class="sc">xslt</span> or writing <span class="sc">xml</span>,
I will show you how you could deal with this bad format
@ -94,7 +94,7 @@ or language.</p>
<h2 id="the-span-classscxsltspan-example">The <span class="sc">xslt</span> Example</h2>
<p>Let&rsquo;s start by the worst case of misused <span class="sc">xml</span> I know: <span class="sc">xslt</span>.
<p>Lets start by the worst case of misused <span class="sc">xml</span> I know: <span class="sc">xslt</span>.
Any developer who had to deal with <span class="sc">xslt</span> know how horrible it is.</p>
<p>In order to reduce the verbosity of such a bad languages, there is a way.
@ -137,11 +137,11 @@ Any developer who had to deal with <span class="sc">xslt</span> know how horribl
<pre class="twilight">
<span class="DoctypeXmlProcessing"><span class="DoctypeXmlProcessing">&lt;?</span><span class="DoctypeXmlProcessing">xml</span><span class="DoctypeXmlProcessing"> version</span>=<span class="DoctypeXmlProcessing"><span class="DoctypeXmlProcessing">&quot;</span>1.0<span class="DoctypeXmlProcessing">&quot;</span></span><span class="DoctypeXmlProcessing"> standalone</span>=<span class="DoctypeXmlProcessing"><span class="DoctypeXmlProcessing">&quot;</span>yes<span class="DoctypeXmlProcessing">&quot;</span></span><span class="DoctypeXmlProcessing">?&gt;</span></span> <span class="Comment"><span class="Comment">&lt;!--</span> YES its <span class="sc">xml</span> <span class="Comment">--&gt;</span></span>
<span class="Comment"><span class="Comment">&lt;!--</span> ← start a comment, then write some m4 directives:</span>
<span class="Comment"></span>
<span class="Comment" />
<span class="Comment">define(`ydef',`&lt;xsl:variable name=&quot;$1&quot; select=&quot;$2&quot;/&gt;')</span>
<span class="Comment">define(`yprint',`&lt;xsl:text disable-output-escaping=&quot;yes&quot;&gt;&lt;![CDATA[$1]]&gt;&lt;/xsl:text&gt;')</span>
<span class="Comment">define(`yshow',`&lt;xsl:value-of select=&quot;$1&quot;/&gt;')</span>
<span class="Comment"></span>
<span class="Comment" />
<span class="Comment"><span class="Comment">--&gt;</span></span>
<span class="Comment"><span class="Comment">&lt;!--</span> Yes, <span class="sc">xml</span> sucks to be read <span class="Comment">--&gt;</span></span>
<span class="MetaTagAll"><span class="MetaTagAll">&lt;</span><span class="MetaTagAll">xsl</span><span class="MetaTagAll"><span class="MetaTagAll">:</span></span><span class="MetaTagAll">stylesheet</span> <span class="MetaTagAll">version</span>=<span class="String"><span class="String">&quot;</span>1.0<span class="String">&quot;</span></span> <span class="MetaTagAll">xmlns</span><span class="MetaTagAll"><span class="MetaTagAll">:</span></span><span class="MetaTagAll">xsl</span>=<span class="String"><span class="String">&quot;</span>http://www.w3.org/1999/XSL/Transform<span class="String">&quot;</span></span><span class="MetaTagAll">&gt;</span></span>
@ -173,7 +173,7 @@ At its beginning some people believed it would be the new Flash. Apparently, it
Click to view directly the <span class="sc">svg</span>. It might slow down your computers if you have an old one.
</a></p>
<p>The positionning of the &ldquo;esod&rdquo; text with regards to the reversed &ldquo;λ&rdquo; was done by changing position in firebug. I didn&rsquo;t had to manually regenerate to test.</p>
<p>The positionning of the “esod” text with regards to the reversed “λ” was done by changing position in firebug. I didnt had to manually regenerate to test.</p>
<p>Making such a fractal is mostly:</p>
@ -185,7 +185,7 @@ Click to view directly the <span class="sc">svg</span>. It might slow down your
<li>Stop when recursion is deep enough.</li>
</ol>
<p>If I had to do this for each step, I had make a lot of copy/paste in my <span class="sc">svg</span>, because the transformation is always the same, but I cannot say, use transformation named &ldquo;titi&rdquo;. Then instead of manually copying some <span class="sc">xml</span>, I used m4</p>
<p>If I had to do this for each step, I had make a lot of copy/paste in my <span class="sc">svg</span>, because the transformation is always the same, but I cannot say, use transformation named “titi”. Then instead of manually copying some <span class="sc">xml</span>, I used m4</p>
<p>and here is the commented code:</p>
@ -258,7 +258,7 @@ It duplicates using the three transformations the preceding level.</p>
<li>At level 0 there is only one λ,</li>
<li>at level 1 there is 3 λ,</li>
<li>at level 2 there is 9 λ</li>
<li>etc&hellip; </li>
<li>etc </li>
</ul>
<p>At the final 5<sup>th</sup> level there is 3<sup>5</sup>=243 λ.

View file

@ -63,7 +63,7 @@
<p><span class="sc"><abbr title="Too long; didn't read">tl;dr</abbr>: </span></p>
<p><a href="http://www.yesodweb.com">Yesod</a> is a web framework which recently reached the maturity for which you should consider to use it.
Before telling you why you should learn Haskell and use yesod, I will talk about ideas yesod introduced and I didn&rsquo;t saw in other frameworks before.</p>
Before telling you why you should learn Haskell and use yesod, I will talk about ideas yesod introduced and I didnt saw in other frameworks before.</p>
</div>
@ -71,12 +71,12 @@ Before telling you why you should learn Haskell and use yesod, I will talk about
<h2 id="type-safety">Type safety</h2>
<p>Let&rsquo;s start by an obligatory link from <a href="http://xkcd.com">xkcd</a>:</p>
<p>Lets start by an obligatory link from <a href="http://xkcd.com">xkcd</a>:</p>
<p><img src="http://imgs.xkcd.com/comics/exploits_of_a_mom.png" alt="SQL injection by a mom" /></p>
<p>When you create a web application, a lot of time is spent dealing with strings.
Strings for URL, HTML, JavaScript, CSS, SQL, etc&hellip;
Strings for URL, HTML, JavaScript, CSS, SQL, etc
To prevent malicious usage you have to protect each strings to be sure, no script will pass from one point to another.
Suppose a user enter this user name:</p>
@ -105,7 +105,7 @@ falselink&quot;&gt;<span class="EmbeddedSource"><span class="EmbeddedSource">&lt
<h2 id="widgets">Widgets</h2>
<p>Yesod&rsquo;s widgets are different from javascript widget.
<p>Yesods widgets are different from javascript widget.
For yesod, widgets are sets of small parts of a web application.
If you want to use many widgets in a same page yesod do the work.
Some examples of widget are:</p>
@ -114,7 +114,7 @@ Some examples of widget are:</p>
<li>the footer of a webpage,</li>
<li>the header of a webpage with a menu,</li>
<li>a button which appears only when scrolling down, </li>
<li>etc&hellip;</li>
<li>etc</li>
</ul>
<p>For each of this part, you might need, </p>
@ -177,9 +177,9 @@ Of course two routes must not interfere.</p>
/blog/$DATE DateR
</pre>
<p>is invalid by default (you can make it valid, but I don&rsquo;t think it is a good idea).</p>
<p>is invalid by default (you can make it valid, but I dont think it is a good idea).</p>
<p>You&rsquo;d better</p>
<p>Youd better</p>
<pre class="twilight">
/blog/$DATE DateR
@ -195,7 +195,7 @@ Of course two routes must not interfere.</p>
<li><em>Good ideas, excellent community</em>. I follow yesod from some month now and the speed at which the project progress is incredible.</li>
</ol>
<p>If you are a haskeller, I believe you shouldn&rsquo;t fear the special syntax imposed by the standard yesod way of doing things.
<p>If you are a haskeller, I believe you shouldnt fear the special syntax imposed by the standard yesod way of doing things.
Just try it more than the firsts basic tutorials. </p>
<p>Until here I believe it goes in the right direction.

View file

@ -1,15 +0,0 @@
module Handler.New where
import Import
getNewR :: Handler RepHtml
getNewR = do
defaultLayout $ do
$(widgetFile "new")
postNewR :: Handler RepHtml
postNewR = do
postedText <- runInputPost $ ireq textField "content"
defaultLayout $ do
$(widgetFile "posted")

View file

@ -1,5 +0,0 @@
<h1> Enter your text
<form method=post action=@{NewR}>
<input type=text name=content>
<input type=submit>

View file

@ -66,7 +66,7 @@
<p><span class="sc"><abbr title="Too long; didn't read">tl;dr</abbr>: </span> A simple yesod tutorial.
Yesod is an Haskell web framework.
You shouldn&rsquo;t need to know Haskell. </p>
You shouldnt need to know Haskell. </p>
<blockquote>
<center><span class="sc"><b>Table of content</b></span></center>
@ -114,8 +114,8 @@ than <code>C</code>, <code>C++</code> or <code>Java</code> for example.
One of the best property of Haskell being:</p>
<blockquote>
<p>&ldquo;If your program compile it will be
very close to what the programmer intended&rdquo;.</p>
<p>If your program compile it will be
very close to what the programmer intended.</p>
</blockquote>
<p>Haskell web frameworks handle parallel tasks perfectly.
@ -123,9 +123,9 @@ For example even better than node.js<sup id="fnref:nodejstroll"><a href="#fn:nod
<p><img alt="Thousands of Agent Smith" src="/Scratch/img/blog/Yesod-tutorial-for-newbies/thousands_smiths.jpg" class="left" /></p>
<p>From the pure technical &ldquo;point of vue&rdquo;,
<p>From the pure technical “point of vue”,
Haskell seems to be the perfect web development tool.
Weaknesses of Haskell certainly won&rsquo;t be technical:</p>
Weaknesses of Haskell certainly wont be technical:</p>
<ul>
<li>Hard to grasp Haskell</li>
@ -134,7 +134,7 @@ Weaknesses of Haskell certainly won&rsquo;t be technical:</p>
<li>There is no <a href="http://heroku.com">heroku</a> for Haskell (even if <a href="http://www.yesodweb.com/blog/2011/07/haskell-on-heroku">Greg Weber did it</a>, it was more a workaround).</li>
</ul>
<p>I won&rsquo;t say these are not important drawbacks.
<p>I wont say these are not important drawbacks.
But, with Haskell your web application will have both properties
to absorb an impressive number of parallel request securely
and to adapt to change.</p>
@ -147,7 +147,7 @@ and to adapt to change.</p>
<li><a href="http://yesodweb.com">Yesod</a></li>
</ol>
<p>I don&rsquo;t think there is a real winner between these three framework.
<p>I dont think there is a real winner between these three framework.
The choice I made for yesod is highly subjective.
I just lurked a bit and tried some tutorials.
I had the feeling yesod make a better job at helping newcomers.
@ -159,16 +159,16 @@ Of course I might be wrong since it is a matter of feeling.</p>
<p>Why did I write this article?
The yesod documentation and particularly the book are excellent.
But I missed an intermediate tutorial.
This tutorial won&rsquo;t explain all details.
This tutorial wont explain all details.
I tried to give a step by step of how to start from a five minute tutorial
to an almost production ready architecture.
Furthermore explaining something to others is a great way to learn.
If you are used to Haskell and Yesod, this tutorial won&rsquo;t learn you much.
If you are used to Haskell and Yesod, this tutorial wont learn you much.
If you are completely new to Haskell and Yesod it might hopefully helps you.</p>
<p>During this tutorial you&rsquo;ll install, initialize and configure your first yesod project.
<p>During this tutorial youll install, initialize and configure your first yesod project.
Then there is a very minimal 5 minutes yesod tutorial to heat up and verify the awesomeness of yesod.
Then we will clean up the 5 minutes tutorial to use some &ldquo;best practices&rdquo;.
Then we will clean up the 5 minutes tutorial to use some “best practices”.
Finally there will be a more standard real world example; a minimal blog system.</p>
<h2 id="before-the-real-start">Before the real start</h2>
@ -262,7 +262,7 @@ and a local web server listening the port 3000.
If we modify a file inside this directory, yesod should try
to recompile as fast as possible the site.
Instead of explaining the role of every file,
let&rsquo;s focus only on the important files/directories for this tutorial:</p>
lets focus only on the important files/directories for this tutorial:</p>
<ol>
<li><code>config/routes</code></li>
@ -277,7 +277,7 @@ let&rsquo;s focus only on the important files/directories for this tutorial:</p>
<tbody>
<tr>
<td><code>config/routes</code></td>
<td>is where you&rsquo;ll configure the map <span class="sc">url</span> → Code.</td>
<td>is where youll configure the map <span class="sc">url</span> → Code.</td>
</tr>
<tr>
<td><code>Handler/</code></td>
@ -289,13 +289,13 @@ let&rsquo;s focus only on the important files/directories for this tutorial:</p>
</tr>
<tr>
<td><code>config/models</code></td>
<td>is where you&rsquo;ll configure the persistent objects (database tables).</td>
<td>is where youll configure the persistent objects (database tables).</td>
</tr>
</tbody>
</table>
<p>During this tutorial we&rsquo;ll modify other files as well,
but we won&rsquo;t explore them in detail.</p>
<p>During this tutorial well modify other files as well,
but we wont explore them in detail.</p>
<p>Also note, shell command are executed in the root directory of your project instead specified otherwise.</p>
@ -304,16 +304,16 @@ but we won&rsquo;t explore them in detail.</p>
<h2 id="echo">Echo</h2>
<p>To verify the quality of the security of the yesod framework,
let&rsquo;s make a minimal echo application.</p>
lets make a minimal echo application.</p>
<blockquote>
<p>Goal:</p>
<p>Make a server that when accessed <code>/echo/[some text]</code> should return a web page containing &ldquo;some text&rdquo; inside an <code>h1</code> bloc.</p>
<p>Make a server that when accessed <code>/echo/[some text]</code> should return a web page containing “some text” inside an <code>h1</code> bloc.</p>
</blockquote>
<p>In a first time, we must declare the <span class="sc">url</span> of the form <code>/echo/...</code> are meaningful.
Let&rsquo;s take a look at the file <code>config/routes</code>:</p>
Lets take a look at the file <code>config/routes</code>:</p>
<pre>
/static StaticR Static getStatic
@ -341,7 +341,7 @@ I am not particularly fan of the big R notation but this is the standard convent
Application.hs:31:1: Not in scope: `getEchoR'
</pre>
<p>Why? Simply because we didn&rsquo;t written the code for the handler <code>EchoR</code>.
<p>Why? Simply because we didnt written the code for the handler <code>EchoR</code>.
Edit the file <code>Handler/Root.hs</code> and append this:</p>
<pre class="twilight">
@ -351,13 +351,13 @@ getEchoR theText = <span class="Keyword">do</span>
[whamlet|&lt;h1&gt;#{theText}|]
</pre>
<p>Don&rsquo;t worry if you find all of this a bit cryptic.
<p>Dont worry if you find all of this a bit cryptic.
In short it just declare a function named <code>getEchoR</code> with one argument (<code>theText</code>) of type String.
When this function is called, it return a <code>Handler RepHtml</code> whatever it is.
But mainly this will encapsulate our expected result inside an <span class="sc">html</span> text.</p>
<p>After saving the file, you should see yesod recompile the application.
When the compilation is finished you&rsquo;ll see the message: <code>Starting devel application</code>.</p>
When the compilation is finished youll see the message: <code>Starting devel application</code>.</p>
<p>Now you can visit: <a href="http://localhost:3000/echo/Yesod%20rocks!"><code>http://localhost:3000/echo/Yesod%20rocks!</code></a></p>
@ -379,9 +379,9 @@ A malicious user could not hide some bad script inside.</p>
The <span class="sc">url</span> string is put inside a <span class="sc">url</span> type.
Then the interesting part in the <span class="sc">url</span> is put inside a String type.
To pass from <span class="sc">url</span> type to String type some transformation are made.
For example, replace all &ldquo;<code>%20</code>&rdquo; by space characters.
For example, replace all <code>%20</code> by space characters.
Then to show the String inside an <span class="sc">html</span> document, the string is put inside an <span class="sc">html</span> type.
Some transformations occurs like replace &ldquo;<code>&lt;</code>&rdquo; by &ldquo;<code>&amp;lt;</code>&rdquo;.
Some transformations occurs like replace <code>&lt;</code>” by “<code>&amp;lt;</code>.
Thanks to yesod, this tedious job is done for us.</p>
<pre class="twilight">
@ -406,7 +406,7 @@ We will clean up many details:</p>
<li>Use a general <span class="sc">css</span> (cleaner than the empty by default)</li>
<li>Dispatch handler code into different files</li>
<li>Use <code>Data.Text</code> instead of <code>String</code></li>
<li>Put our &ldquo;views&rdquo;<sup id="fnref:explainviewwidget"><a href="#fn:explainviewwidget" rel="footnote">4</a></sup> inside the <code>template</code> directory</li>
<li>Put our “views”<sup id="fnref:explainviewwidget"><a href="#fn:explainviewwidget" rel="footnote">4</a></sup> inside the <code>template</code> directory</li>
</ul>
<h4 id="span-classschtml5span-boilerplate-and-a-better-span-classsccssspan"><span class="sc">html5</span> boilerplate and a better <span class="sc">css</span></h4>
@ -456,7 +456,7 @@ But I digress.</p>
<h4 id="separate-handlers">Separate Handlers</h4>
<p>Generally you don&rsquo;t want to have all your code inside a unique file.
<p>Generally you dont want to have all your code inside a unique file.
This is why we will separate our handlers.
In a first time create a new file <code>Handler/Echo.hs</code> containing:</p>
@ -481,7 +481,7 @@ Just after <code>Handler.Root</code>, add:</p>
</pre>
<p>We must also declare this new Handler module inside <code>Application.hs</code>.
Just after the &ldquo;<code>import Handler.Root</code>&rdquo;, add:</p>
Just after the <code>import Handler.Root</code>, add:</p>
<pre class="twilight">
<span class="Keyword">import</span> <span class="Constant">Handler</span>.<span class="Constant">Echo</span>
@ -553,11 +553,11 @@ It is the time to make a slightly more complex example.</p>
<p><img alt="Neo touching a mirror" src="/Scratch/img/blog/Yesod-tutorial-for-newbies/mirror.jpg" class="left" /></p>
<p>Let&rsquo;s make another minimal application.
<p>Lets make another minimal application.
You should see a form containing a text field and a validation button.
When you enter some text (for example &ldquo;Jormungad&rdquo;) and validate,
When you enter some text (for example “Jormungad”) and validate,
the next page present you the content and its reverse appended to it.
In our example it should return &ldquo;JormungaddagnumroJ&rdquo;. </p>
In our example it should return “JormungaddagnumroJ”. </p>
<p>First, add a new route:</p>
@ -588,12 +588,12 @@ postMirrorR = <span class="Keyword">do</span>
</pre>
</div></div>
<p>Don&rsquo;t forget to declare it inside <code>yosog.cabal</code> and <code>Application.hs</code>.</p>
<p>Dont forget to declare it inside <code>yosog.cabal</code> and <code>Application.hs</code>.</p>
<p>We will need to use the <code>reverse</code> function provided by <code>Data.Text</code>
which explain the additional import.</p>
<p>The only new thing here is the line that get the POST parameter named &ldquo;content&rdquo;.
<p>The only new thing here is the line that get the POST parameter named “content”.
If you want to know more detail about it and form in general you can take
look at <a href="http://www.yesodweb.com/book/forms">the yesod book</a>.</p>
@ -618,9 +618,9 @@ look at <a href="http://www.yesodweb.com/book/forms">the yesod book</a>.</p>
</div></div>
<p>And that is all.
This time, we won&rsquo;t need to clean up.
This time, we wont need to clean up.
We may have used another way to generate the form
but we&rsquo;ll see this in the next section.</p>
but well see this in the next section.</p>
<p>Just try it by <a href="http://localhost:3000/mirror">clicking here</a>.</p>
@ -664,7 +664,7 @@ If you forget it, there will be an error.</p>
<p>After the route and the model, we write the handler.
First, declare a new Handler module.
Add <code>import Handler.Blog</code> inside <code>Application.hs</code> and add it into <code>yosog.cabal</code>.
Let&rsquo;s write the content of <code>Handler/Blog.hs</code>.
Lets write the content of <code>Handler/Blog.hs</code>.
We start by declaring the module and by importing some block necessary to
handle Html in forms.</p>
@ -698,7 +698,7 @@ entryForm = renderDivs $ <span class="Constant">Article</span>
</pre>
<p>This function defines a form for adding a new article.
Don&rsquo;t pay attention to all the syntax.
Dont pay attention to all the syntax.
If you are curious you can take a look at Applicative Functor.
You just have to remember <code>areq</code> is for required form input.
Its arguments being: <code>areq type label default_value</code>.</p>
@ -741,7 +741,7 @@ $else
</div></div>
<p>You should remark we added some logic inside the template.
There is a test and a &ldquo;loop&rdquo;.</p>
There is a test and a “loop”.</p>
<p>Another very interesting part is the creation of the form.
The <code>articleWidget</code> was created by yesod.
@ -830,7 +830,7 @@ I made it very minimal.
If you want to go further, you should take a look at the
recent <a href="http://yesodweb.com/blog/2012/01/blog-example">i18n blog tutorial</a>.
It will be obvious I inspired my own tutorial on it.
You&rsquo;ll learn in a very straightforward way how easy it is to use authorizations,
Youll learn in a very straightforward way how easy it is to use authorizations,
Time and internationalization.
The example on also add a comment system.</p>
@ -838,16 +838,16 @@ The example on also add a comment system.</p>
<hr/><div class="footnotes">
<ol>
<li id="fn:benchmarkdigression">
<p>One can argue these benchmark contains many problems. But benchmark are just here to give an order of idea. Mainly Haskell is very fast.<a href="#fnref:benchmarkdigression" rel="reference">&#8617;</a></p>
<p>One can argue these benchmark contains many problems. But benchmark are just here to give an order of idea. Mainly Haskell is very fast.<a href="#fnref:benchmarkdigression" rev="footnote">&#8617;</a></p>
</li>
<li id="fn:speeddigression">
<p>Generally <em>high level</em> Haskell is slower than C, but <em>low level</em> Haskell is equivalent to C speed. It means that even if you can easily link C code with Haskell, this is not needed to reach the same speed. Furthermore writing a web service in C/C++ seems to be a very bad idea. You can take a look at a <a href="http://news.ycombinator.com/item?id=3449388">discussion on HN about this</a>. <a href="#fnref:speeddigression" rel="reference">&#8617;</a></p>
<p>Generally <em>high level</em> Haskell is slower than C, but <em>low level</em> Haskell is equivalent to C speed. It means that even if you can easily link C code with Haskell, this is not needed to reach the same speed. Furthermore writing a web service in C/C++ seems to be a very bad idea. You can take a look at a <a href="http://news.ycombinator.com/item?id=3449388">discussion on HN about this</a>. <a href="#fnref:speeddigression" rev="footnote">&#8617;</a></p>
</li>
<li id="fn:nodejstroll">
<p>If you are curious, you can search about <a href="http://www.unlimitednovelty.com/2011/10/nodejs-has-jumped-shark.html">the Fibonacci node.js troll</a>. Without any tweaking, <a href="http://mathias-biilmann.net/posts/2011/10/is-haskell-the-cure">Haskell handled this problem perfectly</a>. I tested it myself using yesod instead of Snap.<a href="#fnref:nodejstroll" rel="reference">&#8617;</a></p>
<p>If you are curious, you can search about <a href="http://www.unlimitednovelty.com/2011/10/nodejs-has-jumped-shark.html">the Fibonacci node.js troll</a>. Without any tweaking, <a href="http://mathias-biilmann.net/posts/2011/10/is-haskell-the-cure">Haskell handled this problem perfectly</a>. I tested it myself using yesod instead of Snap.<a href="#fnref:nodejstroll" rev="footnote">&#8617;</a></p>
</li>
<li id="fn:explainviewwidget">
<p>By view I mean yesod widget&rsquo;s hamlet, lucius and julius files. <a href="#fnref:explainviewwidget" rel="reference">&#8617;</a></p>
<p>By view I mean yesod widgets hamlet, lucius and julius files. <a href="#fnref:explainviewwidget" rev="footnote">&#8617;</a></p>
</li>
</ol>
</div>

View file

@ -27,7 +27,7 @@
&lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Too long; didn't read"&gt;tl;dr&lt;/abbr&gt;: &lt;/span&gt; A simple yesod tutorial.
Yesod is an Haskell web framework.
You shouldn&amp;rsquo;t need to know Haskell. &lt;/p&gt;
You shouldnt need to know Haskell. &lt;/p&gt;
&lt;blockquote&gt;
&lt;center&gt;&lt;span class="sc"&gt;&lt;b&gt;Table of content&lt;/b&gt;&lt;/span&gt;&lt;/center&gt;
@ -41,7 +41,7 @@ You shouldn&amp;rsquo;t need to know Haskell. &lt;/p&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#echo"&gt;Echo&lt;/a&gt; &lt;ul&gt;
&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/p&gt;</content>
&lt;li&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/p&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2011-10-20:/Scratch/en/blog/SVG-and-m4-fractals/</id>
@ -91,7 +91,7 @@ Then some believed it would be a good idea to invent many &lt;span class="sc"&gt
&lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Too long; didn't read"&gt;tl;dr&lt;/abbr&gt;: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.yesodweb.com"&gt;Yesod&lt;/a&gt; is a web framework which recently reached the maturity for which you should consider to use it.
Before telling you why you should learn Haskell and use yesod, I will talk about ideas yesod introduced and I didn&amp;rsquo;t saw in other frameworks before.&lt;/p&gt;
Before telling you why you should learn Haskell and use yesod, I will talk about ideas yesod introduced and I didnt saw in other frameworks before.&lt;/p&gt;
&lt;/div&gt;
@ -99,11 +99,11 @@ Before telling you why you should learn Haskell and use yesod, I will talk about
&lt;h2 id="type-safety"&gt;Type safety&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s start by an obligatory link from &lt;a href="http://xkcd.com"&gt;xkcd&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;Lets start by an obligatory link from &lt;a href="http://xkcd.com"&gt;xkcd&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://imgs.xkcd.com/comics/exploits_of_a_mom.png" alt="SQL injection by a mom" /&gt;&lt;/p&gt;
&lt;p&gt;When you create a web application, a lot of time is spent...&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;</content>
&lt;p&gt;When you create a web application, a lot of time is spent dealing wit...&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2011-09-28:/Scratch/en/blog/Higher-order-function-in-zsh/</id>
@ -132,13 +132,13 @@ Simply because, the more I programmed with zsh the more I tended to work using f
&lt;p&gt;The minimal to have better code are the functions &lt;code&gt;map&lt;/code&gt;, &lt;code&gt;filter&lt;/code&gt; and &lt;code&gt;fold&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s compare.
&lt;p&gt;Lets compare.
First a program which convert all gif to png in many different directories of different projects.&lt;/p&gt;
&lt;p&gt;Before &#8658;&lt;/p&gt;
&lt;p&gt;Before &lt;/p&gt;
&lt;pre class="twilight"&gt;
&lt;span class="Comment"&gt;&lt;span class="Comment"&gt;#&lt;/span&gt; for each directory in...&lt;/span&gt;&lt;/pre&gt;&lt;/p&gt;</content>
&lt;span class="Comment"&gt;&lt;span class="Comment"&gt;#&lt;/span&gt; for each directory in project...&lt;/span&gt;&lt;/pre&gt;&lt;/p&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2011-09-28:/Scratch/en/blog/programming-language-experience/</id>
@ -166,11 +166,11 @@ First a program which convert all gif to png in many different directories of di
The language of my firsts programs!
I was about 10, with an &lt;code&gt;MO5&lt;/code&gt; and &lt;code&gt;Amstrad CPC 6128&lt;/code&gt; and even with my &lt;code&gt;Atari STe&lt;/code&gt;.
This is the language of &lt;code&gt;GOTO&lt;/code&gt;s.
&#212; nostalgia.
Ô nostalgia.
Unfortunately this might be the only interesting part of this language.&lt;/p&gt;
&lt;p&gt;Today this language is obsolescent.
It is not even good to learn programming...&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;</content>
It is not even good to learn programming....&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2011-08-25:/Scratch/en/blog/Learn-Vim-Progressively/</id>
@ -182,7 +182,7 @@ It is not even good to learn programming...&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;</conte
<uri>yannesposito.com</uri>
</author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/"/>
<content type="html">&lt;p&gt;&lt;img alt="&#220;ber leet use vim!" src="/Scratch/img/blog/Learn-Vim-Progressively/uber_leet_use_vim.jpg" /&gt;&lt;/p&gt;
<content type="html">&lt;p&gt;&lt;img alt="Über leet use vim!" src="/Scratch/img/blog/Learn-Vim-Progressively/uber_leet_use_vim.jpg" /&gt;&lt;/p&gt;
&lt;div class="intro"&gt;
@ -201,14 +201,14 @@ It is not even good to learn programming...&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;</conte
&lt;/blockquote&gt;
&lt;p&gt;Learn &lt;a href="http://www.vim.org"&gt;vim&lt;/a&gt; and it will be your last text editor.
There isn&amp;rsquo;t any better text editor I know.
There isnt any better text editor I know.
Hard to learn, but incredible to use.&lt;/p&gt;
&lt;p&gt;I suggest you to learn it in 4 steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Survive&lt;/li&gt;
...&lt;/ol&gt;&lt;/p&gt;</content>
&lt;li&gt;Fe...&lt;/li&gt;&lt;/ol&gt;&lt;/p&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2011-08-17:/Scratch/en/blog/A-more-convenient-diff/</id>
@ -224,7 +224,7 @@ Hard to learn, but incredible to use.&lt;/p&gt;
&lt;p&gt;This is why, when you use &lt;code&gt;git&lt;/code&gt; it will use a better formatting and colorize it.&lt;/p&gt;
&lt;p&gt;Here is the script I use when I want to use human readable &lt;code&gt;diff&lt;/code&gt; &#224; la git. &lt;/p&gt;
&lt;p&gt;Here is the script I use when I want to use human readable &lt;code&gt;diff&lt;/code&gt; à la git. &lt;/p&gt;
&lt;div class="code"&gt;&lt;div class="file"&gt;&lt;a href="/Scratch/en/blog/A-more-convenient-diff/code/ydiff"&gt; &amp;#x27A5; ydiff &lt;/a&gt;&lt;/div&gt;&lt;div class="withfile"&gt;
&lt;pre class="twilight"&gt;
@ -280,9 +280,9 @@ I use a different password on all website.&lt;/p&gt;
&lt;p&gt;Disclamer, this is an unashamed attempt to make you download my iPhone app&amp;nbsp;;-).
You&amp;rsquo;re always here?
Even if you won&amp;rsquo;t download my app, you should read more.
My method doesn&amp;rsquo;t necessitate my app.
Youre always here?
Even if you wont download my app, you should read more.
My method doesnt necessitate my app.
It is both safe and easy to use everyday.&lt;/p&gt;
&lt;p&gt;If you just want to &lt;em&gt;use&lt;/em&gt; the tools without searching to understand why it is safe, just jump at the &lt;/p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;</content>
@ -320,7 +320,7 @@ It is both safe and easy to use everyday.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Update&lt;/em&gt;: I might change my mind now. Why?
I just discovered a &lt;a href="https://github.com/rstacruz/js2coffee"&gt;js2coffee converter&lt;/a&gt;. Furthermore Denis Knauf told me about a &lt;code&gt;CoffeeScript.eval&lt;/code&gt; function.
And as Denis said: &amp;ldquo;it is time to use Coffeescript as a javascript with Ruby-like syntax not a Ruby-like programming language&amp;rdquo;.&lt;/p&gt;
And as Denis said: it is time to use Coffeescript as a javascript with Ruby-like syntax not a Ruby-like programming language.&lt;/p&gt;
&lt;/div&gt;
@ -374,14 +374,14 @@ But I will revive a bit this blog.&lt;/p&gt;
&lt;div class="intro"&gt;
&lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Too long; didn't read"&gt;tl;dr&lt;/abbr&gt;: &lt;/span&gt; I made a simple macro system for my blog. Now I juste have to write %&lt;span&gt;&lt;/span&gt;latex and it show as &lt;span style="text-transform: uppercase"&gt;L&lt;sup style="vertical-align: 0.15em; margin-left: -0.36em; margin-right: -0.15em; font-size: .85em"&gt;a&lt;/sup&gt;T&lt;sub style="vertical-align: -0.5ex; margin-left: -0.1667em; margin-right: -0.125em; font-size: 1em"&gt;e&lt;/sub&gt;X&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Too long; didn't read"&gt;tl;dr&lt;/abbr&gt;: &lt;/span&gt; I made a simple macro system for my blog. Now I juste have to write %&lt;span /&gt;latex and it show as &lt;span style="text-transform: uppercase"&gt;L&lt;sup style="vertical-align: 0.15em; margin-left: -0.36em; margin-right: -0.15em; font-size: .85em"&gt;a&lt;/sup&gt;T&lt;sub style="vertical-align: -0.5ex; margin-left: -0.1667em; margin-right: -0.125em; font-size: 1em"&gt;e&lt;/sub&gt;X&lt;/span&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;I added a macro system for my blog system.
When we are used to &lt;span style="text-transform: uppercase"&gt;L&lt;sup style="vertical-align: 0.15em; margin-left: -0.36em; margin-right: -0.15em; font-size: .85em"&gt;a&lt;/sup&gt;T&lt;/span&gt;&lt;/p&gt;</content>
When we are used to &lt;span style="text-transform: uppercase"&gt;L&lt;sup style="vertical-align: 0.15em; margin-left: -0.36em; margin-right: -0.15em; font-size: .85em"&gt;a&lt;/sup&gt;T&lt;sub style="vertical-align: -0.5ex; margin-left: -0.1667em; margin-right: -0.125em; font-size: 1em"&gt;e&lt;/sub&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2010-10-14:/Scratch/en/blog/2010-10-14-Fun-with-wav/</id>
@ -399,7 +399,7 @@ When we are used to &lt;span style="text-transform: uppercase"&gt;L&lt;sup style
&lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Too long; didn't read"&gt;tl;dr&lt;/abbr&gt;: &lt;/span&gt; Played to process a &lt;code&gt;wav&lt;/code&gt; file. &lt;code&gt;C&lt;/code&gt; was easier and cleaner than Ruby.&lt;/p&gt;
&lt;p&gt;edit: I wanted this program to work only on one specific machine (a x86 on a 32 bit Ubuntu). Therefore I didn&amp;rsquo;t had any portability consideration. This is only a &lt;em&gt;hack&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;edit: I wanted this program to work only on one specific machine (a x86 on a 32 bit Ubuntu). Therefore I didnt had any portability consideration. This is only a &lt;em&gt;hack&lt;/em&gt;.&lt;/p&gt;
&lt;/div&gt;
@ -408,11 +408,11 @@ When we are used to &lt;span style="text-transform: uppercase"&gt;L&lt;sup style
&lt;p&gt;I had to compute the sum of the absolute values of data of a &lt;code&gt;.wav&lt;/code&gt; file.
For efficiency (and fun) reasons, I had chosen &lt;code&gt;C&lt;/code&gt; language.&lt;/p&gt;
&lt;p&gt;I didn&amp;rsquo;t programmed in &lt;code&gt;C&lt;/code&gt; for a long time.
&lt;p&gt;I didnt programmed in &lt;code&gt;C&lt;/code&gt; for a long time.
From my memory it was a pain to read and write to files.
But in the end I was really impressed by the code I get.
It was really clean.
This is even more impressive know...&lt;/p&gt;</content>
This is even more impressive knowing I used m...&lt;/p&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2010-10-10:/Scratch/en/blog/2010-10-10-Secure-eMail-on-Mac-in-few-steps/</id>
@ -445,12 +445,12 @@ This is even more impressive know...&lt;/p&gt;</content>
&lt;/div&gt;
&lt;p&gt;I&amp;rsquo;ve (re)discovered how to become S/MIME compliant.
&lt;p&gt;Ive (re)discovered how to become S/MIME compliant.
I am now suprised how easy it was.
Some years ago it was far more difficult.
Now I&amp;rsquo;m able to sign and encrypt my emails.&lt;/p&gt;
Now Im able to sign and encrypt my emails.&lt;/p&gt;
&lt;/p&gt;</content>
&lt;h2 id="why-is-it-important"&gt;Why is it ...&lt;/h2&gt;&lt;/p&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2010-10-06:/Scratch/en/blog/2010-10-06-New-Blog-Design-Constraints/</id>
@ -472,7 +472,7 @@ But the major problem came from, &lt;code&gt;font-shadow&lt;/code&gt; and gradie
Then my new design obey to the following rules:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;no CSS element begining by &amp;lsquo;-moz&amp;rsquo; or &amp;lsquo;-webkit&amp;rsquo;, etc&amp;hellip;,&lt;/li&gt;
&lt;li&gt;no CSS element begining by -moz or -webkit, etc…,&lt;/li&gt;
&lt;li&gt;no text shadow,&lt;/li&gt;
&lt;li&gt;clean (I mean delete) most javascript.&lt;/li&gt;
&lt;/ul&gt;
@ -493,7 +493,7 @@ Then my new design obey to the following rules:&lt;/p&gt;
<content type="html">&lt;p&gt;You can remark at the bottom of each page I provide a last modification date.
This label was first calculated using the &lt;code&gt;mtime&lt;/code&gt; of the file on the file system.
But many times I modify this date just to force some recompilation.
Therefore the date wasn&amp;rsquo;t a date of &lt;em&gt;real&lt;/em&gt; modification.&lt;/p&gt;
Therefore the date wasnt a date of &lt;em&gt;real&lt;/em&gt; modification.&lt;/p&gt;
&lt;p&gt;I use &lt;a href="http://git-scm.org"&gt;git&lt;/a&gt; to version my website.
And fortunately I can know the last date of &lt;em&gt;real&lt;/em&gt; change of a file.
@ -501,7 +501,7 @@ This is how I do this with &lt;a href="http://nanoc.stoneship.org"&gt;nanoc&lt;/
&lt;div class="code"&gt;&lt;div class="file"&gt;&lt;a href="/Scratch/en/blog/2010-09-02-Use-git-to-calculate-trusted-mtimes/code/gitmtime.rb"&gt; &amp;#x27A5; gitmtime.rb &lt;/a&gt;&lt;/div&gt;&lt;div class="withfile"&gt;
&lt;pre class="twilight"&gt;
&lt;span class="Keyword"&gt;def&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content>
&lt;span class="Keyword"&gt;def&lt;/span&gt; &lt;span class="Entity"&gt;g...&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2010-09-02:/Scratch/en/blog/2010-09-02-base64-and-sha1-on-iPhone/</id>
@ -519,11 +519,11 @@ here are two functions to add to your code to have &lt;code&gt;base64&lt;/code&g
&lt;p&gt;To use it, simply copy the code in your class and use as this:&lt;/p&gt;
&lt;pre class="twilight"&gt;
&lt;span class="CCCPreprocessorLine"&gt;#&lt;span class="CCCPreprocessorDirective"&gt;import&lt;/span&gt; &lt;span class="String"&gt;&lt;span class="String"&gt;&amp;lt;&lt;/span&gt;CommonCrypto/CommonDigest.h&lt;span class="String"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
#import &amp;lt;CommonCrypto/CommonDigest.h&amp;gt;
...
&lt;span class="Support"&gt;NSString&lt;/span&gt; *b64_hash = [&lt;span class="Variable"&gt;self&lt;/span&gt; &lt;span class="SupportFunction"&gt;b64_sha1&lt;span class="SupportFunction"&gt;:&lt;/span&gt;&lt;/span&gt;&lt;span class="String"&gt;&lt;span class="String"&gt;@&amp;quot;&lt;/span&gt;some NSString to be sha1'ed&lt;span class="String"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;];
...
&lt;/pre&gt;</content>
&lt;span class="Support"&gt;NSString&lt;/span&gt; *hex_hash = [&lt;span class="Variable"&gt;self&lt;/span&gt; &lt;span class="SupportFunction"&gt;hex_sha1&lt;span class="SupportFunction"&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2010-08-31:/Scratch/en/blog/2010-08-31-send-mail-from-command-line-with-attached-file/</id>
@ -536,8 +536,8 @@ here are two functions to add to your code to have &lt;code&gt;base64&lt;/code&g
</author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-08-31-send-mail-from-command-line-with-attached-file/"/>
<content type="html">&lt;p&gt;I had to send a mail using only command line.
I was surprised it isn&amp;rsquo;t straightforward at all.
I didn&amp;rsquo;t had &lt;code&gt;pine&lt;/code&gt; nor &lt;code&gt;mutt&lt;/code&gt; or anything like that.
I was surprised it isnt straightforward at all.
I didnt had &lt;code&gt;pine&lt;/code&gt; nor &lt;code&gt;mutt&lt;/code&gt; or anything like that.
Just &lt;code&gt;mail&lt;/code&gt; and &lt;code&gt;mailx&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;What Internet say (via google) is&lt;/p&gt;
@ -548,13 +548,14 @@ uuencode fic.jpg fic.jpg &lt;span class="Keyword"&gt;|&lt;/span&gt; mail -s &lt;
&lt;p&gt;I tried it.
And it works almost each times.
But for my file, it didn&amp;rsquo;t worked.
But for my file, it didnt worked.
I compressed it to &lt;code&gt;.gz&lt;/code&gt;, &lt;code&gt;.bz2&lt;/code&gt; and &lt;code&gt;.zip&lt;/code&gt;.
Using &lt;code&gt;.bz2&lt;/code&gt; format it worked nicely, but not with other formats.
Instead of having an attached file I saw this in my email.&lt;/p&gt;
&lt;pre&gt;
begin 664 fic....&lt;/pre&gt;</content>
begin 664 fic.jpg
M(R$O=7-R+V)I;...&lt;/pre&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2010-08-23:/Scratch/en/blog/2010-08-23-Now-heberged-on-heroku/</id>
@ -622,10 +623,10 @@ But here is the conf to make it work on heroku.&lt;/p&gt;
&lt;p&gt;If a demiurge made our world, he certainly had a great sense of humor.
After this read, you should be convinced.
I&amp;rsquo;ll pretend to be him.
I&amp;rsquo;ll create a simplified world.
Ill pretend to be him.
Ill create a simplified world.
A world that obey to simple mathematical rules.
And I&amp;rsquo;ll...&lt;/p&gt;&lt;/div&gt;</content>
And Ill tell you about on...&lt;/p&gt;&lt;/div&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2010-07-31:/Scratch/en/blog/2010-07-31-New-style-after-holidays/</id>
@ -656,7 +657,7 @@ I was inspired by Readability and iBooks&lt;small&gt;&amp;copy;&lt;/small&gt; (t
</author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-07-07-CSS-rendering-problems-by-navigator/"/>
<content type="html">&lt;p&gt;Some &lt;a href="http://reddit.com"&gt;Reddit&lt;/a&gt; users reported my website was really long to load and to scroll.
They thinks it was because of the &amp;lsquo;1px shadow&amp;rsquo; I apply on all the text.
They thinks it was because of the 1px shadow I apply on all the text.
I was a bit surprised, because I make some test into a really &lt;em&gt;slow&lt;/em&gt; virtual machine. And all have always worked fine. In fact, what slow down so much are by order of importance:&lt;/p&gt;
&lt;ol&gt;
@ -668,7 +669,7 @@ I was a bit surprised, because I make some test into a really &lt;em&gt;slow&lt;
&lt;p&gt;On Safari on Mac there is absolutely no rendering time problem. But when I use Chrome under Linux it is almost unusable.&lt;/p&gt;
&lt;p&gt;Safari and Chrome use webkit, when you access my website with javascript enabled, an additionnal browser specific CSS is loaded....&lt;/p&gt;</content>
&lt;p&gt;Safari and Chrome use webkit, when you access my website with javascript enabled, an additionnal browser specific CSS is loaded. Until now I...&lt;/p&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2010-07-05:/Scratch/en/blog/2010-07-05-Cappuccino-and-Web-applications/</id>
@ -690,7 +691,7 @@ I was a bit surprised, because I make some test into a really &lt;em&gt;slow&lt;
&lt;li&gt;Tried to make &lt;a href="http://yannesposito.com/Softwares/YPassword.html"&gt;YPassword&lt;/a&gt; in jQuery and with Cappuccino.&lt;/li&gt;
&lt;li&gt;Cappuccino nice in desktop browser but 1.4MB, not compatible with iPhone.&lt;/li&gt;
&lt;li&gt;jQuery not as nice as the Cappuccino version but 106KB. iPhone compatible.&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;ll give a try to Dashcode 3.&lt;/li&gt;
&lt;li&gt;Ill give a try to Dashcode 3.&lt;/li&gt;
&lt;/ul&gt;
@ -703,7 +704,7 @@ I was a bit surprised, because I make some test into a really &lt;em&gt;slow&lt;
&lt;p&gt;Before start, I must say I know Cappuccino and jQuery are no more comparable than Cocoa and the C++ standard library. One is oriented for user interface while the other is and helper for low level programming.
Nonetheless I used these two to make the same web application. This is why I compare the exp...&lt;/p&gt;&lt;/div&gt;&lt;/hr&gt;</content>
Nonetheless I used these two to make the same web application. This is why I compare the experienc...&lt;/p&gt;&lt;/div&gt;&lt;/hr&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2010-06-19:/Scratch/en/blog/2010-06-19-jQuery-popup-the-easy-way/</id>
@ -788,7 +789,7 @@ You can get it on &lt;a href="http://github.com/yogsototh/nanoc3_blog"&gt;github
&lt;li&gt;&lt;a href="http://intensedebate.org"&gt;intenseDebate&lt;/a&gt; comments integration (asynchronous)&amp;nbsp;;&lt;/li&gt;
&lt;li&gt;Portable with and without javascript, XHTML Strict 1.0 / CSS3,&lt;/li&gt;
&lt;li&gt;Write in markdown format (no HTML editing needed),&lt;/li&gt;
&lt;li&gt;Typographic ameliorations (no &amp;lsquo;:&amp;rsquo; ...&lt;/li&gt;&lt;/ul&gt;</content>
&lt;li&gt;Typographic ameliorations (no : starting a l...&lt;/li&gt;&lt;/ul&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2010-06-14:/Scratch/en/blog/2010-06-14-multi-language-choices/</id>
@ -806,7 +807,7 @@ Most people advice me to have one file per language. Generally it ends with:&lt;
&lt;pre class="twilight"&gt;
Bonjour,
voici un exemple de texte en fran&#231;ais.
voici un exemple de texte en français.
[image](url)
&lt;/pre&gt;
@ -819,12 +820,12 @@ here is an example of english text.
&lt;p&gt;This way of handling translations force you to write completely an article in one language, copy it, and translate it.&lt;/p&gt;
&lt;p&gt;However, most of time, there are common parts like images, source code, etc&amp;hellip;
&lt;p&gt;However, most of time, there are common parts like images, source code, etc
When I want to correct some mistake on these parts, I have to make twice the work. With sometimes adding another mistake in only one language.&lt;/p&gt;
&lt;p&gt;This is why I preferred to handle it differently.
I use &lt;em&gt;tags&lt;/em&gt; on a single file.
Finally my files...&lt;/p&gt;</content>
Finally my files looks l...&lt;/p&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2010-05-24:/Scratch/en/blog/2010-05-24-Trees--Pragmatism-and-Formalism/</id>
@ -849,7 +850,7 @@ Finally my files...&lt;/p&gt;</content>
&lt;li&gt;Used a pen and a sheet of paper&lt;/li&gt;
&lt;li&gt;Made some math.&lt;/li&gt;
&lt;li&gt;Crushed the problem in 10 minutes&lt;/li&gt;
&lt;li&gt;Conclusion: The pragmatism shouldn&amp;rsquo;t mean &amp;ldquo;never use theory&amp;rdquo;.&lt;/li&gt;
&lt;li&gt;Conclusion: The pragmatism shouldnt mean “never use theory”.&lt;/li&gt;
&lt;/ul&gt;
@ -860,7 +861,7 @@ Finally my files...&lt;/p&gt;</content>
&lt;p&gt;For my job, I needed to resolve a problem. It first seems not too hard.
Then I started working directly on my program.
I entered in the &lt;em&gt;infernal&lt;/em&gt;: ...&lt;/p&gt;</content>
I entered in the &lt;em&gt;infernal&lt;/em&gt;: &lt;em&gt;try &amp;amp; repa...&lt;/em&gt;&lt;/p&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2010-05-19:/Scratch/en/blog/2010-05-19-How-to-cut-HTML-and-repair-it/</id>
@ -896,14 +897,14 @@ I entered in the &lt;em&gt;infernal&lt;/em&gt;: ...&lt;/p&gt;</content>
&lt;p&gt;The more you wait to do something, the more difficult it is to start doing it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I had to write another post for this blog. I had added many article idea in my todolist. But, I made many other things, and I&amp;rsquo;ve always said (until now), I&amp;rsquo;ll do this later. What changed my mind is the haunt of this simple remark about how to be productive in programming.
&lt;p&gt;I had to write another post for this blog. I had added many article idea in my todolist. But, I made many other things, and Ive always said (until now), Ill do this later. What changed my mind is the haunt of this simple remark about how to be productive in programming.
&amp;gt; Stop write &lt;code&gt;TODO&lt;/code&gt; in your code and make it now!&lt;br /&gt;
&amp;gt; You&amp;rsquo;ll be surprised by the results.&lt;/p&gt;
&amp;gt; Youll be surprised by the results.&lt;/p&gt;
&lt;p&gt;In short:
&amp;gt; &lt;strong&gt;Just do it!&lt;/strong&gt; ou &lt;strong&gt;Juste fait le&lt;/strong&gt; comme auraient dit les nuls.&lt;/p&gt;
&lt;p&gt;Finally I&amp;rsquo;ll certainly write blog post more often for a ...&lt;/p&gt;&lt;/p&gt;</content>
&lt;p&gt;Finally Ill certainly write blog post more often for a short period of time.&lt;/p&gt;&lt;/p&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2010-03-23:/Scratch/en/blog/2010-03-23-Encapsulate-git/</id>
@ -963,7 +964,7 @@ git clone git+ssh://git@github.com:443/yogsototh/project.git
&lt;p&gt;&lt;code&gt;git clone&lt;/code&gt; can only fetch the master branch.&lt;/p&gt;
&lt;p&gt;If you don&amp;rsquo;t have much branches, you can simply use clone your project and then use the following command:&lt;/p&gt;
&lt;p&gt;If you dont have much branches, you can simply use clone your project and then use the following command:&lt;/p&gt;
&lt;div&gt;&lt;pre class="twilight"&gt;
git branch --track local_branch remote_branch
@ -974,7 +975,7 @@ git branch --track local_branch remote_branch
$ git clone git@github:yogsototh/example.git
$ git branch
master *
$ git ...&lt;/pre&gt;&lt;/div&gt;</content>
$ git branch...&lt;/pre&gt;&lt;/div&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2010-02-23:/Scratch/en/blog/2010-02-23-When-regexp-is-not-the-best-solution/</id>
@ -1006,7 +1007,7 @@ ext&lt;span class="Keyword"&gt;=&lt;/span&gt;&lt;span class="Variable"&gt;&lt;sp
<uri>yannesposito.com</uri>
</author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-02-18-split-a-file-by-keyword/"/>
<content type="html">&lt;p&gt;Strangely enough, I didn&amp;rsquo;t find any built-in tool to split a file by keyword. I made one myself in &lt;code&gt;awk&lt;/code&gt;. I put it here mostly for myself. But it could also helps someone else.
<content type="html">&lt;p&gt;Strangely enough, I didnt find any built-in tool to split a file by keyword. I made one myself in &lt;code&gt;awk&lt;/code&gt;. I put it here mostly for myself. But it could also helps someone else.
The following code split a file for each line containing the word &lt;code&gt;UTC&lt;/code&gt;.&lt;/p&gt;
&lt;div&gt;&lt;pre class="twilight"&gt;
@ -1028,7 +1029,7 @@ The following code split a file for each line containing the word &lt;code&gt;UT
<uri>yannesposito.com</uri>
</author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-02-16-All-but-something-regexp--2-/"/>
<content type="html">&lt;p&gt;In my &lt;a href="previouspost"&gt;previous post&lt;/a&gt; I had given some trick to match all except something. On the same idea, the trick to match the smallest possible string. Say you want to match the string between &amp;lsquo;a&amp;rsquo; and &amp;lsquo;b&amp;rsquo;, for example, you want to match:&lt;/p&gt;
<content type="html">&lt;p&gt;In my &lt;a href="previouspost"&gt;previous post&lt;/a&gt; I had given some trick to match all except something. On the same idea, the trick to match the smallest possible string. Say you want to match the string between a and b, for example, you want to match:&lt;/p&gt;
&lt;pre class="twilight"&gt;
a.....&lt;span class="Constant"&gt;&lt;strong&gt;a......b&lt;/strong&gt;&lt;/span&gt;..b..a....&lt;span class="Constant"&gt;&lt;strong&gt;a....b&lt;/strong&gt;&lt;/span&gt;...
@ -1045,7 +1046,7 @@ a.....&lt;span class="Constant"&gt;&lt;strong&gt;a......b&lt;/strong&gt;&lt;/spa
&lt;pre class="twilight"&gt;
/a.*?b/
&lt;span class="Constant"&gt;&lt;strong&gt;...&lt;/strong&gt;&lt;/span&gt;&lt;/pre&gt;</content>
&lt;span class="Constant"&gt;&lt;strong&gt;a.....a......b&lt;/strong&gt;&lt;/span&gt;&lt;/pre&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2010-02-15:/Scratch/en/blog/2010-02-15-All-but-something-regexp/</id>
@ -1069,7 +1070,7 @@ a.....&lt;span class="Constant"&gt;&lt;strong&gt;a......b&lt;/strong&gt;&lt;/spa
But, there exists a major problem: the complementary of a regular language might not be regular.
Then, for some expression it is absolutely impossible to negate a regular expression.&lt;/p&gt;
&lt;p&gt;But sometimes with some simple regular expression it should be possible&lt;sup&gt;&lt;a href="#note1"&gt;&amp;dagger;&lt;/a&gt;&lt;/sup&gt;. Say you want to match everything containing the some word say &lt;code&gt;bull&lt;/code&gt; but don&amp;rsquo;t want to match &lt;/p&gt;</content>
&lt;p&gt;But sometimes with some simple regular expression it should be possible&lt;sup&gt;&lt;a href="#note1"&gt;&lt;/a&gt;&lt;/sup&gt;. Say you want to match everything containing the some word say &lt;code&gt;bull&lt;/code&gt; but dont want to match &lt;code&gt;bullshit&lt;/code&gt;&lt;/p&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2010-01-12:/Scratch/en/blog/2010-01-12-antialias-font-in-Firefox-under-Ubuntu/</id>
@ -1081,7 +1082,7 @@ Then, for some expression it is absolutely impossible to negate a regular expres
<uri>yannesposito.com</uri>
</author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-01-12-antialias-font-in-Firefox-under-Ubuntu/"/>
<content type="html">&lt;p&gt;How to stop using bad Microsoft&#169; font under Ubuntu Linux in order to user nice anti aliased font under Firefox.&lt;/p&gt;
<content type="html">&lt;p&gt;How to stop using bad Microsoft© font under Ubuntu Linux in order to user nice anti aliased font under Firefox.&lt;/p&gt;
&lt;p&gt;Just modify the &lt;code&gt;/etc/fonts/local.conf&lt;/code&gt; with the following code: &lt;/p&gt;

File diff suppressed because one or more lines are too long

View file

@ -54,17 +54,17 @@
<div class="corps">
<h1 class="first" id="why-this-article-and-for-whom">Why This article and for whom?</h1>
<p>Many website explaining how MVC works. But I can&rsquo;t found one who explain why.</p>
<p>Many website explaining how MVC works. But I cant found one who explain why.</p>
<p>I have difficulties to obey some principle don&rsquo;t know <em>why</em> I should use it. And something better than the:</p>
<p>I have difficulties to obey some principle dont know <em>why</em> I should use it. And something better than the:</p>
<blockquote>
<p>&ldquo;Smarter people than you decided you have to do so&rdquo;</p>
<p>“Smarter people than you decided you have to do so”</p>
</blockquote>
<p>This article is for people who like me want to understand the real motivation of using an MVC architecture and which advantage it gives you.</p>
<p>Let&rsquo;s start making a project from scratch pretending we don&rsquo;t know anything about the MVC architecture. Then let see how we&rsquo;ll naturally derive to an MVC architecture.</p>
<p>Lets start making a project from scratch pretending we dont know anything about the MVC architecture. Then let see how well naturally derive to an MVC architecture.</p>
<center>
<p> <a href="/Scratch/en/blog/mvc/mvc1">&rarr; Next</a> </p>

View file

@ -99,10 +99,10 @@ Most lines were like:</p>
<p><img alt="Dragon fractal" src="/Scratch/img/blog/programming-language-experience/dragon.jpg" class="left" />
I was about 10 when I played with logo to draw on the computer.</p>
<p>I remember the Bach&rsquo;s music while the program loaded.</p>
<p>I remember the Bachs music while the program loaded.</p>
<p>At that time we had to load the program into the memory using tapes.
This one was a rare one. It didn&rsquo;t made an awfull &lsquo;Krrrkrr cssssss krrr&rsquo; noise.</p>
This one was a rare one. It didnt made an awfull Krrrkrr cssssss krrr noise.</p>
<p>Some years after, I used it to learn programming to my college student.
It was really good as a first language.
@ -150,7 +150,7 @@ In the end I prefer C.</p>
<p><img alt="Pointer representation from Dancing links" src="/Scratch/img/blog/programming-language-experience/C.jpg" class="left" /></p>
<p>The pointer&rsquo;s language.</p>
<p>The pointers language.</p>
<p><em>Le</em> programming language.</p>
@ -161,12 +161,12 @@ If you want to have good quality code, knowing C is almost mandatory.</p>
<p>This language is close to machine language.
So much, there is (mostly) a linear relation between the size of your code and the size of the compiled one.</p>
<p>In short, each time you write a C instruction there won&rsquo;t be anything strange that will occurs, like starting a long algorithm behind the scene.</p>
<p>In short, each time you write a C instruction there wont be anything strange that will occurs, like starting a long algorithm behind the scene.</p>
<p>It is very close to the machine while keeping sufficient abstractions to be fun.</p>
<p>I made a lot of program with it.
From sort algorithms to AI ones (SAT3), system, network prgramming, etc&hellip;
From sort algorithms to AI ones (SAT3), system, network prgramming, etc
It is a very useful language that will help you understand how things works on your computer.
Most modern computer language hide a lot of informations on what occurs.
This is not the case with C.</p>
@ -175,7 +175,7 @@ This is not the case with C.</p>
<p>The super-clean one.</p>
<p>I liked ADA. I must confess I didn&rsquo;t used it a lot.
<p>I liked ADA. I must confess I didnt used it a lot.
May be one day I will try it again.
I was impressed by asynchronous programming with it.
What you need to know is this old language had certainly inspired most new object oriented languages.</p>
@ -184,12 +184,12 @@ What you need to know is this old language had certainly inspired most new objec
<p>Until here I just described imperative languages without any object notion.</p>
<p>More clearly, the language didn&rsquo;t helped you to structure your program.</p>
<p>More clearly, the language didnt helped you to structure your program.</p>
<p>In order to limit the number of bugs, particularly for huge programs, we started to think about how to organize computer programs.
In the end, from the imperatives language culture, it produced the Object Oriented programming (OOP).
Beware, the Object Oriented programming isn&rsquo;t a miracle. Proof? How many bug-free software do you use?
Furthermore, OOP doesn&rsquo;t fit all problems.
Beware, the Object Oriented programming isnt a miracle. Proof? How many bug-free software do you use?
Furthermore, OOP doesnt fit all problems.
But to make a bank application, an application which help to manage stock, clients or text archives.
I mean an information system, the OOP is not so bad.</p>
@ -213,7 +213,7 @@ But in reality, T have to be only <code>char</code> or <code>char16</code>.
Then I had to reduce my alphabet to 2<sup>16</sup> letters.
Except for some application, the alphabet must be far larger than that.</p>
<p>To conclude, I&rsquo;d say, C++ is very good if you work alone or with a fixed subset of its features.</p>
<p>To conclude, Id say, C++ is very good if you work alone or with a fixed subset of its features.</p>
<h3 id="eiffel">Eiffel</h3>
@ -221,7 +221,7 @@ Except for some application, the alphabet must be far larger than that.</p>
<p>Yes, it is a really nice language.
Full object in mind. Far cleaner than C++.
But it isn&rsquo;t so popular.
But it isnt so popular.
Behind C++ there is a large community to help new users and to write libraries.
Furthermore, I preferred working with C++.
At that time I programmed a lot with C and like its syntax.</p>
@ -233,10 +233,10 @@ At that time I programmed a lot with C and like its syntax.</p>
<p>The first time I heard about Java it was <em>le Grail</em>!</p>
<p>Perfect portability, your program will work on all platform.
There was incrusted inside the language architecture concepts to help limit mistakes, and force you to use good programming habits. But&hellip;</p>
There was incrusted inside the language architecture concepts to help limit mistakes, and force you to use good programming habits. But</p>
<p>But It is extremely verbose.
And limitations are quite boring if you know what you&rsquo;re doing.</p>
And limitations are quite boring if you know what youre doing.</p>
<p>For example, there is no multiple inheritance.
Generally it is a coherent choice when there are a way to compensate.
@ -252,23 +252,23 @@ And I add to make a bunch of copy/paste inside all my subclasses!
Copy/paste are exactly what should be avoided the most by object oriented languages.</p>
<p>Another thing: threads.
I was forced to make my own thread management system to avoid locks and notifications between threads (wait the end of this thread, &hellip;).
I was forced to make my own thread management system to avoid locks and notifications between threads (wait the end of this thread, ).
At that time I used Java 1.5.
This problem should have been solved with Java 1.6.
I wish it is the case, but lacking such an essential feature for a language was very bad.</p>
<p>In the same idea, it was very long to wait for the foreach loops.</p>
<p>After my experience, I don&rsquo;t recommend Java.
<p>After my experience, I dont recommend Java.
Portability does not worth this price.</p>
<p><abbr title="Graphic User Interface">GUI</abbr> protability means mediocre experience on all platforms.
Any system it might be (wxWidget, QT, etc&hellip;).</p>
Any system it might be (wxWidget, QT, etc).</p>
<p>The Java ideology is &ldquo;closed&rdquo;. But it resolve a big problem.
<p>The Java ideology is “closed”. But it resolve a big problem.
It helps medium to low quality developper to work in team without the ability to make too much harm to the product.
A good programmer will be able to make very interresting things with it thought.
Please note I didn&rsquo;t say Java programmer are bad programmer.</p>
Please note I didnt say Java programmer are bad programmer.</p>
<h3 id="objective-c">Objective-C</h3>
@ -277,7 +277,7 @@ Please note I didn&rsquo;t say Java programmer are bad programmer.</p>
<p>The language I learned and used only to make application on Apple<small>&copy;</small> platform.
I learned Objective-C just after Python.
It was hard to do it.
At first I didn&rsquo;t liked the syntax and many other details.
At first I didnt liked the syntax and many other details.
But it is this kind of language you like more and more you use it.
In fact, Objective-C is a simple language, but associated with the Cocoa framework it is a really good tool.
Cocoa is very different to other framework I used before.
@ -288,7 +288,7 @@ It might seems like small details on paper, but once you start using it, it make
<p>Even if Objective-C is a relatively low level language.
Its dynamic typing ability make it very good for <abbr title="Graphic User Interface">GUI</abbr> programming.
I recommand to continue working with this language.
In the end you&rsquo;ll certainely find it better than expected.</p>
In the end youll certainely find it better than expected.</p>
<h2 id="modern-scripting-languages">Modern Scripting Languages</h2>
@ -298,7 +298,7 @@ In the end you&rsquo;ll certainely find it better than expected.</p>
<p>This small script language that we used all to make our website in the time of animated gifs.</p>
<p>Nice but no more. Apparently there were a lot of progress since PHP5. Maybe one day I&rsquo;ll use it again. But behind it, this language has a &ldquo;script kiddies only&rdquo; reputation.
<p>Nice but no more. Apparently there were a lot of progress since PHP5. Maybe one day Ill use it again. But behind it, this language has a “script kiddies only” reputation.
Also long history of easy to make security holes.</p>
<p>In reality PHP is just behind C for the abstraction level.
@ -306,7 +306,7 @@ Therefore it has a lot of organisation problems and make it easier to create bug
For web applications it is a real problem.</p>
<p>PHP remains for me the SQL injection language.
I make a bit of PHP not so long ago, and it was a pain to protect my application to SQL injection. Yep, I didn&rsquo;t found any standard library to make this, but I didn&rsquo;t searched a lot.</p>
I make a bit of PHP not so long ago, and it was a pain to protect my application to SQL injection. Yep, I didnt found any standard library to make this, but I didnt searched a lot.</p>
<h3 id="python">Python</h3>
@ -314,20 +314,20 @@ I make a bit of PHP not so long ago, and it was a pain to protect my application
<p>Revelation!</p>
<p>When you were used to work with compiled languages (C++, Java) and you start learning Python, it&rsquo;s like a punch in the face.
<p>When you were used to work with compiled languages (C++, Java) and you start learning Python, its like a punch in the face.
Programming like it always should have been.
Everything is natural, it&rsquo;s <em>magic</em>.
Everything is natural, its <em>magic</em>.
Yes, as good as this.
But something so good must have some drawback.</p>
<p>And yes, like all interpreted languages, Python is <em>slow</em>.
Beware, no just a bit slow like 2 or 3 times slower than C. (like Java for example).
No, really slow, about 10 to 20 times slower than C.
Argh&hellip; Note it is completely usable for many things.</p>
Argh Note it is completely usable for many things.</p>
<h3 id="awk">Awk</h3>
<p>If you have to &ldquo;filter&rdquo; some files and the filter is not too complicated awk is the ideal language to do this.
<p>If you have to “filter” some files and the filter is not too complicated awk is the ideal language to do this.
For example, if you want to know which words in a text file are most used.
I used it to modify hundred of XML files in an easier manner than XSLT.</p>
@ -401,10 +401,10 @@ Generally it takes me no more than some hours to some days to learn a new progra
Concerning haskell, this is very different.
To master haskell you need to understand very hard concepts.
Monads and Arrows are some of them.
I didn&rsquo;t understand them before I read some scientific paper.
I didnt understand them before I read some scientific paper.
Many week will be necessary to master it perfectly (if someone does).
Also the community is very friendly and nice. There is no &ldquo;LOL! URAN00B! RTFM!&rdquo;
And no concession has been made to make this language more popular (I&rsquo;m looking at you C++, Java and Javascript).
Also the community is very friendly and nice. There is no “LOL! URAN00B! RTFM!”
And no concession has been made to make this language more popular (Im looking at you C++, Java and Javascript).
This langage remain pure (I know there are two meaning).</p>
<h2 id="unpopular-languages">Unpopular Languages</h2>

View file

@ -55,7 +55,7 @@
<div id="afterheader">
<div class="corps">
<p>If you don&rsquo;t have the password or believe it is an error you can mail me at .</p>
<p>If you dont have the password or believe it is an error you can mail me at .</p>
</div>

View file

@ -29,8 +29,8 @@
<div id="afterheader">
<div class="corps">
<p>The page you&rsquo;re looking at doesn&rsquo;t exists on the server.
If you have followed an internal link, you can tell me by mail and I&rsquo;ll fix it as soon as possible.</p>
<p>The page youre looking at doesnt exists on the server.
If you have followed an internal link, you can tell me by mail and Ill fix it as soon as possible.</p>
</div>
@ -38,7 +38,7 @@ If you have followed an internal link, you can tell me by mail and I&rsquo;ll f
<div class="corps">
<p>La page que vous recherchez n&rsquo;est pas présente sur le site.
<p>La page que vous recherchez nest pas présente sur le site.
Si vous avez suivi un lien vous pouvez me prévenir par mail et je réparerai ça dès que possible.</p>
</div>

View file

@ -103,7 +103,7 @@
<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Copyright ©, Yann Esposito</a>
</div>
<div id="lastmod">
Modified: 01/19/2012
Modified: 01/20/2012
</div>
<div>
Entirely done with

View file

@ -1,11 +1,13 @@
<html>
<head>
<title>Redirect to the right page.</title>
<meta http-equiv="refresh" content="0;url=/Scratch/en/blog/Yesod-tutorial-for-newbies">
<meta http-equiv="refresh" content="0;url=/Scratch/en/blog/Yesod-tutorial-for-newbies/">
<style> body { font: sans-serif; color: #333333; font-size: 18px; position: absolute; text-align: center; font-weight: bold; top: 50%; left: 50%; width: 460px; height: 100px; margin-left: -230px; margin-top: -50px; line-height: 2em; } a,a:hover,a:visited,a:active { color: #C53; } </style>
</head>
<body>
<p>You should be redirected to</p>
<div><a href="/Scratch/en/blog/Yesod-tutorial-for-newbies">/Scratch/en/blog/Yesod-tutorial-for-newbies</a></div>
<div><a href="/Scratch/en/blog/Yesod-tutorial-for-newbies/">/Scratch/en/blog/Yesod-tutorial-for-newbies/</a></div>
</body>
</HTML>

View file

@ -72,7 +72,7 @@
<h2 class="first" id="my-explanation">My explanation</h2>
<p>It is an easy way to aggregate all the update made on websites you like in a single place. You&rsquo;ll never have to surf many website to see if there is news on a website. </p>
<p>It is an easy way to aggregate all the update made on websites you like in a single place. Youll never have to surf many website to see if there is news on a website. </p>
<h3 id="choose-an-aggregator">choose an aggregator</h3>
@ -85,11 +85,11 @@ It is great for content you never want to forgot some article. It is not really
<h3 id="subscribe-to-some-website-news">Subscribe to some website news</h3>
<p>Once you have chosen your aggregator, you only have to subscribe to websites you like. Do do this, you only have to click on the RSS icon in the top bar of your navigator. Or generally a nice icon is shown into the page you&rsquo;re reading.</p>
<p>Once you have chosen your aggregator, you only have to subscribe to websites you like. Do do this, you only have to click on the RSS icon in the top bar of your navigator. Or generally a nice icon is shown into the page youre reading.</p>
<h3 id="get-the-news">Get the news</h3>
<p>Now, you&rsquo;ll only have to use your RSS client. And you&rsquo;ll see all news on all subscribed websites. There is no more need to surf many websites. All news which interest you are in the same place.</p>
<p>Now, youll only have to use your RSS client. And youll see all news on all subscribed websites. There is no more need to surf many websites. All news which interest you are in the same place.</p>
<div class="return"><a href="#entete" onclick="fastShowMenu()">&uarr;</a></div>

View file

@ -65,7 +65,7 @@
<p>YAquaBubbles is a QuartzComposer Screensaver.
It was one of my first try but the result was nice.</p>
<p><a href="/Scratch/files/YAquaBubbles.dmg"><span class="nicer">&#x27A5;</span> YAquaBubbles.dmg</a></p>
<p><a href="/Scratch/files/YAquaBubbles.dmg"><span class="nicer"></span> YAquaBubbles.dmg</a></p>

View file

@ -62,7 +62,7 @@
It has three themes: white, black and red.
It is based on a QuartzComposition and with some little Objective-C code to handle gently the frame per second.</p>
<p><a href="/Scratch/files/YClock.dmg"><span class="nicer">&#x27A5;</span> YClock.dmg</a></p>
<p><a href="/Scratch/files/YClock.dmg"><span class="nicer"></span> YClock.dmg</a></p>

View file

@ -70,7 +70,7 @@
<li>A <a href="http://github.com/yogsototh/YPasswordCLI">command line tool</a>.</li>
</ul>
<p>I&rsquo;ll soon release an iPhone application.</p>
<p>Ill soon release an iPhone application.</p>
<div class="return"><a href="#entete" onclick="fastShowMenu()">&uarr;</a></div>

View file

@ -64,9 +64,9 @@
<p>Using these properties broke my validation
but work really well in the two most recent and main browsers
(Safari&nbsp;4 and Firefox&nbsp;3.5 at the time I&rsquo;m writing these lines).
If you don&rsquo;t use these browser the page is
correctly displayed but not with all the &lsquo;eyecandy&rsquo; effects.</p>
(Safari 4 and Firefox 3.5 at the time Im writing these lines).
If you dont use these browser the page is
correctly displayed but not with all the eyecandy effects.</p>
<p>I believed in the benefits of <abbr title="Cascading Style Sheet">CSS</abbr>
validation, this is why there is alway the

View file

@ -60,9 +60,9 @@
<p><img src="/Scratch/img/about/avatar.png" alt="Avatar" class="left" /></p>
<p><a href="&#109;&#097;&#105;&#108;&#116;&#111;:&#121;&#097;&#110;&#110;&#046;&#101;&#115;&#112;&#111;&#115;&#105;&#116;&#111;&#064;&#103;&#109;&#097;&#105;&#108;&#046;&#099;&#111;&#109;">&#121;&#097;&#110;&#110;&#046;&#101;&#115;&#112;&#111;&#115;&#105;&#116;&#111;&#064;&#103;&#109;&#097;&#105;&#108;&#046;&#099;&#111;&#109;</a><br />
<p><a href="&#109;&#097;&#105;&#108;&#116;&#111;:&#121;&#097;&#110;&#110;&#046;&#101;&#115;&#112;&#111;&#115;&#105;&#116;&#111;&#064;&#103;&#109;&#097;&#105;&#108;&#046;&#099;&#111;&#109;">yann.esposito@gmail.com</a><br />
Suivez moi sur <a href="http://twitter.com/yogsototh">twitter</a><br />
Mes &ldquo;bookmarks&rdquo; <a href="http://pinboard.in/u:yogsototh">pinboard</a><br />
Mes “bookmarks” <a href="http://pinboard.in/u:yogsototh">pinboard</a><br />
Open Source <a href="http://github.com/yogsototh">github</a><br />
<a href="http://stackoverflow.com/users/40569/yogsototh">stackoverflow</a></p>

View file

@ -69,7 +69,7 @@
</table></div>
</div>
<p>Livres que j&rsquo;aime&nbsp;: </p>
<p>Livres que jaime&nbsp;: </p>
<ul>
<li>Goëdel, Escher &amp; Bach <em>[Hofstadter]</em></li>
@ -77,7 +77,7 @@
<li>Baudolino <em>[Eco]</em></li>
</ul>
<p>Films que j&rsquo;aime&nbsp;: </p>
<p>Films que jaime&nbsp;: </p>
<ul>
<li>Eraserhead <em>[Lynch]</em></li>
@ -99,13 +99,13 @@
<p>Je suis un passioné. Passioné par&nbsp;:</p>
<ul>
<li>L&rsquo;informatique scientifique&nbsp;: <a href="http://yann.esposito.free.fr/recherche.php?lang=fr">j&rsquo;ai un doctorat en Informatique</a>&nbsp;;</li>
<li>Programmation: j&rsquo;ai développé <a href="http://yann.esposito.free.fr/logiciels.php">deux applications scientifiques</a> ainsi que des <a href="/YBlog/Softwares.html">éconimiseurs d&rsquo;écran pour Mac</a>.</li>
<li>Sécurité informatique: j&rsquo;ai modélisé <a href="http://yann.esposito.free.fr/enseignement/rez0.php#projet">un protocole sécurisé (similaire à TOR)</a>, <a href="/YBlog/Computer/Entries/2008/7/30_Easy,_secure_and_portable_password_management_system.html">une méthode pour gérer de façon sécurisé ses mots de passes</a>, un <a href="/YBlog/YPassword.html">widget</a> et un script shell pour utiliser cette méthode.</li>
<li>Linformatique scientifique&nbsp;: <a href="http://yann.esposito.free.fr/recherche.php?lang=fr">jai un doctorat en Informatique</a>&nbsp;;</li>
<li>Programmation: jai développé <a href="http://yann.esposito.free.fr/logiciels.php">deux applications scientifiques</a> ainsi que des <a href="/YBlog/Softwares.html">éconimiseurs décran pour Mac</a>.</li>
<li>Sécurité informatique: jai modélisé <a href="http://yann.esposito.free.fr/enseignement/rez0.php#projet">un protocole sécurisé (similaire à TOR)</a>, <a href="/YBlog/Computer/Entries/2008/7/30_Easy,_secure_and_portable_password_management_system.html">une méthode pour gérer de façon sécurisé ses mots de passes</a>, un <a href="/YBlog/YPassword.html">widget</a> et un script shell pour utiliser cette méthode.</li>
</ul>
<p>Mais avant tout j&rsquo;adore apprendre. Par exemple, j&rsquo;ai appris de nombreux langages de programmation:
<code>C</code>, <code>C++</code>, <code>Objective-C</code>, <code>Python</code>, <code>Java</code>, <code>Perl</code>, <code>awk</code>, <code>bash</code>, <code>zsh</code>, <code>LaTeX</code>, <code>Metapost</code>, <code>CamL</code>&hellip; Et j&rsquo;ai la même passion pour la recherche scientifique, la sécurité informatique, la philosophie et encore pas mal d&rsquo;autres choses.</p>
<p>Mais avant tout jadore apprendre. Par exemple, jai appris de nombreux langages de programmation:
<code>C</code>, <code>C++</code>, <code>Objective-C</code>, <code>Python</code>, <code>Java</code>, <code>Perl</code>, <code>awk</code>, <code>bash</code>, <code>zsh</code>, <code>LaTeX</code>, <code>Metapost</code>, <code>CamL</code>… Et jai la même passion pour la recherche scientifique, la sécurité informatique, la philosophie et encore pas mal dautres choses.</p>
</div>
@ -115,11 +115,11 @@
<h2 class="first" id="ma-petite-histoire">Ma petite histoire</h2>
<p>J&rsquo;ai eu mon doctorat en Informatique en décembre 2004 au <a href="http://www.lif.univ-mrs.fr/">LIF</a> (Marseille). Pendant les trois années de ma formation j&rsquo;ai non seulement fait de la recherche en informatique mais j&rsquo;ai aussi enseigné à des étudiants de l&rsquo;Université. J&rsquo;ai aussi développé un programme informatique dont le but était de vérifier expérimentalement mes résultats théoriques.</p>
<p>Jai eu mon doctorat en Informatique en décembre 2004 au <a href="http://www.lif.univ-mrs.fr/">LIF</a> (Marseille). Pendant les trois années de ma formation jai non seulement fait de la recherche en informatique mais jai aussi enseigné à des étudiants de lUniversité. Jai aussi développé un programme informatique dont le but était de vérifier expérimentalement mes résultats théoriques.</p>
<p>J&rsquo;ai ensuite fait un Post Doctorat au Laboratoire Hubert Curient de Saint-Etienne. Ma mission consistait à développer une application scientifique (SEDiL). Cette application visait comme public des biologistes et devait avoir une interface utilisateur agréable à utiliser.</p>
<p>Jai ensuite fait un Post Doctorat au Laboratoire Hubert Curient de Saint-Etienne. Ma mission consistait à développer une application scientifique (SEDiL). Cette application visait comme public des biologistes et devait avoir une interface utilisateur agréable à utiliser.</p>
<p>Ajourd&rsquo;hui je travaille pour AirFrance<small>&copy;</small> via Astek. Ce travail est très diversifié. Il demande la connaissance des technologies Web, CMS mais aussi de la programmation en Perl, JSP, meta-programmation&hellip;</p>
<p>Ajourdhui je travaille pour AirFrance<small>&copy;</small> via Astek. Ce travail est très diversifié. Il demande la connaissance des technologies Web, CMS mais aussi de la programmation en Perl, JSP, meta-programmation</p>
<div class="return"><a href="#entete" onclick="fastShowMenu()">&uarr;</a></div>

View file

@ -76,8 +76,8 @@ comme
</p>
<p>Les commentaires de blog sont gérés par
<del><a href="http://disqus.com">disqus</a></del> <a href="http://intensedebate.com">intense debate</a>. Ainsi je n&rsquo;ai besoin pour héberger mons site que
d&rsquo;un serveur de pages statiques. Ce qui a de nombreux avantages.
<del><a href="http://disqus.com">disqus</a></del> <a href="http://intensedebate.com">intense debate</a>. Ainsi je nai besoin pour héberger mons site que
dun serveur de pages statiques. Ce qui a de nombreux avantages.
Principalement concernant la charge et la sécurité du serveur.</p>
<p>
@ -89,7 +89,7 @@ et que j'ai conçu ce site quasiment <em>ex nihilo</em>.
</p>
<p>Si au contraire vous voulez connaitre tous les détails je vous suggère
d&rsquo;aller lire mon <a href="/Scratch/fr/blog/01_nanoc">article concernant nanoc</a>.</p>
daller lire mon <a href="/Scratch/fr/blog/01_nanoc">article concernant nanoc</a>.</p>
<div class="return"><a href="#entete" onclick="fastShowMenu()">&uarr;</a></div>

View file

@ -52,18 +52,18 @@
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<h1 class="first" id="quest-ce-que-nanoc-">Qu&rsquo;est-ce que nanoc&nbsp;?</h1>
<h1 class="first" id="quest-ce-que-nanoc-">Quest-ce que nanoc&nbsp;?</h1>
<p>Il ne s&rsquo;agit pas exactement d&rsquo;un
<p>Il ne sagit pas exactement dun
<abbr title="Content Management System">CMS</abbr>,
mais plutôt d&rsquo;un <em>système</em> de gestion de pages statiques. </p>
mais plutôt dun <em>système</em> de gestion de pages statiques. </p>
<p>Il faut programmer sois-même les pages web,
le code pour engendrer les menus&hellip;</p>
le code pour engendrer les menus</p>
<p>J&rsquo;ai programmé des filtres pour rendre ce site multilangue par exemple</p>
<p>Jai programmé des filtres pour rendre ce site multilangue par exemple</p>
<p>Vous pourrez trouver beaucoup d&rsquo;informations sur
<p>Vous pourrez trouver beaucoup dinformations sur
le <a href="http://nanoc.stoneship.org">site officiel de nanoc</a>.</p>
</div>

View file

@ -54,11 +54,11 @@
<div class="corps">
<h1 class="first" id="mise--jour">Mise à jour</h1>
<p>Comme <a href="http://www.theworkinggeek.com">Andy Lester</a> me l&rsquo;a fait remarqué. <a href="http://betterthangrep.com"><code>ack</code></a> est un simple fichier perl qu&rsquo;il suffit de copier dans son répertoire personnel <code>~/bin</code>. Maintenant j&rsquo;ai <code>ack</code> sur mon serveur professionnel.</p>
<p>Comme <a href="http://www.theworkinggeek.com">Andy Lester</a> me la fait remarqué. <a href="http://betterthangrep.com"><code>ack</code></a> est un simple fichier perl quil suffit de copier dans son répertoire personnel <code>~/bin</code>. Maintenant jai <code>ack</code> sur mon serveur professionnel.</p>
<p>Il suffit d&rsquo;aller sur <a href="http://betterthangrep.com">http://betterthangrep.com</a> pour le télécharger.</p>
<p>Il suffit daller sur <a href="http://betterthangrep.com">http://betterthangrep.com</a> pour le télécharger.</p>
<p>Sincèrement, je ne comprend pas qu&rsquo;<code>ack</code> ne soit pas une commande implémentée par défaut sur les systèmes UNIX. Je ne peux vraiment plus m&rsquo;en passer, il m&rsquo;est devenu aussi essentiel qu&rsquo;un <code>which</code> ou un <code>find</code>.</p>
<p>Sincèrement, je ne comprend pas qu<code>ack</code> ne soit pas une commande implémentée par défaut sur les systèmes UNIX. Je ne peux vraiment plus men passer, il mest devenu aussi essentiel quun <code>which</code> ou un <code>find</code>.</p>
</div>
@ -76,11 +76,11 @@ grep <span class="String"><span class="String">'</span>pattern<span class="Strin
</pre>
</div>
<p>La plupart du temps c&rsquo;est suffisant, mais ajouter de la coloration
améliore beaucoup l&rsquo;utilité de cette commande. Il existe déjà un outil
pour ça&nbsp;: il s&rsquo;appelle <code>ack-grep</code> sous Ubuntu.
Comme je ne peux pas l&rsquo;installer sur le serveur de mon entreprise,
j&rsquo;en ai créé un moi-même en quelques lignes&nbsp;:</p>
<p>La plupart du temps cest suffisant, mais ajouter de la coloration
améliore beaucoup lutilité de cette commande. Il existe déjà un outil
pour ça&nbsp;: il sappelle <code>ack-grep</code> sous Ubuntu.
Comme je ne peux pas linstaller sur le serveur de mon entreprise,
jen ai créé un moi-même en quelques lignes&nbsp;:</p>
<div>
<div class="code"><div class="file"><a href="/Scratch/fr/blog/02_ackgrep/code/ack"> &#x27A5; ack </a></div><div class="withfile">
@ -103,7 +103,7 @@ zargs -- <span class="Variable"><span class="Variable">$</span>listeFic</span> -
</div>
<p>Pour mon utilisation personnelle et celle de mon équipe
c&rsquo;est suffisant. J&rsquo;espère que ça pourra vous aider.</p>
cest suffisant. Jespère que ça pourra vous aider.</p>
</div>

View file

@ -66,42 +66,42 @@
</strong>
</div>
<p>Tout d&rsquo;abord, il est clair que comprendre le film comme simplement un film fantastique ne fonctionne pas. En suivant ce point d&rsquo;entrée on en fini pas de se heurter à des détails incompréhensibles.</p>
<p>Tout dabord, il est clair que comprendre le film comme simplement un film fantastique ne fonctionne pas. En suivant ce point dentrée on en fini pas de se heurter à des détails incompréhensibles.</p>
<p>Mon <em>hypothèse de départ</em> c&rsquo;est que le film dépeint la représentation de la réalité que s&rsquo;en fait Fred.
Chaque fois qu&rsquo;il essaye d&rsquo;échapper à la réalité, celle-ci finira par le rattraper.</p>
<p>Mon <em>hypothèse de départ</em> cest que le film dépeint la représentation de la réalité que sen fait Fred.
Chaque fois quil essaye déchapper à la réalité, celle-ci finira par le rattraper.</p>
<p>Fred a commis un acte horrible, un meurtre, et essaye de <em>réparer</em> sa mémoire pour accepter son acte. Il va alors s&rsquo;inventer des <em>réalitées alternatives</em>.</p>
<p>Fred a commis un acte horrible, un meurtre, et essaye de <em>réparer</em> sa mémoire pour accepter son acte. Il va alors sinventer des <em>réalitées alternatives</em>.</p>
<ul>
<li>Dans un premier temps il tue sa femme (Renée) parce qu&rsquo;elle le trompe.</li>
<li>Dans un premier temps il tue sa femme (Renée) parce quelle le trompe.</li>
<li>Dans la deuxième partie, il est plus faible. La version blonde de Renée va le manipuler pour tuer Dick Laurent.</li>
<li>Dans la troisième partie il tue Dick Laurent</li>
</ul>
<h2 id="quelle-est-la-validit-de-ce-choix-">Quelle est la validité de ce choix&nbsp;?</h2>
<p>Cet interprétation me semble valide à cause du dialogue au début du film avec les policier qui demande au protagoniste s&rsquo;il a une caméra&nbsp;:</p>
<p>Cet interprétation me semble valide à cause du dialogue au début du film avec les policier qui demande au protagoniste sil a une caméra&nbsp;:</p>
<blockquote>
<p>&ldquo;Do you own a video camera?&rdquo;<br />
&ldquo;No, Fred hates them.&rdquo;<br />
&ldquo;I like to remember things my own way.&rdquo;<br />
&ldquo;What do you mean by that?&rdquo;<br />
&ldquo;How I remember them, not necessarily the way they happened.&rdquo;</p>
<p>“Do you own a video camera?”<br />
“No, Fred hates them.”<br />
“I like to remember things my own way.”<br />
“What do you mean by that?”<br />
“How I remember them, not necessarily the way they happened.”</p>
</blockquote>
<p>Ce que l&rsquo;on peut traduire approximativement par&nbsp;:</p>
<p>Ce que lon peut traduire approximativement par&nbsp;:</p>
<blockquote>
<p>&ndash; Avez-vous une caméra&nbsp;?<br />
&ndash; Non, Fred les détestes.<br />
&ndash; J&rsquo;aime me rappeler les choses à ma façon.<br />
&ndash; Qu&rsquo;entendez-vous par là&nbsp;?<br />
&ndash; Je me rapelle des choses pas nécessairement comme elles se sont passées.</p>
<p> Avez-vous une caméra&nbsp;?<br />
Non, Fred les détestes.<br />
Jaime me rappeler les choses à ma façon.<br />
Quentendez-vous par là&nbsp;?<br />
Je me rapelle des choses pas nécessairement comme elles se sont passées.</p>
</blockquote>
<p>Ainsi, ce que l&rsquo;on voit n&rsquo;est pas la réalité, mais la réalité telle que le conçoit Fred. Il est donc le Dieu de cette réalité. Ainsi les interprétations mystiques faisant intervenir le Diable ont une certaine validité.</p>
<p>Ainsi, ce que lon voit nest pas la réalité, mais la réalité telle que le conçoit Fred. Il est donc le Dieu de cette réalité. Ainsi les interprétations mystiques faisant intervenir le Diable ont une certaine validité.</p>
</div>

View file

@ -58,25 +58,25 @@
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<h2 class="first" id="qui-est-lhomme-mystrieux-">Qui est l&rsquo;homme mystérieux&nbsp;?</h2>
<h2 class="first" id="qui-est-lhomme-mystrieux-">Qui est lhomme mystérieux&nbsp;?</h2>
<p><img alt="l'homme mystérieux" src="/Scratch/img/blog/03_losthighway/03_losthighway_2/mysteryman.jpg" class="left" /></p>
<p>Qui est donc ce personnage étrange et inquiétant&nbsp;?
Un être capable d&rsquo;ubiquité qui dit être invité par Fred dans sa maison&nbsp;?
Un être capable dubiquité qui dit être invité par Fred dans sa maison&nbsp;?
Sans sourcils, le visage blême, les yeux écarquillés fixant sans relâche les faits et gestes de Fred.</p>
<p>C&rsquo;est certainement une des clés du film.
<p>Cest certainement une des clés du film.
À mon avis, il représente la partie <em>mauvaise</em> de Fred.
Certainement la jalousie. Si j&rsquo;étais Catholique je dirai Satan, le tentateur.
Il n&rsquo;agit jamais, mais ne fait qu&rsquo;observer et filmer.
Par contre c&rsquo;est lui qui donne les armes à Fred pour tuer Dick Laurent.
Fred l&rsquo;a laissé entrer chez lui et il ne peut plus s&rsquo;en débarrasser.
Certainement la jalousie. Si jétais Catholique je dirai Satan, le tentateur.
Il nagit jamais, mais ne fait quobserver et filmer.
Par contre cest lui qui donne les armes à Fred pour tuer Dick Laurent.
Fred la laissé entrer chez lui et il ne peut plus sen débarrasser.
Un peu comme le <em>Iago</em> de Shakespeare est enfermé dans sa jalousie.
Le personnage mystérieux prend toute l&rsquo;importance, il le ronge de l&rsquo;intérieur.
Il aide Fred à accomplir les actes de violences et aussi l&rsquo;oblige à se souvenir de la réalité.</p>
Le personnage mystérieux prend toute limportance, il le ronge de lintérieur.
Il aide Fred à accomplir les actes de violences et aussi loblige à se souvenir de la réalité.</p>
<p>Quand il fait l&rsquo;amour à Renée il voit le visage de l&rsquo;homme mystérieux à la place du visage de sa femme. En réalité, il s&rsquo;agit de la même personne d&rsquo;après Fred. Ce serait donc elle qui est la source de son mal intérieur.</p>
<p>Quand il fait lamour à Renée il voit le visage de lhomme mystérieux à la place du visage de sa femme. En réalité, il sagit de la même personne daprès Fred. Ce serait donc elle qui est la source de son mal intérieur.</p>
</div>

View file

@ -60,11 +60,11 @@
<div class="corps">
<h2 class="first" id="qui-filme-et-dpose-les-cassettes-">Qui filme et dépose les cassettes&nbsp;?</h2>
<p>C&rsquo;est certainement l&rsquo;homme mystérieux (ou Fred lui-même) qui est à l&rsquo;origine de ces cassettes.
<p>Cest certainement lhomme mystérieux (ou Fred lui-même) qui est à lorigine de ces cassettes.
Le rôle des cassettes est double&nbsp;: </p>
<ul>
<li>Rappeler à Fred la réalité. D&rsquo;après Fred les cassettes video correspondent à la réalité. Il a beau essayer de se cacher la réalité, les cassettes finissent par aller jusqu&rsquo;au bout et il se voit en train de tuer Renée.</li>
<li>Rappeler à Fred la réalité. Daprès Fred les cassettes video correspondent à la réalité. Il a beau essayer de se cacher la réalité, les cassettes finissent par aller jusquau bout et il se voit en train de tuer Renée.</li>
<li>La cassette peut aussi faire référence aux cassettes de films pornographique dans laquelle Renée a peut-être tournée dans la réalité&nbsp;?</li>
</ul>

View file

@ -58,27 +58,27 @@
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<h2 class="first" id="que-sest-il-vraiment-pass-">Que s&rsquo;est-il vraiment passé&nbsp;?</h2>
<h2 class="first" id="que-sest-il-vraiment-pass-">Que sest-il vraiment passé&nbsp;?</h2>
<p>Ici, tout n&rsquo;est pas donné, on garde une assez grande liberté. Mais on a des indices. </p>
<p>Ici, tout nest pas donné, on garde une assez grande liberté. Mais on a des indices. </p>
<h3 id="hypothese-n1">Hypothese n°1</h3>
<p>Je dirais que le protagoniste est un garagiste qui est tombé amoureux d&rsquo;une actrice porno. Il l&rsquo;a certainement vu la première fois accompagnant le fameux Dick Laurent. Voyant qu&rsquo;il ne peut pas l&rsquo;avoir pour lui, fou de jalousie il tue Dick Laurent dans un motel où celui-ci à couché avec Renée. </p>
<p>Je dirais que le protagoniste est un garagiste qui est tombé amoureux dune actrice porno. Il la certainement vu la première fois accompagnant le fameux Dick Laurent. Voyant quil ne peut pas lavoir pour lui, fou de jalousie il tue Dick Laurent dans un motel où celui-ci à couché avec Renée. </p>
<p>On a la liberté de décider s&rsquo;il a vraiment tué la femme ou pas.
Dans ma première vision du film, j&rsquo;avais envie de dire qu&rsquo;il ne la tue pas. Mais qu&rsquo;une fois le meurtre commis, il va chez elle, sonne pour lui annoncer la mort de Dick Laurent. Il a alors juste le temps de s&rsquo;enfuir, la police à ses trousses.</p>
<p>On a la liberté de décider sil a vraiment tué la femme ou pas.
Dans ma première vision du film, javais envie de dire quil ne la tue pas. Mais quune fois le meurtre commis, il va chez elle, sonne pour lui annoncer la mort de Dick Laurent. Il a alors juste le temps de senfuir, la police à ses trousses.</p>
<h3 id="hypothese-n2">Hypothese n°2</h3>
<p>La première partie resemble à la réalité. Il a vraiment tué sa femme. Il se fait arrété et condamné (certainement à mort). Par contre on ne sait pas s&rsquo;il est aussi allé tuer Andy.</p>
<p>La première partie resemble à la réalité. Il a vraiment tué sa femme. Il se fait arrété et condamné (certainement à mort). Par contre on ne sait pas sil est aussi allé tuer Andy.</p>
<h2 id="alors-cest-laquelle-">alors c&rsquo;est laquelle&nbsp;?</h2>
<h2 id="alors-cest-laquelle-">alors cest laquelle&nbsp;?</h2>
<p>La seconde hypothèse me semble plus vraisemblable, car il y a plus de recoupements possibles.
La première me semble aussi cohérente. C&rsquo;est cette première hypothèse que j&rsquo;avais émise lors de mon premier visionnage du film.</p>
La première me semble aussi cohérente. Cest cette première hypothèse que javais émise lors de mon premier visionnage du film.</p>
<p>Ce qui montre la force de ce film c&rsquo;est de se dire qu&rsquo;il y a de nombreuses autres hypothèses qui pourraient aussi bien fonctionner. C&rsquo;est le fameux <a href="http://en.wikipedia.org/wiki/Rashomon_effect">effet Rashomon</a>. Plusieurs personnes peuvent décrire de façon cohérentes ce qu&rsquo;elles ont vu, mais toutes les descriptions sont incohérentes entres-elles.</p>
<p>Ce qui montre la force de ce film cest de se dire quil y a de nombreuses autres hypothèses qui pourraient aussi bien fonctionner. Cest le fameux <a href="http://en.wikipedia.org/wiki/Rashomon_effect">effet Rashomon</a>. Plusieurs personnes peuvent décrire de façon cohérentes ce quelles ont vu, mais toutes les descriptions sont incohérentes entres-elles.</p>
</div>
@ -88,11 +88,11 @@ La première me semble aussi cohérente. C&rsquo;est cette première hypothèse
<h2 class="first" id="conclusion">Conclusion</h2>
<p>Il y aurait encore beaucoup à dire sur l&rsquo;analyse de ce film. Mais il me semble que j&rsquo;ai rassemblé l&rsquo;essentiel des clés pour sa compréhension.</p>
<p>Il y aurait encore beaucoup à dire sur lanalyse de ce film. Mais il me semble que jai rassemblé lessentiel des clés pour sa compréhension.</p>
<p>Il me semble qu&rsquo;avoir à l&rsquo;esprit l&rsquo;effet &ldquo;test de Rorschach&rdquo; est essentiel lors de la visualisation de ce film.</p>
<p>Il me semble quavoir à lesprit leffet “test de Rorschach” est essentiel lors de la visualisation de ce film.</p>
<p>J&rsquo;aimerai avoir votre opinion&nbsp;; mon interprétation tient-elle la route&nbsp;?</p>
<p>Jaimerai avoir votre opinion&nbsp;; mon interprétation tient-elle la route&nbsp;?</p>
</div>

View file

@ -69,24 +69,24 @@ Je donne cependant quelques clés que j'ai découverte qui aident à suivre le f
Ces clés devraient vous aider à vous faire votre propre idée du film...
</div>
<p>La première fois que j&rsquo;ai vu Lost Highway je me suis senti un peu perdu.
J&rsquo;en ai alors cherché le sens. Voilà ce que j&rsquo;ai pu trouver sur Internet&nbsp;:</p>
<p>La première fois que jai vu Lost Highway je me suis senti un peu perdu.
Jen ai alors cherché le sens. Voilà ce que jai pu trouver sur Internet&nbsp;:</p>
<ul>
<li>Fred passe un pacte avec le diable incarné par l&rsquo;homme en noir&nbsp;;</li>
<li>l&rsquo;homme mystérieux est une (la) caméra&nbsp;;</li>
<li>seule la première histoire est vrai, la suite étant l&rsquo;imagination de Fred&nbsp;;</li>
<li>Fred passe un pacte avec le diable incarné par lhomme en noir&nbsp;;</li>
<li>lhomme mystérieux est une (la) caméra&nbsp;;</li>
<li>seule la première histoire est vrai, la suite étant limagination de Fred&nbsp;;</li>
</ul>
<p>sans compter les multiples avis trouvés sur les forums. Tout cela ne me paraissait pas convaincant.
J&rsquo;ai alors réussi à trouver deux articles (en anglais) qui proposent de bien meilleures interprétations. Mais aucun des deux ne m&rsquo;a complètement convaincu&nbsp;:</p>
Jai alors réussi à trouver deux articles (en anglais) qui proposent de bien meilleures interprétations. Mais aucun des deux ne ma complètement convaincu&nbsp;:</p>
<ul>
<li>le permier est sur <a href="http://www.mediacircus.net/lh.html">mediacircus</a>,</li>
<li>le second qui développe presque la même interprétation que la première est vraiment très détaillé sur <a href="http://www.jasonsweb.com/LostHighway/main.htm">jasonweb</a>.</li>
</ul>
<p>Il faut garder à l&rsquo;esprit qu&rsquo;il n&rsquo;existe pas une seule interprétation possible et cohérente du film. Seul David Lynch pourrait donner l&rsquo;explication complète du film.</p>
<p>Il faut garder à lesprit quil nexiste pas une seule interprétation possible et cohérente du film. Seul David Lynch pourrait donner lexplication complète du film.</p>
<p>Je donne quelques clés aidant à suivre le film <strong>sans être complètement perdu</strong>.
Ces clés devraient vous aider à vous faire votre propre idée du film.</p>
@ -94,21 +94,21 @@ Ces clés devraient vous aider à vous faire votre propre idée du film.</p>
<h2 id="le-test-de-rorschach">Le test de Rorschach</h2>
<p><img alt="test de Rorschach" src="/Scratch/img/blog/03_losthighway/rorschach.gif" class="left" />
À l&rsquo;instar du protagoniste chacun voit dans ce film ce qu&rsquo;il a envie d&rsquo;y voir. Nous pouvons nous y perdre simplement parce que nous pouvons nous perdre dans notre propre esprit. C&rsquo;est une invitation à la réflexion. Regarder ce film c&rsquo;est un peu comme passer un test de Rorschach. Qu&rsquo;y voit-on&nbsp;? Chacun y met un peu de sa propre personnalité dans l&rsquo;explication du film.</p>
À linstar du protagoniste chacun voit dans ce film ce quil a envie dy voir. Nous pouvons nous y perdre simplement parce que nous pouvons nous perdre dans notre propre esprit. Cest une invitation à la réflexion. Regarder ce film cest un peu comme passer un test de Rorschach. Quy voit-on&nbsp;? Chacun y met un peu de sa propre personnalité dans lexplication du film.</p>
<ul>
<li>Si vous êtes un mystique, vous verrez dans l&rsquo;homme mystérieux un démon</li>
<li>si vous êtes plus psychanalytique vous y verrez une partie inconsciente du protagoniste&hellip;</li>
<li>Si vous êtes un mystique, vous verrez dans lhomme mystérieux un démon</li>
<li>si vous êtes plus psychanalytique vous y verrez une partie inconsciente du protagoniste</li>
</ul>
<p>En général en essayant d&rsquo;expliquer ce film, on se perd un peu dans notre pensée. Et souvent on échoue à tout expliquer. Il y a toujours un point qui rend la construction incohérente avec le film. C&rsquo;est pourquoi rechercher une explication unique est un entreprise vaine.</p>
<p>En général en essayant dexpliquer ce film, on se perd un peu dans notre pensée. Et souvent on échoue à tout expliquer. Il y a toujours un point qui rend la construction incohérente avec le film. Cest pourquoi rechercher une explication unique est un entreprise vaine.</p>
<h2 id="interprtation-ne-explication">Interprétation&nbsp;&ne; Explication</h2>
<h2 id="interprtation-ne-explication">Interprétation Explication</h2>
<p>Je donne une <strong>interprétation</strong> et non pas une <strong>explication</strong>. Ma vision des choses, me semble cohérente. Cependant il est très probable que mon adhésion au film soit très différente de la votre.
Il y a certainement beaucoup d&rsquo;autres explications qui restent cohérentes. </p>
Il y a certainement beaucoup dautres explications qui restent cohérentes. </p>
<p>J&rsquo;écris cet article, parce que j&rsquo;ai l&rsquo;impression d&rsquo;en avoir trouver une qui marche pour plus de 97% du film (peut-être 100%, mais j&rsquo;en doute, il faudrait que je le revois encore une fois).</p>
<p>Jécris cet article, parce que jai limpression den avoir trouver une qui marche pour plus de 97% du film (peut-être 100%, mais jen doute, il faudrait que je le revois encore une fois).</p>
</div>

View file

@ -60,13 +60,13 @@
<div class="corps">
<h1 class="first" id="protections-anti-copie--belle-connerie-1">Protections anti-copie = Belle connerie (+1)!</h1>
<p>Ma femme a acheté pour environ 500€ (au moins) de séries télé sur iTunes. Mais elles s&rsquo;est trompé pour la première saison de Battlestar Galactica. Qu&rsquo;elle a téléchargé en anglais. Hors comme les séries sont protégées, on ne peut simplement pas voir la série avec des sous-titres&nbsp;!</p>
<p>Ma femme a acheté pour environ 500€ (au moins) de séries télé sur iTunes. Mais elles sest trompé pour la première saison de Battlestar Galactica. Quelle a téléchargé en anglais. Hors comme les séries sont protégées, on ne peut simplement pas voir la série avec des sous-titres&nbsp;!</p>
<div class="encadre">
<p style="text-align: center; font-size: 5em"><strong>WTF?</strong></p>
</div>
<p>Résultat des courses, ma femme n&rsquo;achetera plus de séries sur iTunes tant qu&rsquo;elles resteront protégées par DRM, qu&rsquo;elle ne pourront pas être gravées sur DVD (pour être regardées sur la télé). Et comme elle est bien moins prompte à acheter des DVD que simplement cliquer sur un bouton.</p>
<p>Résultat des courses, ma femme nachetera plus de séries sur iTunes tant quelles resteront protégées par DRM, quelle ne pourront pas être gravées sur DVD (pour être regardées sur la télé). Et comme elle est bien moins prompte à acheter des DVD que simplement cliquer sur un bouton.</p>
<div class="encadre">
@ -75,7 +75,7 @@ Ca fera nettement moins d'argent pour vous les <strong>ayant-droits</strong>&nbs
</div>
<p>Et ma femme ne pourra pas voir ces épisodes. <br />
C&rsquo;est ce qu&rsquo;on appelle une cooperation <strong>&lsquo;LOSE-LOSE&rsquo;</strong>.</p>
Cest ce quon appelle une cooperation <strong>LOSE-LOSE</strong>.</p>
</div>

View file

@ -56,10 +56,10 @@
<div class="corps">
<h2 class="first" id="crer-une-branche-git-externe-facilement">Créer une branche Git externe facilement</h2>
<p>J&rsquo;utilise Git pour synchroniser des projets personnels.
C&rsquo;est pourquoi quand je crée une branche locale je souhaite quasiment toujours qu&rsquo;elle soit aussi créée en <em>externe</em> (remote).</p>
<p>Jutilise Git pour synchroniser des projets personnels.
Cest pourquoi quand je crée une branche locale je souhaite quasiment toujours quelle soit aussi créée en <em>externe</em> (remote).</p>
<p>Voici le script que j&rsquo;utilise pour accomplir cette tâche&nbsp;: </p>
<p>Voici le script que jutilise pour accomplir cette tâche&nbsp;: </p>
<div>
<div class="code"><div class="file"><a href="/Scratch/fr/blog/05_git_create_remote_branch/code/git-create-new-branch.sh"> &#x27A5; git-create-new-branch.sh </a></div><div class="withfile">
@ -81,7 +81,7 @@ git config branch.<span class="Variable"><span class="Variable">${</span>branch<
</div></div>
</div>
<p>Bien sûr, je suppose qu&rsquo;<code>origin</code> est déjà configurée.</p>
<p>Bien sûr, je suppose qu<code>origin</code> est déjà configurée.</p>
</div>

View file

@ -60,17 +60,17 @@
<div class="encadre">
<p><em>Màj</em>&nbsp;: Actuellement j&rsquo;utilise github avec des repository privés. Je paye une somme très raisonnable pour ce service. Si vous voulez être complètement autonome, je vous conseille d&rsquo;utiliser <a href="https://github.com/sitaramc/gitolite">gitolite</a> sur votre propre serveur accessible sur le web.</p>
<p><em>Màj</em>&nbsp;: Actuellement jutilise github avec des repository privés. Je paye une somme très raisonnable pour ce service. Si vous voulez être complètement autonome, je vous conseille dutiliser <a href="https://github.com/sitaramc/gitolite">gitolite</a> sur votre propre serveur accessible sur le web.</p>
</div>
<p>J&rsquo;utilise <a href="http://www.git-scm.org/">Git</a> pour gérer mes projets personnels.
J&rsquo;ai un <em>repository</em> centralisé et tous mes ordinateurs se synchronisent avec lui.
Cependant, dans la documentation officielle, je n&rsquo;ai pas trouvé clairement ce que je souhaitais.</p>
<p>Jutilise <a href="http://www.git-scm.org/">Git</a> pour gérer mes projets personnels.
Jai un <em>repository</em> centralisé et tous mes ordinateurs se synchronisent avec lui.
Cependant, dans la documentation officielle, je nai pas trouvé clairement ce que je souhaitais.</p>
<p>En d&rsquo;autres termes, si vous souhaitez utiliser le type de <em>workflow</em> que SVN proposait avec Git (et ses avantages), voici comment procéder.</p>
<p>En dautres termes, si vous souhaitez utiliser le type de <em>workflow</em> que SVN proposait avec Git (et ses avantages), voici comment procéder.</p>
</div>
@ -80,7 +80,7 @@ Cependant, dans la documentation officielle, je n&rsquo;ai pas trouvé clairemen
<h2 class="first" id="initialisation">Initialisation</h2>
<p>Disons que j&rsquo;ai déjà un projet et que je veuille en créer un nouveau.</p>
<p>Disons que jai déjà un projet et que je veuille en créer un nouveau.</p>
<div>
<pre class="twilight">
@ -119,7 +119,7 @@ Màj: La meilleure solution est d'installer <a href="https://github.com/sitaramc
</em>
</div>
<p>Maintenant à partir de n&rsquo;importe quel ordinateur, voici ce que vous pouvez faire&nbsp;: </p>
<p>Maintenant à partir de nimporte quel ordinateur, voici ce que vous pouvez faire&nbsp;: </p>
<div>
<pre class="twilight">
@ -141,11 +141,11 @@ Je vous conseille de faire la même opération sur l'ordinateur qui à servi à
<div class="corps">
<h2 class="first" id="lutilisation-courante">L&rsquo;utilisation courante</h2>
<h2 class="first" id="lutilisation-courante">Lutilisation courante</h2>
<p>Pour résumer vous avez maintenant un repository sur Internet et un ou plusieurs ordinateurs lui sont associés. Maintenant il faut que tout soit toujours synchronisé.</p>
<p>Avant de commencer à travailler, la première chose à faire est de récupérer les modification à partir d&rsquo;Internet vers votre poste local&nbsp;: </p>
<p>Avant de commencer à travailler, la première chose à faire est de récupérer les modification à partir dInternet vers votre poste local&nbsp;: </p>
<div>
<pre class="twilight">
@ -190,17 +190,17 @@ git push
<h2 id="synchronisation-des-branches">Synchronisation des branches</h2>
<p>Bien, maintenant que tout semble bon, il faut encore s&rsquo;occuper de quelques petites choses (sinon, SVN suffirait).
Git est complètement orienté sur la décentralisation et la création de nouvelles branches sur le même poste. Synchroniser des branches sur plusieurs serveurs différent n&rsquo;est pas une opération naturelle.</p>
<p>Bien, maintenant que tout semble bon, il faut encore soccuper de quelques petites choses (sinon, SVN suffirait).
Git est complètement orienté sur la décentralisation et la création de nouvelles branches sur le même poste. Synchroniser des branches sur plusieurs serveurs différent nest pas une opération naturelle.</p>
<p>C&rsquo;est pourquoi j&rsquo;ai créé deux simples scripts pour automatiser cette opération. Un script pour créer un branche localement et en ligne. Un autre script pour récupérer les branches en lignes qui ne sont pas présente localement.</p>
<p>Cest pourquoi jai créé deux simples scripts pour automatiser cette opération. Un script pour créer un branche localement et en ligne. Un autre script pour récupérer les branches en lignes qui ne sont pas présente localement.</p>
<p>Ainsi, lorsque je veux créer une nouvelle branche (localement et ligne)&nbsp;; je lance le script&nbsp;:</p>
<div><pre class="twilight">git-create-new-branch branch_name
</pre></div>
<p>et quand je suis sur un autre ordinateur et que je veux récupérer les branches crées sur un autre poste, j&rsquo;exécute&nbsp;:</p>
<p>et quand je suis sur un autre ordinateur et que je veux récupérer les branches crées sur un autre poste, jexécute&nbsp;:</p>
<div><pre class="twilight">git-get-remote-branches
</pre></div>

View file

@ -54,18 +54,18 @@
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<h1 class="first" id="comment-recompiler-un-conomiseur-dcran-sous-snow-leopardc">Comment recompiler un économiseur d&rsquo;écran sous Snow Leopard<small>&copy;</small></h1>
<h1 class="first" id="comment-recompiler-un-conomiseur-dcran-sous-snow-leopardc">Comment recompiler un économiseur décran sous Snow Leopard<small>&copy;</small></h1>
<p>Mon économiseur d&rsquo;écran ne fonctionnait plus sous Mac OS X 10.6 Snow Leopard<small>&copy;</small>. Après un peu de recherche sous google, le problème semblait pouvoir être réglé avec une recompilation.
<p>Mon économiseur décran ne fonctionnait plus sous Mac OS X 10.6 Snow Leopard<small>&copy;</small>. Après un peu de recherche sous google, le problème semblait pouvoir être réglé avec une recompilation.
Cependant, même en recomilant en 64 bits ça ne fonctionnait toujours pas.
Après un peu plus de recherches (merci à <a href="http://community.electricsheep.org/node/236">ElectricSheep</a> ),
j&rsquo;ai découvert les bons paramètres.</p>
jai découvert les bons paramètres.</p>
<p><img alt="XCode configuration" src="/Scratch/img/blog/07_Screensaver_compilation_option_for_Snow_Leopard/xcodeConfig.png" /></p>
<p>Pour l&rsquo;instant je ne l&rsquo;ai pas compilé pour être compatible Tiger et Leopard. Je ne connais pas assez bien XCode pour savoir comment désactiver le garbage collector sur la version 32 bits et l&rsquo;activer sur la version 64 bits.</p>
<p>Pour linstant je ne lai pas compilé pour être compatible Tiger et Leopard. Je ne connais pas assez bien XCode pour savoir comment désactiver le garbage collector sur la version 32 bits et lactiver sur la version 64 bits.</p>
<p>Il a été assez difficile de découvrir toutes ces informations. J&rsquo;espère que cet article aura pu aider quelqu&rsquo;un.</p>
<p>Il a été assez difficile de découvrir toutes ces informations. Jespère que cet article aura pu aider quelquun.</p>
</div>

View file

@ -56,7 +56,7 @@
<div class="corps">
<h1 class="first" id="surfez-partout-comme-si-vous-tiez-chez-vous">Surfez partout comme si vous étiez chez vous</h1>
<p>Que ce soit pour surfer en toute sécurité depuis un accès <span class="sc">wifi</span> non sécurisé ou pour contourner les parefeux diaboliques des entreprises. J&rsquo;ai configuré un serveur ssh écoutant sur le port 443 chez moi.</p>
<p>Que ce soit pour surfer en toute sécurité depuis un accès <span class="sc">wifi</span> non sécurisé ou pour contourner les parefeux diaboliques des entreprises. Jai configuré un serveur ssh écoutant sur le port 443 chez moi.</p>
<p>Ensuite de mon portable ou de mon ordinateur local, je dois simplement lancé la merveilleuse commande&nbsp;:</p>
@ -68,16 +68,16 @@ ssh -p 443 -D 9050 username@host
<p>et un proxy <span class="sc">socks</span> écoute sur le port 9050. Ce proxy <span class="sc">socks</span> transférera toutes les requêtes locales via le tunnel ssh. Ainsi je peux surfer en local comme si je naviguais depuis mon ordinateur à la maison. Je peux écrire mon numéro de carte bleu sans avoir peur que le <span class="sc">wifi</span> local soit <em>sniffé</em>. Je dois simplement configurer mon navigateur web pour utiliser le proxy <span class="sc">socks</span> sur <code>localhost</code> écoutant le port 9050.</p>
<p>J&rsquo;ai eu cette information à partir de <a href="http://dltj.org/article/ssh-as-socks-proxy/">cet article</a>.</p>
<p>Jai eu cette information à partir de <a href="http://dltj.org/article/ssh-as-socks-proxy/">cet article</a>.</p>
<h1 id="ssh-et-snow-leopardc">Ssh et Snow Leopard<small>&copy;</small></h1>
<p>J&rsquo;ai un Mac avec Snow Leopard<small>&copy;</small> à la maison.
Il ne suffit pas de modifier le fichier <code>/etc/sshd.config</code> pour changer le port d&rsquo;écoute d&rsquo;<code>sshd</code>.
<p>Jai un Mac avec Snow Leopard<small>&copy;</small> à la maison.
Il ne suffit pas de modifier le fichier <code>/etc/sshd.config</code> pour changer le port découte d<code>sshd</code>.
Le système utilise <code>launchd</code> pour lancer les démons.</p>
<p>J&rsquo;ai posé cette question sur <a href="discussions.apple.com">Apple Discussions</a> dans ce <a href="http://discussions.apple.com/thread.jspa?messageID=10141032">fil de discussion</a>.
Merci à tous ceux qui m&rsquo;ont aidé. Et la solution est&nbsp;:</p>
<p>Jai posé cette question sur <a href="discussions.apple.com">Apple Discussions</a> dans ce <a href="http://discussions.apple.com/thread.jspa?messageID=10141032">fil de discussion</a>.
Merci à tous ceux qui mont aidé. Et la solution est&nbsp;:</p>
<p>Créer un fichier <tt>/Library/LaunchDaemons/ssh-443.plist</tt> contenant&nbsp;:</p>
@ -122,14 +122,14 @@ Merci à tous ceux qui m&rsquo;ont aidé. Et la solution est&nbsp;:</p>
</div></div>
</div>
<p>C&rsquo;est une copie de <code>/System/Library/LaunchDaemons/ssh.plist</code> avec quelques modifications&nbsp;:</p>
<p>Cest une copie de <code>/System/Library/LaunchDaemons/ssh.plist</code> avec quelques modifications&nbsp;:</p>
<ul>
<li>le <code>SockServiceName</code> est devenu <code>https</code> au lieu de <code>ssh</code></li>
<li>le <code>Label</code> est passé de <code>com.openssh.sshd</code> à quelque chose qui n&rsquo;existait pas comme <code>local.sshd</code></li>
<li>le <code>Label</code> est passé de <code>com.openssh.sshd</code> à quelque chose qui nexistait pas comme <code>local.sshd</code></li>
</ul>
<p>Encore une fois j&rsquo;espère que ça a pu être utile.</p>
<p>Encore une fois jespère que ça a pu être utile.</p>
</div>

View file

@ -54,13 +54,13 @@
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<p>J&rsquo;ai arrété d&rsquo;utiliser <a href="http://whos.amung.us">whos.amung.us</a> en faveur de <a href="http://www.google.com/analytics">Google Analytics</a>.</p>
<p>Jai arrété dutiliser <a href="http://whos.amung.us">whos.amung.us</a> en faveur de <a href="http://www.google.com/analytics">Google Analytics</a>.</p>
<p>La plupart du temps je préfère ne pas utiliser le même produit que tout le monde. J&rsquo;aime bien essayer des choses un peu nouvelles. Mais whosamung.us avait trop de publicités. Je devais affichier une de leur image sur mon site qui n&rsquo;écrivait que le nombre de personne actuellement présentes. Pas les nombres de visites.</p>
<p>La plupart du temps je préfère ne pas utiliser le même produit que tout le monde. Jaime bien essayer des choses un peu nouvelles. Mais whosamung.us avait trop de publicités. Je devais affichier une de leur image sur mon site qui nécrivait que le nombre de personne actuellement présentes. Pas les nombres de visites.</p>
<p>C&rsquo;est pourquoi j&rsquo;utilise maintenant google analytics. Le problème reste entier pour les navigateurs sans javascript.</p>
<p>Cest pourquoi jutilise maintenant google analytics. Le problème reste entier pour les navigateurs sans javascript.</p>
<p>Donc pour l&rsquo;instant</p>
<p>Donc pour linstant</p>
<div class="encadre">
Théorème&nbsp;:<br />

Some files were not shown because too many files have changed in this diff Show more