Merge branch 'next' into test

Conflicts:
	.gitignore
This commit is contained in:
Yann Esposito (Yogsototh) 2013-01-03 16:28:34 +01:00
commit 8f500575ea
20 changed files with 1708 additions and 1315 deletions

8
.gitignore vendored
View file

@ -16,5 +16,9 @@ output/Scratch/*/*/*/index.html
output/Scratch/*/*/*/*/index.html output/Scratch/*/*/*/*/index.html
output/Scratch/*/*/*/*/*/index.html output/Scratch/*/*/*/*/*/index.html
output/Scratch/*/*/*/*/*/*/index.html output/Scratch/*/*/*/*/*/*/index.html
output/Scratch/assets/**/* output/Scratch/assets/css/*.css
crash.log output/Scratch/*/graph
output/Scratch/*/*/graph
output/Scratch/*/*/*/graph
output/Scratch/*/*/*/*/graph
output/Scratch/*/*/*/*/*/graph

View file

@ -13,7 +13,8 @@ What you'll need to use it:
- [nanoc](nanoc.stoneship.org) → `gem install nanoc` - [nanoc](nanoc.stoneship.org) → `gem install nanoc`
- [zsh](zsh.org) → Installed by default on most good system - [zsh](zsh.org) → Installed by default on most good system
- A bunch of gems: `gem install ultraviolet krambook sass rainpress` - A bunch of gems: `gem install kramdown builder sass rainpress`
- Optionally if you want to serve locally: `gem install unicorn rack rack-contrib rack-rewrite mime-types`
Optionally Optionally

5
Rules
View file

@ -51,14 +51,13 @@ compile '/html/*' do
elsif ext == 'haml' || ext.nil? elsif ext == 'haml' || ext.nil?
filter :haml filter :haml
elsif ext == 'md' || ext == 'markdown' elsif ext == 'md' || ext == 'markdown'
filter :ultraviolet # must be before kramdown filter :code
filter :graph filter :graph
filter :description filter :description
filter :falacy filter :falacy
filter :blogimage filter :blogimage
filter :erb # I'll try not to use ruby anymore inside content filter :erb # I should try to remove all erb code inside markdown
filter :kramdown filter :kramdown
# filter :math_repair # after kramdown
filter :fix_img filter :fix_img
else else
raise "Filter is not configured for #{item.identifier} in Rules file." raise "Filter is not configured for #{item.identifier} in Rules file."

View file

@ -1,3 +1,6 @@
-----
-----
@font-face @font-face
font-family: 'cmuntt' font-family: 'cmuntt'
src: url('fonts/cmuntt.eot') src: url('fonts/cmuntt.eot')

View file

@ -19,244 +19,224 @@ $blue : #268bd2
$cyan : #2aa198 $cyan : #2aa198
$green : #859900 $green : #859900
/* $backtext: #FAFAFC */ $unit: 16px
$backtext: $base3 + #151515 $lineheight: $unit * 1.5
$fronttext: $base02 $hmargin: 4*$unit
$hightext: $base03
$borderColor: $base2
$altback: $base3
@import url(/Scratch/assets/css/cmufontface.css) html
/* General */
body
font-family: 'Futura', serif
font-size: 20px
color: $base3
background: $base02
a, a:link, a:visited, a:active, a:hover
color: $hightext
text-decoration: none
outline: none
a:hover
color: $orange
hr
color: $borderColor
border:
top: 1px solid $borderColor
bottom: none
left: none
right: none
ul
list-style: none
padding-left: 0
margin-left: 1.5ex
text-indent: -1.5ex
ol
padding-left: 0
ul li:before
content: "- "
ol li ul, ol li ol, ul li ol, ul li ul
margin: .5em 1.5em
list-style: none
/* fix for possible markdown issues */
li p, ol p
display: inline
padding: 0 padding: 0
table tr
&:nth-child(odd)
background-color: $altback
table
border:
top: solid 2px $borderColor
bottom: solid 2px $borderColor
body body
text-rendering: optimizelegibility padding: 0
line-height: 1.5em margin: 0
body
h1, h2, h3, h4, h5, h6 font-family: Helvetica, sans-serif !important
color: $hightext font-size: $unit
line-height: 1.1em line-height: $lineheight
padding-left: 30px background: $base2
/* Header Numbering */
.article #afterheader
counter-reset: niv02
h2
counter-increment: niv02
counter-reset: niv03
marker-offset: 3em
&:before
content: counter(niv02) ". "
h3
counter-increment: niv03
counter-reset: niv04
&:before
content: counter(niv02) "." counter(niv03) ". "
h4
counter-increment: niv04
&:before
content: counter(niv02) "." counter(niv03) "." counter(niv04) ". "
p, ul, ol, h1, h2, h3, h4
margin-bottom: 30px
padding: 0 30px
text-align: justify
pre
line-height: 1.1em
margin-bottom: 30px
padding: 30px
overflow: auto
background: $base3
font-size: 18px
=sc
text-transform: uppercase
font-size: 0.8em
abbr, acronym
+sc
text:
decoration: none
border:
bottom:
width: 0
// -- TYPOGRAPHY --
.small
font-size: 0.8em
.sc
+sc
.clear,.flush
clear: both
.impact, .darkimpact
font-size: 2em
margin: 0 auto 1em auto
line-height: 1.3em
figure
margin: 3em 0
img
box-shadow: 0 10px 15px #CCC inset
figcaption
text-align: center
margin: .5em 0
figure.left, figure.right
max-width: 30%
/* Specific */
#afterheader
color: $base01 color: $base01
background-color: $backtext
.intro, .resume, blockquote a
font-style: italic text-decoration: none
padding: 0.5em 1em
a:hover
color: $orange
i, em
font-style: normal
strong, b
font-weight: normal
.intro, .resume
font-size: 0.9em
blockquote
border: solid 1px $borderColor
background-color: $altback
pre, pre code
background-color: $base2
pre
border: solid 1px rgba(0,0,0,0.1)
ul
padding-left: 1.5em
section.slide
border-color: $borderColor
border: solid 1px
margin-bottom: 1em
padding: .5em
font-family: sans-serif
font-size: .8em
.base03
color: $base03
.base02
color: $base02 color: $base02
.base01 a:visited
color: $base01
.base00
color: $base00 color: $base00
.base0
color: $base0
.base1
color: $base1
.base2
color: $base2
.base3
color: $base3
.yellow
color: $yellow
.orange
color: $orange
.red
color: $red
.magenta
color: $magenta
.violet
color: $violet
.blue
color: $blue
.cyan
color: $cyan
.green
color: $green
/* Black page */
#blackpage
font-family: sans-serif
font-style: italic
padding-top: 8em
z-index: 9000
cursor: wait
img
background: none
border: none
max-width: 80%
margin: 0 auto
a
cursor: pointer
.cut #blackpage, #nojsredirect
font-size: .8em top: 0
text-align: right left: 0
display: inline-block
width: 100% width: 100%
opacity: 0.3 min-height: 100%
margin-left: 0
margin-right: 0
margin-top: 0
margin-bottom: 0
position: absolute
text-align: center
background: $base3
.cut:hover #content
opacity: 1 width: 37*$unit + 2*$hmargin
/* Layout */
#afterheader
width: 35em
margin: 0 auto margin: 0 auto
padding: 0
background: $base3 + #111111
color: $base01
h1,h2,h3,h4,h5,h6
color: $base02
padding: 0 $hmargin
margin: $unit 0
figure
margin: 0
padding: 0
figcaption
padding: 0 $hmargin
margin: $unit 0
p
padding: 0 $hmargin
margin: $unit 0
img img
width: 100% width: 100%
img.left, img.right pre
width: 30% background: $base3
font-family: monaco, monospace
overflow: auto
padding: $unit
line-height: $unit + 2px
border-top: solid 1px $base2
border-bottom: solid 1px $base2
pre code
background: $base3
ul
list-style: none
ul li:before
content: "- "
ul
padding-left: 0
margin: $unit $hmargin
// width of '-'
text-indent: -($unit/2)
ol
padding-left: 0
margin: $unit $hmargin
.toc
ol li, ul li
margin: ($unit/2) 0
ol li ul, ol li ol, ul li ol, ul li ul
margin: ($unit/2) (3*$unit/2)
list-style: none
li p
display: inline
margin: 0
padding: 0
#entete > #choix > #choixrss
margin: 0
padding: 0
#entete > #choix > #choixlang
float: left
#choix
font-size: (3*$unit / 4)
padding: 0 $unit
.return
float: right
.cut
font-size: (3*$unit / 4)
opacity: .5
.cut:hover
opacity: 1
hr
color: $base2
border-color: $base2
margin: 0 ($unit / 4)
p code, li code
padding: 1px 2px
background: $base3
border: solid 1px $base2
blockquote
border: solid 1px $base2
background: $base3
code
background: $base2
border: solid 1px rgba(0,0,0,0.1)
// Specific elements
#social,#choixrss,#comment
margin: $unit $hmargin
#social
float: left
opacity: 0.3
&:hover
opacity: 1
#choixrss
float: right
opacity: 0.3
&:hover
opacity: 1
#comment
img
width: auto
max-width: 100%
.intro
font-size: 14px
line-height: 21px
color: $base02
.left
float: left
.right
float: right
.flush
clear: both
#bottom
padding: $unit 0
background: $base2
text-align: center
font-size: 14px
line-height: 21px
#entete
padding: $unit 0
background: $base2
text-align: center
ul
text-indent: 0
ul li:before
content: ""
ul li
display: inline-block
span.active
color: $yellow
ul li > *
padding: 2px $unit
border: solid
#previous_articles
float: left
text-align: left
#next_articles
float: right
text-align: right
.corps
padding-bottom: 2*$unit
#tagcloud
margin: $unit $hmargin
font-size: 14px
line-height: 21px
#sousliens.archive > ul
display: none
#sousliens.archive > h4:hover
cursor: pointer
#hiddenDivs > div
display: none
.list
margin: $unit $hmargin
#content img#mainlogo
width: auto
margin: 0 auto
display: block
max-width: 100%
.date, .day, .month, .year
display: inline-block
padding-left: 10px
text-align: right
.day
width: 10px
.month
width: 20px
.year
width: 30px
.date
margin-right: 10px
.popularblock
display: block
float: left
margin: 1.5%
width: 30%
figure
width: 100%
height: 120px
overflow: hidden
figcaption
display: none

196
lib/graph.mp Normal file
View file

@ -0,0 +1,196 @@
% solarized color scheme
color baseZeroThree, baseZeroTwo, baseZeroOne, baseZeroZero
, baseZero, baseOne, baseTwo, baseThree, yellow, orange
, red, magenta, violet, blue, cyan, green;
baseZeroThree :=(0.0 ,0.168627450980392,0.211764705882353);
baseZeroTwo :=(0.0274509803921569,0.211764705882353,0.258823529411765);
baseZeroOne :=(0.345098039215686 ,0.431372549019608,0.458823529411765);
baseZeroZero :=(0.396078431372549 ,0.482352941176471,0.513725490196078);
baseZero :=(0.513725490196078 ,0.580392156862745,0.588235294117647);
baseOne :=(0.576470588235294 ,0.631372549019608,0.631372549019608);
baseTwo :=(0.933333333333333 ,0.909803921568627,0.835294117647059);
baseThree :=(0.992156862745098 ,0.964705882352941,0.890196078431372);
yellow :=(0.709803921568627 ,0.537254901960784,0.0);
orange :=(0.796078431372549 ,0.294117647058824,0.0862745098039216);
red :=(0.862745098039216 ,0.196078431372549,0.184313725490196);
magenta :=(0.827450980392157 ,0.211764705882353,0.509803921568627);
violet :=(0.423529411764706 ,0.443137254901961,0.768627450980392);
blue :=(0.149019607843137 ,0.545098039215686,0.823529411764706);
cyan :=(0.164705882352941 ,0.631372549019608,0.596078431372549);
green :=(0.52156862745098 ,0.6 ,0.0);
vardef shorten(expr p,d) =
path q,bcirc,ecirc;
bcirc := fullcircle scaled d shifted point 0 of p;
ecirc := fullcircle scaled d shifted point length(p) of p;
q := p cutbefore bcirc cutafter ecirc;
q
enddef;
%%%%%%%%%%%%%%%%%%%%
% Automata drawing %
%%%%%%%%%%%%%%%%%%%%
u:=.5cm; % unity
gu:=5u; % distance between states
% -- Generic private functions
% return the edge between points A and B.
% out angle from A is inan
% in angle to B is outan
% nodesize is the size of the node
vardef _edgeFullParam(expr posA,posB,inan,outan,nodesize) =
path sub;
if (posA = posB):
pair ba,ea,b;
path circ,p;
b :=posA shifted (0,nodesize);
p:=posA{1,1}..b..{1,-1}cycle;
circ:= fullcircle scaled nodesize shifted posA;
ba = circ intersectionpoint (subpath (0,1) of p);
ea = circ intersectionpoint (subpath (1,2) of p);
sub:= ba{1,1}..b..{1,-1}ea;
else:
path s; s := posA {dir inan} .. {dir outan} posB ;
pair bA;
pair bA; bA = (fullcircle scaled nodesize shifted posA) intersectionpoint s;
pair eB; eB = (fullcircle scaled nodesize shifted posB) intersectionpoint s;
sub := bA {dir inan} .. {dir outan} eB ;
fi
sub
enddef;
% return a picture of the label l for edge e
vardef _edgelabel(expr e,l) =
picture ret;
pair mid;
mid := point 1/2length(e) of e;
numeric an;
an := angle (direction 1/2length(e) of e);
picture lab;
pair height,width;
lab:=thelabel(l,origin);
height:=(0,ypart (ulcorner l - llcorner l));
width:=(ypart (urcorner l - ulcorner l),0);
if (an>-35) and (an<35):
ret:=lab shifted height rotated an shifted mid;
elseif (an>145) or (an<-145):
ret:=thelabel(l,origin) shifted height rotated (an+180) shifted mid;
elseif (an>75) and (an<120):
ret:=lab shifted mid shifted -width;
elseif (an>-120) and (an<-75):
ret:=lab shifted mid shifted width;
else:
ret:=lab shifted mid shifted height;
fi;
ret
enddef;
% draw an edge
def _drawEdgeFullParam(expr posA,posB,l,inan,outan,nodesize) =
path sub;
picture lab;
sub := _edgeFullParam(posA,posB,inan,outan,nodesize);
drawarrow sub;
draw _edgelabel(sub,l);
enddef;
% --- LABELED GRAPHS ---
% return the edge between points A and B.
% out angle from A is inan
vardef edgeAngle(expr posA,posB,an) =
path sub;
sub := _edgeFullParam(posA,posB,an,-an,1.2u);
sub
enddef;
% return the direct edge between A and B
vardef edge(expr posA,posB) =
numeric an;
an := angle(posB-posA);
path sub;
sub := _edgeFullParam(posA,posB,an,an,1.2u);
sub
enddef;
% --- UNLABELED GRAPHS ---
% return the edge between points A and B.
% out angle from A is inan
vardef nl_edgeAngle(expr posA,posB,an) =
path sub;
sub := _edgeFullParam(posA,posB,an,-an,6);
sub
enddef;
% return the direct edge between A and B
vardef nl_edge(expr posA,posB) =
numeric an;
an := angle(posB-posA);
path sub;
sub := _edgeFullParam(posA,posB,an,an,6);
sub
enddef;
def drawloop(expr a,b,l) =
pair ba,ea;
path circ,p,s;
p:=a{1,1}..b..{1,-1}cycle;
circ:= fullcircle scaled 6 shifted a;
ba = circ intersectionpoint (subpath (0,1) of p);
ea = circ intersectionpoint (subpath (1,2) of p);
s:= ba{1,1}..b..{1,-1}ea;
drawarrow s;
label.top(l,b);
enddef;
def drawLoop(expr a,l) =
pair b; b:=a shifted (0,u);
pair ba,ea;
path circ,p,s;
p:=a{1,1}..b..{1,-1}cycle;
circ:= fullcircle scaled 1.2u shifted a;
ba = circ intersectionpoint (subpath (0,1) of p);
ea = circ intersectionpoint (subpath (1,2) of p);
s:= ba{1,1}..b..{1,-1}ea;
drawarrow s;
label.top(l,b);
enddef;
def drawstate(expr pos) =
draw pos withpen pencircle scaled 4bp;
enddef;
def drawedgeWithDoubleAngle(expr posA,posB,l,inan,outan) =
_drawEdgeFullParam(posA,posB,l,inan,outan,6);
enddef;
def drawedgeangle(expr posA,posB,l,an) =
_drawEdgeFullParam(posA,posB,l,an,-an,6);
enddef;
def drawedge(expr posA,posB,l) =
numeric an;
an=angle(posB-posA);
_drawEdgeFullParam(posA,posB,l,an,an,6);
enddef;
def drawState(expr pos,l) =
label(l,pos);
draw fullcircle scaled u shifted pos;
enddef;
def drawEdgeWithDoubleAngle(expr posA,posB,l,inan,outan) =
_drawEdgeFullParam(posA,posB,l,inan,outan,1.2u);
enddef;
def drawEdgeWithAngle(expr posA,posB,l,an) =
drawEdgeWithDoubleAngle(posA,posB,l,an,-an);
enddef;
def drawEdge(expr posA,posB,l) =
numeric an;
if (posA = posB):
an := 0;
else:
an=angle(posB-posA);
fi
drawEdgeWithDoubleAngle(posA,posB,l,an,an);
enddef;
prologues:=3;

View file

@ -1,6 +1,41 @@
class Graph < Nanoc3::Filter class Graph < Nanoc3::Filter
identifier :graph identifier :graph
@@tmpfic="/tmp/graphtemp.dot" @@tmpfic="/tmp/graphtemp.dot"
def solarized(str)
str.gsub(
%r{color="base03"},'color="#002b36"'
).gsub(
%r{color="base02"},'color="#073642"'
).gsub(
%r{color="base01"},'color="#586e75"'
).gsub(
%r{color="base00"},'color="#657b83"'
).gsub(
%r{color="base0"},'color="#839496"'
).gsub(
%r{color="base1"},'color="#93a1a1"'
).gsub(
%r{color="base2"},'color="#eee8d5"'
).gsub(
%r{color="base3"},'color="#fdf6e3"'
).gsub(
%r{color="yellow"},'color="#b58900"'
).gsub(
%r{color="orange"},'color="#cb4b16"'
).gsub(
%r{color="red"},'color="#dc322f"'
).gsub(
%r{color="magenta"},'color="#d33682"'
).gsub(
%r{color="violet"},'color="#6c71c4"'
).gsub(
%r{color="blue"},'color="#268bd2"'
).gsub(
%r{color="cyan"},'color="#2aa198"'
).gsub(
%r{color="green"},'color="#859900"'
)
end
def run(content, params={}) def run(content, params={})
content.gsub(%r{<graph( title="([^"]*)")?>(.+?)</graph>}m) do |full| content.gsub(%r{<graph( title="([^"]*)")?>(.+?)</graph>}m) do |full|
# FileUtils.rm(@@tmpfic) # FileUtils.rm(@@tmpfic)
@ -11,19 +46,24 @@ class Graph < Nanoc3::Filter
f.write %[ digraph Source { f.write %[ digraph Source {
fontsize=10; fontsize=10;
rankdir="LR"; rankdir="LR";
graph [truecolor bgcolor="#FAFAFA00"]; graph [truecolor bgcolor="#fafafc"];
node [width=0, height=0, fontname="Optima Bold", shape="box", color="#333333", style="filled" fillcolor="#FAFAFA", fontcolor="#333333"] ; node [width=0, height=0, fontname="CMU Serif Italic", shape="circle", color="#657b83", style="filled" fillcolor="#fafafc", fontcolor="#657b83"] ;
edge [arrowsize=.5, color="#333333"] ; ] edge [fontname="CMU Serif Italic", arrowsize=.5, color="#657b83",fontcolor="#657b83"] ; ]
f.write str f.write solarized(str)
f.write %[}] f.write %[}]
end end
FileUtils.mkdir_p('output'+@item.path+'graph') FileUtils.mkdir_p('output'+@item.path+'graph')
webpath=@item.path + 'graph/' + filename + '.png' webpath=@item.path + 'graph/' + filename + '.png'
path='output'+webpath path='output'+webpath
# puts "dot -Tpng -o #{path} /tmp/graphtemp.dot" if str.match(/pos=/)
system("dot -Tpng -o #{path} /tmp/graphtemp.dot") prog="neato"
else
prog="dot"
end
# puts "#{prog} -Tpng -o #{path} /tmp/graphtemp.dot"
system("#{prog} -Tpng -o #{path} /tmp/graphtemp.dot")
# puts %{<img alt="#{title}" src="#{webpath}"/>} # puts %{<img alt="#{title}" src="#{webpath}"/>}
%{<img alt="#{title}" src="#{webpath}"/>} %{<figure><img alt="#{title}" src="#{webpath}"/><figcaption>#{title}</figcaption></figure>}
end end
end end
end end

66
lib/mpost.rb Normal file
View file

@ -0,0 +1,66 @@
class MPost < Nanoc3::Filter
identifier :mpost
@@tmp="/tmp/mp/"
@@name=["Zero","One","Two","Three"]
def solarized(str)
str.gsub(
%r{base0([0123])},'base'+@@name[0]+@@name[$1.to_i]
).gsub(
%r{base([0123])},'base'+@@name[$1.to_i]
).gsub(
%{red},'s_red'
).gsub(
%{blue},'s_blue'
).gsub(
%{green},'s_green'
)
end
def run(content, params={})
content.gsub(%r{<mpost( title="([^"]*)")?>(.+?)</mpost>}m) do |full|
title=$2
str=$3
filename=title.gsub(/[^a-zA-Z0-9_]/,"_")
# write the mp file using the code
code=File.read('lib/graph.mp')
code<<=%{beginfig(1)
drawoptions (withcolor base01);}
code <<= str
code <<= %{\nendfig;\nbye;\n}
# create the directory to compile metapost files
FileUtils.mkdir_p(@@tmp)
# write the code into a temporary file
File.open(@@tmp+filename+'.mp','w') do |f|
f.write solarized(code)
end
# write the URL of the image
imgurl=@item.path + 'mpost/' + filename + '.png'
# We compile only if the source changed
if not (File.exists?(@@tmp+filename+'.old') and
FileUtils.cmp(@@tmp+filename+'.mp', @@tmp+filename+'.old'))
then
print %{\t[mpost] updating: #{filename}}
fspath=FileUtils.pwd+'/output'+imgurl
# create the directory for the output file
FileUtils.mkdir_p(File.dirname(fspath))
# Launch the metapost compilation and update
# the cache in case of success
cmd="cd #{@@tmp} && mpost #{filename}.mp >/dev/null 2>&1 && convert -density 180 #{filename}.1 #{fspath} >/dev/null"
if system(cmd)
if FileUtils.copy(@@tmp+filename+'.mp',@@tmp+filename+'.old')
puts " [SUCCESS]"
else
puts " [ERROR: couldn't copy]"
end
else
puts " [ERROR: compilation error; check #{@@tmp}#{filename}.log ]"
end
end
# replace the code by the image
%{<figure><img alt="#{title}" src="#{imgurl}"/><figcaption>#{title}</figcaption></figure>}
end
end
end

View file

@ -1,7 +1,7 @@
class UltraVioletFilter < Nanoc3::Filter class UltraVioletFilter < Nanoc3::Filter
identifier :ultraviolet identifier :code
def protect(str) def protect(str)
str.gsub(%r{<([^>]*)>}) do str.gsub(%r{<([^>]*)>}) do
"&lt;#{$1}&gt;" "&lt;#{$1}&gt;"
end end
@ -33,4 +33,4 @@ class UltraVioletFilter < Nanoc3::Filter
FileUtils.mkdir_p code_path FileUtils.mkdir_p code_path
File.open(%{#{code_path}/#{@filename}}, 'w'){|f|f.write(@code)} File.open(%{#{code_path}/#{@filename}}, 'w'){|f|f.write(@code)}
end end
end end

View file

@ -1 +0,0 @@
pre,code,a.cut{font-family:"cmuntt",Incosolata,Monaco,monospace}body{font-family:"ComputerModern",Georgia,Palatino,"Century Schoolbook L","Times New Roman",Times,serif}

View file

@ -1 +0,0 @@
*{transition-property:all;transition-duration:.5s;-moz-transition-property:all;-moz-transition-duration:.5s;-webkit-transition-property:all;-webkit-transition-duration:.5s;-o-transition-property:all;-o-transition-duration:.5s}#social *,#comment *{transition-property:all;transition-duration:0s;-moz-transition-property:all;-moz-transition-duration:0s;-webkit-transition-property:all;-webkit-transition-duration:0s;-o-transition-property:all;-o-transition-duration:0s}

File diff suppressed because one or more lines are too long

View file

@ -48,7 +48,7 @@
<div class="flush"></div> <div class="flush"></div>
<div id="afterheader"> <div id="afterheader">
<div class="corps"> <div class="corps">
<p><img alt="The B in Benoît B. Mandelbrot stand for Benoît B. Mandelbrot" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/BenoitBMandelbrot.jpg" /></p> <img alt="The B in Benoît B. Mandelbrot stand for Benoît B. Mandelbrot" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/BenoitBMandelbrot.jpg" />
<div class="intro"> <div class="intro">
@ -67,7 +67,7 @@ Imperative language could also benefit from this functional organization.</p>
<ul id="markdown-toc"> <ul id="markdown-toc">
<li><a href="#introduction">Introduction</a></li> <li><a href="#introduction">Introduction</a></li>
<li><a href="#first-version">First version</a> <ul> <li><a href="#first-version">First version</a> <ul>
<li><a href="#lets-play-the-song-of-our-people">Let&rsquo;s play the song of our people</a></li> <li><a href="#lets-play-the-song-of-our-people">Let&#8217;s play the song of our people</a></li>
<li><a href="#let-us-start">Let us start</a></li> <li><a href="#let-us-start">Let us start</a></li>
</ul> </ul>
</li> </li>
@ -138,7 +138,7 @@ and something nice to see in 3D.</p>
<p>And you can see the intermediate steps to reach this goal:</p> <p>And you can see the intermediate steps to reach this goal:</p>
<p><img alt="The parts of the article" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/HGL_Plan.png" /></p> <img alt="The parts of the article" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/HGL_Plan.png" />
<p>From the 2<sup>nd</sup> section to the 4<sup>th</sup> it will be <em>dirtier</em> and <em>dirtier</em>. <p>From the 2<sup>nd</sup> section to the 4<sup>th</sup> it will be <em>dirtier</em> and <em>dirtier</em>.
We start cleaning the code at the 5<sup>th</sup> section.</p> We start cleaning the code at the 5<sup>th</sup> section.</p>
@ -152,7 +152,7 @@ We start cleaning the code at the 5<sup>th</sup> section.</p>
The first being mostly some boilerplate<sup id="fnref:011"><a href="#fn:011" rel="footnote">2</a></sup>. The first being mostly some boilerplate<sup id="fnref:011"><a href="#fn:011" rel="footnote">2</a></sup>.
And the second part more focused on OpenGL and content.</p> And the second part more focused on OpenGL and content.</p>
<h3 id="lets-play-the-song-of-our-people">Let&rsquo;s play the song of our people</h3> <h3 id="lets-play-the-song-of-our-people">Let&#8217;s play the song of our people</h3>
<div class="codehighlight"> <div class="codehighlight">
@ -381,20 +381,20 @@ f c z n = if (magnitude z &gt; 2 )
<p>Well, if you download this file (look at the bottom of this section), compile it and run it this is the result:</p> <p>Well, if you download this file (look at the bottom of this section), compile it and run it this is the result:</p>
<p><img alt="The mandelbrot set version 1" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/hglmandel_v01.png" /></p> <img alt="The mandelbrot set version 1" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/hglmandel_v01.png" />
<p>A first very interesting property of this program is that the computation for all the points is done only once. <p>A first very interesting property of this program is that the computation for all the points is done only once.
It is a bit long before the first image appears, but if you resize the window, it updates instantaneously. It is a bit long before the first image appears, but if you resize the window, it updates instantaneously.
This property is a direct consequence of purity. This property is a direct consequence of purity.
If you look closely, you see that <code>allPoints</code> is a pure list. If you look closely, you see that <code>allPoints</code> is a pure list.
Therefore, calling <code>allPoints</code> will always render the same result and Haskell is clever enough to use this property. Therefore, calling <code>allPoints</code> will always render the same result and Haskell is clever enough to use this property.
While Haskell doesn&rsquo;t garbage collect <code>allPoints</code> the result is reused for free. While Haskell doesn&#8217;t garbage collect <code>allPoints</code> the result is reused for free.
We did not specified this value should be saved for later use. We did not specified this value should be saved for later use.
It is saved for us.</p> It is saved for us.</p>
<p>See what occurs if we make the window bigger:</p> <p>See what occurs if we make the window bigger:</p>
<p><img alt="The mandelbrot too wide, black lines and columns" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/hglmandel_v01_too_wide.png" /></p> <img alt="The mandelbrot too wide, black lines and columns" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/hglmandel_v01_too_wide.png" />
<p>We see some black lines because we have drawn less point than there is on the surface. <p>We see some black lines because we have drawn less point than there is on the surface.
We can repair this by drawing little squares instead of just points. We can repair this by drawing little squares instead of just points.
@ -565,7 +565,7 @@ maxZeroIndex func minval maxval n =
<p>No rocket science here. See the result now:</p> <p>No rocket science here. See the result now:</p>
<p><img alt="The edges of the mandelbrot set" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/HGLMandelEdges.png" /></p> <img alt="The edges of the mandelbrot set" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/HGLMandelEdges.png" />
<div style="display:none"> <div style="display:none">
@ -626,7 +626,7 @@ instead of using a 3D projection of quaternions.
I am pretty sure this construction is not useful for numbers. I am pretty sure this construction is not useful for numbers.
But it will be enough for us to create something that look nice.</p> But it will be enough for us to create something that look nice.</p>
<p>This section is quite long, but don&rsquo;t be afraid, <p>This section is quite long, but don&#8217;t be afraid,
most of the code is some OpenGL boilerplate. most of the code is some OpenGL boilerplate.
If you just want to skim this section, If you just want to skim this section,
here is a high level representation:</p> here is a high level representation:</p>
@ -642,7 +642,7 @@ here is a high level representation:</p>
<p>Drawing: </p> <p>Drawing: </p>
<ul> <ul>
<li>set doubleBuffer, handle depth, window size&hellip;</li> <li>set doubleBuffer, handle depth, window size&#8230;</li>
<li>Use state to apply some transformations</li> <li>Use state to apply some transformations</li>
</ul> </ul>
</li> </li>
@ -898,7 +898,7 @@ Mainly there are two parts: apply some transformations, draw the object.</p>
<h3 id="the-3d-mandelbrot">The 3D Mandelbrot</h3> <h3 id="the-3d-mandelbrot">The 3D Mandelbrot</h3>
<p>We have finished with the OpenGL section, let&rsquo;s talk about how we <p>We have finished with the OpenGL section, let&#8217;s talk about how we
generate the 3D points and colors. generate the 3D points and colors.
First, we will set the number of details to 200 pixels in the three dimensions.</p> First, we will set the number of details to 200 pixels in the three dimensions.</p>
@ -938,7 +938,7 @@ Each three successive point representing the coordinate of each vertex of a tria
<p>In fact, we will provide six ordered points. <p>In fact, we will provide six ordered points.
These points will be used to draw two triangles.</p> These points will be used to draw two triangles.</p>
<p><img alt="Explain triangles" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/triangles.png" /></p> <img alt="Explain triangles" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/triangles.png" />
<p>The next function is a bit long. <p>The next function is a bit long.
Here is an approximative English version:</p> Here is an approximative English version:</p>
@ -1012,7 +1012,7 @@ depthPoints = do
<p>If you prefer the first version, then just imagine how hard it will be to change the enumeration of the point from (x,y) to (x,z) for example.</p> <p>If you prefer the first version, then just imagine how hard it will be to change the enumeration of the point from (x,y) to (x,z) for example.</p>
<p>Also, we didn&rsquo;t searched for negative values. <p>Also, we didn&#8217;t searched for negative values.
This modified Mandelbrot is no more symmetric relatively to the plan <code>y=0</code>. This modified Mandelbrot is no more symmetric relatively to the plan <code>y=0</code>.
But it is symmetric relatively to the plan <code>z=0</code>. But it is symmetric relatively to the plan <code>z=0</code>.
Then I mirror these values. </p> Then I mirror these values. </p>
@ -1110,7 +1110,7 @@ and change the type signature of <code>f</code> from <code>Complex</code> to <co
<p>Here is the result:</p> <p>Here is the result:</p>
<p><img alt="A 3D mandelbrot like" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/mandelbrot_3D.png" /></p> <img alt="A 3D mandelbrot like" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/mandelbrot_3D.png" />
<p><a href="code/03_Mandelbulb/Mandelbulb.lhs" class="cut">Download the source code of this section → 03_Mandelbulb/<strong>Mandelbulb.lhs</strong> </a></p> <p><a href="code/03_Mandelbulb/Mandelbulb.lhs" class="cut">Download the source code of this section → 03_Mandelbulb/<strong>Mandelbulb.lhs</strong> </a></p>
@ -1237,7 +1237,7 @@ ymandel x y z = mandel (2*x/width) (2*y/height) (2*z/deep) 64
</div> </div>
<p>This code is cleaner but many things doesn&rsquo;t feel right. <p>This code is cleaner but many things doesn&#8217;t feel right.
First, all the user interaction code is outside our main file. First, all the user interaction code is outside our main file.
I feel it is okay to hide the detail for the rendering. I feel it is okay to hide the detail for the rendering.
But I would have preferred to control the user actions.</p> But I would have preferred to control the user actions.</p>
@ -1271,12 +1271,12 @@ We will have two choices: </p>
</li> </li>
<li> <li>
<p>Our main problem come from user interaction. <p>Our main problem come from user interaction.
If you ask &ldquo;the Internet&rdquo;, If you ask &#8220;the Internet&#8221;,
about how to deal with user interaction with a functional paradigm, about how to deal with user interaction with a functional paradigm,
the main answer is to use <em>functional reactive programming</em> (FRP). the main answer is to use <em>functional reactive programming</em> (FRP).
I won&rsquo;t use FRP in this article. I won&#8217;t use FRP in this article.
Instead, I&rsquo;ll use a simpler while less effective way to deal with user interaction. Instead, I&#8217;ll use a simpler while less effective way to deal with user interaction.
But The method I&rsquo;ll use will be as pure and functional as possible.</p> But The method I&#8217;ll use will be as pure and functional as possible.</p>
</li> </li>
</ol> </ol>
@ -1298,7 +1298,7 @@ First, what the main loop should look like if we could make our own:</p>
<li>a function taking two parameters: time and world state and render a new world without user interaction.</li> <li>a function taking two parameters: time and world state and render a new world without user interaction.</li>
</ul> </ul>
<p>Here is a real working code, I&rsquo;ve hidden most display functions. <p>Here is a real working code, I&#8217;ve hidden most display functions.
The YGL, is a kind of framework to display 3D functions. The YGL, is a kind of framework to display 3D functions.
But it can easily be extended to many kind of representation.</p> But it can easily be extended to many kind of representation.</p>
@ -1518,7 +1518,7 @@ idleAction tnew world = world {
<p>Now the function which will generate points in 3D. <p>Now the function which will generate points in 3D.
The first parameter (<code>res</code>) is the resolution of the vertex generation. The first parameter (<code>res</code>) is the resolution of the vertex generation.
More precisely, <code>res</code> is distance between two points on one direction. More precisely, <code>res</code> is distance between two points on one direction.
We need it to &ldquo;close&rdquo; our shape.</p> We need it to &#8220;close&#8221; our shape.</p>
<p>The type <code>Function3D</code> is <code>Point -&gt; Point -&gt; Maybe Point</code>. <p>The type <code>Function3D</code> is <code>Point -&gt; Point -&gt; Maybe Point</code>.
Because we consider partial functions Because we consider partial functions
@ -1587,7 +1587,7 @@ ymandel x y z = fromIntegral (mandel x y z 64) / 64
</div> </div>
<p>I won&rsquo;t explain how the magic occurs here. <p>I won&#8217;t explain how the magic occurs here.
If you are interested, just read the file <a href="code/05_Mandelbulb/YGL.hs"><code>YGL.hs</code></a>. If you are interested, just read the file <a href="code/05_Mandelbulb/YGL.hs"><code>YGL.hs</code></a>.
It is commented a lot.</p> It is commented a lot.</p>
@ -1607,8 +1607,8 @@ It is commented a lot.</p>
<p>Our code architecture feel very clean. <p>Our code architecture feel very clean.
All the meaningful code is in our main file and all display details are All the meaningful code is in our main file and all display details are
externalized. externalized.
If you read the code of <code>YGL.hs</code>, you&rsquo;ll see I didn&rsquo;t made everything perfect. If you read the code of <code>YGL.hs</code>, you&#8217;ll see I didn&#8217;t made everything perfect.
For example, I didn&rsquo;t finished the code of the lights. For example, I didn&#8217;t finished the code of the lights.
But I believe it is a good first step and it will be easy to go further. But I believe it is a good first step and it will be easy to go further.
Unfortunately the program of the preceding session is extremely slow. Unfortunately the program of the preceding session is extremely slow.
We compute the Mandelbulb for each frame now.</p> We compute the Mandelbulb for each frame now.</p>
@ -1892,20 +1892,20 @@ ymandel x y z = fromIntegral (mandel x y z 64) / 64
<p>As we can use imperative style in a functional language, <p>As we can use imperative style in a functional language,
know you can use functional style in imperative languages. know you can use functional style in imperative languages.
This article exposed a way to organize some code in a functional way. This article exposed a way to organize some code in a functional way.
I&rsquo;d like to stress the usage of Haskell made it very simple to achieve this.</p> I&#8217;d like to stress the usage of Haskell made it very simple to achieve this.</p>
<p>Once you are used to pure functional style, <p>Once you are used to pure functional style,
it is hard not to see all advantages it offers.</p> it is hard not to see all advantages it offers.</p>
<p>The code in the two last sections is completely pure and functional. <p>The code in the two last sections is completely pure and functional.
Furthermore I don&rsquo;t use <code>GLfloat</code>, <code>Color3</code> or any other OpenGL type. Furthermore I don&#8217;t use <code>GLfloat</code>, <code>Color3</code> or any other OpenGL type.
If I want to use another library in the future, If I want to use another library in the future,
I would be able to keep all the pure code and simply update the YGL module.</p> I would be able to keep all the pure code and simply update the YGL module.</p>
<p>The <code>YGL</code> module can be seen as a &ldquo;wrapper&rdquo; around 3D display and user interaction. <p>The <code>YGL</code> module can be seen as a &#8220;wrapper&#8221; around 3D display and user interaction.
It is a clean separator between the imperative paradigm and functional paradigm.</p> It is a clean separator between the imperative paradigm and functional paradigm.</p>
<p>If you want to go further, it shouldn&rsquo;t be hard to add parallelism. <p>If you want to go further, it shouldn&#8217;t be hard to add parallelism.
This should be easy mainly because most of the visible code is pure. This should be easy mainly because most of the visible code is pure.
Such an optimization would have been harder by using directly the OpenGL library.</p> Such an optimization would have been harder by using directly the OpenGL library.</p>
@ -1915,7 +1915,7 @@ O(n².log(n)) to O(n³).</p>
<hr/><div class="footnotes"> <hr/><div class="footnotes">
<ol> <ol>
<li id="fn:001"> <li id="fn:001">
<p>Unfortunately, I couldn&rsquo;t make this program to work on my Mac. More precisely, I couldn&rsquo;t make the <a href="http://openil.sourceforge.net/">DevIL</a> library work on Mac to output the image. Yes I have done a <code>brew install libdevil</code>. But even a minimal program who simply write some <code>jpg</code> didn&rsquo;t worked. I tried both with <code>Haskell</code> and <code>C</code>.<a href="#fnref:001" rel="reference">&#8617;</a></p> <p>Unfortunately, I couldn&#8217;t make this program to work on my Mac. More precisely, I couldn&#8217;t make the <a href="http://openil.sourceforge.net/">DevIL</a> library work on Mac to output the image. Yes I have done a <code>brew install libdevil</code>. But even a minimal program who simply write some <code>jpg</code> didn&#8217;t worked. I tried both with <code>Haskell</code> and <code>C</code>.<a href="#fnref:001" rel="reference">&#8617;</a></p>
</li> </li>
<li id="fn:011"> <li id="fn:011">
<p>Generally in Haskell you need to declare a lot of import lines. <p>Generally in Haskell you need to declare a lot of import lines.
@ -2010,10 +2010,14 @@ O(n².log(n)) to O(n³).</p>
next entries next entries
<div class="next_article"> <div class="next_article">
<a href="/Scratch/en/blog/Category-Theory-Presentation/">Category Theory Presentation&nbsp;<span class="nicer">»</span></a> <a href="/Scratch/en/blog/Category-Theory-Programming/">Category Theory Programming&nbsp;<span class="nicer">»</span></a>
</div> </div>
<div class="next_article">
<a href="/Scratch/en/blog/Category-Theory-Presentation/">Category Theory Presentation&nbsp;<span class="nicer">»</span></a>
</div>
</div> </div>

View file

@ -35,6 +35,46 @@ just continue to read as a standard web page.
\(\newcommand{\F}{\mathbf{F}}\) \(\newcommand{\F}{\mathbf{F}}\)
\(\newcommand{\E}{\mathbf{E}}\) \(\newcommand{\E}{\mathbf{E}}\)
\(\newcommand{\C}{\mathc...&lt;/div&gt;&lt;/img&gt;</content> \(\newcommand{\C}{\mathc...&lt;/div&gt;&lt;/img&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2012-10-01:/Scratch/en/blog/Category-Theory-Programming/</id>
<title type="html">Category Theory Programming</title>
<published>2012-10-01T17:16:43Z</published>
<updated>2012-10-01T17:16:43Z</updated>
<author>
<name>Yann Esposito</name>
<uri>yannesposito.com</uri>
</author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Category-Theory-Programming/"/>
<content type="html">
&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; How to program using category theory.&lt;/p&gt;
&lt;blockquote&gt;
&lt;center&gt;&lt;hr style="width:30%;float:left;border-color:#CCCCD0;margin-top:1em" /&gt;&lt;span class="sc"&gt;&lt;b&gt;Table of Content&lt;/b&gt;&lt;/span&gt;&lt;hr style="width:30%;float:right;border-color:#CCCCD0;margin-top:1em" /&gt;&lt;/center&gt;
&lt;ul id="markdown-toc"&gt;
&lt;li&gt;&lt;a href="#introduction"&gt;Introduction&lt;/a&gt; &lt;ul&gt;
&lt;li&gt;&lt;a href="#programming-paradigms"&gt;Programming Paradigms&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#get-some-intuition"&gt;Get some intuition&lt;/a&gt; &lt;ul&gt;
&lt;li&gt;&lt;a href="#representation-of-category"&gt;Representation of Category&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;%TODO{Do every...&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2012-06-15:/Scratch/en/blog/Haskell-OpenGL-Mandelbrot/</id> <id>tag:yannesposito.com,2012-06-15:/Scratch/en/blog/Haskell-OpenGL-Mandelbrot/</id>
@ -46,7 +86,7 @@ just continue to read as a standard web page.
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Haskell-OpenGL-Mandelbrot/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Haskell-OpenGL-Mandelbrot/"/>
<content type="html">&lt;p&gt;&lt;img alt="The B in Beno&#238;t B. Mandelbrot stand for Beno&#238;t B. Mandelbrot" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/BenoitBMandelbrot.jpg" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="The B in Beno&#238;t B. Mandelbrot stand for Beno&#238;t B. Mandelbrot" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/BenoitBMandelbrot.jpg" /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
@ -60,7 +100,7 @@ The display details will be put in an external module playing the role of a wrap
Imperative language could also benefit from this functional organization.&lt;/p&gt; Imperative language could also benefit from this functional organization.&lt;/p&gt;
&lt;blockquote&gt; &lt;blockquote&gt;
&lt;center&gt;&lt;hr style="width:30%;float:left;border-color:#CCCCD0;margin-top:1em" /&gt;&lt;span class="sc"&gt;&lt;b&gt;Table of Content&lt;/b&gt;&lt;/span&gt;&lt;/hr&gt;&lt;/center&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/p&gt;</content> &lt;center&gt;&lt;hr style="width:30%;float:left;border-color:#CCCCD0;margin-top:1em" /&gt;&lt;span class="sc"&gt;&lt;b&gt;Table of Content&lt;/b&gt;&lt;/span&gt;&lt;/hr&gt;&lt;/center&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2012-02-08:/Scratch/en/blog/Haskell-the-Hard-Way/</id> <id>tag:yannesposito.com,2012-02-08:/Scratch/en/blog/Haskell-the-Hard-Way/</id>
@ -72,7 +112,7 @@ Imperative language could also benefit from this functional organization.&lt;/p&
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Haskell-the-Hard-Way/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Haskell-the-Hard-Way/"/>
<content type="html">&lt;p&gt;&lt;img alt="Magritte pleasure principle" src="/Scratch/img/blog/Haskell-the-Hard-Way/magritte_pleasure_principle.jpg" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Magritte pleasure principle" src="/Scratch/img/blog/Haskell-the-Hard-Way/magritte_pleasure_principle.jpg" /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
@ -86,7 +126,7 @@ Imperative language could also benefit from this functional organization.&lt;/p&
&lt;center&gt;&lt;hr style="width:30%;float:left;border-color:#CCCCD0;margin-top:1em" /&gt;&lt;span class="sc"&gt;&lt;b&gt;Table of Content&lt;/b&gt;&lt;/span&gt;&lt;hr style="width:30%;float:right;border-color:#CCCCD0;margin-top:1em" /&gt;&lt;/center&gt; &lt;center&gt;&lt;hr style="width:30%;float:left;border-color:#CCCCD0;margin-top:1em" /&gt;&lt;span class="sc"&gt;&lt;b&gt;Table of Content&lt;/b&gt;&lt;/span&gt;&lt;hr style="width:30%;float:right;border-color:#CCCCD0;margin-top:1em" /&gt;&lt;/center&gt;
&lt;/hr&gt;&lt;/center&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/p&gt;</content> &lt;/hr&gt;&lt;/center&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2012-02-02:/Scratch/en/blog/Typography-and-the-Web/</id> <id>tag:yannesposito.com,2012-02-02:/Scratch/en/blog/Typography-and-the-Web/</id>
@ -98,13 +138,13 @@ Imperative language could also benefit from this functional organization.&lt;/p&
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Typography-and-the-Web/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Typography-and-the-Web/"/>
<content type="html">&lt;p&gt;&lt;img alt="Screenshot of first in small caps with and without ligatures." src="/Scratch/img/blog/Typography-and-the-Web/first_sc_screenshot.png" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Screenshot of first in small caps with and without ligatures." src="/Scratch/img/blog/Typography-and-the-Web/first_sc_screenshot.png" /&gt;
&lt;div class="intro"&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; Web typography sucks and we&amp;rsquo;ll have to wait forever before it will be fixed.&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; Web typography sucks and we&amp;#8217;ll have to wait forever before it will be fixed.&lt;/p&gt;
&lt;/div&gt; &lt;/div&gt;
@ -119,7 +159,7 @@ We can all create better web typography ourselves, today.&#187;&lt;/p&gt;
&lt;p&gt;As somebody who tried to make my website using some nice typography features and in particular &lt;em&gt;ligatures&lt;/em&gt;, I believe this is wrong.&lt;/p&gt; &lt;p&gt;As somebody who tried to make my website using some nice typography features and in particular &lt;em&gt;ligatures&lt;/em&gt;, I believe this is wrong.&lt;/p&gt;
&lt;p&gt;I already made an automa...&lt;/p&gt;&lt;/p&gt;</content> &lt;p&gt;I already made an automatic sys...&lt;/p&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2012-01-15:/Scratch/en/blog/Yesod-tutorial-for-newbies/</id> <id>tag:yannesposito.com,2012-01-15:/Scratch/en/blog/Yesod-tutorial-for-newbies/</id>
@ -131,7 +171,7 @@ We can all create better web typography ourselves, today.&#187;&lt;/p&gt;
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Yesod-tutorial-for-newbies/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Yesod-tutorial-for-newbies/"/>
<content type="html">&lt;p&gt;&lt;img alt="Neo Flying at warp speed" src="/Scratch/img/blog/Yesod-tutorial-for-newbies/flying_neo.jpg" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Neo Flying at warp speed" src="/Scratch/img/blog/Yesod-tutorial-for-newbies/flying_neo.jpg" /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
@ -141,7 +181,7 @@ We can all create better web typography ourselves, today.&#187;&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; A simple yesod tutorial. &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 a Haskell web framework. Yesod is a Haskell web framework.
You shouldn&amp;rsquo;t need to know Haskell. &lt;/p&gt; You shouldn&amp;#8217;t need to know Haskell. &lt;/p&gt;
&lt;blockquote&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; &lt;center&gt;&lt;span class="sc"&gt;&lt;b&gt;Table of content&lt;/b&gt;&lt;/span&gt;&lt;/center&gt;
@ -154,7 +194,7 @@ You shouldn&amp;rsquo;t need to know Haskell. &lt;/p&gt;
&lt;li&gt;&lt;a href="#some-last-minute-words"&gt;Some last minute words&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#some-last-minute-words"&gt;Some last minute words&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt; &lt;/ul&gt;
&lt;/li&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;/blockquote&gt;&lt;/div&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2011-10-20:/Scratch/en/blog/SVG-and-m4-fractals/</id> <id>tag:yannesposito.com,2011-10-20:/Scratch/en/blog/SVG-and-m4-fractals/</id>
@ -166,7 +206,7 @@ You shouldn&amp;rsquo;t need to know Haskell. &lt;/p&gt;
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/SVG-and-m4-fractals/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/SVG-and-m4-fractals/"/>
<content type="html">&lt;p&gt;&lt;img alt="Yesod logo made in SVG and m4" src="/Scratch/img/blog/SVG-and-m4-fractals/main.png" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Yesod logo made in SVG and m4" src="/Scratch/img/blog/SVG-and-m4-fractals/main.png" /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
@ -183,7 +223,7 @@ Some people where so enthusiastic about &lt;span class="sc"&gt;xml&lt;/span&gt;
The idea was: the future is &lt;span class="sc"&gt;xml&lt;/span&gt;. The idea was: the future is &lt;span class="sc"&gt;xml&lt;/span&gt;.
Then some believed it would be a good idea to invent many &lt;span class="sc"&gt;xml&lt;/span&gt; compatible format and even programming languages with &lt;span class="sc"&gt;xml&lt;/span&gt; syntax.&lt;/p&gt; Then some believed it would be a good idea to invent many &lt;span class="sc"&gt;xml&lt;/span&gt; compatible format and even programming languages with &lt;span class="sc"&gt;xml&lt;/span&gt; syntax.&lt;/p&gt;
&lt;/p&gt;</content> &lt;p&gt;Happy...&lt;/p&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2011-10-04:/Scratch/en/blog/Yesod-excellent-ideas/</id> <id>tag:yannesposito.com,2011-10-04:/Scratch/en/blog/Yesod-excellent-ideas/</id>
@ -195,7 +235,7 @@ Then some believed it would be a good idea to invent many &lt;span class="sc"&gt
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Yesod-excellent-ideas/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Yesod-excellent-ideas/"/>
<content type="html">&lt;p&gt;&lt;img alt="Title image" src="/Scratch/img/blog/Yesod-excellent-ideas/main.png" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Title image" src="/Scratch/img/blog/Yesod-excellent-ideas/main.png" /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
@ -204,7 +244,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;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. &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 didn&amp;#8217;t saw in other frameworks before.&lt;/p&gt;
&lt;/div&gt; &lt;/div&gt;
@ -212,11 +252,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;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;Let&amp;#8217;s 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;img src="http://imgs.xkcd.com/comics/exploits_of_a_mom.png" alt="SQL injection by a mom" /&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 with ...&lt;/p&gt;&lt;/img&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2011-09-28:/Scratch/en/blog/Higher-order-function-in-zsh/</id> <id>tag:yannesposito.com,2011-09-28:/Scratch/en/blog/Higher-order-function-in-zsh/</id>
@ -228,7 +268,7 @@ Before telling you why you should learn Haskell and use yesod, I will talk about
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Higher-order-function-in-zsh/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Higher-order-function-in-zsh/"/>
<content type="html">&lt;p&gt;&lt;img alt="Title image" src="/Scratch/img/blog/Higher-order-function-in-zsh/main.jpg" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Title image" src="/Scratch/img/blog/Higher-order-function-in-zsh/main.jpg" /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
@ -263,7 +303,7 @@ $ mapa '$1*2' {1..3}
4 4
6 6
$ mapl 'echo result $1' $(m...&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;</content> $ mapl 'echo result $1' $(mapa '$1...&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2011-09-28:/Scratch/en/blog/programming-language-experience/</id> <id>tag:yannesposito.com,2011-09-28:/Scratch/en/blog/programming-language-experience/</id>
@ -275,7 +315,7 @@ $ mapl 'echo result $1' $(m...&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;</c
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/programming-language-experience/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/programming-language-experience/"/>
<content type="html">&lt;p&gt;&lt;img alt="Title image" src="/Scratch/img/blog/programming-language-experience/dragon.jpg" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Title image" src="/Scratch/img/blog/programming-language-experience/dragon.jpg" /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
@ -287,7 +327,7 @@ $ mapl 'echo result $1' $(m...&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;</c
&lt;h3 id="basic"&gt;&lt;code&gt;BASIC&lt;/code&gt;&lt;/h3&gt; &lt;h3 id="basic"&gt;&lt;code&gt;BASIC&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img alt="Title image" src="/Scratch/img/blog/programming-language-experience/basic.gif" class=" left" /&gt;&lt;/p&gt; &lt;img alt="Title image" src="/Scratch/img/blog/programming-language-experience/basic.gif" class=" left" /&gt;
&lt;p&gt;The language of my firsts programs! &lt;p&gt;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;. 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;.
@ -296,7 +336,7 @@ This is the language of &lt;code&gt;GOTO&lt;/code&gt;s.
Unfortunately this might be the only interesting part of this language.&lt;/p&gt; Unfortunately this might be the only interesting part of this language.&lt;/p&gt;
&lt;p&gt;Today this language is obsolescent. &lt;p&gt;Today this language is obsolescent.
It is not even good to lea...&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;</content> It is not even good to learn programming...&lt;/p&gt;&lt;/img&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2011-08-25:/Scratch/en/blog/Learn-Vim-Progressively/</id> <id>tag:yannesposito.com,2011-08-25:/Scratch/en/blog/Learn-Vim-Progressively/</id>
@ -308,7 +348,7 @@ It is not even good to lea...&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;</content>
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/"/> <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;img alt="&#220;ber leet use vim!" src="/Scratch/img/blog/Learn-Vim-Progressively/uber_leet_use_vim.jpg" /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
@ -327,10 +367,10 @@ It is not even good to lea...&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;</content>
&lt;/blockquote&gt; &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. &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 that I know of. There isn&amp;#8217;t any better text editor that I know of.
It is hard to learn, but incredible to use.&lt;/p&gt; It is hard to learn, but incredible to use.&lt;/p&gt;
&lt;p&gt;I suggest you teach yo...&lt;/p&gt;&lt;/p&gt;</content> &lt;p&gt;I suggest you teach yourself ...&lt;/p&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2011-08-17:/Scratch/en/blog/A-more-convenient-diff/</id> <id>tag:yannesposito.com,2011-08-17:/Scratch/en/blog/A-more-convenient-diff/</id>
@ -397,7 +437,7 @@ main = putStrLn $ im ...&lt;/code&gt;&lt;/pre&gt;</content>
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Password-Management/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Password-Management/"/>
<content type="html">&lt;p&gt;&lt;img alt="Title image" src="/Scratch/img/blog/Password-Management/main.png" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Title image" src="/Scratch/img/blog/Password-Management/main.png" /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
@ -413,12 +453,12 @@ 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;;-). &lt;p&gt;Disclamer, this is an unashamed attempt to make you download my iPhone app&amp;nbsp;;-).
You&amp;rsquo;re always here? You&amp;#8217;re always here?
Even if you won&amp;rsquo;t download my app, you should read more. Even if you won&amp;#8217;t download my app, you should read more.
My method doesn&amp;rsquo;t necessitate my app. My method doesn&amp;#8217;t necessitate my app.
It is both safe and easy to use everyday.&lt;/p&gt; 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> &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;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2011-04-20:/Scratch/en/blog/2011-04-20-Now-hosted-on-github/</id> <id>tag:yannesposito.com,2011-04-20:/Scratch/en/blog/2011-04-20-Now-hosted-on-github/</id>
@ -430,10 +470,10 @@ It is both safe and easy to use everyday.&lt;/p&gt;
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2011-04-20-Now-hosted-on-github/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2011-04-20-Now-hosted-on-github/"/>
<content type="html">&lt;p&gt;&lt;img alt="Title image" src="/Scratch/img/blog/2011-04-20-Now-hosted-on-github/main.png" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Title image" src="/Scratch/img/blog/2011-04-20-Now-hosted-on-github/main.png" /&gt;
&lt;p&gt;I am now hosted on github.&lt;/p&gt; &lt;p&gt;I am now hosted on github.&lt;/p&gt;
&lt;/p&gt;</content> &lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2011-01-03:/Scratch/en/blog/2011-01-03-Why-I-sadly-won-t-use-coffeescript/</id> <id>tag:yannesposito.com,2011-01-03:/Scratch/en/blog/2011-01-03-Why-I-sadly-won-t-use-coffeescript/</id>
@ -445,7 +485,7 @@ It is both safe and easy to use everyday.&lt;/p&gt;
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2011-01-03-Why-I-sadly-won-t-use-coffeescript/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2011-01-03-Why-I-sadly-won-t-use-coffeescript/"/>
<content type="html">&lt;p&gt;&lt;img alt="Title image" src="/Scratch/img/blog/2011-01-03-Why-I-sadly-won-t-use-coffeescript/main.png" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Title image" src="/Scratch/img/blog/2011-01-03-Why-I-sadly-won-t-use-coffeescript/main.png" /&gt;
&lt;div class="encadre"&gt; &lt;div class="encadre"&gt;
@ -453,7 +493,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? &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. 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: &amp;#8220;it is time to use Coffeescript as a javascript with Ruby-like syntax not a Ruby-like programming language&amp;#8221;.&lt;/p&gt;
&lt;/div&gt; &lt;/div&gt;
@ -469,7 +509,7 @@ And as Denis said: &amp;ldquo;it is time to use Coffeescript as a javascript wit
&lt;/div&gt; &lt;/div&gt;
&lt;p&gt;Recently I read &lt;/p&gt;&lt;/p&gt;</content> &lt;p&gt;Recently I read &lt;/p&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2011-01-01:/Scratch/en/blog/2011-01-03-Happy-New-Year/</id> <id>tag:yannesposito.com,2011-01-01:/Scratch/en/blog/2011-01-03-Happy-New-Year/</id>
@ -532,7 +572,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;&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 didn&amp;#8217;t had any portability consideration. This is only a &lt;em&gt;hack&lt;/em&gt;.&lt;/p&gt;
&lt;/div&gt; &lt;/div&gt;
@ -541,7 +581,7 @@ 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. &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; 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 didn&amp;#8217;t 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. 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. But in the end I was really impressed by the code I get.
It was really clean. It was really clean.
@ -557,7 +597,7 @@ This is even more impressive know...&lt;/p&gt;</content>
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-10-10-Secure-eMail-on-Mac-in-few-steps/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-10-10-Secure-eMail-on-Mac-in-few-steps/"/>
<content type="html">&lt;p&gt;&lt;img alt="Title image" src="/Scratch/img/blog/2010-10-10-Secure-eMail-on-Mac-in-few-steps/main.png" class="clean " /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Title image" src="/Scratch/img/blog/2010-10-10-Secure-eMail-on-Mac-in-few-steps/main.png" class="clean " /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
@ -578,12 +618,12 @@ This is even more impressive know...&lt;/p&gt;</content>
&lt;/div&gt; &lt;/div&gt;
&lt;p&gt;I&amp;rsquo;ve (re)discovered how to become S/MIME compliant. &lt;p&gt;I&amp;#8217;ve (re)discovered how to become S/MIME compliant.
I am now suprised how easy it was. I am now suprised how easy it was.
Some years ago it was far more difficult. Some years ago it was far more difficult.
Now I&amp;rsquo;m able to sign and encrypt my emails.&lt;/p&gt; Now I&amp;#8217;m able to sign and encrypt my emails.&lt;/p&gt;
&lt;/p&gt;</content> &lt;h2 id="why-is-it-important"&gt;Why ...&lt;/h2&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2010-10-06:/Scratch/en/blog/2010-10-06-New-Blog-Design-Constraints/</id> <id>tag:yannesposito.com,2010-10-06:/Scratch/en/blog/2010-10-06-New-Blog-Design-Constraints/</id>
@ -605,7 +645,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; Then my new design obey to the following rules:&lt;/p&gt;
&lt;ul&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 &amp;#8216;-moz&amp;#8217; or &amp;#8216;-webkit&amp;#8217;, etc&amp;#8230;,&lt;/li&gt;
&lt;li&gt;no text shadow,&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;li&gt;clean (I mean delete) most javascript.&lt;/li&gt;
&lt;/ul&gt; &lt;/ul&gt;
@ -626,7 +666,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. <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. 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. 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 wasn&amp;#8217;t 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. &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. And fortunately I can know the last date of &lt;em&gt;real&lt;/em&gt; change of a file.
@ -678,8 +718,8 @@ NSString *hex_hash = [self hex_sha1:@"some NSString to be sha1'ed"];
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-08-31-send-mail-from-command-line-with-attached-file/"/> <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. <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 was surprised it isn&amp;#8217;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 didn&amp;#8217;t 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; 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; &lt;p&gt;What Internet say (via google) is&lt;/p&gt;
@ -689,7 +729,7 @@ Just &lt;code&gt;mail&lt;/code&gt; and &lt;code&gt;mailx&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I tried it. &lt;p&gt;I tried it.
And it works almost each times. And it works almost each times.
But for my file, it didn&amp;rsquo;t worked. But for my file, it didn&amp;#8217;t 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;. 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. 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; Instead of having an attached file I saw this in my email.&lt;/p&gt;
@ -737,8 +777,42 @@ require 'rack-rewr...&lt;/code&gt;&lt;/pre&gt;</content>
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-07-09-Indecidabilities/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-07-09-Indecidabilities/"/>
<content type="html"> <content type="html">&lt;p&gt;&amp;lt;% # toremove_ %&amp;gt;&lt;/p&gt;
</content>
&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 pretend to create a world to give examples of different meanings behind the word &lt;em&gt;undecidability&lt;/em&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Undecidability due to measure errors, &lt;/li&gt;
&lt;li&gt;Big errors resulting from small initial measure error,&lt;/li&gt;
&lt;li&gt;Fractal undecidability&amp;nbsp;;&lt;/li&gt;
&lt;li&gt;Logic Undecidability.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="corps"&gt;
&lt;h1 class="first" id="the-undecidabilities"&gt;The Undecidabilities&lt;/h1&gt;
&lt;div class="intro"&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;#8217;ll pretend to be him.
I&amp;#8217;ll create a simplified world.
A world that obey to simple ma...&lt;/p&gt;&lt;/div&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2010-07-31:/Scratch/en/blog/2010-07-31-New-style-after-holidays/</id> <id>tag:yannesposito.com,2010-07-31:/Scratch/en/blog/2010-07-31-New-style-after-holidays/</id>
@ -769,7 +843,7 @@ I was inspired by Readability and iBooks&lt;small&gt;&amp;copy;&lt;/small&gt; (t
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-07-07-CSS-rendering-problems-by-navigator/"/> <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. <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 &amp;#8216;1px shadow&amp;#8217; 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; 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; &lt;ol&gt;
@ -803,7 +877,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;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;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;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;I&amp;#8217;ll give a try to Dashcode 3.&lt;/li&gt;
&lt;/ul&gt; &lt;/ul&gt;
@ -929,7 +1003,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;&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;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;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 &amp;#8216;:&amp;#8217; ...&lt;/li&gt;&lt;/ul&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2010-06-14:/Scratch/en/blog/2010-06-14-multi-language-choices/</id> <id>tag:yannesposito.com,2010-06-14:/Scratch/en/blog/2010-06-14-multi-language-choices/</id>
@ -960,12 +1034,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;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&amp;#8230;
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; 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. &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. I use &lt;em&gt;tags&lt;/em&gt; on a single file.
Finally my files...&lt;/p&gt;</content> Finally my files ...&lt;/p&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2010-05-24:/Scratch/en/blog/2010-05-24-Trees--Pragmatism-and-Formalism/</id> <id>tag:yannesposito.com,2010-05-24:/Scratch/en/blog/2010-05-24-Trees--Pragmatism-and-Formalism/</id>
@ -990,7 +1064,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;Used a pen and a sheet of paper&lt;/li&gt;
&lt;li&gt;Made some math.&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;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 shouldn&amp;#8217;t mean &amp;#8220;never use theory&amp;#8221;.&lt;/li&gt;
&lt;/ul&gt; &lt;/ul&gt;
@ -1052,14 +1126,14 @@ I entered in the...&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;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;/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 I&amp;#8217;ve always said (until now), I&amp;#8217;ll 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; 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; You&amp;#8217;ll be surprised by the results.&lt;/p&gt;
&lt;p&gt;In short: &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; &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 I&amp;#8217;ll certainly write blog post more often for a ...&lt;/p&gt;&lt;/p&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2010-03-23:/Scratch/en/blog/2010-03-23-Encapsulate-git/</id> <id>tag:yannesposito.com,2010-03-23:/Scratch/en/blog/2010-03-23-Encapsulate-git/</id>
@ -1125,7 +1199,7 @@ clientB: project adapted for client B&lt;/p&gt;
&lt;p&gt;&lt;code&gt;git clone&lt;/code&gt; can only fetch the master branch.&lt;/p&gt; &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 don&amp;#8217;t have much branches, you can simply use clone your project and then use the following command:&lt;/p&gt;
&lt;div&gt; &lt;div&gt;
@ -1173,47 +1247,4 @@ ext=File.extname(str)
</content> </content>
</entry> </entry>
<entry>
<id>tag:yannesposito.com,2010-02-18:/Scratch/en/blog/2010-02-18-split-a-file-by-keyword/</id>
<title type="html">split a file by keyword</title>
<published>2010-02-18T13:29:14Z</published>
<updated>2010-02-18T13:29:14Z</updated>
<author>
<name>Yann Esposito</name>
<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.
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&gt;&lt;code class="perl"&gt;#!/usr/bin/env awk
BEGIN{i=0;}
/UTC/ {
i+=1;
FIC=sprintf("fic.%03d",i);
}
{print $0&amp;gt;&amp;gt;FIC}
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;In my real world example, I wanted one file per day, each line containing UTC being in the following format:&lt;/p&gt;
&lt;pre class="twilight"&gt;
Mon Dec 7 10:32:30 UTC 2009
&lt;/pre&gt;
&lt;p&gt;I then finished with the following code:&lt;/p&gt;
&lt;div&gt;
&lt;pre&gt;&lt;code class="perl"&gt;#!/usr/bin/env awk
BEGIN{i=0;}
/UTC/ {
date=$1$2$3;
if ( date != olddate ) {
...&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content>
</entry>
</feed> </feed>

View file

@ -48,13 +48,13 @@
<div class="flush"></div> <div class="flush"></div>
<div id="afterheader"> <div id="afterheader">
<div class="corps"> <div class="corps">
<p><img alt="The B in Benoît B. Mandelbrot stand for Benoît B. Mandelbrot" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/BenoitBMandelbrot.jpg" /></p> <img alt="The B in Benoît B. Mandelbrot stand for Benoît B. Mandelbrot" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/BenoitBMandelbrot.jpg" />
<div class="intro"> <div class="intro">
<p><span class="sc"><abbr title="Trop long à lire">tlàl</abbr>&nbsp;: </span> Un exemple progressif d&rsquo;utilisation d&rsquo;Haskell. <p><span class="sc"><abbr title="Trop long à lire">tlàl</abbr>&nbsp;: </span> Un exemple progressif d&#8217;utilisation d&#8217;Haskell.
Vous pourrez voir un ensemble de Mandelbrot étendu à la troisième dimension. Vous pourrez voir un ensemble de Mandelbrot étendu à la troisième dimension.
De plus le code sera très propre. De plus le code sera très propre.
Les détails de rendu sont séparés dans un module externe. Les détails de rendu sont séparés dans un module externe.
@ -67,7 +67,7 @@ Vous pouvez vous inspirer de ce code utilisant le paradigme fonctional dans tous
<ul id="markdown-toc"> <ul id="markdown-toc">
<li><a href="#introduction">Introduction</a></li> <li><a href="#introduction">Introduction</a></li>
<li><a href="#first-version">First version</a> <ul> <li><a href="#first-version">First version</a> <ul>
<li><a href="#lets-play-the-song-of-our-people">Let&rsquo;s play the song of our people</a></li> <li><a href="#lets-play-the-song-of-our-people">Let&#8217;s play the song of our people</a></li>
<li><a href="#let-us-start">Let us start</a></li> <li><a href="#let-us-start">Let us start</a></li>
</ul> </ul>
</li> </li>
@ -138,7 +138,7 @@ and something nice to see in 3D.</p>
<p>And you can see the intermediate steps to reach this goal:</p> <p>And you can see the intermediate steps to reach this goal:</p>
<p><img alt="The parts of the article" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/HGL_Plan.png" /></p> <img alt="The parts of the article" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/HGL_Plan.png" />
<p>From the 2<sup>nd</sup> section to the 4<sup>th</sup> it will be <em>dirtier</em> and <em>dirtier</em>. <p>From the 2<sup>nd</sup> section to the 4<sup>th</sup> it will be <em>dirtier</em> and <em>dirtier</em>.
We start cleaning the code at the 5<sup>th</sup> section.</p> We start cleaning the code at the 5<sup>th</sup> section.</p>
@ -152,7 +152,7 @@ We start cleaning the code at the 5<sup>th</sup> section.</p>
The first being mostly some boilerplate<sup id="fnref:011"><a href="#fn:011" rel="footnote">2</a></sup>. The first being mostly some boilerplate<sup id="fnref:011"><a href="#fn:011" rel="footnote">2</a></sup>.
And the second part more focused on OpenGL and content.</p> And the second part more focused on OpenGL and content.</p>
<h3 id="lets-play-the-song-of-our-people">Let&rsquo;s play the song of our people</h3> <h3 id="lets-play-the-song-of-our-people">Let&#8217;s play the song of our people</h3>
<div class="codehighlight"> <div class="codehighlight">
@ -381,20 +381,20 @@ f c z n = if (magnitude z &gt; 2 )
<p>Well, if you download this file (look at the bottom of this section), compile it and run it this is the result:</p> <p>Well, if you download this file (look at the bottom of this section), compile it and run it this is the result:</p>
<p><img alt="The mandelbrot set version 1" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/hglmandel_v01.png" /></p> <img alt="The mandelbrot set version 1" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/hglmandel_v01.png" />
<p>A first very interesting property of this program is that the computation for all the points is done only once. <p>A first very interesting property of this program is that the computation for all the points is done only once.
It is a bit long before the first image appears, but if you resize the window, it updates instantaneously. It is a bit long before the first image appears, but if you resize the window, it updates instantaneously.
This property is a direct consequence of purity. This property is a direct consequence of purity.
If you look closely, you see that <code>allPoints</code> is a pure list. If you look closely, you see that <code>allPoints</code> is a pure list.
Therefore, calling <code>allPoints</code> will always render the same result and Haskell is clever enough to use this property. Therefore, calling <code>allPoints</code> will always render the same result and Haskell is clever enough to use this property.
While Haskell doesn&rsquo;t garbage collect <code>allPoints</code> the result is reused for free. While Haskell doesn&#8217;t garbage collect <code>allPoints</code> the result is reused for free.
We did not specified this value should be saved for later use. We did not specified this value should be saved for later use.
It is saved for us.</p> It is saved for us.</p>
<p>See what occurs if we make the window bigger:</p> <p>See what occurs if we make the window bigger:</p>
<p><img alt="The mandelbrot too wide, black lines and columns" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/hglmandel_v01_too_wide.png" /></p> <img alt="The mandelbrot too wide, black lines and columns" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/hglmandel_v01_too_wide.png" />
<p>We see some black lines because we have drawn less point than there is on the surface. <p>We see some black lines because we have drawn less point than there is on the surface.
We can repair this by drawing little squares instead of just points. We can repair this by drawing little squares instead of just points.
@ -565,7 +565,7 @@ maxZeroIndex func minval maxval n =
<p>No rocket science here. See the result now:</p> <p>No rocket science here. See the result now:</p>
<p><img alt="The edges of the mandelbrot set" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/HGLMandelEdges.png" /></p> <img alt="The edges of the mandelbrot set" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/HGLMandelEdges.png" />
<div style="display:none"> <div style="display:none">
@ -626,7 +626,7 @@ instead of using a 3D projection of quaternions.
I am pretty sure this construction is not useful for numbers. I am pretty sure this construction is not useful for numbers.
But it will be enough for us to create something that look nice.</p> But it will be enough for us to create something that look nice.</p>
<p>This section is quite long, but don&rsquo;t be afraid, <p>This section is quite long, but don&#8217;t be afraid,
most of the code is some OpenGL boilerplate. most of the code is some OpenGL boilerplate.
If you just want to skim this section, If you just want to skim this section,
here is a high level representation:</p> here is a high level representation:</p>
@ -642,7 +642,7 @@ here is a high level representation:</p>
<p>Drawing: </p> <p>Drawing: </p>
<ul> <ul>
<li>set doubleBuffer, handle depth, window size&hellip;</li> <li>set doubleBuffer, handle depth, window size&#8230;</li>
<li>Use state to apply some transformations</li> <li>Use state to apply some transformations</li>
</ul> </ul>
</li> </li>
@ -898,7 +898,7 @@ Mainly there are two parts: apply some transformations, draw the object.</p>
<h3 id="the-3d-mandelbrot">The 3D Mandelbrot</h3> <h3 id="the-3d-mandelbrot">The 3D Mandelbrot</h3>
<p>We have finished with the OpenGL section, let&rsquo;s talk about how we <p>We have finished with the OpenGL section, let&#8217;s talk about how we
generate the 3D points and colors. generate the 3D points and colors.
First, we will set the number of details to 200 pixels in the three dimensions.</p> First, we will set the number of details to 200 pixels in the three dimensions.</p>
@ -938,7 +938,7 @@ Each three successive point representing the coordinate of each vertex of a tria
<p>In fact, we will provide six ordered points. <p>In fact, we will provide six ordered points.
These points will be used to draw two triangles.</p> These points will be used to draw two triangles.</p>
<p><img alt="Explain triangles" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/triangles.png" /></p> <img alt="Explain triangles" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/triangles.png" />
<p>The next function is a bit long. <p>The next function is a bit long.
Here is an approximative English version:</p> Here is an approximative English version:</p>
@ -1012,7 +1012,7 @@ depthPoints = do
<p>If you prefer the first version, then just imagine how hard it will be to change the enumeration of the point from (x,y) to (x,z) for example.</p> <p>If you prefer the first version, then just imagine how hard it will be to change the enumeration of the point from (x,y) to (x,z) for example.</p>
<p>Also, we didn&rsquo;t searched for negative values. <p>Also, we didn&#8217;t searched for negative values.
This modified Mandelbrot is no more symmetric relatively to the plan <code>y=0</code>. This modified Mandelbrot is no more symmetric relatively to the plan <code>y=0</code>.
But it is symmetric relatively to the plan <code>z=0</code>. But it is symmetric relatively to the plan <code>z=0</code>.
Then I mirror these values. </p> Then I mirror these values. </p>
@ -1110,7 +1110,7 @@ and change the type signature of <code>f</code> from <code>Complex</code> to <co
<p>Here is the result:</p> <p>Here is the result:</p>
<p><img alt="A 3D mandelbrot like" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/mandelbrot_3D.png" /></p> <img alt="A 3D mandelbrot like" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/mandelbrot_3D.png" />
<p><a href="code/03_Mandelbulb/Mandelbulb.lhs" class="cut">Download the source code of this section → 03_Mandelbulb/<strong>Mandelbulb.lhs</strong> </a></p> <p><a href="code/03_Mandelbulb/Mandelbulb.lhs" class="cut">Download the source code of this section → 03_Mandelbulb/<strong>Mandelbulb.lhs</strong> </a></p>
@ -1237,7 +1237,7 @@ ymandel x y z = mandel (2*x/width) (2*y/height) (2*z/deep) 64
</div> </div>
<p>This code is cleaner but many things doesn&rsquo;t feel right. <p>This code is cleaner but many things doesn&#8217;t feel right.
First, all the user interaction code is outside our main file. First, all the user interaction code is outside our main file.
I feel it is okay to hide the detail for the rendering. I feel it is okay to hide the detail for the rendering.
But I would have preferred to control the user actions.</p> But I would have preferred to control the user actions.</p>
@ -1271,12 +1271,12 @@ We will have two choices: </p>
</li> </li>
<li> <li>
<p>Our main problem come from user interaction. <p>Our main problem come from user interaction.
If you ask &ldquo;the Internet&rdquo;, If you ask &#8220;the Internet&#8221;,
about how to deal with user interaction with a functional paradigm, about how to deal with user interaction with a functional paradigm,
the main answer is to use <em>functional reactive programming</em> (FRP). the main answer is to use <em>functional reactive programming</em> (FRP).
I won&rsquo;t use FRP in this article. I won&#8217;t use FRP in this article.
Instead, I&rsquo;ll use a simpler while less effective way to deal with user interaction. Instead, I&#8217;ll use a simpler while less effective way to deal with user interaction.
But The method I&rsquo;ll use will be as pure and functional as possible.</p> But The method I&#8217;ll use will be as pure and functional as possible.</p>
</li> </li>
</ol> </ol>
@ -1298,7 +1298,7 @@ First, what the main loop should look like if we could make our own:</p>
<li>a function taking two parameters: time and world state and render a new world without user interaction.</li> <li>a function taking two parameters: time and world state and render a new world without user interaction.</li>
</ul> </ul>
<p>Here is a real working code, I&rsquo;ve hidden most display functions. <p>Here is a real working code, I&#8217;ve hidden most display functions.
The YGL, is a kind of framework to display 3D functions. The YGL, is a kind of framework to display 3D functions.
But it can easily be extended to many kind of representation.</p> But it can easily be extended to many kind of representation.</p>
@ -1518,7 +1518,7 @@ idleAction tnew world = world {
<p>Now the function which will generate points in 3D. <p>Now the function which will generate points in 3D.
The first parameter (<code>res</code>) is the resolution of the vertex generation. The first parameter (<code>res</code>) is the resolution of the vertex generation.
More precisely, <code>res</code> is distance between two points on one direction. More precisely, <code>res</code> is distance between two points on one direction.
We need it to &ldquo;close&rdquo; our shape.</p> We need it to &#8220;close&#8221; our shape.</p>
<p>The type <code>Function3D</code> is <code>Point -&gt; Point -&gt; Maybe Point</code>. <p>The type <code>Function3D</code> is <code>Point -&gt; Point -&gt; Maybe Point</code>.
Because we consider partial functions Because we consider partial functions
@ -1587,7 +1587,7 @@ ymandel x y z = fromIntegral (mandel x y z 64) / 64
</div> </div>
<p>I won&rsquo;t explain how the magic occurs here. <p>I won&#8217;t explain how the magic occurs here.
If you are interested, just read the file <a href="code/05_Mandelbulb/YGL.hs"><code>YGL.hs</code></a>. If you are interested, just read the file <a href="code/05_Mandelbulb/YGL.hs"><code>YGL.hs</code></a>.
It is commented a lot.</p> It is commented a lot.</p>
@ -1607,8 +1607,8 @@ It is commented a lot.</p>
<p>Our code architecture feel very clean. <p>Our code architecture feel very clean.
All the meaningful code is in our main file and all display details are All the meaningful code is in our main file and all display details are
externalized. externalized.
If you read the code of <code>YGL.hs</code>, you&rsquo;ll see I didn&rsquo;t made everything perfect. If you read the code of <code>YGL.hs</code>, you&#8217;ll see I didn&#8217;t made everything perfect.
For example, I didn&rsquo;t finished the code of the lights. For example, I didn&#8217;t finished the code of the lights.
But I believe it is a good first step and it will be easy to go further. But I believe it is a good first step and it will be easy to go further.
Unfortunately the program of the preceding session is extremely slow. Unfortunately the program of the preceding session is extremely slow.
We compute the Mandelbulb for each frame now.</p> We compute the Mandelbulb for each frame now.</p>
@ -1892,20 +1892,20 @@ ymandel x y z = fromIntegral (mandel x y z 64) / 64
<p>As we can use imperative style in a functional language, <p>As we can use imperative style in a functional language,
know you can use functional style in imperative languages. know you can use functional style in imperative languages.
This article exposed a way to organize some code in a functional way. This article exposed a way to organize some code in a functional way.
I&rsquo;d like to stress the usage of Haskell made it very simple to achieve this.</p> I&#8217;d like to stress the usage of Haskell made it very simple to achieve this.</p>
<p>Once you are used to pure functional style, <p>Once you are used to pure functional style,
it is hard not to see all advantages it offers.</p> it is hard not to see all advantages it offers.</p>
<p>The code in the two last sections is completely pure and functional. <p>The code in the two last sections is completely pure and functional.
Furthermore I don&rsquo;t use <code>GLfloat</code>, <code>Color3</code> or any other OpenGL type. Furthermore I don&#8217;t use <code>GLfloat</code>, <code>Color3</code> or any other OpenGL type.
If I want to use another library in the future, If I want to use another library in the future,
I would be able to keep all the pure code and simply update the YGL module.</p> I would be able to keep all the pure code and simply update the YGL module.</p>
<p>The <code>YGL</code> module can be seen as a &ldquo;wrapper&rdquo; around 3D display and user interaction. <p>The <code>YGL</code> module can be seen as a &#8220;wrapper&#8221; around 3D display and user interaction.
It is a clean separator between the imperative paradigm and functional paradigm.</p> It is a clean separator between the imperative paradigm and functional paradigm.</p>
<p>If you want to go further, it shouldn&rsquo;t be hard to add parallelism. <p>If you want to go further, it shouldn&#8217;t be hard to add parallelism.
This should be easy mainly because most of the visible code is pure. This should be easy mainly because most of the visible code is pure.
Such an optimization would have been harder by using directly the OpenGL library.</p> Such an optimization would have been harder by using directly the OpenGL library.</p>
@ -1915,7 +1915,7 @@ O(n².log(n)) to O(n³).</p>
<hr/><div class="footnotes"> <hr/><div class="footnotes">
<ol> <ol>
<li id="fn:001"> <li id="fn:001">
<p>Unfortunately, I couldn&rsquo;t make this program to work on my Mac. More precisely, I couldn&rsquo;t make the <a href="http://openil.sourceforge.net/">DevIL</a> library work on Mac to output the image. Yes I have done a <code>brew install libdevil</code>. But even a minimal program who simply write some <code>jpg</code> didn&rsquo;t worked. I tried both with <code>Haskell</code> and <code>C</code>.<a href="#fnref:001" rel="reference">&#8617;</a></p> <p>Unfortunately, I couldn&#8217;t make this program to work on my Mac. More precisely, I couldn&#8217;t make the <a href="http://openil.sourceforge.net/">DevIL</a> library work on Mac to output the image. Yes I have done a <code>brew install libdevil</code>. But even a minimal program who simply write some <code>jpg</code> didn&#8217;t worked. I tried both with <code>Haskell</code> and <code>C</code>.<a href="#fnref:001" rel="reference">&#8617;</a></p>
</li> </li>
<li id="fn:011"> <li id="fn:011">
<p>Generally in Haskell you need to declare a lot of import lines. <p>Generally in Haskell you need to declare a lot of import lines.
@ -2010,10 +2010,14 @@ O(n².log(n)) to O(n³).</p>
articles suivants articles suivants
<div class="next_article"> <div class="next_article">
<a href="/Scratch/fr/blog/Category-Theory-Presentation/">Category Theory Presentation&nbsp;<span class="nicer">»</span></a> <a href="/Scratch/fr/blog/Category-Theory-Programming/">Programmation en Théorie des Catégories&nbsp;<span class="nicer">»</span></a>
</div> </div>
<div class="next_article">
<a href="/Scratch/fr/blog/Category-Theory-Presentation/">Category Theory Presentation&nbsp;<span class="nicer">»</span></a>
</div>
</div> </div>

View file

@ -35,6 +35,44 @@ just continue to read as a standard web page.
\(\newcommand{\F}{\mathbf{F}}\) \(\newcommand{\F}{\mathbf{F}}\)
\(\newcommand{\E}{\mathbf{E}}\) \(\newcommand{\E}{\mathbf{E}}\)
\(\newcommand{\C}{\mathc...&lt;/div&gt;&lt;/img&gt;</content> \(\newcommand{\C}{\mathc...&lt;/div&gt;&lt;/img&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2012-10-01:/Scratch/fr/blog/Category-Theory-Programming/</id>
<title type="html">Programmation en Th&#233;orie des Cat&#233;gories</title>
<published>2012-10-01T17:16:43Z</published>
<updated>2012-10-01T17:16:43Z</updated>
<author>
<name>Yann Esposito</name>
<uri>yannesposito.com</uri>
</author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/Category-Theory-Programming/"/>
<content type="html">
&lt;div class="intro"&gt;
&lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt; Comment programmer en utilisant la th&#233;orie des cat&#233;gories.&lt;/p&gt;
&lt;blockquote&gt;
&lt;center&gt;&lt;hr style="width:30%;float:left;border-color:#CCCCD0;margin-top:1em" /&gt;&lt;span class="sc"&gt;&lt;b&gt;Table of Content&lt;/b&gt;&lt;/span&gt;&lt;hr style="width:30%;float:right;border-color:#CCCCD0;margin-top:1em" /&gt;&lt;/center&gt;
&lt;ul id="markdown-toc"&gt;
&lt;li&gt;&lt;a href="#introduction"&gt;Introduction&lt;/a&gt; &lt;ul&gt;
&lt;li&gt;&lt;a href="#programming-paradigms"&gt;Programming Paradigms&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#get-some-intuition"&gt;Get some intuition&lt;/a&gt; &lt;ul&gt;
&lt;li&gt;&lt;a href="#representation-of-category"&gt;Representation of Category&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;h2 id="introduction"&gt;Introductio...&lt;/h2&gt;&lt;/blockquote&gt;&lt;/div&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2012-06-15:/Scratch/fr/blog/Haskell-OpenGL-Mandelbrot/</id> <id>tag:yannesposito.com,2012-06-15:/Scratch/fr/blog/Haskell-OpenGL-Mandelbrot/</id>
@ -46,13 +84,13 @@ just continue to read as a standard web page.
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/Haskell-OpenGL-Mandelbrot/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/Haskell-OpenGL-Mandelbrot/"/>
<content type="html">&lt;p&gt;&lt;img alt="The B in Beno&#238;t B. Mandelbrot stand for Beno&#238;t B. Mandelbrot" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/BenoitBMandelbrot.jpg" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="The B in Beno&#238;t B. Mandelbrot stand for Beno&#238;t B. Mandelbrot" src="/Scratch/img/blog/Haskell-OpenGL-Mandelbrot/BenoitBMandelbrot.jpg" /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
&lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt; Un exemple progressif d&amp;rsquo;utilisation d&amp;rsquo;Haskell. &lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt; Un exemple progressif d&amp;#8217;utilisation d&amp;#8217;Haskell.
Vous pourrez voir un ensemble de Mandelbrot &#233;tendu &#224; la troisi&#232;me dimension. Vous pourrez voir un ensemble de Mandelbrot &#233;tendu &#224; la troisi&#232;me dimension.
De plus le code sera tr&#232;s propre. De plus le code sera tr&#232;s propre.
Les d&#233;tails de rendu sont s&#233;par&#233;s dans un module externe. Les d&#233;tails de rendu sont s&#233;par&#233;s dans un module externe.
@ -60,7 +98,7 @@ Le code descriptif int&#233;ressant est concentr&#233; dans un environnement pur
Vous pouvez vous inspirer de ce code utilisant le paradigme fonctional dans tous les languages.&lt;/p&gt; Vous pouvez vous inspirer de ce code utilisant le paradigme fonctional dans tous les languages.&lt;/p&gt;
&lt;blockquote&gt; &lt;blockquote&gt;
&lt;center&gt;&lt;hr style="width:30%;float:left;border-color:#CCCCD0;margin-top:1em" /&gt;&lt;span class="sc"&gt;&lt;/span&gt;&lt;/hr&gt;&lt;/center&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/p&gt;</content> &lt;center&gt;&lt;hr style="width:30%;float:left;border-color:#CCCCD0;margin-top:1em" /&gt;&lt;span class="sc"&gt;&lt;b&gt;Table...&lt;/b&gt;&lt;/span&gt;&lt;/hr&gt;&lt;/center&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2012-02-08:/Scratch/fr/blog/Haskell-the-Hard-Way/</id> <id>tag:yannesposito.com,2012-02-08:/Scratch/fr/blog/Haskell-the-Hard-Way/</id>
@ -72,7 +110,7 @@ Vous pouvez vous inspirer de ce code utilisant le paradigme fonctional dans tous
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/Haskell-the-Hard-Way/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/Haskell-the-Hard-Way/"/>
<content type="html">&lt;p&gt;&lt;img alt="Magritte pleasure principle" src="/Scratch/img/blog/Haskell-the-Hard-Way/magritte_pleasure_principle.jpg" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Magritte pleasure principle" src="/Scratch/img/blog/Haskell-the-Hard-Way/magritte_pleasure_principle.jpg" /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
@ -83,7 +121,7 @@ Vous pouvez vous inspirer de ce code utilisant le paradigme fonctional dans tous
&lt;p&gt;Merci &#224; &lt;a href="https://plus.google.com/u/0/113751420744109290534"&gt;Oleg Taykalo&lt;/a&gt; vous pouvez trouver une traduction Russe ici: &lt;a href="http://habrahabr.ru/post/152889/"&gt;Partie 1&lt;/a&gt; &lt;em class="pala"&gt;&amp;amp;&lt;/em&gt; &lt;a href="http://habrahabr.ru/post/153383/"&gt;Partie 2&lt;/a&gt;&amp;nbsp;; &lt;/p&gt; &lt;p&gt;Merci &#224; &lt;a href="https://plus.google.com/u/0/113751420744109290534"&gt;Oleg Taykalo&lt;/a&gt; vous pouvez trouver une traduction Russe ici: &lt;a href="http://habrahabr.ru/post/152889/"&gt;Partie 1&lt;/a&gt; &lt;em class="pala"&gt;&amp;amp;&lt;/em&gt; &lt;a href="http://habrahabr.ru/post/153383/"&gt;Partie 2&lt;/a&gt;&amp;nbsp;; &lt;/p&gt;
&lt;blockquote&gt; &lt;blockquote&gt;
&lt;center&gt;&lt;hr style="width:30%;float:left;border-color:#CCCCD0;margin-top:1em" /&gt;&lt;span class="sc"&gt;&lt;b&gt;Table of Content&lt;/b&gt;&lt;/span&gt;&lt;/hr&gt;&lt;/center&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/p&gt;</content> &lt;center&gt;&lt;hr style="width:30%;float:left;border-color:#CCCCD0;margin-top:1em" /&gt;&lt;span class="sc"&gt;&lt;b&gt;Table of Content&lt;/b&gt;&lt;/span&gt;&lt;hr style="width:30%;float:right;border-color:#CCCCD0;margin-top:1em" /&gt;&lt;/hr&gt;&lt;/hr&gt;&lt;/center&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2012-02-02:/Scratch/fr/blog/Typography-and-the-Web/</id> <id>tag:yannesposito.com,2012-02-02:/Scratch/fr/blog/Typography-and-the-Web/</id>
@ -95,30 +133,30 @@ Vous pouvez vous inspirer de ce code utilisant le paradigme fonctional dans tous
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/Typography-and-the-Web/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/Typography-and-the-Web/"/>
<content type="html">&lt;p&gt;&lt;img alt="Screenshot of first in small caps with and without ligatures." src="/Scratch/img/blog/Typography-and-the-Web/first_sc_screenshot.png" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Screenshot of first in small caps with and without ligatures." src="/Scratch/img/blog/Typography-and-the-Web/first_sc_screenshot.png" /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
&lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt; La typography sur le web est pourrie et nous ne somme pas pr&#232;s de voir ce probl&#232;me r&#233;par&#233;.&lt;/p&gt; &lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Trop long &#195;&#160; lire"&gt;tl&#195;&#160;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt; La typography sur le web est pourrie et nous ne somme pas pr&#195;&#168;s de voir ce probl&#195;&#168;me r&#195;&#169;par&#195;&#169;.&lt;/p&gt;
&lt;/div&gt; &lt;/div&gt;
&lt;p&gt;Je suis tomb&#233; sur ce site: &lt;a href="http://opentypography.org/"&gt;open typography&lt;/a&gt;. Leur message principal est&amp;nbsp;:&lt;/p&gt; &lt;p&gt;Je suis tomb&#195;&#169; sur ce site: &lt;a href="http://opentypography.org/"&gt;open typography&lt;/a&gt;. Leur message principal est&amp;nbsp;:&lt;/p&gt;
&lt;blockquote&gt; &lt;blockquote&gt;
&lt;p&gt;&#171;There is no reason to wait for browser development to catch up. &lt;p&gt;&#194;&#171;There is no reason to wait for browser development to catch up.
We can all create better web typography ourselves, today.&#187;&lt;/p&gt; We can all create better web typography ourselves, today.&#194;&#187;&lt;/p&gt;
&lt;/blockquote&gt; &lt;/blockquote&gt;
&lt;p&gt;ou en fran&#231;ais&amp;nbsp;:&lt;/p&gt; &lt;p&gt;ou en fran&#195;&#167;ais&amp;nbsp;:&lt;/p&gt;
&lt;blockquote&gt; &lt;blockquote&gt;
&lt;p&gt;&#171;Nous ne somme pas oblig&#233; d&amp;rsquo;attendre le d&#233;veloppement des navigateurs. &lt;p&gt;&#194;&#171;Nous ne somme pas oblig&#195;&#169; d&amp;#8217;attendre le d&#195;&#169;veloppement des navigateurs.
Nous pouv...&lt;/p&gt;&lt;/blockquote&gt;&lt;/p&gt;</content> Nous pouvons cr&#195;...&lt;/p&gt;&lt;/blockquote&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2012-01-15:/Scratch/fr/blog/Yesod-tutorial-for-newbies/</id> <id>tag:yannesposito.com,2012-01-15:/Scratch/fr/blog/Yesod-tutorial-for-newbies/</id>
@ -130,7 +168,7 @@ Nous pouv...&lt;/p&gt;&lt;/blockquote&gt;&lt;/p&gt;</content>
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/Yesod-tutorial-for-newbies/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/Yesod-tutorial-for-newbies/"/>
<content type="html">&lt;p&gt;&lt;img alt="Neo Flying at warp speed" src="/Scratch/img/blog/Yesod-tutorial-for-newbies/flying_neo.jpg" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Neo Flying at warp speed" src="/Scratch/img/blog/Yesod-tutorial-for-newbies/flying_neo.jpg" /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
@ -141,7 +179,7 @@ Nous pouv...&lt;/p&gt;&lt;/blockquote&gt;&lt;/p&gt;</content>
&lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt; Un tutoriel pour yesod, un framework web Haskell. &lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt; Un tutoriel pour yesod, un framework web Haskell.
Vous ne devriez pas avoir besoin de savoir programmer en Haskell. Vous ne devriez pas avoir besoin de savoir programmer en Haskell.
Par contre je suis d&#233;sol&#233; pour les francophones, Par contre je suis d&#233;sol&#233; pour les francophones,
mais je n&amp;rsquo;ai pas eu le courage de traduire cet article en Fran&#231;ais.&lt;/p&gt; mais je n&amp;#8217;ai pas eu le courage de traduire cet article en Fran&#231;ais.&lt;/p&gt;
&lt;blockquote&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; &lt;center&gt;&lt;span class="sc"&gt;&lt;b&gt;Table of content&lt;/b&gt;&lt;/span&gt;&lt;/center&gt;
@ -149,7 +187,7 @@ mais je n&amp;rsquo;ai pas eu le courage de traduire cet article en Fran&#231;ai
&lt;ul id="markdown-toc"&gt; &lt;ul id="markdown-toc"&gt;
&lt;li&gt;&lt;a href="#before-the-real-start"&gt;Before the real start&lt;/a&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#before-the-real-start"&gt;Before the real start&lt;/a&gt; &lt;ul&gt;
&lt;li&gt;&lt;a href="#install"&gt;Install&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#install"&gt;Install&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#initialize"&gt;In...&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/p&gt;</content> &lt;li&gt;&lt;a href="#initialize"&gt;Initializ...&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2011-10-20:/Scratch/fr/blog/SVG-and-m4-fractals/</id> <id>tag:yannesposito.com,2011-10-20:/Scratch/fr/blog/SVG-and-m4-fractals/</id>
@ -161,23 +199,23 @@ mais je n&amp;rsquo;ai pas eu le courage de traduire cet article en Fran&#231;ai
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/SVG-and-m4-fractals/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/SVG-and-m4-fractals/"/>
<content type="html">&lt;p&gt;&lt;img alt="Yesod logo made in SVG and m4" src="/Scratch/img/blog/SVG-and-m4-fractals/main.png" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Yesod logo made in SVG and m4" src="/Scratch/img/blog/SVG-and-m4-fractals/main.png" /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
&lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt; Utiliser m4 pour accro&#238;tre le pouvoir d&amp;rsquo;&lt;span class="sc"&gt;xslt&lt;/span&gt; et d&amp;rsquo;&lt;span class="sc"&gt;svg&lt;/span&gt;. Example cool, les fractales.&lt;/p&gt; &lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt; Utiliser m4 pour accro&#238;tre le pouvoir d&amp;#8217;&lt;span class="sc"&gt;xslt&lt;/span&gt; et d&amp;#8217;&lt;span class="sc"&gt;svg&lt;/span&gt;. Example cool, les fractales.&lt;/p&gt;
&lt;/div&gt; &lt;/div&gt;
&lt;p&gt;Lorsqu&amp;rsquo;&lt;span class="sc"&gt;xml&lt;/span&gt; f&#251;t invent&#233; beaucoup pensaient que c&amp;rsquo;&#233;tait l&amp;rsquo;avenir. &lt;p&gt;Lorsqu&amp;#8217;&lt;span class="sc"&gt;xml&lt;/span&gt; f&#251;t invent&#233; beaucoup pensaient que c&amp;#8217;&#233;tait l&amp;#8217;avenir.
Passer de fichiers plat &#224; des fichiers structur&#233;s standardis&#233;s f&#251;t un grand progr&#232;s dans beaucoup de domaines. Passer de fichiers plat &#224; des fichiers structur&#233;s standardis&#233;s f&#251;t un grand progr&#232;s dans beaucoup de domaines.
Cerain se mirent &#224; voir du &lt;span class="sc"&gt;xml&lt;/span&gt; de partout. Cerain se mirent &#224; voir du &lt;span class="sc"&gt;xml&lt;/span&gt; de partout.
&#192; tel point que les les format compatibles &lt;span class="sc"&gt;xml&lt;/span&gt; naquirent de toute part. &#192; tel point que les les format compatibles &lt;span class="sc"&gt;xml&lt;/span&gt; naquirent de toute part.
Non seulement comme format de fichie...&lt;/p&gt;&lt;/p&gt;</content> Non seulement comme format de fichier, mais...&lt;/p&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2011-10-04:/Scratch/fr/blog/Yesod-excellent-ideas/</id> <id>tag:yannesposito.com,2011-10-04:/Scratch/fr/blog/Yesod-excellent-ideas/</id>
@ -189,7 +227,7 @@ Non seulement comme format de fichie...&lt;/p&gt;&lt;/p&gt;</content>
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/Yesod-excellent-ideas/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/Yesod-excellent-ideas/"/>
<content type="html">&lt;p&gt;&lt;img alt="Title image" src="/Scratch/img/blog/Yesod-excellent-ideas/main.png" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Title image" src="/Scratch/img/blog/Yesod-excellent-ideas/main.png" /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
@ -198,8 +236,8 @@ Non seulement comme format de fichie...&lt;/p&gt;&lt;/p&gt;</content>
&lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Cela fait un moment que je suis la progression du &lt;a href="http://www.yesodweb.com"&gt;framework yesod&lt;/a&gt;. &lt;p&gt;Cela fait un moment que je suis la progression du &lt;a href="http://www.yesodweb.com"&gt;framework yesod&lt;/a&gt;.
&#192; mon humble avis on peut commencer &#224; l&amp;rsquo;utiliser pour des applications s&#233;rieuses (comprendre en prod). &#192; mon humble avis on peut commencer &#224; l&amp;#8217;utiliser pour des applications s&#233;rieuses (comprendre en prod).
Avant de vous dire pourquoi vous devriez aussi le consid&#233;rer, je pr&#233;f&#232;re vous parler de bonnes id&#233;es (parmi d&amp;rsquo;autres) introduites par yesod que je n&amp;rsquo;avais jamais vu ailleurs.&lt;/p&gt; Avant de vous dire pourquoi vous devriez aussi le consid&#233;rer, je pr&#233;f&#232;re vous parler de bonnes id&#233;es (parmi d&amp;#8217;autres) introduites par yesod que je n&amp;#8217;avais jamais vu ailleurs.&lt;/p&gt;
&lt;/div&gt; &lt;/div&gt;
@ -207,9 +245,9 @@ Avant de vous dire pourquoi vous devriez aussi le consid&#233;rer, je pr&#233;f&
&lt;h2 id="types-saufs"&gt;Types saufs&lt;/h2&gt; &lt;h2 id="types-saufs"&gt;Types saufs&lt;/h2&gt;
&lt;p&gt;Commen&#231;ons par une BD d&amp;rsquo;&lt;a href="http://xkcd.com"&gt;xkcd&lt;/a&gt;&amp;nbsp;:&lt;/p&gt; &lt;p&gt;Commen&#231;ons par une BD d&amp;#8217;&lt;a href="http://xkcd.com"&gt;xkcd&lt;/a&gt;&amp;nbsp;:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/p&gt;</content> &lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2011-09-28:/Scratch/fr/blog/Higher-order-function-in-zsh/</id> <id>tag:yannesposito.com,2011-09-28:/Scratch/fr/blog/Higher-order-function-in-zsh/</id>
@ -221,7 +259,7 @@ Avant de vous dire pourquoi vous devriez aussi le consid&#233;rer, je pr&#233;f&
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/Higher-order-function-in-zsh/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/Higher-order-function-in-zsh/"/>
<content type="html">&lt;p&gt;&lt;img alt="Title image" src="/Scratch/img/blog/Higher-order-function-in-zsh/main.jpg" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Title image" src="/Scratch/img/blog/Higher-order-function-in-zsh/main.jpg" /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
@ -252,7 +290,7 @@ X filter Y
X fold Y X fold Y
X map Y X map Y
$ mapa '$1*2...&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;</content> $ mapa '$1*2' {1..3...&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2011-09-28:/Scratch/fr/blog/programming-language-experience/</id> <id>tag:yannesposito.com,2011-09-28:/Scratch/fr/blog/programming-language-experience/</id>
@ -264,26 +302,28 @@ $ mapa '$1*2...&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;</content>
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/programming-language-experience/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/programming-language-experience/"/>
<content type="html">&lt;p&gt;&lt;img alt="Title image" src="/Scratch/img/blog/programming-language-experience/dragon.jpg" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Title image" src="/Scratch/img/blog/programming-language-experience/dragon.jpg" /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
&lt;span class="sc"&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt; Mon avis succinct et hautement subjectif concernant les diff&#233;rents languages de programmation que j&amp;rsquo;ai utilis&#233;. &lt;span class="sc"&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt; Mon avis succinct et hautement subjectif concernant les diff&#233;rents languages de programmation que j&amp;#8217;ai utilis&#233;.
&lt;/div&gt; &lt;/div&gt;
&lt;h3 id="basic"&gt;&lt;code&gt;BASIC&lt;/code&gt;&lt;/h3&gt; &lt;h3 id="basic"&gt;&lt;code&gt;BASIC&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img alt="Title image" src="/Scratch/img/blog/programming-language-experience/basic.gif" class=" left" /&gt;&lt;/p&gt; &lt;img alt="Title image" src="/Scratch/img/blog/programming-language-experience/basic.gif" class=" left" /&gt;
&lt;p&gt;Ah&amp;nbsp;! Le language de mes premiers programmes&amp;nbsp;! &lt;p&gt;Ah&amp;nbsp;! Le language de mes premiers programmes&amp;nbsp;!
Je devais avoir 10-11 ans. Je devais avoir 10-11 ans.
Sous &lt;code&gt;MO5&lt;/code&gt;, &lt;code&gt;Amstrad CPC 6128&lt;/code&gt; et m&#234;me &lt;code&gt;Atari STe&lt;/code&gt;. Sous &lt;code&gt;MO5&lt;/code&gt;, &lt;code&gt;Amstrad CPC 6128&lt;/code&gt; et m&#234;me &lt;code&gt;Atari STe&lt;/code&gt;.
Le langage des &lt;code&gt;GOTO&lt;/code&gt;s. Le langage des &lt;code&gt;GOTO&lt;/code&gt;s.
Je suis empleint de nostalgie rien que d&amp;rsquo;y penser. Je suis empleint de nostalgie rien que d&amp;#8217;y penser.
C&amp;rsquo;est &#224; peu pr&#234;t le seul int&#233;r&#234;t de ce ...&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;</content> C&amp;#8217;est &#224; peu pr&#234;t le seul int&#233;r&#234;t de ce langage.&lt;/p&gt;
...&lt;/img&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2011-08-25:/Scratch/fr/blog/Learn-Vim-Progressively/</id> <id>tag:yannesposito.com,2011-08-25:/Scratch/fr/blog/Learn-Vim-Progressively/</id>
@ -295,7 +335,7 @@ C&amp;rsquo;est &#224; peu pr&#234;t le seul int&#233;r&#234;t de ce ...&lt;/p&g
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/Learn-Vim-Progressively/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/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;img alt="&#220;ber leet use vim!" src="/Scratch/img/blog/Learn-Vim-Progressively/uber_leet_use_vim.jpg" /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
@ -307,7 +347,7 @@ C&amp;rsquo;est &#224; peu pr&#234;t le seul int&#233;r&#234;t de ce ...&lt;/p&g
&lt;/div&gt; &lt;/div&gt;
&lt;p&gt;&lt;a href="http://www.vim.org"&gt;Vim&lt;/a&gt; ou l&amp;rsquo;&#233;diteur qui vallait 3 milliards&amp;nbsp;:&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.vim.org"&gt;Vim&lt;/a&gt; ou l&amp;#8217;&#233;diteur qui vallait 3 milliards&amp;nbsp;:&lt;/p&gt;
&lt;blockquote&gt; &lt;blockquote&gt;
&lt;p&gt;Meilleur, plus fort, plus rapide.&lt;/p&gt; &lt;p&gt;Meilleur, plus fort, plus rapide.&lt;/p&gt;
@ -315,7 +355,7 @@ C&amp;rsquo;est &#224; peu pr&#234;t le seul int&#233;r&#234;t de ce ...&lt;/p&g
&lt;p&gt;Apprenez &lt;a href="http://www.vim.org"&gt;vim&lt;/a&gt; et ce sera votre dernier &#233;diteur. &lt;p&gt;Apprenez &lt;a href="http://www.vim.org"&gt;vim&lt;/a&gt; et ce sera votre dernier &#233;diteur.
Aucun &#233;diteur que je connaisse ne le surpasse. Aucun &#233;diteur que je connaisse ne le surpasse.
Sa prise en mais est difficile, mais p...&lt;/p&gt;&lt;/p&gt;</content> Sa prise en mais est difficile, mais payante....&lt;/p&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2011-08-17:/Scratch/fr/blog/A-more-convenient-diff/</id> <id>tag:yannesposito.com,2011-08-17:/Scratch/fr/blog/A-more-convenient-diff/</id>
@ -327,11 +367,11 @@ Sa prise en mais est difficile, mais p...&lt;/p&gt;&lt;/p&gt;</content>
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/A-more-convenient-diff/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/A-more-convenient-diff/"/>
<content type="html">&lt;p&gt;&lt;code&gt;diff&lt;/code&gt; est un utilitaire tr&#232;s pratique, mais il n&amp;rsquo;est pas facile &#224; lire pour nous, les Hommes.&lt;/p&gt; <content type="html">&lt;p&gt;&lt;code&gt;diff&lt;/code&gt; est un utilitaire tr&#232;s pratique, mais il n&amp;#8217;est pas facile &#224; lire pour nous, les Hommes.&lt;/p&gt;
&lt;p&gt;C&amp;rsquo;est pourquoi, lorsque vous utilisez &lt;code&gt;git&lt;/code&gt;, il vous montre un formatage plus agr&#233;able avec des couleurs.&lt;/p&gt; &lt;p&gt;C&amp;#8217;est pourquoi, lorsque vous utilisez &lt;code&gt;git&lt;/code&gt;, il vous montre un formatage plus agr&#233;able avec des couleurs.&lt;/p&gt;
&lt;p&gt;Voici le script que j&amp;rsquo;utilise lorsque je veux avoir un &lt;code&gt;diff&lt;/code&gt; &#224; la git.&lt;/p&gt; &lt;p&gt;Voici le script que j&amp;#8217;utilise lorsque je veux avoir un &lt;code&gt;diff&lt;/code&gt; &#224; la git.&lt;/p&gt;
&lt;div class="codefile"&gt;&lt;a href="/Scratch/fr/blog/A-more-convenient-diff/code/ydiff"&gt;&amp;#x27A5; ydiff&lt;/a&gt;&lt;/div&gt; &lt;div class="codefile"&gt;&lt;a href="/Scratch/fr/blog/A-more-convenient-diff/code/ydiff"&gt;&amp;#x27A5; ydiff&lt;/a&gt;&lt;/div&gt;
@ -359,7 +399,7 @@ function colorize_diff {
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/Haskell-Mandelbrot/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/Haskell-Mandelbrot/"/>
<content type="html">&lt;p&gt;Voici le code &amp;ldquo;obfusqu&#233;&amp;rdquo;&amp;nbsp;:&lt;/p&gt; <content type="html">&lt;p&gt;Voici le code &amp;#8220;obfusqu&#233;&amp;#8221;&amp;nbsp;:&lt;/p&gt;
&lt;div class="codefile"&gt;&lt;a href="/Scratch/fr/blog/Haskell-Mandelbrot/code/animandel.hs"&gt;&amp;#x27A5; animandel.hs&lt;/a&gt;&lt;/div&gt; &lt;div class="codefile"&gt;&lt;a href="/Scratch/fr/blog/Haskell-Mandelbrot/code/animandel.hs"&gt;&amp;#x27A5; animandel.hs&lt;/a&gt;&lt;/div&gt;
@ -382,25 +422,25 @@ main ...&lt;/code&gt;&lt;/pre&gt;</content>
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/Password-Management/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/Password-Management/"/>
<content type="html">&lt;p&gt;&lt;img alt="Title image" src="/Scratch/img/blog/Password-Management/main.png" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Title image" src="/Scratch/img/blog/Password-Management/main.png" /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
&lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt; Une m&#233;thode de gestion des mots de passes que j&amp;rsquo;utilise avec succ&#232;s depuis quelques ann&#233;es.&lt;br /&gt; &lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt; Une m&#233;thode de gestion des mots de passes que j&amp;#8217;utilise avec succ&#232;s depuis quelques ann&#233;es.&lt;br /&gt;
&lt;strong&gt;&lt;code&gt;sha1( mot_de_passe + nom_de_domaine )&lt;/code&gt;&lt;/strong&gt;&lt;br /&gt; &lt;strong&gt;&lt;code&gt;sha1( mot_de_passe + nom_de_domaine )&lt;/code&gt;&lt;/strong&gt;&lt;br /&gt;
Je ne m&#233;morise qu&amp;rsquo;un seul mot de passe de tr&#232;s bonne qualit&#233;. Je ne m&#233;morise qu&amp;#8217;un seul mot de passe de tr&#232;s bonne qualit&#233;.
J&amp;rsquo;utilise des mots de passe diff&#233;rents sur tous les sites.&lt;/p&gt; J&amp;#8217;utilise des mots de passe diff&#233;rents sur tous les sites.&lt;/p&gt;
&lt;/div&gt; &lt;/div&gt;
&lt;p&gt;Avant de commencer, je tiens &#224; pr&#233;ciser qu&amp;rsquo;il s&amp;rsquo;agit d&amp;rsquo;une tentative de vous vendre mon appli iPhone&amp;nbsp;;-).&lt;/p&gt; &lt;p&gt;Avant de commencer, je tiens &#224; pr&#233;ciser qu&amp;#8217;il s&amp;#8217;agit d&amp;#8217;une tentative de vous vendre mon appli iPhone&amp;nbsp;;-).&lt;/p&gt;
&lt;p&gt;Vous &#234;tes toujours l&#224;&amp;nbsp;? &lt;p&gt;Vous &#234;tes toujours l&#224;&amp;nbsp;?
Bon, d&amp;rsquo;accord, m&#234;me si vous ne t&#233;l&#233;chargez pas mon application vous pouvez quand m&#234;me utili...&lt;/p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;</content> Bon, d&amp;#8217;accord, m&#234;me si vous ne t&#233;l&#233;chargez pas mon application vous pouvez quand m&#234;me utiliser ma ...&lt;/p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2011-04-20:/Scratch/fr/blog/2011-04-20-Now-hosted-on-github/</id> <id>tag:yannesposito.com,2011-04-20:/Scratch/fr/blog/2011-04-20-Now-hosted-on-github/</id>
@ -412,10 +452,10 @@ Bon, d&amp;rsquo;accord, m&#234;me si vous ne t&#233;l&#233;chargez pas mon appl
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2011-04-20-Now-hosted-on-github/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2011-04-20-Now-hosted-on-github/"/>
<content type="html">&lt;p&gt;&lt;img alt="Title image" src="/Scratch/img/blog/2011-04-20-Now-hosted-on-github/main.png" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Title image" src="/Scratch/img/blog/2011-04-20-Now-hosted-on-github/main.png" /&gt;
&lt;p&gt;J&amp;rsquo;h&#233;berge mon site sur github &#224; partir d&amp;rsquo;aujourd&amp;rsquo;hui.&lt;/p&gt; &lt;p&gt;J&amp;#8217;h&#233;berge mon site sur github &#224; partir d&amp;#8217;aujourd&amp;#8217;hui.&lt;/p&gt;
&lt;/p&gt;</content> &lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2011-01-03:/Scratch/fr/blog/2011-01-03-Why-I-sadly-won-t-use-coffeescript/</id> <id>tag:yannesposito.com,2011-01-03:/Scratch/fr/blog/2011-01-03-Why-I-sadly-won-t-use-coffeescript/</id>
@ -427,15 +467,15 @@ Bon, d&amp;rsquo;accord, m&#234;me si vous ne t&#233;l&#233;chargez pas mon appl
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2011-01-03-Why-I-sadly-won-t-use-coffeescript/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2011-01-03-Why-I-sadly-won-t-use-coffeescript/"/>
<content type="html">&lt;p&gt;&lt;img alt="Title image" src="/Scratch/img/blog/2011-01-03-Why-I-sadly-won-t-use-coffeescript/main.png" /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Title image" src="/Scratch/img/blog/2011-01-03-Why-I-sadly-won-t-use-coffeescript/main.png" /&gt;
&lt;div class="encadre"&gt; &lt;div class="encadre"&gt;
&lt;p&gt;&lt;em&gt;Mise &#224; jour&amp;nbsp;:&lt;/em&gt; Je pense que je vais finallement changer d&amp;rsquo;avis. &lt;p&gt;&lt;em&gt;Mise &#224; jour&amp;nbsp;:&lt;/em&gt; Je pense que je vais finallement changer d&amp;#8217;avis.
Pourquoi&amp;nbsp;? Pourquoi&amp;nbsp;?
Tout d&amp;rsquo;abord, je viens de d&#233;couvrir un convertisseur javascript vers coffeescript, ensuite Denis Knauf m&amp;rsquo;a laiss&#233; un commentaire et m&amp;rsquo;a appris l&amp;rsquo;existence d&amp;rsquo;une fonction &lt;code&gt;CoffeeScript.eval&lt;/code&gt;. De plus, il faut voir CoffeeScript comme javascript avec une syntaxe similaire &#224; Ruby et pas comme un langage similaire &#224; Ruby.&lt;/p&gt; Tout d&amp;#8217;abord, je viens de d&#233;couvrir un convertisseur javascript vers coffeescript, ensuite Denis Knauf m&amp;#8217;a laiss&#233; un commentaire et m&amp;#8217;a appris l&amp;#8217;existence d&amp;#8217;une fonction &lt;code&gt;CoffeeScript.eval&lt;/code&gt;. De plus, il faut voir CoffeeScript comme javascript avec une syntaxe similaire &#224; Ruby et pas comme un langage similaire &#224; Ruby.&lt;/p&gt;
&lt;/div&gt; &lt;/div&gt;
@ -445,7 +485,7 @@ Tout d&amp;rsquo;abord, je viens de d&#233;couvrir un convertisseur javascript v
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
&lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt; Qu&amp;rsquo;est-ce qui n&amp;rsquo;allait pas avec Coffeescript? La meta-programm...&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;</content> &lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt; Qu&amp;#8217;est-ce qui n&amp;#8217;allait pas avec Coffeescript? La meta-programmation, ...&lt;/p&gt;&lt;/div&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2011-01-01:/Scratch/fr/blog/2011-01-03-Happy-New-Year/</id> <id>tag:yannesposito.com,2011-01-01:/Scratch/fr/blog/2011-01-03-Happy-New-Year/</id>
@ -459,15 +499,15 @@ Tout d&amp;rsquo;abord, je viens de d&#233;couvrir un convertisseur javascript v
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2011-01-03-Happy-New-Year/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2011-01-03-Happy-New-Year/"/>
<content type="html">&lt;p&gt;Bonne et heureuse ann&#233;e&amp;nbsp;!&lt;/p&gt; <content type="html">&lt;p&gt;Bonne et heureuse ann&#233;e&amp;nbsp;!&lt;/p&gt;
&lt;p&gt;J&amp;rsquo;&#233;tais tr&#232;s occup&#233; ces derniers mois. &lt;p&gt;J&amp;#8217;&#233;tais tr&#232;s occup&#233; ces derniers mois.
Maintenant il me semble que je vais pouvoir faire revivre ce blog.&lt;/p&gt; Maintenant il me semble que je vais pouvoir faire revivre ce blog.&lt;/p&gt;
&lt;p&gt;J&amp;rsquo;ai fait un outil qui permet d&amp;rsquo;&#233;crire des livre en utilisant une syntaxe proche de markdown. &lt;p&gt;J&amp;#8217;ai fait un outil qui permet d&amp;#8217;&#233;crire des livre en utilisant une syntaxe proche de markdown.
C&amp;rsquo;est un markdown avec des macros (essentiel pour les textes longs). C&amp;#8217;est un markdown avec des macros (essentiel pour les textes longs).
De plus le syst&#232;me g&#232;re la g&#233;n&#233;ration de pages HTML ainsi que du PDF engendr&#233; avec du XeLaTeX. De plus le syst&#232;me g&#232;re la g&#233;n&#233;ration de pages HTML ainsi que du PDF engendr&#233; avec du XeLaTeX.
Je n&amp;rsquo;en ai pas encore termin&#233; avec &#231;a. Mais si je tarde trop, je communiquerai lorsque j&amp;rsquo;aurai fini le minimum.&lt;/p&gt; Je n&amp;#8217;en ai pas encore termin&#233; avec &#231;a. Mais si je tarde trop, je communiquerai lorsque j&amp;#8217;aurai fini le minimum.&lt;/p&gt;
&lt;p&gt;J&amp;rsquo;ai &#233;crit un framework MVC pour application javascript simple mais n&#233;anmoins tr&#232;s rapide.&lt;/p&gt; &lt;p&gt;J&amp;#8217;ai &#233;crit un framework MVC pour application javascript simple mais n&#233;anmoins tr&#232;s rapide.&lt;/p&gt;
&lt;p&gt;Meilleurs v&#339;ux &#224; tous&amp;nbsp;!&lt;/p&gt; &lt;p&gt;Meilleurs v&#339;ux &#224; tous&amp;nbsp;!&lt;/p&gt;
</content> </content>
@ -486,14 +526,14 @@ Je n&amp;rsquo;en ai pas encore termin&#233; avec &#231;a. Mais si je tarde trop
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
&lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt; J&amp;rsquo;ai fait un syst&#232;me simple de macros pour mon blog. Par exemple, il me suffit d&amp;rsquo;&#233;crire %&lt;span&gt;&lt;/span&gt;latex et &#231;a affiche &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="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt; J&amp;#8217;ai fait un syst&#232;me simple de macros pour mon blog. Par exemple, il me suffit d&amp;#8217;&#233;crire %&lt;span&gt;&lt;/span&gt;latex et &#231;a affiche &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;/div&gt;
&lt;p&gt;J&amp;rsquo;ai ajouter un syst&#232;me de macro pour mon syst&#232;me de blog. &lt;p&gt;J&amp;#8217;ai ajouter un syst&#232;me de macro pour mon syst&#232;me de blog.
Lorsqu&amp;rsquo;on est habitu&#233; &#224; &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> Lorsqu&amp;#8217;on est habitu&#233; &#224; &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>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2010-10-14:/Scratch/fr/blog/2010-10-14-Fun-with-wav/</id> <id>tag:yannesposito.com,2010-10-14:/Scratch/fr/blog/2010-10-14-Fun-with-wav/</id>
@ -517,10 +557,10 @@ Lorsqu&amp;rsquo;on est habitu&#233; &#224; &lt;span style="text-transform: uppe
&lt;/div&gt; &lt;/div&gt;
&lt;p&gt;J&amp;rsquo;ai eu besoin de calculer la somme des valeurs absolue des donn&#233;es d&amp;rsquo;un fichier &lt;code&gt;wav&lt;/code&gt;. &lt;p&gt;J&amp;#8217;ai eu besoin de calculer la somme des valeurs absolue des donn&#233;es d&amp;#8217;un fichier &lt;code&gt;wav&lt;/code&gt;.
Pour des raison d&amp;rsquo;efficacit&#233; (et aussi de fun), j&amp;rsquo;ai fait le programme en &lt;code&gt;C&lt;/code&gt;.&lt;/p&gt; Pour des raison d&amp;#8217;efficacit&#233; (et aussi de fun), j&amp;#8217;ai fait le programme en &lt;code&gt;C&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Cel&#224; faisait longtemps que je n&amp;rsquo;avais pas programm&#233; en &lt;code&gt;C&lt;/code&gt;. &lt;p&gt;Cel&#224; faisait longtemps que je n&amp;#8217;avais pas programm&#233; en &lt;code&gt;C&lt;/code&gt;.
De m&#233;moire il &#233;tait peu ais&#233; de manipuler des ...&lt;/p&gt;</content> De m&#233;moire il &#233;tait peu ais&#233; de manipuler des ...&lt;/p&gt;</content>
</entry> </entry>
<entry> <entry>
@ -533,7 +573,7 @@ De m&#233;moire il &#233;tait peu ais&#233; de manipuler des ...&lt;/p&gt;</cont
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-10-10-Secure-eMail-on-Mac-in-few-steps/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-10-10-Secure-eMail-on-Mac-in-few-steps/"/>
<content type="html">&lt;p&gt;&lt;img alt="Title image" src="/Scratch/img/blog/2010-10-10-Secure-eMail-on-Mac-in-few-steps/main.png" class="clean " /&gt;&lt;/p&gt; <content type="html">&lt;img alt="Title image" src="/Scratch/img/blog/2010-10-10-Secure-eMail-on-Mac-in-few-steps/main.png" class="clean " /&gt;
&lt;div class="intro"&gt; &lt;div class="intro"&gt;
@ -545,16 +585,16 @@ De m&#233;moire il &#233;tait peu ais&#233; de manipuler des ...&lt;/p&gt;</cont
&lt;li&gt;R&#233;cup&#233;rez un certificat sign&#233; par une AC: &lt;a href="http://www.instantssl.com/ssl-certificate-products/free-email-certificate.html"&gt;cliquez ici pour un certificat gratuit&lt;/a&gt;&amp;nbsp;;&lt;/li&gt; &lt;li&gt;R&#233;cup&#233;rez un certificat sign&#233; par une AC: &lt;a href="http://www.instantssl.com/ssl-certificate-products/free-email-certificate.html"&gt;cliquez ici pour un certificat gratuit&lt;/a&gt;&amp;nbsp;;&lt;/li&gt;
&lt;li&gt;ouvrez le fichier&amp;nbsp;;&lt;/li&gt; &lt;li&gt;ouvrez le fichier&amp;nbsp;;&lt;/li&gt;
&lt;li&gt;supprimer le fichier en mode s&#233;curis&#233;&amp;nbsp;;&lt;/li&gt; &lt;li&gt;supprimer le fichier en mode s&#233;curis&#233;&amp;nbsp;;&lt;/li&gt;
&lt;li&gt;utilisez Mail plut&#244;t que l&amp;rsquo;interface web de gmail.&lt;/li&gt; &lt;li&gt;utilisez Mail plut&#244;t que l&amp;#8217;interface web de gmail.&lt;/li&gt;
&lt;/ul&gt; &lt;/ul&gt;
&lt;/div&gt; &lt;/div&gt;
&lt;p&gt;J&amp;rsquo;ai (re)d&#233;couvert comment adoptez la norme S/MIME. &lt;p&gt;J&amp;#8217;ai (re)d&#233;couvert comment adoptez la norme S/MIME.
J&amp;rsquo;ai &#233;t&#233; surpris de voir &#224; quel point ce fut ais&#233;. J&amp;#8217;ai &#233;t&#233; surpris de voir &#224; quel point ce fut ais&#233;.
Il y a seulement quelques ann&#233;es c&amp;r...&lt;/p&gt;&lt;/p&gt;</content> Il y a seulement quelques ann&#233;es c&amp;#8217;&#233;...&lt;/p&gt;&lt;/img&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2010-10-06:/Scratch/fr/blog/2010-10-06-New-Blog-Design-Constraints/</id> <id>tag:yannesposito.com,2010-10-06:/Scratch/fr/blog/2010-10-06-New-Blog-Design-Constraints/</id>
@ -566,15 +606,15 @@ Il y a seulement quelques ann&#233;es c&amp;r...&lt;/p&gt;&lt;/p&gt;</content>
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-10-06-New-Blog-Design-Constraints/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-10-06-New-Blog-Design-Constraints/"/>
<content type="html">&lt;p&gt;Vous avez pu constater que j&amp;rsquo;ai modifi&#233; le design de mon blog. <content type="html">&lt;p&gt;Vous avez pu constater que j&amp;#8217;ai modifi&#233; le design de mon blog.
Maintenant il doit &#234;tre beaucoup plus l&#233;ger qu&amp;rsquo;avant. Maintenant il doit &#234;tre beaucoup plus l&#233;ger qu&amp;#8217;avant.
Je n&amp;rsquo;utilise plus de CSS3 et beaucoup moins de javascript. Je n&amp;#8217;utilise plus de CSS3 et beaucoup moins de javascript.
Bien entendu, m&#234;me avant, mes pages &#233;taient parfaitement lisibles sans javascript. Bien entendu, m&#234;me avant, mes pages &#233;taient parfaitement lisibles sans javascript.
Mais, je me suis aper&#231;u que les syst&#232;mes de CSS3 sont loin d&amp;rsquo;&#234;tre au point. Mais, je me suis aper&#231;u que les syst&#232;mes de CSS3 sont loin d&amp;#8217;&#234;tre au point.
J&amp;rsquo;utilisait des gradient en CSS3, ainsi que des ombres sous le texte. &#199;a avait un rendu tr&#232;s sympa. Sauf&amp;hellip; J&amp;#8217;utilisait des gradient en CSS3, ainsi que des ombres sous le texte. &#199;a avait un rendu tr&#232;s sympa. Sauf&amp;#8230;
Ce n&amp;rsquo;&#233;tait pas compatible ie6, sous Chrome le rendu &#233;tait d&amp;rsquo;une lenteur incroyable. Ce n&amp;#8217;&#233;tait pas compatible ie6, sous Chrome le rendu &#233;tait d&amp;#8217;une lenteur incroyable.
J&amp;rsquo;ai donc d&#233;cid&#233; de faire un site &#224; minima. J&amp;#8217;ai donc d&#233;cid&#233; de faire un site &#224; minima.
Je voulais qu&amp;rsquo;il soit joli &lt;em&gt;et&lt;/em&gt; le plus simple possible pour assurer sa compatibilit&#233;. Je voulais qu&amp;#8217;il soit joli &lt;em&gt;et&lt;/em&gt; le plus simple possible pour assurer sa compatibilit&#233;.
Les r&#232;gles que je me suis fix&#233;es sont donc:&lt;/p&gt; Les r&#232;gles que je me suis fix&#233;es sont donc:&lt;/p&gt;
</content> </content>
@ -589,14 +629,14 @@ Les r&#232;gles que je me suis fix&#233;es sont donc:&lt;/p&gt;
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-09-02-Use-git-to-calculate-trusted-mtimes/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-09-02-Use-git-to-calculate-trusted-mtimes/"/>
<content type="html">&lt;p&gt;Vous pouvez remarquer qu&amp;rsquo;&#224; la fin de chaque page je donne une date de derni&#232;re modification. <content type="html">&lt;p&gt;Vous pouvez remarquer qu&amp;#8217;&#224; la fin de chaque page je donne une date de derni&#232;re modification.
Pr&#233;c&#233;demment cette date &#233;tait calcul&#233;e en utilisant la date du fichier. Pr&#233;c&#233;demment cette date &#233;tait calcul&#233;e en utilisant la date du fichier.
Mais il arrive fr&#233;quemment que je fasse un &lt;code&gt;touch&lt;/code&gt; d&amp;rsquo;un fichier pour engendrer tout le site de nouveau. Mais il arrive fr&#233;quemment que je fasse un &lt;code&gt;touch&lt;/code&gt; d&amp;#8217;un fichier pour engendrer tout le site de nouveau.
Donc la date n&amp;rsquo;est pas n&#233;cessairement la &lt;em&gt;vraie&lt;/em&gt; de modification du contenue.&lt;/p&gt; Donc la date n&amp;#8217;est pas n&#233;cessairement la &lt;em&gt;vraie&lt;/em&gt; de modification du contenue.&lt;/p&gt;
&lt;p&gt;J&amp;rsquo;utilise &lt;a href="http://git-scm.org"&gt;git&lt;/a&gt; pour &lt;em&gt;versionner&lt;/em&gt; mon site web. &lt;p&gt;J&amp;#8217;utilise &lt;a href="http://git-scm.org"&gt;git&lt;/a&gt; pour &lt;em&gt;versionner&lt;/em&gt; mon site web.
Et cet outil me permet de r&#233;cup&#233;rer la derni&#232;re date de &lt;em&gt;vraie&lt;/em&gt; modification d&amp;rsquo;un fichier. Et cet outil me permet de r&#233;cup&#233;rer la derni&#232;re date de &lt;em&gt;vraie&lt;/em&gt; modification d&amp;#8217;un fichier.
Voici comment je m&amp;rsquo;y prend avec &lt;a href="http://nanoc.stoneship.org"&gt;nanoc&lt;/a&gt;&amp;nbsp;:&lt;/p&gt; Voici comment je m&amp;#8217;y prend avec &lt;a href="http://nanoc.stoneship.org"&gt;nanoc&lt;/a&gt;&amp;nbsp;:&lt;/p&gt;
&lt;div class="codefile"&gt;&lt;/div&gt;</content> &lt;div class="codefile"&gt;&lt;/div&gt;</content>
</entry> </entry>
@ -610,10 +650,10 @@ Voici comment je m&amp;rsquo;y prend avec &lt;a href="http://nanoc.stoneship.org
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-09-02-base64-and-sha1-on-iPhone/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-09-02-base64-and-sha1-on-iPhone/"/>
<content type="html">&lt;p&gt;Allons directement &#224; l&amp;rsquo;essentiel&amp;nbsp;: <content type="html">&lt;p&gt;Allons directement &#224; l&amp;#8217;essentiel&amp;nbsp;:
voici deux fonctions &#224; int&#233;grer &#224; votre application iPhone pour afficher l&amp;rsquo;encodage en base64 ou en hexadecimal du hash sha1 d&amp;rsquo;un string en Objective-C pour iPhone.&lt;/p&gt; voici deux fonctions &#224; int&#233;grer &#224; votre application iPhone pour afficher l&amp;#8217;encodage en base64 ou en hexadecimal du hash sha1 d&amp;#8217;un string en Objective-C pour iPhone.&lt;/p&gt;
&lt;p&gt;Pour l&amp;rsquo;usage c&amp;rsquo;est tr&#232;s simple, copiez le code dans la classe de votre choix. &lt;p&gt;Pour l&amp;#8217;usage c&amp;#8217;est tr&#232;s simple, copiez le code dans la classe de votre choix.
Puis&amp;nbsp;:&lt;/p&gt; Puis&amp;nbsp;:&lt;/p&gt;
&lt;pre&gt;&lt;code class="objective-c"&gt;#import &amp;lt;CommonCrypto/CommonDigest.h&amp;gt; &lt;pre&gt;&lt;code class="objective-c"&gt;#import &amp;lt;CommonCrypto/CommonDigest.h&amp;gt;
@ -623,8 +663,8 @@ NSString *b64_hash = [self b64_sha1:@"some NSString to be sha1'ed"];
NSString *hex_hash = [self hex_sha1:@"some NSString to be sha1'ed"]; NSString *hex_hash = [self hex_sha1:@"some NSString to be sha1'ed"];
&lt;/code&gt;&lt;/pre&gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;L&amp;rsquo;algorithme pour l&amp;rsquo;encodage en &lt;code&gt;base64&lt;/code&gt; doit &#234;tre programm&#233; sur iPhone. &lt;p&gt;L&amp;#8217;algorithme pour l&amp;#8217;encodage en &lt;code&gt;base64&lt;/code&gt; doit &#234;tre programm&#233; sur iPhone.
Il n&amp;rsquo;y a pas de librairie officielle qui s&amp;rsquo;occupe de &#231;a.&lt;/p&gt; Il n&amp;#8217;y a pas de librairie officielle qui s&amp;#8217;occupe de &#231;a.&lt;/p&gt;
&lt;div class="codefile"&gt;&lt;/div&gt;</content> &lt;div class="codefile"&gt;&lt;/div&gt;</content>
</entry> </entry>
@ -638,19 +678,19 @@ Il n&amp;rsquo;y a pas de librairie officielle qui s&amp;rsquo;occupe de &#231;a
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-08-31-send-mail-from-command-line-with-attached-file/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-08-31-send-mail-from-command-line-with-attached-file/"/>
<content type="html">&lt;p&gt;J&amp;rsquo;ai d&#251; envoyer un mail en ligne de commande r&#233;cemment. <content type="html">&lt;p&gt;J&amp;#8217;ai d&#251; envoyer un mail en ligne de commande r&#233;cemment.
Quelle ne f&#251;t pas ma surprise lorsque je constatais que ce n&amp;rsquo;&#233;tait vraiment pas &#233;vident. Quelle ne f&#251;t pas ma surprise lorsque je constatais que ce n&amp;#8217;&#233;tait vraiment pas &#233;vident.
Je n&amp;rsquo;avais ni &lt;code&gt;pine&lt;/code&gt; ni &lt;code&gt;mutt&lt;/code&gt;. Seulement &lt;code&gt;mail&lt;/code&gt; et &lt;code&gt;mailx&lt;/code&gt;.&lt;/p&gt; Je n&amp;#8217;avais ni &lt;code&gt;pine&lt;/code&gt; ni &lt;code&gt;mutt&lt;/code&gt;. Seulement &lt;code&gt;mail&lt;/code&gt; et &lt;code&gt;mailx&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Ce qu&amp;rsquo;on trouve sur internet pour envoyer un mail avec fichier attach&#233; c&amp;rsquo;est &#231;a&amp;nbsp;:&lt;/p&gt; &lt;p&gt;Ce qu&amp;#8217;on trouve sur internet pour envoyer un mail avec fichier attach&#233; c&amp;#8217;est &#231;a&amp;nbsp;:&lt;/p&gt;
&lt;pre&gt;&lt;code class="zsh"&gt;uuencode fic.jpg fic.jpg | mail -s 'Subject' &lt;pre&gt;&lt;code class="zsh"&gt;uuencode fic.jpg fic.jpg | mail -s 'Subject'
&lt;/code&gt;&lt;/pre&gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Bon, alors, b&#234;te et disciplin&#233; j&amp;rsquo;ai essay&#233;. &lt;p&gt;Bon, alors, b&#234;te et disciplin&#233; j&amp;#8217;ai essay&#233;.
Et bien, &#231;a marche &lt;em&gt;presque&lt;/em&gt; tout le temps. Et bien, &#231;a marche &lt;em&gt;presque&lt;/em&gt; tout le temps.
Pour mon fichier &#231;a n&amp;rsquo;a pas march&#233; du tout. Pour mon fichier &#231;a n&amp;#8217;a pas march&#233; du tout.
Je l&amp;rsquo;ai compress&#233; au format &lt;code&gt;.gz&lt;/code&gt;, &lt;code&gt;.bz2&lt;/code&gt; et &lt;code&gt;.zip&lt;/code&gt;. Je l&amp;#8217;ai compress&#233; au format &lt;code&gt;.gz&lt;/code&gt;, &lt;code&gt;.bz2&lt;/code&gt; et &lt;code&gt;.zip&lt;/code&gt;.
Avec le format &lt;code&gt;.bz2&lt;/code&gt; le mail re&#231;u avait bien un fichie...&lt;/p&gt;</content> Avec le format &lt;code&gt;.bz2&lt;/code&gt; le mail re&#231;u avait bien un fichie...&lt;/p&gt;</content>
</entry> </entry>
<entry> <entry>
@ -665,14 +705,14 @@ Avec le format &lt;code&gt;.bz2&lt;/code&gt; le mail re&#231;u avait bien un fic
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-08-23-Now-heberged-on-heroku/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-08-23-Now-heberged-on-heroku/"/>
<content type="html">&lt;h1 class="first" id="maintenant-sur-herokuhttpherokucom"&gt;Maintenant sur &lt;a href="http://heroku.com"&gt;Heroku&lt;/a&gt;&lt;/h1&gt; <content type="html">&lt;h1 class="first" id="maintenant-sur-herokuhttpherokucom"&gt;Maintenant sur &lt;a href="http://heroku.com"&gt;Heroku&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;J&amp;rsquo;ai chang&#233; mon h&#233;bergeur. Mobileme n&amp;rsquo;est absolument pas adapt&#233; &#224; la diffusion de mon blog. C&amp;rsquo;est pourquoi je suis pass&#233; &#224; &lt;a href="http://heroku.com"&gt;Heroku&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;J&amp;#8217;ai chang&#233; mon h&#233;bergeur. Mobileme n&amp;#8217;est absolument pas adapt&#233; &#224; la diffusion de mon blog. C&amp;#8217;est pourquoi je suis pass&#233; &#224; &lt;a href="http://heroku.com"&gt;Heroku&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Mais comme vous devez le savoir mon blog est un site compl&#232;tement statique. &lt;p&gt;Mais comme vous devez le savoir mon blog est un site compl&#232;tement statique.
J&amp;rsquo;utilise &lt;a href="http://nanoc.stoneship.org/"&gt;nanoc&lt;/a&gt; pour l&amp;rsquo;engendrer. J&amp;#8217;utilise &lt;a href="http://nanoc.stoneship.org/"&gt;nanoc&lt;/a&gt; pour l&amp;#8217;engendrer.
Avoir un site statique am&#232;ne beaucoup d&amp;rsquo;avantages par rapport &#224; un site dynamique. Surtout en terme de s&#233;curit&#233;. Avoir un site statique am&#232;ne beaucoup d&amp;#8217;avantages par rapport &#224; un site dynamique. Surtout en terme de s&#233;curit&#233;.
Voici comment configurer un site statique sur heroku.&lt;/p&gt; Voici comment configurer un site statique sur heroku.&lt;/p&gt;
&lt;p&gt;La racine de mes fichiers est &amp;lsquo;/output&amp;rsquo;. Vous devez simplement cr&#233;er deux fichiers. Un fichier &lt;code&gt;config.ru&lt;/code&gt;&lt;/p&gt;</content> &lt;p&gt;La racine de mes fichiers est &amp;#8216;/output&amp;#8217;. Vous devez simplement cr&#233;er deux fichiers. Un fichier &lt;code&gt;config.ru&lt;/code&gt;&lt;/p&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2010-08-11:/Scratch/fr/blog/2010-07-09-Indecidabilities/</id> <id>tag:yannesposito.com,2010-08-11:/Scratch/fr/blog/2010-07-09-Indecidabilities/</id>
@ -684,8 +724,39 @@ Voici comment configurer un site statique sur heroku.&lt;/p&gt;
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-07-09-Indecidabilities/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-07-09-Indecidabilities/"/>
<content type="html"> <content type="html">&lt;p&gt;&amp;lt;% # toremove_ %&amp;gt;&lt;/p&gt;
</content>
&lt;div class="intro"&gt;
&lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt; Je cr&#233;e un mode math&#233;matique simple pour parler de diff&#233;rents types d&amp;#8217;&lt;em&gt;ind&#233;cidabilit&#233;s&lt;/em&gt;&amp;nbsp;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ind&#233;cidabilit&#233; due aux erreurs d&amp;#8217;observation&amp;nbsp;;&lt;/li&gt;
&lt;li&gt;grandes erreurs r&#233;sultant de petites erreurs de mesure&amp;nbsp;;&lt;/li&gt;
&lt;li&gt;ind&#233;cidabilit&#233; fractales&amp;nbsp;;&lt;/li&gt;
&lt;li&gt;ind&#233;cidabilit&#233; logique.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="corps"&gt;
&lt;h1 class="first" id="les-indcidabilits"&gt;Les ind&#233;cidabilit&#233;s&lt;/h1&gt;
&lt;div class="intro"&gt;
&lt;p&gt;Si le monde a &#233;t&#233; fabriqu&#233; par un d&#233;miurge, on peut dire que celui-ci devait avoir le sens de l&amp;#8217;humour.
Et le r&#233;cit que je vais faire va vous en fournir la p...&lt;/p&gt;&lt;/div&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2010-07-31:/Scratch/fr/blog/2010-07-31-New-style-after-holidays/</id> <id>tag:yannesposito.com,2010-07-31:/Scratch/fr/blog/2010-07-31-New-style-after-holidays/</id>
@ -697,11 +768,11 @@ Voici comment configurer un site statique sur heroku.&lt;/p&gt;
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-07-31-New-style-after-holidays/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-07-31-New-style-after-holidays/"/>
<content type="html">&lt;p&gt;Avant les vacances beaucoup d&amp;rsquo;utilisateurs se sont plaints de la lenteur de rendu de mon site. <content type="html">&lt;p&gt;Avant les vacances beaucoup d&amp;#8217;utilisateurs se sont plaints de la lenteur de rendu de mon site.
Il s&amp;rsquo;agit notamment de probl&#232;mes avec Chrome en particulier. Il s&amp;#8217;agit notamment de probl&#232;mes avec Chrome en particulier.
Mais pour &#233;viter tout probl&#232;me. Mais pour &#233;viter tout probl&#232;me.
J&amp;rsquo;ai compl&#232;tement modifi&#233; le style de mon site web. J&amp;#8217;ai compl&#232;tement modifi&#233; le style de mon site web.
Il est inspir&#233; du style de l&amp;rsquo;application iBooks&lt;small&gt;&amp;copy;&lt;/small&gt; sur iPhone&lt;small&gt;&amp;copy;&lt;/small&gt;.&lt;/p&gt; Il est inspir&#233; du style de l&amp;#8217;application iBooks&lt;small&gt;&amp;copy;&lt;/small&gt; sur iPhone&lt;small&gt;&amp;copy;&lt;/small&gt;.&lt;/p&gt;
&lt;p&gt;Dites moi ce que vous pensez de ce nouveau design.&lt;/p&gt; &lt;p&gt;Dites moi ce que vous pensez de ce nouveau design.&lt;/p&gt;
</content> </content>
@ -716,10 +787,10 @@ Il est inspir&#233; du style de l&amp;rsquo;application iBooks&lt;small&gt;&amp;
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-07-07-CSS-rendering-problems-by-navigator/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-07-07-CSS-rendering-problems-by-navigator/"/>
<content type="html">&lt;p&gt;Beaucoup d&amp;rsquo;utilisateurs de &lt;a href="http://reddit.com"&gt;Reddit&lt;/a&gt; m&amp;rsquo;ont rapport&#233; que mon site &#233;tait tr&#232;s long &#224; charger et &#224; &lt;em&gt;scroller&lt;/em&gt;. <content type="html">&lt;p&gt;Beaucoup d&amp;#8217;utilisateurs de &lt;a href="http://reddit.com"&gt;Reddit&lt;/a&gt; m&amp;#8217;ont rapport&#233; que mon site &#233;tait tr&#232;s long &#224; charger et &#224; &lt;em&gt;scroller&lt;/em&gt;.
Ils pensaient qu&amp;rsquo;il s&amp;rsquo;agissait d&amp;rsquo;un probl&#232;me d&#251; aux ombres que j&amp;rsquo;applique sur le texte. Ils pensaient qu&amp;#8217;il s&amp;#8217;agissait d&amp;#8217;un probl&#232;me d&#251; aux ombres que j&amp;#8217;applique sur le texte.
J&amp;rsquo;&#233;tais un peu surpris puisque je fais mes tests sur une machine vraiment tr&#232;s lente et je n&amp;rsquo;avais jamais d&#233;tect&#233; ces probl&#232;mes. J&amp;#8217;&#233;tais un peu surpris puisque je fais mes tests sur une machine vraiment tr&#232;s lente et je n&amp;#8217;avais jamais d&#233;tect&#233; ces probl&#232;mes.
En r&#233;alit&#233;, ce qui ralenti le rendu de ce site est par ordre d&amp;rsquo;importance&amp;nbsp;:&lt;/p&gt; En r&#233;alit&#233;, ce qui ralenti le rendu de ce site est par ordre d&amp;#8217;importance&amp;nbsp;:&lt;/p&gt;
&lt;ol&gt; &lt;ol&gt;
&lt;li&gt;Les d&#233;grad&#233;s sur Chrome (pas dans Safari sur Mac)&lt;/li&gt; &lt;li&gt;Les d&#233;grad&#233;s sur Chrome (pas dans Safari sur Mac)&lt;/li&gt;
@ -728,7 +799,7 @@ En r&#233;alit&#233;, ce qui ralenti le rendu de ce site est par ordre d&amp;rsq
&lt;h2 id="les-dgrads"&gt;les d&#233;grad&#233;s&lt;/h2&gt; &lt;h2 id="les-dgrads"&gt;les d&#233;grad&#233;s&lt;/h2&gt;
&lt;p&gt;Sur Safari il n&amp;rsquo;y a absolument aucun probl&#232;me avec les d&#233;grad&#233;s. Par contre sur Chrome sous Linux le si...&lt;/p&gt;</content> &lt;p&gt;Sur Safari il n&amp;#8217;y a absolument aucun probl&#232;me avec les d&#233;grad&#233;s. Par contre sur Chrome sous Linux le si...&lt;/p&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2010-07-05:/Scratch/fr/blog/2010-07-05-Cappuccino-and-Web-applications/</id> <id>tag:yannesposito.com,2010-07-05:/Scratch/fr/blog/2010-07-05-Cappuccino-and-Web-applications/</id>
@ -747,10 +818,10 @@ En r&#233;alit&#233;, ce qui ralenti le rendu de ce site est par ordre d&amp;rsq
&lt;p&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;:&lt;/p&gt; &lt;p&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;:&lt;/p&gt;
&lt;ul&gt; &lt;ul&gt;
&lt;li&gt;J&amp;rsquo;ai essay&#233; de faire une version de &lt;a href="http://yannesposito.com/Softwares/YPassword.html"&gt;YPassword&lt;/a&gt; en jQuery et avec Cappuccino.&lt;/li&gt; &lt;li&gt;J&amp;#8217;ai essay&#233; de faire une version de &lt;a href="http://yannesposito.com/Softwares/YPassword.html"&gt;YPassword&lt;/a&gt; en jQuery et avec Cappuccino.&lt;/li&gt;
&lt;li&gt;Cappuccino est tr&#232;s bien sur les navigateurs non mobile mais l&amp;rsquo;application p&#232;se 1.4Mo et n&amp;rsquo;est pas compatible avec l&amp;rsquo;iPhone.&lt;/li&gt; &lt;li&gt;Cappuccino est tr&#232;s bien sur les navigateurs non mobile mais l&amp;#8217;application p&#232;se 1.4Mo et n&amp;#8217;est pas compatible avec l&amp;#8217;iPhone.&lt;/li&gt;
&lt;li&gt;la version jQuery n&amp;rsquo;est pas aussi jolie que la version r&#233;alis&#233;e avec Cappuccino mais elle p&#232;se seulement 106Ko et est compatible avec l&amp;rsquo;iPhone.&lt;/li&gt; &lt;li&gt;la version jQuery n&amp;#8217;est pas aussi jolie que la version r&#233;alis&#233;e avec Cappuccino mais elle p&#232;se seulement 106Ko et est compatible avec l&amp;#8217;iPhone.&lt;/li&gt;
&lt;li&gt;J&amp;rsquo;essayerai Dashcode 3&lt;/li&gt; &lt;li&gt;J&amp;#8217;essayerai Dashcode 3&lt;/li&gt;
&lt;/ul&gt; &lt;/ul&gt;
@ -808,12 +879,12 @@ function initCode() {
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-06-17-hide-yourself-to-analytics/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-06-17-hide-yourself-to-analytics/"/>
<content type="html">&lt;p&gt;Voici un moyen tr&#232;s simple de ne plus &#234;tre comptabilis&#233; dans les visites de son propre site. <content type="html">&lt;p&gt;Voici un moyen tr&#232;s simple de ne plus &#234;tre comptabilis&#233; dans les visites de son propre site.
Tout d&amp;rsquo;abord, vous devriez jeter un coup d&amp;rsquo;&#339;il sur comment &lt;a href="/Scratch/fr/blog/2010-06-17-track-events-with-google-analytics"&gt;je g&#232;re les syst&#232;mes de r&#233;cup&#233;ration de statistiques&lt;/a&gt;. Tout d&amp;#8217;abord, vous devriez jeter un coup d&amp;#8217;&#339;il sur comment &lt;a href="/Scratch/fr/blog/2010-06-17-track-events-with-google-analytics"&gt;je g&#232;re les syst&#232;mes de r&#233;cup&#233;ration de statistiques&lt;/a&gt;.
Je centralise tout dans un seul fichier javascript ce qui facilite le travail.&lt;/p&gt; Je centralise tout dans un seul fichier javascript ce qui facilite le travail.&lt;/p&gt;
&lt;p&gt;Cette m&#233;thode n&#233;cessite l&amp;rsquo;utilisation de &lt;code&gt;jquery-cookie&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;Cette m&#233;thode n&#233;cessite l&amp;#8217;utilisation de &lt;code&gt;jquery-cookie&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Avant de comptabiliser les visites, je v&#233;rifie que la cl&#233; &lt;code&gt;admin&lt;/code&gt; n&amp;rsquo;est pas utilis&#233;e dans mes cookies.&lt;/p&gt; &lt;p&gt;Avant de comptabiliser les visites, je v&#233;rifie que la cl&#233; &lt;code&gt;admin&lt;/code&gt; n&amp;#8217;est pas utilis&#233;e dans mes cookies.&lt;/p&gt;
&lt;pre&gt;&lt;code class="javascript"&gt; var admin = $.cookie('admin'); &lt;pre&gt;&lt;code class="javascript"&gt; var admin = $.cookie('admin');
if (! admin) { if (! admin) {
@ -833,7 +904,7 @@ Je centralise tout dans un seul fichier javascript ce qui facilite le travail.&l
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-06-17-track-events-with-google-analytics/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-06-17-track-events-with-google-analytics/"/>
<content type="html">&lt;p&gt;Voici comment analyser tous les clics que font vos utilisateurs sur votre blog en incluant google analytics de fa&#231;on asynchrone.&lt;/p&gt; <content type="html">&lt;p&gt;Voici comment analyser tous les clics que font vos utilisateurs sur votre blog en incluant google analytics de fa&#231;on asynchrone.&lt;/p&gt;
&lt;p&gt;Dans le html, il faut utiliser &lt;a href="http://jquery.com"&gt;jQuery&lt;/a&gt; et un fichier que j&amp;rsquo;ai appel&#233; &lt;code&gt;yga.js&lt;/code&gt;&amp;nbsp;:&lt;/p&gt; &lt;p&gt;Dans le html, il faut utiliser &lt;a href="http://jquery.com"&gt;jQuery&lt;/a&gt; et un fichier que j&amp;#8217;ai appel&#233; &lt;code&gt;yga.js&lt;/code&gt;&amp;nbsp;:&lt;/p&gt;
&lt;pre&gt;&lt;code class="html"&gt; &amp;lt;script type="text/javascript" src="jquery.js"&amp;gt;&amp;lt;/script&amp;gt; &lt;pre&gt;&lt;code class="html"&gt; &amp;lt;script type="text/javascript" src="jquery.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript" src="yga.js"&amp;gt;&amp;lt;/script&amp;gt; &amp;lt;script type="text/javascript" src="yga.js"&amp;gt;&amp;lt;/script&amp;gt;
@ -857,7 +928,7 @@ Je centralise tout dans un seul fichier javascript ce qui facilite le travail.&l
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-06-15-Get-my-blog-engine/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-06-15-Get-my-blog-engine/"/>
<content type="html">&lt;p&gt;J&amp;rsquo;ai publi&#233; une version &lt;em&gt;light&lt;/em&gt; de mon syst&#232;me de blog hier soir. Par &lt;em&gt;light&lt;/em&gt; il faut comprendre avec un CSS plus &#233;pur&#233; et plus portable (sans les bords ronds). <content type="html">&lt;p&gt;J&amp;#8217;ai publi&#233; une version &lt;em&gt;light&lt;/em&gt; de mon syst&#232;me de blog hier soir. Par &lt;em&gt;light&lt;/em&gt; il faut comprendre avec un CSS plus &#233;pur&#233; et plus portable (sans les bords ronds).
Vous pouvez le r&#233;cup&#233;rer sur &lt;a href="http://github.com/yogsototh/nanoc3_blog"&gt;github.com&lt;/a&gt;.&lt;/p&gt; Vous pouvez le r&#233;cup&#233;rer sur &lt;a href="http://github.com/yogsototh/nanoc3_blog"&gt;github.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Que pouvez-vous attendre de ce syst&#232;me de blog&amp;nbsp;?&lt;/p&gt; &lt;p&gt;Que pouvez-vous attendre de ce syst&#232;me de blog&amp;nbsp;?&lt;/p&gt;
@ -879,8 +950,8 @@ Vous pouvez le r&#233;cup&#233;rer sur &lt;a href="http://github.com/yogsototh/n
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-06-14-multi-language-choices/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-06-14-multi-language-choices/"/>
<content type="html">&lt;p&gt;Je traduis la plupart de mes articles pour qu&amp;rsquo;ils soient disponibles en fran&#231;ais et en anglais. <content type="html">&lt;p&gt;Je traduis la plupart de mes articles pour qu&amp;#8217;ils soient disponibles en fran&#231;ais et en anglais.
La fa&#231;on que l&amp;rsquo;on m&amp;rsquo;a conseill&#233; &#233;tait d&amp;rsquo;avoir un fichier par langue. En g&#233;n&#233;ral &#231;a donne &#231;a.&lt;/p&gt; La fa&#231;on que l&amp;#8217;on m&amp;#8217;a conseill&#233; &#233;tait d&amp;#8217;avoir un fichier par langue. En g&#233;n&#233;ral &#231;a donne &#231;a.&lt;/p&gt;
&lt;pre class="twilight"&gt; &lt;pre class="twilight"&gt;
Bonjour, Bonjour,
@ -897,11 +968,11 @@ here is an example of english text.
&lt;/pre&gt; &lt;/pre&gt;
&lt;p&gt;Cette fa&#231;on de traduire vous impose une certaine fa&#231;on de traduire. &lt;p&gt;Cette fa&#231;on de traduire vous impose une certaine fa&#231;on de traduire.
D&amp;rsquo;abord &#233;crire enti&#232;rement le texte dans une langue, D&amp;#8217;abord &#233;crire enti&#232;rement le texte dans une langue,
puis copier le fichier et enfin retraduire dans une nouvelle langue.&lt;/p&gt; puis copier le fichier et enfin retraduire dans une nouvelle langue.&lt;/p&gt;
&lt;p&gt;Le probl&#232;me, c&amp;rsquo;est que tr&#232;s souvent, les articles ont des parties communes non n&#233;gligeables. Par exemple, les images, les codes sources, etc&amp;hellip; &lt;p&gt;Le probl&#232;me, c&amp;#8217;est que tr&#232;s souvent, les articles ont des parties communes non n&#233;gligeables. Par exemple, les images, les codes sources, etc&amp;#8230;
Lorsque je m&amp;...&lt;/p&gt;</content> Lorsque je m&amp;#...&lt;/p&gt;</content>
</entry> </entry>
<entry> <entry>
<id>tag:yannesposito.com,2010-05-24:/Scratch/fr/blog/2010-05-24-Trees--Pragmatism-and-Formalism/</id> <id>tag:yannesposito.com,2010-05-24:/Scratch/fr/blog/2010-05-24-Trees--Pragmatism-and-Formalism/</id>
@ -920,13 +991,13 @@ Lorsque je m&amp;...&lt;/p&gt;</content>
&lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt;&amp;nbsp;:&lt;/p&gt; &lt;p&gt;&lt;span class="sc"&gt;&lt;abbr title="Trop long &#224; lire"&gt;tl&#224;l&lt;/abbr&gt;&amp;nbsp;: &lt;/span&gt;&amp;nbsp;:&lt;/p&gt;
&lt;ul&gt; &lt;ul&gt;
&lt;li&gt;J&amp;rsquo;ai essay&#233; de programmer un simple filtre&amp;nbsp;;&lt;/li&gt; &lt;li&gt;J&amp;#8217;ai essay&#233; de programmer un simple filtre&amp;nbsp;;&lt;/li&gt;
&lt;li&gt;J&amp;rsquo;ai &#233;t&#233; bloqu&#233; pendant deux jours&amp;nbsp;;&lt;/li&gt; &lt;li&gt;J&amp;#8217;ai &#233;t&#233; bloqu&#233; pendant deux jours&amp;nbsp;;&lt;/li&gt;
&lt;li&gt;J&amp;rsquo;ai arr&#234;t&#233; de penser comme un robot&amp;nbsp;;&lt;/li&gt; &lt;li&gt;J&amp;#8217;ai arr&#234;t&#233; de penser comme un robot&amp;nbsp;;&lt;/li&gt;
&lt;li&gt;J&amp;rsquo;ai utilis&#233; un papier et un stylo&amp;nbsp;;&lt;/li&gt; &lt;li&gt;J&amp;#8217;ai utilis&#233; un papier et un stylo&amp;nbsp;;&lt;/li&gt;
&lt;li&gt;J&amp;rsquo;ai fait un peu de maths&amp;nbsp;;&lt;/li&gt; &lt;li&gt;J&amp;#8217;ai fait un peu de maths&amp;nbsp;;&lt;/li&gt;
&lt;li&gt;J&amp;rsquo;ai r&#233;solu le probl&#232;me en 10 minutes&amp;nbsp;;&lt;/li&gt; &lt;li&gt;J&amp;#8217;ai r&#233;solu le probl&#232;me en 10 minutes&amp;nbsp;;&lt;/li&gt;
&lt;li&gt;Conclusion: Pragmatisme n&amp;rsquo;est pas&amp;nbsp;: &amp;laquo;n&amp;rsquo;utilisez jamais la th&#233;orie&amp;raquo;. &lt;li&gt;Conclusion: Pragmatisme n&amp;#8217;est pas&amp;nbsp;: &amp;laquo;n&amp;#8217;utilisez jamais la th&#233;orie&amp;raquo;.
&lt;/div&gt; &lt;/div&gt;
@ -944,7 +1015,7 @@ Lorsque je m&amp;...&lt;/p&gt;</content>
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-05-19-How-to-cut-HTML-and-repair-it/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-05-19-How-to-cut-HTML-and-repair-it/"/>
<content type="html">&lt;p&gt;Sur ma page d&amp;rsquo;accueil vous pouvez voir la liste des mes derniers articles avec le d&#233;but de ceux-ci. Pour arriver &#224; faire &#231;a, j&amp;rsquo;ai besoin de couper le code XHTML de mes pages en plein milieu. Il m&amp;rsquo;a donc fallu trouver un moyen de les r&#233;parer.&lt;/p&gt; <content type="html">&lt;p&gt;Sur ma page d&amp;#8217;accueil vous pouvez voir la liste des mes derniers articles avec le d&#233;but de ceux-ci. Pour arriver &#224; faire &#231;a, j&amp;#8217;ai besoin de couper le code XHTML de mes pages en plein milieu. Il m&amp;#8217;a donc fallu trouver un moyen de les r&#233;parer.&lt;/p&gt;
&lt;p&gt;Prenons un exemple&amp;nbsp;:&lt;/p&gt; &lt;p&gt;Prenons un exemple&amp;nbsp;:&lt;/p&gt;
@ -958,7 +1029,7 @@ Lorsque je m&amp;...&lt;/p&gt;</content>
&amp;lt;/div&amp;gt; &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Apr&#232;s avoir coup&#233;, j&amp;rsquo;obtiens&amp;nbsp;:&lt;/p&gt; &lt;p&gt;Apr&#232;s avoir coup&#233;, j&amp;#8217;obtiens&amp;nbsp;:&lt;/p&gt;
&lt;pre&gt;&lt;code class="html"&gt;&amp;lt;div class="corps"&amp;gt; &lt;pre&gt;&lt;code class="html"&gt;&amp;lt;div class="corps"&amp;gt;
&amp;lt;div class="intro"&amp;gt; &amp;lt;div class="intro"&amp;gt;
@ -978,12 +1049,12 @@ Lorsque je m&amp;...&lt;/p&gt;</content>
<content type="html">&lt;p&gt;Bonjour &#224; tous&amp;nbsp;!&lt;/p&gt; <content type="html">&lt;p&gt;Bonjour &#224; tous&amp;nbsp;!&lt;/p&gt;
&lt;blockquote cite="http://www.madore.org/~david/weblog/2010-05.html#d.2010-05-12.1752"&gt; &lt;blockquote cite="http://www.madore.org/~david/weblog/2010-05.html#d.2010-05-12.1752"&gt;
&lt;p&gt;&amp;hellip;plus on retarde quelque chose, plus il devient difficile de s&amp;rsquo;y mettre&amp;hellip;&lt;/p&gt; &lt;p&gt;&amp;#8230;plus on retarde quelque chose, plus il devient difficile de s&amp;#8217;y mettre&amp;#8230;&lt;/p&gt;
&lt;/blockquote&gt; &lt;/blockquote&gt;
&lt;p&gt;Je devais &#233;crire d&amp;rsquo;autres articles pour ce blog. J&amp;rsquo;ai not&#233; plein d&amp;rsquo;id&#233;es dans mes &lt;em&gt;todolist&lt;/em&gt;. Mais j&amp;rsquo;avais pas mal d&amp;rsquo;autres choses &#224; faire. Et jusqu&amp;rsquo;ici, j&amp;rsquo;ai toujours dit &amp;laquo;je le ferai plus tard&amp;raquo;. Ce qui m&amp;rsquo;a fait agir, c&amp;rsquo;est la petite r&#233;flexion que j&amp;rsquo;avais lu une fois. &lt;p&gt;Je devais &#233;crire d&amp;#8217;autres articles pour ce blog. J&amp;#8217;ai not&#233; plein d&amp;#8217;id&#233;es dans mes &lt;em&gt;todolist&lt;/em&gt;. Mais j&amp;#8217;avais pas mal d&amp;#8217;autres choses &#224; faire. Et jusqu&amp;#8217;ici, j&amp;#8217;ai toujours dit &amp;laquo;je le ferai plus tard&amp;raquo;. Ce qui m&amp;#8217;a fait agir, c&amp;#8217;est la petite r&#233;flexion que j&amp;#8217;avais lu une fois.
&amp;gt; Arr&#233;tez d&amp;rsquo;&#233;crire des &lt;code&gt;TODO&lt;/code&gt; dans votre code est faites le maintenant&amp;nbsp;!&lt;br /&gt; &amp;gt; Arr&#233;tez d&amp;#8217;&#233;crire des &lt;code&gt;TODO&lt;/code&gt; dans votre code est faites le maintenant&amp;nbsp;!&lt;br /&gt;
&amp;gt; Vous serez surpris de l&amp;rsquo;efficacit&#233; de cette mesure.&lt;/p&gt; &amp;gt; Vous serez surpris de l&amp;#8217;efficacit&#233; de cette mesure.&lt;/p&gt;
&lt;p&gt;En r&#233;sum&#233;&amp;nbsp;: &lt;p&gt;En r&#233;sum&#233;&amp;nbsp;:
&amp;gt; &lt;/p&gt;&lt;/p&gt;</content> &amp;gt; &lt;/p&gt;&lt;/p&gt;</content>
@ -1000,16 +1071,16 @@ Lorsque je m&amp;...&lt;/p&gt;</content>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-03-23-Encapsulate-git/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-03-23-Encapsulate-git/"/>
<content type="html">&lt;p&gt;&lt;span class="intro"&gt; <content type="html">&lt;p&gt;&lt;span class="intro"&gt;
Voici une solution pour conserver des branches divergentes avec &lt;code&gt;git&lt;/code&gt;. Voici une solution pour conserver des branches divergentes avec &lt;code&gt;git&lt;/code&gt;.
Parce qu&amp;rsquo;il est facile de &lt;em&gt;merger&lt;/em&gt; par erreur, je propose un script qui encapsule le comportement de &lt;code&gt;git&lt;/code&gt; pour interdire certains &lt;em&gt;merges&lt;/em&gt; dangereux. Mais qui permet aussi de faire des merges en cascades de la racines vers les autres branches. Parce qu&amp;#8217;il est facile de &lt;em&gt;merger&lt;/em&gt; par erreur, je propose un script qui encapsule le comportement de &lt;code&gt;git&lt;/code&gt; pour interdire certains &lt;em&gt;merges&lt;/em&gt; dangereux. Mais qui permet aussi de faire des merges en cascades de la racines vers les autres branches.
&lt;/span&gt;&lt;/p&gt; &lt;/span&gt;&lt;/p&gt;
&lt;h2 id="se-prmunir-contre-les-erreurs"&gt;Se pr&#233;munir contre les erreurs&lt;/h2&gt; &lt;h2 id="se-prmunir-contre-les-erreurs"&gt;Se pr&#233;munir contre les erreurs&lt;/h2&gt;
&lt;p&gt;Je travaille sur un projet dans lequel certaines de mes branches &lt;code&gt;git&lt;/code&gt; doivent rester divergentes. Et les divergences devraient aller en s&amp;rsquo;accentuant.&lt;/p&gt; &lt;p&gt;Je travaille sur un projet dans lequel certaines de mes branches &lt;code&gt;git&lt;/code&gt; doivent rester divergentes. Et les divergences devraient aller en s&amp;#8217;accentuant.&lt;/p&gt;
&lt;p&gt;J&amp;rsquo;utilise aussi certaines branches qui contiennent la partie commune de ces projets.&lt;/p&gt; &lt;p&gt;J&amp;#8217;utilise aussi certaines branches qui contiennent la partie commune de ces projets.&lt;/p&gt;
&lt;p&gt;Disons que j&amp;rsquo;ai les branches&amp;nbsp;:&lt;/p&gt; &lt;p&gt;Disons que j&amp;#8217;ai les branches&amp;nbsp;:&lt;/p&gt;
...</content> ...</content>
</entry> </entry>
@ -1047,7 +1118,7 @@ Parce qu&amp;rsquo;il est facile de &lt;em&gt;merger&lt;/em&gt; par erreur, je p
&lt;p&gt;&lt;code&gt;git clone&lt;/code&gt; peut seulement r&#233;cuper la branche &lt;code&gt;master&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;&lt;code&gt;git clone&lt;/code&gt; peut seulement r&#233;cuper la branche &lt;code&gt;master&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Si vous n&amp;rsquo;avez pas beaucoup de branches, vous pouvez simplement les clone le project et ensuite pour chacune d&amp;rsquo;entre elle lancer la commande suivante&amp;nbsp;:&lt;/p&gt; &lt;p&gt;Si vous n&amp;#8217;avez pas beaucoup de branches, vous pouvez simplement les clone le project et ensuite pour chacune d&amp;#8217;entre elle lancer la commande suivante&amp;nbsp;:&lt;/p&gt;
&lt;div&gt; &lt;div&gt;
@ -1063,10 +1134,10 @@ Parce qu&amp;rsquo;il est facile de &lt;em&gt;merger&lt;/em&gt; par erreur, je p
<uri>yannesposito.com</uri> <uri>yannesposito.com</uri>
</author> </author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-02-23-When-regexp-is-not-the-best-solution/"/> <link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-02-23-When-regexp-is-not-the-best-solution/"/>
<content type="html">&lt;p&gt;Les expressions r&#233;guli&#232;res sont tr&#232;s utiles. Cependant, elles ne sont pas toujours la meilleure mani&#232;re d&amp;rsquo;aborder certain probl&#232;me autour des chaines de caract&#232;res. <content type="html">&lt;p&gt;Les expressions r&#233;guli&#232;res sont tr&#232;s utiles. Cependant, elles ne sont pas toujours la meilleure mani&#232;re d&amp;#8217;aborder certain probl&#232;me autour des chaines de caract&#232;res.
Et surtout quand les transformations que vous voulez accomplir sont simples.&lt;/p&gt; Et surtout quand les transformations que vous voulez accomplir sont simples.&lt;/p&gt;
&lt;p&gt;Je voulais savoir comment r&#233;cup&#233;rer le plus vite possible l&amp;rsquo;extension d&amp;rsquo;un nom de fichier. Il y a trois mani&#232;re naturelle d&amp;rsquo;accomplir cel&#224;&amp;nbsp;:&lt;/p&gt; &lt;p&gt;Je voulais savoir comment r&#233;cup&#233;rer le plus vite possible l&amp;#8217;extension d&amp;#8217;un nom de fichier. Il y a trois mani&#232;re naturelle d&amp;#8217;accomplir cel&#224;&amp;nbsp;:&lt;/p&gt;
&lt;div&gt; &lt;div&gt;
@ -1083,44 +1154,6 @@ ext=File.extname(str)
&lt;/div&gt; &lt;/div&gt;
&lt;p&gt;A premi&#232;re vue, je pensais que l&amp;rsquo;expression r&#233;guli&#232;re serait plus rapide que le &lt;code&gt;split&lt;/code&gt; parce qu&amp;rsquo;il pouvait y avoir plusieurs de &lt;code&gt;.&lt;/code&gt; dans un nom de fichie...&lt;/p&gt;</content> &lt;p&gt;A premi&#232;re vue, je pensais que l&amp;#8217;expression r&#233;guli&#232;re serait plus rapide que le &lt;code&gt;split&lt;/code&gt; parce qu&amp;#8217;il pouvait y avoir plusieurs de &lt;code&gt;.&lt;/code&gt; dans un nom de fichie...&lt;/p&gt;</content>
</entry>
<entry>
<id>tag:yannesposito.com,2010-02-18:/Scratch/fr/blog/2010-02-18-split-a-file-by-keyword/</id>
<title type="html">d&#233;couper un fichier par mots cl&#233;s</title>
<published>2010-02-18T13:29:14Z</published>
<updated>2010-02-18T13:29:14Z</updated>
<author>
<name>Yann Esposito</name>
<uri>yannesposito.com</uri>
</author>
<link rel="alternate" href="http://yannesposito.com/Scratch/fr/blog/2010-02-18-split-a-file-by-keyword/"/>
<content type="html">&lt;p&gt;Assez bizarrement, je n&amp;rsquo;ai trouv&#233; aucun outil UNIX pour d&#233;couper un fichier par mot cl&#233;.
Alors j&amp;rsquo;en ai fait un en &lt;code&gt;awk&lt;/code&gt;. Je le met ici principalement pour moi, mais &#231;a peut toujours servir &#224; quelqu&amp;rsquo;un d&amp;rsquo;autre.
Le code suivant d&#233;coupe un fichier pour chacune de ses ligne contenant le mot &lt;code&gt;UTC&lt;/code&gt;.&lt;/p&gt;
&lt;div&gt;
&lt;pre&gt;&lt;code class="perl"&gt;#!/usr/bin/env awk
BEGIN{i=0;}
/UTC/ {
i+=1;
FIC=sprintf("fic.%03d",i);
}
{print $0&amp;gt;&amp;gt;FIC}
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;En r&#233;alit&#233;, j&amp;rsquo;avais besoin de cet outils pour avoir un fichier par jour. Chaque ligne contenant UTC ayant le format suivant&amp;nbsp;:&lt;/p&gt;
&lt;pre class="twilight"&gt;
Mon Dec 7 10:32:30 UTC 2009
&lt;/pre&gt;
&lt;p&gt;J&amp;rsquo;en suis finallement arriv&#233; au code suivant&amp;nbsp;:&lt;/p&gt;
&lt;div&gt;
...&lt;/div&gt;</content>
</entry> </entry>
</feed> </feed>

File diff suppressed because it is too large Load diff

View file

@ -72,7 +72,7 @@
<h3><a href="/Scratch/en/about/contact" onclick="setLanguage('en')">Contact <span class="nicer">»</span> </a></h3> <h3><a href="/Scratch/en/about/contact" onclick="setLanguage('en')">Contact <span class="nicer">»</span> </a></h3>
<h3> <a href="/resume/index.html"> Resume <span class="nicer">»</span> </a> </h3> <h3> <a href="/resume/index.html"> Resume <span class="nicer">»</span> </a> </h3>
</div> </div>
<div class="francais right"style="text-align: right; width: 30%; font-size: 0.8em"> <div class="francais right"style="text-align: right; width: 32%; font-size: 0.8em">
<div style="color: #AAA">Français</div> <div style="color: #AAA">Français</div>
<h3> <h3>
<a href="/Scratch/fr/blog/" onclick="setLanguage('fr')"> <a href="/Scratch/fr/blog/" onclick="setLanguage('fr')">
@ -107,7 +107,7 @@
<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Copyright ©, Yann Esposito</a> <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Copyright ©, Yann Esposito</a>
</div> </div>
<div id="lastmod"> <div id="lastmod">
Modified: 12/19/2012 Modified: 01/02/2013
</div> </div>
<div> <div>
Entirely done with Entirely done with

18
tasks/csswatch Executable file
View file

@ -0,0 +1,18 @@
#!/usr/bin/env zsh
# watch and update the css
typeset -A hmap
while true; do
for src in content/css/*.sass; do
val=$(md5sum $src|awk '{print $1}')
if [[ $hmap[$src] != "$val" ]]; then
print "$src changed. Updating..."
hmap[${src}]=$val
dst="output/Scratch/assets/css/${${src:t}:r}.css"
tail -n +4 $src | sass > $dst
fi
done
sleep 1
done

View file

@ -56,6 +56,7 @@ en: title: $title
fr: title: $title fr: title: $title
author_name: Yann Esposito author_name: Yann Esposito
author_uri: yannesposito.com author_uri: yannesposito.com
layout: article2
# tags: # tags:
----- -----
<%= blogimage("main.png","Title image") %> <%= blogimage("main.png","Title image") %>