<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8724479949460106754</id><updated>2011-12-30T07:56:13.708-08:00</updated><category term='gtd'/><category term='emacs'/><category term='drawing'/><category term='zim'/><category term='javascript'/><category term='fortran'/><category term='freesmartphone'/><category term='openmoko'/><category term='paroli'/><category term='gtk'/><category term='game'/><category term='D'/><category term='coroutines'/><category term='c'/><category term='gnome'/><category term='hamster'/><category term='gedit'/><category term='python'/><category term='vala'/><category term='guisterax'/><category term='optimization'/><category term='gimp'/><category term='tichy'/><category term='inkscape'/><category term='c++'/><category term='pypy'/><category term='org-mode'/><category term='chinese'/><title type='text'>Charlie's Second Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Guillaume</name><uri>http://www.blogger.com/profile/04248189602756889056</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>31</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-676402661178883000</id><published>2011-09-23T05:45:00.000-07:00</published><updated>2011-09-23T05:47:37.158-07:00</updated><title type='text'>Ascii art Tetris game</title><content type='html'>I was bored so I wrote this little online &lt;a href="http://darshak.free.fr/asctriis/asctriis.html"&gt;tetris game in ascii art&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I hope someone will have fun playing it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-676402661178883000?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/676402661178883000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=676402661178883000' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/676402661178883000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/676402661178883000'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2011/09/ascii-art-tetris-game.html' title='Ascii art Tetris game'/><author><name>Guillaume</name><uri>http://www.blogger.com/profile/04248189602756889056</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-142741988495544584</id><published>2011-07-10T08:37:00.000-07:00</published><updated>2011-07-10T08:44:09.862-07:00</updated><title type='text'>Voxpaint, an opensource 3d voxels painter</title><content type='html'>This is the first release of a small 3D voxels painter I had been working on recently.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;For the moment it cannot do much, but I am planning to use to create some video game graphics.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;The code is hosted on launchpad: &lt;a href="https://launchpad.net/voxpaint"&gt;https://launchpad.net/voxpaint&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Check out the videos:&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe width="480" height="390" src="http://www.youtube.com/embed/Bh9BNtpWlPY" frameborder="0" allowfullscreen=""&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe width="480" height="390" src="http://www.youtube.com/embed/fy-VzY7gxUo" frameborder="0" allowfullscreen=""&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-142741988495544584?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/142741988495544584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=142741988495544584' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/142741988495544584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/142741988495544584'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2011/07/voxpaint-opensource-3d-voxels-painter.html' title='Voxpaint, an opensource 3d voxels painter'/><author><name>Guillaume</name><uri>http://www.blogger.com/profile/04248189602756889056</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/Bh9BNtpWlPY/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-1597894047723512179</id><published>2011-06-28T09:02:00.000-07:00</published><updated>2011-06-28T09:38:53.461-07:00</updated><title type='text'>Compiling Qt mobility for Simulator on Windows</title><content type='html'>These days I am working on a Symbian application using Qt 4.7.3 and Qt mobility 1.2.0.&lt;br /&gt;&lt;br /&gt;Since the last version of Qt SDK doesn't ship Qt mobility 1.2.0 for the simulator, I had to recompile it myself. Since it took me some time, I write a step by step how to to help people who are trying to do the same thing.&lt;br /&gt;&lt;br /&gt;The only real problem is that the SDK for windows doesn't include all the headers files needed to compile the sources. So I copied them from my linux installation of the SDK.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Make sure you have the latest version of Qt SDK. As I write it it is the version 1.1.2, including Qt 4.7.3 and Qt mobility 1.1.3. In my case the SDK is installed into c:\QtSDK.&lt;/li&gt;&lt;li&gt;Get the sources of qt mobility for the simulator from its &lt;a href="http://qt.gitorious.org/%7Eqtbynokia/qt-mobility/simulator-mobility"&gt;git repo&lt;/a&gt;&lt;a href="http://qt.gitorious.org/%7Eqtbynokia/qt-mobility/simulator-mobility"&gt;sitory&lt;/a&gt;. Note that it is not the same repository as for Symbian or desktop version.&lt;/li&gt;&lt;li&gt;Two directories are missing in the the simulator source on windows:&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;c:\QtSDK\Simulator\Qt\mingw\include\private&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;c:\QtSDK\Simulator\Qt\mingw\include\QtGui\private&lt;/li&gt;&lt;/ul&gt;So what I did is copied those directory from my linux partition where Qt SDK was installed (from the directory ./QtSDK/Simulator/Qt/gcc/include).&lt;/li&gt;&lt;li&gt;In a windows console, set up the PATH to include all the needed tools. You need qmake from the Simulator SDK, perl, and makew32-make:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;set PATH=c:\QtSDK\Simulator\Qt\mingw\bin;%PATH%&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;set PATH=c:\QtSDK\mingw\bin;%PATH%&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;set PATH=c:\QtSDK\Symbian\tools\perl\bin\;%PATH%&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Run configure. In my case I didn't need the messaging module and since it requires dependencies I removed it from the list of modules using the -modules argument of the command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;configure -modules "bearer contacts gallery location  publishsubscribe multimedia    systeminfo serviceframework&lt;/span&gt; sensors versit organizer feedback connectivit&lt;span style="font-style: italic;"&gt;y"&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Run the make command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;mingw32-make&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Finally install everything:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;mingw32-make install&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;After this I was able to compile and run applications using qt mobility 1.2.0 on the simulator.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-1597894047723512179?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/1597894047723512179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=1597894047723512179' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/1597894047723512179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/1597894047723512179'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2011/06/compiling-qt-mobility-for-simulator-on.html' title='Compiling Qt mobility for Simulator on Windows'/><author><name>Guillaume</name><uri>http://www.blogger.com/profile/04248189602756889056</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-1294328456924515136</id><published>2011-05-02T15:28:00.001-07:00</published><updated>2011-05-02T15:37:14.536-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gedit'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>Gedit plugin to emulate emacs alt-q</title><content type='html'>Here is a &lt;a href="https://github.com/guillaumechereau/gedit-reflow-plugin"&gt;small gedit plugin&lt;/a&gt; for all the people who are like me on an &lt;a href="http://www.gnu.org/software/emacs/"&gt;emacs&lt;/a&gt; rehab.&lt;br /&gt;&lt;br /&gt;If there is one emacs feature I really miss when using &lt;a href="http://projects.gnome.org/gedit/"&gt;gedit&lt;/a&gt; -which is by the way a great text editor- this is the alt-q command (fill-paragraph), that automatically reformats the current paragraph according to the margin width.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-1294328456924515136?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/1294328456924515136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=1294328456924515136' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/1294328456924515136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/1294328456924515136'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2011/05/gedit-plugin-to-emulate-emacs-alt-q.html' title='Gedit plugin to emulate emacs alt-q'/><author><name>Guillaume</name><uri>http://www.blogger.com/profile/04248189602756889056</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-1092195037963914595</id><published>2011-02-21T08:58:00.000-08:00</published><updated>2011-04-25T05:06:22.721-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='org-mode'/><category scheme='http://www.blogger.com/atom/ns#' term='zim'/><category scheme='http://www.blogger.com/atom/ns#' term='hamster'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><category scheme='http://www.blogger.com/atom/ns#' term='gnome'/><category scheme='http://www.blogger.com/atom/ns#' term='gtd'/><title type='text'>from org-mode to zim</title><content type='html'>In a &lt;a href="http://charlie137-2.blogspot.com/2009/05/org-mode-will-i-finally-get-organized.html"&gt;previous post&lt;/a&gt; I shared my enthusiasm with &lt;a href="http://orgmode.org/"&gt;org-mode&lt;/a&gt;, the great emacs module for keeping notes and getting things done.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;At the time I was using org-mode for pretty much everything : taking notes, keeping my contacts list,  monitoring the time spent working on different projects, etc.&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But these days, even though I still think org-mode is one of the most powerful notes taking system out there, I don't use it anymore.  Now I am using a mix of &lt;a href="http://live.gnome.org/ProjectHamster"&gt;hamster&lt;/a&gt; and &lt;a href="http://zim-wiki.org/"&gt;zim&lt;/a&gt;.  Here is the list of reasons that made me switch from org-mode:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;1. I don't use emac&lt;/b&gt;&lt;b&gt;s anymore.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;img src="http://1.bp.blogspot.com/--fkGPCl6t-8/TWKdB-olL5I/AAAAAAAABEw/XkChZ4zCOKQ/s320/emacs.png" style="cursor:pointer; cursor:hand;width: 320px; height: 108px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5576191945956732818" /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; I am not going to start the old flame war about emacs vs other text editors, but the fact is that org-mode is only useful for people who know how to use emacs.  I don't like to use too many different tools, I am already currently using gedit, netbeans and vim.  Having to use emacs at the same time confuses me too much.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2. No integration with gnome&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;content="text charset="utf-8&amp;quot;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;a href="http://1.bp.blogspot.com/-NVCplrNVAec/TWKdhe3fK3I/AAAAAAAABE4/zRZLObZnu7Q/s1600/gnome.png"&gt;&lt;img src="http://1.bp.blogspot.com/-NVCplrNVAec/TWKdhe3fK3I/AAAAAAAABE4/zRZLObZnu7Q/s320/gnome.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5576192487185132402" style="cursor: pointer; width: 320px; height: 180px; " /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/content="text&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt; This is specially important for time tracking.  I need to be able to see at every moment the task I am working on, and be able to change it in a few seconds.  With org-mode I had to switch to the workspace where I run emacs, then enter several commands to see the current task and changing it. Very often when working on a task I would forget to start or stop the timers. In contrast, hamster always show very clearly in the gnome bar what I am doing and the time spent on the task.  A simple click and I can stop the task and start a new one.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt; 3. Too complicated (but this is related to the point 1)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt; Not really a problem for people who use emacs all the time, but when I use it only for org-mode, then I spent many time simply learning the commands. Getting Things Done is all about spending time doing things, not learning about how to do things.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt; 4. Zim organization of files is much better for my needs&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://2.bp.blogspot.com/-qayr4lyw00A/TWKd4ucz7EI/AAAAAAAABFA/ltd0Y0Pq900/s1600/zim.png"&gt;&lt;img src="http://2.bp.blogspot.com/-qayr4lyw00A/TWKd4ucz7EI/AAAAAAAABFA/ltd0Y0Pq900/s320/zim.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5576192886505204802" style="cursor: pointer; width: 320px; height: 266px; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; The most important thing that org-mode (and zim) got right is that all the data should be stored in plain text files that can be read and edited by any text editor.  This way I can always access my notes no matter where. Now the problem with org-mode is that if it works very well with one file per project, it doesn't scale well for wiki style notes where you have many small text files linked to each other. Zim on the other hand make it super easy to have as many files as needed. Each file is automatically added into the ~/Notes directory, which is exactly what I want.  On the left&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;So, here is the typical way I use zim and hamster&lt;/span&gt; :&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Every morning after I turn on my computer (and I am done reading blogs and emails), I click on the hamster notification to start a new task. The timer always remind me of what I am supped to do, and this is a good physiological fence that prevent me from focusing on anything else that&lt;/div&gt;&lt;div&gt;the current task.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I keep a general Zim note for each project I am working on, that mostly look like a TODO file. Before I start to work I can read it and see what are the important things I should do.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If I suddenly have an idea or find a link that would be useful for a task that is not the one I am working on, I open zim (takes half a second) and add the idea/link in the relevant note.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When I find useful general informations, I add then into my personal wiki that is also managed by zim.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Every time hamster reminds me that I have been working for more that one hour on a task, I allow myself to make a pause, and eventually switch task.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;At the end of the day I can review the total time I spent working during the day.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the end my workflow is pretty much the same as before, but the overall experience is much better than it was with org-mode.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now of course there are some things I wish I could get from zim / hamster&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt; 1. Tables&lt;/b&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt; This is the killer feature of org-mode, and to be honest the only reason I still sometime turn on emacs these days.  org-mode just make it super easy to edit tables.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt; 2. Calendar integration&lt;/b&gt;&lt;/div&gt;&lt;div&gt; I would love to have gnome automatically parsing my notes for entry containing dates and adding them in the calendar.  Once again org-mode had it almost right, except that they don't care about gnome or any other desktop. For them the working environment is emacs.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt; 3. Better wiki syntax and text editing&lt;/b&gt;&lt;/div&gt;&lt;div&gt; Disclaimer : I am a fan of restructured text, and I wish that every wiki would use its syntax.&lt;/div&gt;&lt;div&gt; Being a programmer, I feel more comfortable working with mono-spaced font, with if possible a way to automatically format the lines to 80 characters. Currently zim don't allow to edit the notes directly in plain text, and I understand it is the better option for most people, but that is one of the cases where I think more choices would be good.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;b&gt;So should you use org-mode or zim / hamster or something else ?&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;My opinion: If you already use emacs a lot (and if you like it), then go for org-mode, you can do pretty much anything with it and it can be quite enjoyable to use.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you don't like emacs, and use gnome, then go for zim/hamster.  You can get 80/100 of what you get with org-mode, and you won't spend much time learning it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-1092195037963914595?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/1092195037963914595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=1092195037963914595' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/1092195037963914595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/1092195037963914595'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2011/02/from-org-mode-to-zim.html' title='from org-mode to zim'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/--fkGPCl6t-8/TWKdB-olL5I/AAAAAAAABEw/XkChZ4zCOKQ/s72-c/emacs.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-8075847499674184808</id><published>2011-02-08T02:39:00.000-08:00</published><updated>2011-02-08T02:40:17.667-08:00</updated><title type='text'>Chatocracy released</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_fDNYVHtzuAI/TVEdZ3gxoYI/AAAAAAAABD0/VXwL_ynfndU/s1600/logoName.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 310px; height: 42px;" src="http://4.bp.blogspot.com/_fDNYVHtzuAI/TVEdZ3gxoYI/AAAAAAAABD0/VXwL_ynfndU/s400/logoName.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5571266544269369730" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.chatocracy.com/"&gt;Chatocracy&lt;/a&gt; is a website that allows people to have one to one conversations on the webcam. After each conversation you can rate the person you have been talking to ; the better ranking you get, the more people you can talk to.&lt;br /&gt;&lt;br /&gt;My brother and me have been working on this for the last few weeks. It is still beta so if you encounter problems please report it.&lt;br /&gt;&lt;br /&gt;url : http://www.chatocracy.com&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-8075847499674184808?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/8075847499674184808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=8075847499674184808' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/8075847499674184808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/8075847499674184808'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2011/02/chatocracy-released.html' title='Chatocracy released'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_fDNYVHtzuAI/TVEdZ3gxoYI/AAAAAAAABD0/VXwL_ynfndU/s72-c/logoName.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-7504456079542812869</id><published>2010-02-28T20:45:00.001-08:00</published><updated>2010-02-28T20:48:27.036-08:00</updated><title type='text'>Laoshi release 0.1.0</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fDNYVHtzuAI/S4tGmqffo0I/AAAAAAAABC8/oLyXdXija30/s1600-h/laoshi.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 96px; height: 96px;" src="http://3.bp.blogspot.com/_fDNYVHtzuAI/S4tGmqffo0I/AAAAAAAABC8/oLyXdXija30/s400/laoshi.png" alt="" id="BLOGGER_PHOTO_ID_5443522204662735682" border="0" /&gt;&lt;/a&gt;I announce the first release of laoshi, my Chinese learning application.  In this release I include four lessons for beginners.  The code and files can be downloaded from the &lt;a href="http://code.google.com/p/laoshi/"&gt;google code&lt;/a&gt; page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-7504456079542812869?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/7504456079542812869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=7504456079542812869' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/7504456079542812869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/7504456079542812869'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2010/02/laoshi-release-010.html' title='Laoshi release 0.1.0'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_fDNYVHtzuAI/S4tGmqffo0I/AAAAAAAABC8/oLyXdXija30/s72-c/laoshi.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-9056638238704106038</id><published>2010-02-20T02:18:00.000-08:00</published><updated>2010-02-20T02:28:14.603-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gtk'/><category scheme='http://www.blogger.com/atom/ns#' term='chinese'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>laoshi : A Chinese learning application</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_fDNYVHtzuAI/S3-4eFymBmI/AAAAAAAABCw/INUWsD14zNA/s1600-h/Screenshot-Laoshi.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 372px;" src="http://4.bp.blogspot.com/_fDNYVHtzuAI/S3-4eFymBmI/AAAAAAAABCw/INUWsD14zNA/s400/Screenshot-Laoshi.png" alt="" id="BLOGGER_PHOTO_ID_5440269701976819298" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I had some free time recently so I created a small application to learn Chinese.  The name "laoshi" is the pinyin for "老師" which means "teacher".&lt;br /&gt;&lt;br /&gt;For the moment the application features :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A dictionary, using the database from &lt;a href="http://us.mdbg.net/chindict/chindict.php?page=cedict"&gt;cedict&lt;/a&gt; containing more than 90,000 entries.&lt;/li&gt;&lt;li&gt;A  lessons viewer, with automatic dictionary lookup when we pass the mouse over the text.&lt;/li&gt;&lt;li&gt;A flash card player.&lt;/li&gt;&lt;li&gt;Two lessons that I wrote for beginners.&lt;/li&gt;&lt;/ul&gt;I wrote everything in python using gtk for the interface, so it should work on every platform.  I don't provide any package yet, but people interested can check the code at &lt;a href="http://code.google.com/p/laoshi/"&gt;google code&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-9056638238704106038?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/9056638238704106038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=9056638238704106038' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/9056638238704106038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/9056638238704106038'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2010/02/laoshi-chinese-learning-application.html' title='laoshi : A Chinese learning application'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_fDNYVHtzuAI/S3-4eFymBmI/AAAAAAAABCw/INUWsD14zNA/s72-c/Screenshot-Laoshi.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-2829284197460256805</id><published>2010-02-03T05:57:00.000-08:00</published><updated>2010-08-11T18:14:42.589-07:00</updated><title type='text'>Writing a resume using reStructuredText</title><content type='html'>&lt;a href="http://docutils.sourceforge.net/rst.html"&gt;reStructuredText&lt;/a&gt; (rst) is a simple markup language perfect for writing documentation. Altough it may not be as powerful as Latex, it is much simpler to use.&lt;br /&gt;&lt;br /&gt;I decided to give a try at using rst to create my resume : here is the &lt;a href="http://darshak.free.fr/cv/cv.rst"&gt;input file&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Now, thanks to this &lt;a href="http://code.google.com/p/rst2pdf/"&gt;rst to pdf converter&lt;/a&gt; project (written in my &lt;a href="http://www.python.org/"&gt;favourite language&lt;/a&gt;),  I can easily generate a nice pdf version of my resume.  Here is the &lt;a href="http://darshak.free.fr/cv/cv.pdf"&gt;resulting pdf&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This approach has many advantages compared to my previous way of doing (using open office).  I can easily update the document, change the style, and generate my resume not only in pdf, but also in html or almost any formats I want.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[edit] : as some people pointed out, the input file for my CV needs an extra file for the style.  This file can be found &lt;a href="http://darshak.free.fr/cv/cv.pdfstyle"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-2829284197460256805?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/2829284197460256805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=2829284197460256805' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/2829284197460256805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/2829284197460256805'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2010/02/writing-resume-using-restructuredtext.html' title='Writing a resume using reStructuredText'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-924362482957063214</id><published>2009-11-19T06:49:00.000-08:00</published><updated>2009-11-19T07:01:25.511-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='org-mode'/><title type='text'>monitor long compilation time</title><content type='html'>For people who like me like to keep logs of everything they do, this little script can be used to automatically add entries into a log file before and after running a long command.&lt;br /&gt;&lt;br /&gt;It fits nicely into my org-mode system, I put the logs entries into an org file and they then appear into my agenda :&lt;br /&gt;&lt;br /&gt;&lt;pre class="src src-sh"&gt;&lt;span style="color: rgb(205, 0, 0);"&gt;=====================================================================&lt;br /&gt;#&lt;/span&gt;&lt;span style="color: rgb(205, 0, 0);"&gt;!/bin/bash&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(205, 0, 0);"&gt;# &lt;/span&gt;&lt;span style="color: rgb(205, 0, 0);"&gt;Automatically logs the task given as argument into my org log file.&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(205, 0, 0);"&gt;# &lt;/span&gt;&lt;span style="color: rgb(205, 0, 0);"&gt;This is useful when running long compilations.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(205, 205, 0);"&gt;LOG_FILE&lt;/span&gt;=/home/guillaume/Org/Logs.org&lt;br /&gt;&lt;span style="color: rgb(205, 205, 0);"&gt;CMD&lt;/span&gt;=$@&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(205, 205, 0);"&gt;TMP_FILE&lt;/span&gt;=$(&lt;span style="color: rgb(205, 0, 205);"&gt;tempfile&lt;/span&gt;)&lt;br /&gt;&lt;span style="color: rgb(205, 205, 0);"&gt;LABEL&lt;/span&gt;=$(&lt;span style="color: rgb(205, 0, 205);"&gt;pwd&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 238); font-weight: bold;"&gt;echo&lt;/span&gt; &lt;span style="color: rgb(0, 205, 0);"&gt;"* start: ($LABEL) $CMD &amp;lt;$(&lt;/span&gt;&lt;span style="color: rgb(205, 0, 205);"&gt;date&lt;/span&gt;&lt;span style="color: rgb(0, 205, 0);"&gt; +'%F %a %R')&amp;gt;"&lt;/span&gt; &amp;gt;&amp;gt; $&lt;span style="color: rgb(205, 205, 0);"&gt;LOG_FILE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(205, 205, 0);"&gt;STAT_FORMAT&lt;/span&gt;=&lt;span style="color: rgb(0, 205, 0);"&gt;"\&lt;br /&gt; - time :: %E&lt;br /&gt; - retun status :: %x&lt;br /&gt;"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 205, 205); font-weight: bold;"&gt;trap&lt;/span&gt; ctrl_c INT&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 205, 205); font-weight: bold;"&gt;function&lt;/span&gt; ctrl_c() {&lt;br /&gt;   &lt;span style="color: rgb(0, 0, 238); font-weight: bold;"&gt;echo&lt;/span&gt; &lt;span style="color: rgb(0, 205, 0);"&gt;"* killed: ($LABEL) $CMD &amp;lt;$(&lt;/span&gt;&lt;span style="color: rgb(205, 0, 205);"&gt;date&lt;/span&gt;&lt;span style="color: rgb(0, 205, 0);"&gt; +'%F %a %R')&amp;gt;"&lt;/span&gt; &amp;gt;&amp;gt; $&lt;span style="color: rgb(205, 205, 0);"&gt;LOG_FILE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   &lt;span style="color: rgb(0, 205, 205); font-weight: bold;"&gt;exit&lt;/span&gt; -1&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/usr/bin/time -o $&lt;span style="color: rgb(205, 205, 0);"&gt;TMP_FILE&lt;/span&gt; -f &lt;span style="color: rgb(0, 205, 0);"&gt;"$STAT_FORMAT"&lt;/span&gt; $&lt;span style="color: rgb(205, 205, 0);"&gt;CMD&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 238); font-weight: bold;"&gt;echo&lt;/span&gt; &lt;span style="color: rgb(0, 205, 0);"&gt;"* end: ($LABEL) $CMD &amp;lt;$(&lt;/span&gt;&lt;span style="color: rgb(205, 0, 205);"&gt;date&lt;/span&gt;&lt;span style="color: rgb(0, 205, 0);"&gt; +'%F %a %R')&amp;gt;"&lt;/span&gt; &amp;gt;&amp;gt; $&lt;span style="color: rgb(205, 205, 0);"&gt;LOG_FILE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;cat $&lt;span style="color: rgb(205, 205, 0);"&gt;TMP_FILE&lt;/span&gt; &amp;gt;&amp;gt; $&lt;span style="color: rgb(205, 205, 0);"&gt;LOG_FILE&lt;/span&gt;&lt;br /&gt;rm $&lt;span style="color: rgb(205, 205, 0);"&gt;TMP_FILE&lt;/span&gt;&lt;br /&gt;=========================================================================&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-924362482957063214?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/924362482957063214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=924362482957063214' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/924362482957063214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/924362482957063214'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2009/11/monitor-long-compilation-time.html' title='monitor long compilation time'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-436121019374427166</id><published>2009-08-07T10:22:00.000-07:00</published><updated>2009-08-07T10:40:34.220-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>Check python coding style on the fly with emacs</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_fDNYVHtzuAI/SnxkLC4N_DI/AAAAAAAABBs/-KbZAzQbNXA/s1600-h/flymode.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 237px;" src="http://4.bp.blogspot.com/_fDNYVHtzuAI/SnxkLC4N_DI/AAAAAAAABBs/-KbZAzQbNXA/s400/flymode.png" alt="" id="BLOGGER_PHOTO_ID_5367274996832795698" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;A nice emacs trick : using &lt;a href="http://flymake.sourceforge.net/"&gt;flymake-mode&lt;/a&gt; and this &lt;a href="http://svn.browsershots.org/trunk/devtools/pep8/pep8.py"&gt;python code styles PEP8 checker script&lt;/a&gt; written by Johann C. Rocholl, we can have automatic real time checking for standard python coding style.&lt;br /&gt;&lt;br /&gt;To make this work I copied the script (pep8.py) in my PATH, and then I added this block of code in my .emac file :&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;(when (load "flymake" t)&lt;br /&gt; (defun flymake-pylint-init ()&lt;br /&gt;   (let* ((temp-file (flymake-init-create-temp-buffer-copy&lt;br /&gt;                      'flymake-create-temp-inplace))&lt;br /&gt;          (local-file (file-relative-name&lt;br /&gt;                       temp-file&lt;br /&gt;                       (file-name-directory buffer-file-name))))&lt;br /&gt;         (list "pep8.py" (list "--repeat" local-file))))&lt;br /&gt;&lt;br /&gt; (add-to-list 'flymake-allowed-file-name-masks&lt;br /&gt;              '("\\.py\\'" flymake-pylint-init)))&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;After this I can just enable flymake mode when I edit a python file, and every coding style error will be highlighted on the fly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-436121019374427166?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/436121019374427166/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=436121019374427166' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/436121019374427166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/436121019374427166'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2009/08/check-python-coding-style-on-fly-with.html' title='Check python coding style on the fly with emacs'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_fDNYVHtzuAI/SnxkLC4N_DI/AAAAAAAABBs/-KbZAzQbNXA/s72-c/flymode.png' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-8866229176404274510</id><published>2009-06-13T09:17:00.000-07:00</published><updated>2009-06-13T09:22:47.098-07:00</updated><title type='text'>Fluid dynamics engine</title><content type='html'>After I read &lt;a href="http://www.dgp.toronto.edu/people/stam/reality/Research/pdf/GDC03.pdf"&gt;this paper&lt;/a&gt; I decided to try to write a small two dimensions fluid dynamics engine for video games. It is quite fun.&lt;br /&gt;&lt;br /&gt;Now I need to see what I could use it for.&lt;br /&gt;&lt;br /&gt;&lt;object height="344" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/Uez4jwg1gu8&amp;amp;hl=en&amp;amp;fs=1&amp;amp;rel=0"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/Uez4jwg1gu8&amp;amp;hl=en&amp;amp;fs=1&amp;amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="344" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-8866229176404274510?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/8866229176404274510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=8866229176404274510' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/8866229176404274510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/8866229176404274510'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2009/06/fluid-dynamics-engine.html' title='Fluid dynamics engine'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-5495491703684360026</id><published>2009-05-31T22:58:00.000-07:00</published><updated>2009-05-31T23:02:35.949-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tichy'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='openmoko'/><title type='text'>Tichy 1.1.0 released</title><content type='html'>Yesterday I released &lt;a href="http://code.google.com/p/tichy/"&gt;tichy 1.1.0&lt;/a&gt;.  In this new release a lot of internal refactoring, improvement of the style system, the text editor, the terminal, and the PIM applications. I also added some unit tests using py.tests.&lt;br /&gt;&lt;br /&gt;See the &lt;a href="http://tichy.googlecode.com/svn/release/1.1.0/README"&gt;release notes&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/Zv8t3XtNF5w&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/Zv8t3XtNF5w&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-5495491703684360026?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/5495491703684360026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=5495491703684360026' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/5495491703684360026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/5495491703684360026'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2009/05/tichy-110-released.html' title='Tichy 1.1.0 released'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-6841440629610518941</id><published>2009-05-05T04:02:00.000-07:00</published><updated>2009-05-05T04:04:11.082-07:00</updated><title type='text'>ditaa</title><content type='html'>Never used it nor planing to do so soon, but I like the idea a lot : &lt;a href="http://ditaa.sourceforge.net/"&gt;ditaa&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-6841440629610518941?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/6841440629610518941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=6841440629610518941' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/6841440629610518941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/6841440629610518941'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2009/05/ditaa.html' title='ditaa'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-6541812690080203905</id><published>2009-05-05T03:40:00.000-07:00</published><updated>2009-05-05T04:08:29.134-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gimp'/><category scheme='http://www.blogger.com/atom/ns#' term='tichy'/><category scheme='http://www.blogger.com/atom/ns#' term='inkscape'/><category scheme='http://www.blogger.com/atom/ns#' term='openmoko'/><category scheme='http://www.blogger.com/atom/ns#' term='drawing'/><title type='text'>Tichy's new style</title><content type='html'>&lt;div style="text-align: left;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_fDNYVHtzuAI/SgAapCZqfjI/AAAAAAAABAs/IgtA4rfqsjc/s1600-h/frame.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 128px; height: 128px;" src="http://1.bp.blogspot.com/_fDNYVHtzuAI/SgAapCZqfjI/AAAAAAAABAs/IgtA4rfqsjc/s320/frame.png" alt="" id="BLOGGER_PHOTO_ID_5332291251128139314" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fDNYVHtzuAI/SgAa8xxxk-I/AAAAAAAABA8/9RoH7g7mhLk/s1600-h/message.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 240px; height: 320px;" src="http://1.bp.blogspot.com/_fDNYVHtzuAI/SgAawiB8BgI/AAAAAAAABA0/gClvyRs6-8c/s320/home.png" alt="" id="BLOGGER_PHOTO_ID_5332291379877643778" border="0" /&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 240px; height: 320px;" src="http://3.bp.blogspot.com/_fDNYVHtzuAI/SgAa8xxxk-I/AAAAAAAABA8/9RoH7g7mhLk/s320/message.png" alt="" id="BLOGGER_PHOTO_ID_5332291590263247842" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Today I created a new style for &lt;a href="http://code.google.com/p/tichy/"&gt;tichy&lt;/a&gt;'s widgets.&lt;br /&gt;&lt;br /&gt;The way we can create widgets style is very simple : we create 32x32 sized png images for each frame. The image is cut so that each 8x8 sized corner will correspond to the associated widget frame corner, the top will be used to fill the top of the widget frame and so on (see the image.)&lt;br /&gt;&lt;br /&gt;This is not very flexible because it only allows 8x8 corners size for all the widgets, but here simplicity beats flexibility.&lt;br /&gt;&lt;br /&gt;My previous style was done using &lt;a href="http://www.gimp.org/"&gt;the gimp&lt;/a&gt;. This time I decided to use &lt;a href="http://www.inkscape.org/"&gt;inkscape&lt;/a&gt; instead. Inskape is one of the best open source software I know. Perfect for this kind of job.&lt;br /&gt;&lt;br /&gt;I went for a very bright style, so that we can read the phone screen even outside. I also decided to use no gradient or effect at all, this increases the feeling of simplicity that I want to have in Tichy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-6541812690080203905?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/6541812690080203905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=6541812690080203905' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/6541812690080203905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/6541812690080203905'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2009/05/tichys-new-style.html' title='Tichy&apos;s new style'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_fDNYVHtzuAI/SgAapCZqfjI/AAAAAAAABAs/IgtA4rfqsjc/s72-c/frame.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-7027374454155517606</id><published>2009-05-03T05:27:00.000-07:00</published><updated>2009-06-28T02:57:53.103-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='org-mode'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><category scheme='http://www.blogger.com/atom/ns#' term='gtd'/><title type='text'>Org-mode : will I finally get organized ?</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://orgmode.org/img/tasks.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 523px; height: 341px;" src="http://orgmode.org/img/tasks.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I always had a love/hate relation to emacs, but recently I found a good reason to start using it a lot again : &lt;a href="http://orgmode.org/"&gt;org-mode&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;org mode allows to keep notes and TODO list using a simple text format.  Basically you can type what you want and every line starting with "TODO" will be interpreted as a task, every date enclosed by "&lt;" and "&gt;" as an agenda entry, every text enclosed by "[[" and "]]" as a link.  (Check the website for more detailed documentation).&lt;br /&gt;&lt;br /&gt;It is a very complicated thing to find a way to keep organized and productive, specially when we have to deal with different projects, involving a lot of information.&lt;br /&gt;&lt;br /&gt;One thing I did learn from the past is that online tools like google calendar or personal wiki don't work for me.  I am just too lazy to take the time to go online to update my wiki or calendar.  Very often when I think of a task I have to do, I am already working on something else, and I don't want to spend time going online and getting through a web interface just to write a few lines of text.&lt;br /&gt;&lt;br /&gt;Until now my optimal solution for keeping organized was to use :&lt;br /&gt;&lt;ol&gt;&lt;li&gt;A directory containing basic text files, one per project, idea or people.&lt;/li&gt;&lt;li&gt;A TODO text file.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;A piece of paper on my desk where I would write every mornings the tasks for the day.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;This worked fine as long as I didn't have to deal with complicated schedules and deadlines.  It is not the case anymore and so I had to change my system.  The system I am using now is :&lt;br /&gt;&lt;ol&gt;&lt;li&gt;One org file per project I am working on.&lt;/li&gt;&lt;li&gt;One org file for all my contacts information.&lt;/li&gt;&lt;li&gt;One org file for other small tasks or ideas (things to buy, etc...)&lt;/li&gt;&lt;/ol&gt;I also created a cron job to email me everyday the weekly calendar as well as the list of pending tasks.&lt;br /&gt;&lt;br /&gt;What I really appreciate with this new system is the fact that I can create TODO or agenda entries from anywhere.  Org-mode will automatically harvest all the tasks and agenda entries and create a nice summary for me.&lt;br /&gt;&lt;br /&gt;I have been using it for only a few weeks now, but I can already tell it makes things much easier than before.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-7027374454155517606?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/7027374454155517606/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=7027374454155517606' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/7027374454155517606'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/7027374454155517606'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2009/05/org-mode-will-i-finally-get-organized.html' title='Org-mode : will I finally get organized ?'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-610449193643560108</id><published>2009-03-14T08:48:00.000-07:00</published><updated>2009-03-14T08:59:05.875-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='coroutines'/><category scheme='http://www.blogger.com/atom/ns#' term='c'/><title type='text'>Coroutines in C</title><content type='html'>&lt;a href="http://www.chiark.greenend.org.uk/%7Esgtatham/coroutines.html"&gt;this article&lt;/a&gt; by &lt;a href="http://pobox.com/%7Eanakin/"&gt;Simon tathan&lt;/a&gt; is fascinating.&lt;br /&gt;&lt;br /&gt;Simon explains how we can use some very dirty tricks to create coroutines directly in C, without using the setcontext functions.&lt;br /&gt;It relies on a very strange feature of C that I didn't know about : being able to put a &lt;span style="font-style: italic;"&gt;case&lt;/span&gt; statement inside a sub-block of the &lt;span style="font-style: italic;"&gt;matching&lt;/span&gt; switch statement !&lt;br /&gt;&lt;br /&gt;I really recommend the lecture of the article to anybody interested in coroutines, even though as Simon says :&lt;span style="font-style: italic;"&gt; "this trick violates every coding standard in the book. Try doing this in your company's code and you will probably be subject to a stern telling off if not disciplinary action!"&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-610449193643560108?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/610449193643560108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=610449193643560108' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/610449193643560108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/610449193643560108'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2009/03/coroutines-in-c.html' title='Coroutines in C'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-8699243164069881016</id><published>2009-01-22T07:15:00.000-08:00</published><updated>2009-01-22T07:36:17.949-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='pypy'/><category scheme='http://www.blogger.com/atom/ns#' term='game'/><title type='text'>online javascript game, in python</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_fDNYVHtzuAI/SXiOixy7gJI/AAAAAAAAA-8/BuKFpq5dits/s1600-h/Screenshot.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 257px; height: 258px;" src="http://1.bp.blogspot.com/_fDNYVHtzuAI/SXiOixy7gJI/AAAAAAAAA-8/BuKFpq5dits/s320/Screenshot.jpg" alt="" id="BLOGGER_PHOTO_ID_5294138090107666578" border="0" /&gt;&lt;/a&gt;&lt;a href="http://charlie137-2.blogspot.com/2009/01/pypy-is-great.html"&gt;Last time&lt;/a&gt; I spoke about &lt;a href="http://codespeak.net/pypy/dist/pypy/doc/"&gt;pypy&lt;/a&gt;, which allow (among other things) to translate python code into other languages.&lt;br /&gt;&lt;br /&gt;This week I wrote a small video game (inspired by the famous &lt;a href="http://en.wikipedia.org/wiki/Boulder_Dash"&gt;boulder dash&lt;/a&gt; game) in rpython and used pypy to create an online version of the game out of it.&lt;br /&gt;&lt;br /&gt;You can play the game &lt;a href="http://darshak.free.fr/Boulder/static.htm"&gt;here&lt;/a&gt;.&lt;br /&gt;The sources can be found &lt;a href="http://darshak.free.fr/Boulder/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The game as it is now is not really fun, but I only wrote it as an example of using pypy.&lt;br /&gt;&lt;br /&gt;What I like with this approach is that I can develop in rpython, and even run the game using python interpreter, and only before I publish it use pypy to create the javascript version.&lt;br /&gt;&lt;br /&gt;I could also create a C version using the same code for the game engine (only the graphic functions would have to be rewritten for each backends.)&lt;br /&gt;&lt;br /&gt;This open the door to a lot of interesting applications.&lt;br /&gt;&lt;br /&gt;On a side note, the pypy javascript translation is really not optimised. For example, let's try to guess what this generated function does :&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="font-family:courier new;"&gt;function (){&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    var v1086,v1087,self_145;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    var block = 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    for(;;){&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        switch(block){&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            case 0:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            self_144 = this;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            self_145 = self_144;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            block = 1;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            break;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            case 1:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            v1086 = 'H';&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            block = 2;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            break;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            case 2:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            return ( v1086 );&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;I don't want to spoil the fun of figuring this out by giving the answer...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-8699243164069881016?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/8699243164069881016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=8699243164069881016' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/8699243164069881016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/8699243164069881016'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2009/01/online-javascript-game-in-python.html' title='online javascript game, in python'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_fDNYVHtzuAI/SXiOixy7gJI/AAAAAAAAA-8/BuKFpq5dits/s72-c/Screenshot.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-8987449964038945198</id><published>2009-01-11T01:36:00.000-08:00</published><updated>2009-01-26T08:07:00.903-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='pypy'/><title type='text'>Pypy is great</title><content type='html'>Even though I was in holidays recently, I spent some time to have a look at the update from the &lt;a href="http://codespeak.net/pypy/dist/pypy/doc/home.html"&gt;pypy project&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I get really excited by what the project has achieved so far.&lt;br /&gt;&lt;br /&gt;Pypy is a python interpreter written in python.&lt;br /&gt;The most interesting part of the project is the ability to use it to translate python code into other languages, like C, java, javascript, and LLVM.&lt;br /&gt;&lt;br /&gt;So far only a subset of python language is translatable (for example generators won't work.) [&lt;span style="color: rgb(255, 0, 0);"&gt;edit:&lt;/span&gt; as the pypy people pointed out, full python language will &lt;span style="font-weight: bold;"&gt;never&lt;/span&gt; be translatable, that is not the goal of the project.]&lt;br /&gt;&lt;br /&gt;But this simplified python (called RPython) is already good enough for many projects. As an example pypy interpreter itself is written in RPython and so can be compiled into machine code.&lt;br /&gt;&lt;br /&gt;The good thing about this is that you can develop an application totally in python and then use the translators to generate fast machine code. So python could become some sort of universal language that replaces all other languages.&lt;br /&gt;&lt;br /&gt;An other interesting things about pypy is the ability to generate stackless code, that allow many cool things, like tasklets (see the &lt;a href="http://codespeak.net/pypy/dist/pypy/doc/stackless.html"&gt;documentation&lt;/a&gt; about this).&lt;br /&gt;&lt;br /&gt;Now I can't help thinking about OpenMoko paroli project, that uses python and tasklets. Could it be possible to use pypy to translate the python code into machine code and so create optimized version of paroli ?&lt;br /&gt;&lt;br /&gt;The idea is very seducing, but many problems would need to be solved before we can get to there. The first thing is that we would have to modify our code to remove all the things that are not supported by pypy.&lt;br /&gt;&lt;br /&gt;The second things is that even though pypy supports tasklets, it is impossible to do it using the python yield statement and the trick explained in &lt;a href="http://www.python.org/dev/peps/pep-0342/"&gt;PEP342&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;An other good use of pypy would be to create web application without having to write -quite ugly-  javascript code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-8987449964038945198?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/8987449964038945198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=8987449964038945198' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/8987449964038945198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/8987449964038945198'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2009/01/pypy-is-great.html' title='Pypy is great'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-3967686346891518525</id><published>2009-01-11T00:54:00.000-08:00</published><updated>2009-01-11T01:36:18.735-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tichy'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='paroli'/><category scheme='http://www.blogger.com/atom/ns#' term='openmoko'/><title type='text'>Paroli get a website</title><content type='html'>Happy new year everybody !&lt;br /&gt;I just come back from holidays, and haven't worked for a few weeks, but now I am back to Taipei where I still work for OpenMoko, with a few news about our next software stack :&lt;br /&gt;&lt;br /&gt;The tichy project had a lot of modifications ; it is now entirely based on etk and edje (part of &lt;a href="http://en.wikipedia.org/wiki/Carsten_Haitzler"&gt;raster&lt;/a&gt; &lt;a href="http://www.enlightenment.org/"&gt;enlightenment&lt;/a&gt; windows manager). It has also been renamed "paroli-core". We loose the ability to use different graphic back-ends, but the other features are still presents. Paroli-core offers :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Signal / slot objects (à la Qt.)&lt;/li&gt;&lt;li&gt;A service system to allow user to register and retrieve python object based on there role.&lt;/li&gt;&lt;li&gt;A tasklet library for easy creation of chained callback function.&lt;/li&gt;&lt;li&gt;A plug-in system.&lt;/li&gt;&lt;li&gt;A set of services that create a layer between the plug-ins and Mikey &lt;a href="http://www.freesmartphone.org/index.php/Main_Page"&gt;FSO framework.&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The &lt;a href="http://www.paroli-project.org/"&gt;Paroli project&lt;/a&gt; based on paroli-core started.&lt;br /&gt;The project includes paroli-core (ex tichy), plus a set of applets that aim at providing basic telephony functionalities.&lt;br /&gt;&lt;br /&gt;More information (and the sources) can be found from the &lt;a href="http://www.paroli-project.org/"&gt;paroli-project web site&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-3967686346891518525?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/3967686346891518525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=3967686346891518525' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/3967686346891518525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/3967686346891518525'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2009/01/paroli-get-website.html' title='Paroli get a website'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-1357214724503937340</id><published>2008-10-12T09:02:00.000-07:00</published><updated>2008-10-12T09:43:16.647-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='D'/><category scheme='http://www.blogger.com/atom/ns#' term='vala'/><category scheme='http://www.blogger.com/atom/ns#' term='openmoko'/><category scheme='http://www.blogger.com/atom/ns#' term='guisterax'/><category scheme='http://www.blogger.com/atom/ns#' term='game'/><title type='text'>D programming on Openmoko</title><content type='html'>Today I decided to start to write a video game for &lt;a href="http://www.openmoko.org/"&gt;OpenMoko&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I am a little bit disappointed by all the current available games for openmoko (I like action games). And the port of already existing games that I tried all have poor usability because they are not usable with a touchscreen (A touch screen is much more limited than a mouse, cause you can't move the pointer when you don't click)&lt;br /&gt;&lt;br /&gt;So anyway, I wanted to write a very simple game where asteroids are falling from space and you have to destroy them by launching missile from the ground. The control is very simple : touch the screen to fire a missile to the pointed position.&lt;br /&gt;&lt;br /&gt;I want the code of the game to be very small and simple, yet fast. I started to write it in &lt;a href="http://live.gnome.org/Vala"&gt;vala&lt;/a&gt;, but after profiling got a little bit frustrated to see that a lot of time was spent getting and setting gobject properties.&lt;br /&gt;&lt;br /&gt;I was about to consider cython + python or C++, and then I found that gdc, the gnu &lt;a href="http://www.digitalmars.com/d/"&gt;D programming language&lt;/a&gt; compiler, was available in the debian distribution for openmoko.&lt;br /&gt;&lt;br /&gt;I immediately tried to compile my game &lt;a href="http://www.dsource.org/projects/guisterax"&gt;guisterax&lt;/a&gt;, and it worked fine. Of course no way to play it without the keyboard, but that is great anyway.&lt;br /&gt;D would be a perfect language for embedded applications.&lt;br /&gt;&lt;br /&gt;Now the problem is that as far as I know it is not possible to compile D sources using openembedded yet, so I may have to use an other language for my game anyway.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-1357214724503937340?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/1357214724503937340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=1357214724503937340' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/1357214724503937340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/1357214724503937340'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2008/10/d-programming-on-openmoko.html' title='D programming on Openmoko'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-3786473118442190405</id><published>2008-10-08T20:10:00.000-07:00</published><updated>2008-10-08T20:34:24.356-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='freesmartphone'/><category scheme='http://www.blogger.com/atom/ns#' term='tichy'/><category scheme='http://www.blogger.com/atom/ns#' term='openmoko'/><title type='text'>OpenMoko update</title><content type='html'>I haven't post for a long time, it is time to give some update about my work at openmoko.&lt;br /&gt;&lt;br /&gt;The last few weeks the full &lt;a href="http://www.freesmartphone.org/index.php/Main_Page"&gt;freesmartphone&lt;/a&gt; team was here in Taipei, so that we could work full time on the openmoko d-bus system interface (the so called framework).&lt;br /&gt;&lt;br /&gt;Many changes have been done recently, I will try to update the wiki to let people that are not subscribed to the mailing list be aware of the status of the project.&lt;br /&gt;To recall, the framework provides a d-bus API (the org.freesmartphone API) for applications running on the neo. The API covers usual phone functionalities (GSM, SIM, PIM, etc).&lt;br /&gt;&lt;br /&gt;I didn't work at all on my personal project &lt;a href="http://wiki.openmoko.org/wiki/Tichy"&gt;tichy&lt;/a&gt;, except yesterday when I stared to write a few applications that I intend to use to learn Chinese :&lt;br /&gt;* A learning game application that implements the &lt;a href="http://en.wikipedia.org/wiki/Flashcard"&gt;Leitner System&lt;/a&gt; to optimize the memorization of new words.&lt;br /&gt;* An English to Chinese dictionary.&lt;br /&gt;* A now working audio files player.&lt;br /&gt;&lt;br /&gt;I think there is a interesting potential for the neo to be a learning platform.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_fDNYVHtzuAI/SO17KW1TQgI/AAAAAAAAAuc/SNQa-8aMgtM/s1600-h/Screenshot-Tichy-3.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://4.bp.blogspot.com/_fDNYVHtzuAI/SO17KW1TQgI/AAAAAAAAAuc/SNQa-8aMgtM/s320/Screenshot-Tichy-3.png" alt="" id="BLOGGER_PHOTO_ID_5254991758069285378" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-3786473118442190405?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/3786473118442190405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=3786473118442190405' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/3786473118442190405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/3786473118442190405'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2008/10/openmoko-update.html' title='OpenMoko update'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_fDNYVHtzuAI/SO17KW1TQgI/AAAAAAAAAuc/SNQa-8aMgtM/s72-c/Screenshot-Tichy-3.png' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-5461922969456455719</id><published>2008-09-02T04:05:00.000-07:00</published><updated>2008-09-02T04:18:58.775-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tichy'/><category scheme='http://www.blogger.com/atom/ns#' term='gtk'/><category scheme='http://www.blogger.com/atom/ns#' term='openmoko'/><title type='text'>Tichy running on GTK</title><content type='html'>Those days I am working on Tichy again.&lt;br /&gt;&lt;br /&gt;Tichy is a python applet manager that allow to easily write applications for mobile phone.&lt;br /&gt;&lt;br /&gt;From the beginning I tried to make the applets code "widget-agnostic". That means for example if an applet need to show a list of item, instead of creating the widgets for that, it will request the system for a 'design' service that will be in charge of representing the items. This way we can have totally different interfaces for the same applications.&lt;br /&gt;&lt;br /&gt;An other advantage of this approach is that I can use any widget toolkit I want. So today I tried to make Tichy running with gtk, instead of SDL. Here is the result. The first image is using my own SDL widget toolkit, the second image is the same application using gtk toolkit.&lt;br /&gt;&lt;br /&gt;My goal is to create a back end using etk + edje, as well as a backend using Clutter.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_fDNYVHtzuAI/SL0fth_ilaI/AAAAAAAAAt0/OZi_Jlv0IFM/s1600-h/Screenshot-Tichy-sdl.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://4.bp.blogspot.com/_fDNYVHtzuAI/SL0fth_ilaI/AAAAAAAAAt0/OZi_Jlv0IFM/s320/Screenshot-Tichy-sdl.png" alt="" id="BLOGGER_PHOTO_ID_5241380408408577442" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fDNYVHtzuAI/SL0f8D3LEvI/AAAAAAAAAt8/ktrcq3ixV40/s1600-h/Screenshot-tichy.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://3.bp.blogspot.com/_fDNYVHtzuAI/SL0f8D3LEvI/AAAAAAAAAt8/ktrcq3ixV40/s320/Screenshot-tichy.png" alt="" id="BLOGGER_PHOTO_ID_5241380658018456306" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-5461922969456455719?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/5461922969456455719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=5461922969456455719' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/5461922969456455719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/5461922969456455719'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2008/09/tichy-running-on-gtk.html' title='Tichy running on GTK'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_fDNYVHtzuAI/SL0fth_ilaI/AAAAAAAAAt0/OZi_Jlv0IFM/s72-c/Screenshot-Tichy-sdl.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-2504453433194253140</id><published>2008-07-21T20:24:00.000-07:00</published><updated>2008-07-23T01:54:21.997-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tichy'/><category scheme='http://www.blogger.com/atom/ns#' term='openmoko'/><title type='text'>Tichy update</title><content type='html'>I did a video of tichy, my python applets manager, running on openmoko :&lt;br /&gt;&lt;br /&gt;&lt;object width="320" height="266" class="BLOG_video_class" id="BLOG_video-7a255087d0c76fb0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="movie" value="http://www.youtube.com/get_player"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;param name="flashvars" value="flvurl=http://v1.nonxt6.googlevideo.com/videoplayback?id%3D7a255087d0c76fb0%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1329858120%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D54116206A14817C52FF877765E5727F8DA5CEEEE.91870961E537C381612E12B95DDB8DCB2587F44%26key%3Dck1&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D7a255087d0c76fb0%26offsetms%3D5000%26itag%3Dw160%26sigh%3DfRos3cPwYgicVf7y0tCEFiCEfzI&amp;amp;autoplay=0&amp;amp;ps=blogger"&gt;&lt;embed src="http://www.youtube.com/get_player" type="application/x-shockwave-flash"width="320" height="266" bgcolor="#FFFFFF"flashvars="flvurl=http://v1.nonxt6.googlevideo.com/videoplayback?id%3D7a255087d0c76fb0%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1329858120%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D54116206A14817C52FF877765E5727F8DA5CEEEE.91870961E537C381612E12B95DDB8DCB2587F44%26key%3Dck1&amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D7a255087d0c76fb0%26offsetms%3D5000%26itag%3Dw160%26sigh%3DfRos3cPwYgicVf7y0tCEFiCEfzI&amp;autoplay=0&amp;ps=blogger"allowFullScreen="true" /&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Once again the code for tichy can be retrieved from the subversion repository with this command :&lt;br /&gt;svn checkout svn://svn.projects.openmoko.org/svnroot/tichy&lt;br /&gt;&lt;br /&gt;It works fine on a desktop computer too. Parts of the program are in C, but I always provide python versions as well, so you don't need to compile anything to test it.&lt;br /&gt;&lt;br /&gt;It is also very easy to extend tichy by adding new plugins&lt;br /&gt;&lt;br /&gt;[Edit]: I put a &lt;a href="http://uk.youtube.com/watch?v=ysS7OuuY0Z4"&gt;copy of the video&lt;/a&gt; on youtube.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;&lt;/span&gt;&lt;tt&gt;&lt;br /&gt;&lt;/tt&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-2504453433194253140?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='enclosure' type='video/mp4' href='http://www.blogger.com/video-play.mp4?contentId=7a255087d0c76fb0&amp;type=video%2Fmp4' length='0'/><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/2504453433194253140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=2504453433194253140' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/2504453433194253140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/2504453433194253140'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2008/07/tichy-update.html' title='Tichy update'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-7379738255690617900</id><published>2008-07-04T03:29:00.001-07:00</published><updated>2008-07-04T03:56:32.155-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='freesmartphone'/><category scheme='http://www.blogger.com/atom/ns#' term='tichy'/><category scheme='http://www.blogger.com/atom/ns#' term='openmoko'/><title type='text'>Introducing tichy</title><content type='html'>The last few weeks I have been working on a python applets manager for &lt;a href="http://www.openmoko.com/"&gt;OpenMoko&lt;/a&gt; cell phone.&lt;br /&gt;&lt;br /&gt;The idea is to be able to very easily develop applications in python. Each application can define a set of services and request for a given services. So if for example I write a text editor, other applications that need a text text editor will be able to use it, even if they don't know about this particular text editor.&lt;br /&gt;&lt;br /&gt;The code can be downloaded from the subversion server :&lt;br /&gt;&lt;br /&gt;svn checkout svn://svn.projects.openmoko.org/svnroot/tichy&lt;br /&gt;&lt;br /&gt;It can work directly on a desktop computer, or on the open moko (See the README file for more informations)&lt;br /&gt;&lt;br /&gt;It uses &lt;a href="http://www.vanille-media.de/site/index.php/about/"&gt;Mickey&lt;/a&gt; &lt;a href="http://www.freesmartphone.org/index.php/Main_Page"&gt;freesmartphone Framework&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here are some screen shots :&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_fDNYVHtzuAI/SG39I4rSCAI/AAAAAAAAAs4/MtYKi5SSuQo/s1600-h/tichy5.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp0.blogger.com/_fDNYVHtzuAI/SG39I4rSCAI/AAAAAAAAAs4/MtYKi5SSuQo/s320/tichy5.png" alt="" id="BLOGGER_PHOTO_ID_5219105872286976002" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_fDNYVHtzuAI/SG38_ST5b5I/AAAAAAAAAso/IBzf3n_0Fa0/s1600-h/tichy3.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp1.blogger.com/_fDNYVHtzuAI/SG38_ST5b5I/AAAAAAAAAso/IBzf3n_0Fa0/s320/tichy3.png" alt="" id="BLOGGER_PHOTO_ID_5219105707369525138" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_fDNYVHtzuAI/SG380SE5e-I/AAAAAAAAAsY/Ckcv3eGayjA/s1600-h/tichy1.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp1.blogger.com/_fDNYVHtzuAI/SG380SE5e-I/AAAAAAAAAsY/Ckcv3eGayjA/s320/tichy1.png" alt="" id="BLOGGER_PHOTO_ID_5219105518328052706" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_fDNYVHtzuAI/SG384ebhRKI/AAAAAAAAAsg/FP-HW0IvdSI/s1600-h/tichy2.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp1.blogger.com/_fDNYVHtzuAI/SG384ebhRKI/AAAAAAAAAsg/FP-HW0IvdSI/s320/tichy2.png" alt="" id="BLOGGER_PHOTO_ID_5219105590363636898" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-7379738255690617900?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/7379738255690617900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=7379738255690617900' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/7379738255690617900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/7379738255690617900'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2008/07/introducing-tichy.html' title='Introducing tichy'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_fDNYVHtzuAI/SG39I4rSCAI/AAAAAAAAAs4/MtYKi5SSuQo/s72-c/tichy5.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-1187383777891670629</id><published>2008-05-18T05:10:00.000-07:00</published><updated>2009-06-28T03:20:05.788-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vala'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='openmoko'/><category scheme='http://www.blogger.com/atom/ns#' term='c'/><title type='text'>Calling Vala code from Python</title><content type='html'>Today I gave a try at using &lt;a href="http://live.gnome.org/Vala"&gt;vala&lt;/a&gt; and &lt;a href="http://www.python.org/"&gt;python&lt;/a&gt; together in my &lt;a href="http://www.openmoko.org/"&gt;OpenMoko&lt;/a&gt; mobile phone.&lt;br /&gt;Python is a powerful object oriented script language, and vala is a C &lt;a href="http://library.gnome.org/devel/gobject/stable/"&gt;gobject&lt;/a&gt; compiler that makes it easy to generate object oriented code in C. It is quite easy to mix python and vala in a same programme, allowing us to write very quickly modular and fast applications.&lt;br /&gt;&lt;br /&gt;So here is how it works :&lt;br /&gt;&lt;br /&gt;Let say I have a vala module, that defines one class, with one public method. Here is the file (test.vala) :&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;using GLib;&lt;br /&gt;&lt;br /&gt;namespace Test {&lt;br /&gt;   public class Test : Object {&lt;br /&gt;       public int sum(int x, int y) {&lt;br /&gt;           return x + y;&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I can generate the C/gobject code for this module, using vala :&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;valac -C test.vala&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;this command will create test.c and test.h. These files are conform C and can be compiled with gcc (in fact these are the files people using gobject in C would write. If we have a look at it, we understand the pain that it is to write gobject code in C !).&lt;br /&gt;But to be able to call the functions from python, we need to create wrapper to the python C interface. This can be easily done using some tools (included in the debian pygtk-dev package). For more information, see &lt;a href="http://www.ibm.com/developerworks/linux/library/l-wrap/"&gt;this page&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Here are the commands that generate our C python interface :&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;python /usr/share/pygtk/2.0/codegen/h2def.py test.h &gt; test.defs&lt;br /&gt;pygtk-codegen-2.0 -o test.override -p test test.defs &gt; test_wrap.c&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Where 'test.override' is a compulsory file that looks like this :&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;%%&lt;br /&gt;headers&lt;br /&gt;#include &lt;python.h&gt;&lt;br /&gt;#include "pygobject.h"&lt;br /&gt;#include "test.h"&lt;br /&gt;%%&lt;br /&gt;modulename test&lt;br /&gt;%%&lt;br /&gt;import gobject.GObject as PyGObject_Type&lt;br /&gt;%%&lt;br /&gt;ignore-glob&lt;br /&gt;*_get_type&lt;br /&gt;%%&lt;br /&gt;&lt;/python.h&gt;&lt;/pre&gt;&lt;br /&gt;Alright we now have a file called test_wrap.c, that contains all the wrapper functions from the python C interface to gobject C.&lt;br /&gt;&lt;br /&gt;The next step is to actually create the C library callable from python. this library must contains a function 'inittest' (this is the function that will be called when we import the module from python.) The file looks like this (test_module.c) :&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#include &lt;pygobject.h&gt;&lt;br /&gt;&lt;br /&gt;void test_register_classes (PyObject *d);&lt;br /&gt;extern PyMethodDef test_functions[];&lt;br /&gt;&lt;br /&gt;DL_EXPORT(void)&lt;br /&gt;inittest(void)&lt;br /&gt;{&lt;br /&gt;  PyObject *m, *d;&lt;br /&gt;  init_pygobject();&lt;br /&gt;  m = Py_InitModule("test", test_functions);&lt;br /&gt;  d = PyModule_GetDict(m);&lt;br /&gt;  test_register_classes(d);&lt;br /&gt;  if (PyErr_Occurred ()) {&lt;br /&gt;      Py_FatalError ("can't initialise module test");&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pygobject.h&gt;&lt;/pre&gt;&lt;br /&gt;And then we are almost done... finally we compile and link everything :&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;CFLAGS="`pkg-config --cflags gtk+-2.0 pygtk-2.0` -I/usr/include/python2.5/ -I."&lt;br /&gt;LDFLAGS=`pkg-config --libs gtk+-2.0 pygtk-2.0`&lt;br /&gt;gcc -c -o test.o test.c&lt;br /&gt;gcc $CFLAGS -c test_wrap.c -o test_wrap.o&lt;br /&gt;gcc $CFLAGS -c test_module.c -o test_module.o&lt;br /&gt;gcc $LDFLAGS -shared test.o test_wrap.o test_module.o -o test.so&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And now we finally have our library : test.so, that can be directly used from python. Here is our python script (test.py):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;import test&lt;br /&gt;t = test.Test()&lt;br /&gt;print t.sum(2,3)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Conclusion :&lt;br /&gt;This combination (python + vala) is ideal to write applications for OpenMoko : there is no need to compile the python part, and since the vala code generate C code, it can be easily compiled for different targets.&lt;br /&gt;So no excuses not to write great apps for OpenMoko :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-1187383777891670629?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/1187383777891670629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=1187383777891670629' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/1187383777891670629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/1187383777891670629'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2008/05/calling-vala-code-from-python.html' title='Calling Vala code from Python'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-3099739330848961342</id><published>2008-05-12T02:54:00.000-07:00</published><updated>2008-05-12T03:19:46.211-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gtk'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='openmoko'/><title type='text'>First day at OpenMoko</title><content type='html'>Today is my first working day at &lt;a href="http://www.openmoko.com/"&gt;OpenMoko&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;After I met my new coworkers - I will need some time to get used to all the new faces - I started to play with the &lt;a href="http://http//wiki.openmoko.org/wiki/Neo_FreeRunner"&gt;Neo FreeRunner&lt;/a&gt;. So I followed the wiki instructions to flash my cell phone with the last kernel and file system image. It worked fine :-)&lt;br /&gt;&lt;br /&gt;Of course, since I am a fan of python and gtk, the second thing I tried was to run a python / gtk / glade application. And the proof that it works with no problem :&lt;br /&gt;&lt;br /&gt;Here is a screenshot of glade designer running on my laptop :&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_fDNYVHtzuAI/SCgWKqIxfDI/AAAAAAAAAro/tXGInAb0k8Q/s1600-h/Screenshot-test.glade.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_fDNYVHtzuAI/SCgWKqIxfDI/AAAAAAAAAro/tXGInAb0k8Q/s320/Screenshot-test.glade.png" alt="" id="BLOGGER_PHOTO_ID_5199430142164827186" border="0" /&gt;&lt;/a&gt;And here is the same interface running on the Neo FreeRunner, from a python script :&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fDNYVHtzuAI/SCgWk6IxfEI/AAAAAAAAArw/Mn6-5xAgnXA/s1600-h/test.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_fDNYVHtzuAI/SCgWk6IxfEI/AAAAAAAAArw/Mn6-5xAgnXA/s320/test.png" alt="" id="BLOGGER_PHOTO_ID_5199430593136393282" border="0" /&gt;&lt;/a&gt;This is pretty cool. The only problem is that the menu bar looks a little bit too small for a screen touch interface.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-3099739330848961342?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/3099739330848961342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=3099739330848961342' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/3099739330848961342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/3099739330848961342'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2008/05/first-day-at-openmoko.html' title='First day at OpenMoko'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_fDNYVHtzuAI/SCgWKqIxfDI/AAAAAAAAAro/tXGInAb0k8Q/s72-c/Screenshot-test.glade.png' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-8029840923367155055</id><published>2008-04-30T01:50:00.000-07:00</published><updated>2008-04-30T02:12:37.608-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='D'/><title type='text'>Enough of C++ !</title><content type='html'>I used to like C++ a lot but the more I use this language the less I like it.&lt;br /&gt;&lt;br /&gt;I think I really definitively made up my opinion about this language when I started to look at the &lt;a href="http://www.boost.org/"&gt;boost libraries&lt;/a&gt;.&lt;br /&gt;First I though all those crazy meta programing stuffs were genius (and indeed the boost libraries are an impressive piece of work), but then I realize that if C++ didn't have so much drawback, the boost code would be quite simple.&lt;br /&gt;&lt;br /&gt;All the boost libraries do is find tricky ways to do things that C++ hasn't been made for in the first place.&lt;br /&gt;&lt;br /&gt;For me it is a clear sign that C++ is going nowhere. And the new &lt;a href="http://en.wikipedia.org/wiki/C%2B%2B0x"&gt;C++0x&lt;/a&gt; doesn't look so good to me. They make the language very complicated, I wonder if people are actually going to learn all the new things they add to the language. Yet one of the most important feature (garbage collector) is still not planed.&lt;br /&gt;&lt;br /&gt;I am getting very interested by the &lt;a href="http://www.digitalmars.com/d/"&gt;D language&lt;/a&gt;, I even made a &lt;a href="http://www.dsource.org/projects/guisterax"&gt;small video game in D&lt;/a&gt;.&lt;br /&gt;At first sight D looks similar to C++, cause it has the same syntax (I would have preferred a python like syntax though), but it corrects all the things that made me not want to write C++ again :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;a garbage collector (you can disable it if you want more control on memory)&lt;/li&gt;&lt;li&gt;a foreach loop&lt;/li&gt;&lt;li&gt;dynamic arrays part of the core language&lt;br /&gt;&lt;/li&gt;&lt;li&gt;automatic type deduction (like "auto x = 10")&lt;/li&gt;&lt;li&gt;simpler and more powerful template system.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Well, and &lt;a href="http://www.digitalmars.com/d/2.0/overview.html"&gt;many other good stuffs&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;So far the language is still new, and unfortunately not so many libraries have been created for it, but for me D may well be the future of compiled language.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-8029840923367155055?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/8029840923367155055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=8029840923367155055' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/8029840923367155055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/8029840923367155055'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2008/04/enough-of-c.html' title='Enough of C++ !'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-2329664471011937089</id><published>2008-04-30T00:49:00.000-07:00</published><updated>2008-04-30T01:39:08.401-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='optimization'/><category scheme='http://www.blogger.com/atom/ns#' term='c'/><title type='text'>How to compute "y = a * x + y"</title><content type='html'>I recently tried to write a numerical computation software that needed to perform a lot of vector operations. My first idea was to use python, and the numpy library.&lt;br /&gt;But then I found that this simple operation :&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;y = a * x + y&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Where x and y are large numpy arrays, and a is a scalar,&lt;br /&gt;was much slower than the same thing coded in C, like this :&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;void func(float x[N], float y[N], float a) {&lt;br /&gt;    for(size_t i = 0; i &lt; N; ++i) {&lt;br /&gt;        y[i] += a * x[i];&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The reason is that numpy has to create a temporary object to store the result of the multiplication, and then also create a new object to store the result of the addition. When the size of the arrays becomes large - I was dealing with several Megabytes data arrays - it can make a lot of difference.&lt;br /&gt;&lt;br /&gt;But I don't like the C code either, because of the very ugly loop.&lt;br /&gt;&lt;br /&gt;So what can I do ? Well, first I could use the C blas library, then the operation is replaced by a function call, like this :&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;cblas_daxpy(N, a, (double*)x, 1, (double*)y, 1);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;But it still looks over complicated.&lt;br /&gt;&lt;br /&gt;OK maybe some other languages can be more suitable for this task. What about C++ ? With the boost::ublas library, it looks already much better :&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;using namespace boost::numeric::ublas;&lt;br /&gt;void func(const vector&lt;double&gt;&amp;amp; x, vector&lt;double&gt;&amp;amp; y, double a) {&lt;br /&gt; y += a * x;&lt;br /&gt;}&lt;br /&gt;&lt;/double&gt;&lt;/double&gt;&lt;/pre&gt;&lt;br /&gt;Well, almost what I wanted, I could even use template parameters to make the function accepts any kind of input data.&lt;br /&gt;&lt;br /&gt;But since at the end I want to be able to call this function from python, C++ is not the easiest choice (beside, I don't like C++ that much). Finally I used a language I really don't like, but that appeared to be the best for this particular task : Fortran90&lt;br /&gt;&lt;br /&gt;Fortran90 is already much better than the horrible Fortran77 (That nobody should ever use). and most important, it has vector operations included in the language.&lt;br /&gt;&lt;br /&gt;So now my simple operation looks like this :&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;subroutine func(x, y, a)&lt;br /&gt; implicit none&lt;br /&gt; REAL, dimension(:), intent(in) :: x&lt;br /&gt; REAL, dimension(:), intent(inout) :: y&lt;br /&gt; REAL, intent(in) :: a&lt;br /&gt;&lt;br /&gt; y = a * x + y&lt;br /&gt;&lt;br /&gt;end subroutine func&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;(Note : in Fortran90, you DON'T need to start every lines at the 7th character !)&lt;br /&gt;&lt;br /&gt;I can call this fortran function from python quite easily, thanks to F2PY, and voilà. Then I can extend my function to perform all sort of numerical operations.&lt;br /&gt;&lt;br /&gt;Conclusion : Fortran90 is not as bad as I though it was, combined with python it can even be quite useful. But I still don't like this language, I am looking forward for the D language to have good numerical operations library, as well as python wrapping (it already exists, but there are still a few issues.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-2329664471011937089?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/2329664471011937089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=2329664471011937089' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/2329664471011937089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/2329664471011937089'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2008/04/how-to-compute-y-x-y.html' title='How to compute &quot;y = a * x + y&quot;'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-13321528504848376</id><published>2008-04-23T00:16:00.000-07:00</published><updated>2008-04-23T00:33:58.070-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='openmoko'/><title type='text'>New job at openmoko</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_fDNYVHtzuAI/SA7izJT8y-I/AAAAAAAAArY/Y58eP1DZ5yk/s1600-h/openmoko.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://1.bp.blogspot.com/_fDNYVHtzuAI/SA7izJT8y-I/AAAAAAAAArY/Y58eP1DZ5yk/s320/openmoko.png" alt="" id="BLOGGER_PHOTO_ID_5192336788705561570" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In a few weeks I will start to work with the great people of the &lt;a href="http://www.openmoko.com/"&gt;OpenMoko&lt;/a&gt; project.&lt;br /&gt;&lt;br /&gt;The goal of this project is to produce a totally open source mobile phone that everyone can modify at will.&lt;br /&gt;&lt;br /&gt;You can learn more from the &lt;a href="http://www.openmoko.com/"&gt;web site&lt;/a&gt;, download the sources, and even the CAO files !&lt;br /&gt;&lt;br /&gt;My job will start in a few weeks, for the moment I am still working for Taiwan university, but I start to have a look at the huge &lt;a href="http://lists.openmoko.org/mailman/listinfo/"&gt;mailing list archives&lt;/a&gt; of OpenMoko to get a better idea of the project and the people involved.&lt;br /&gt;&lt;br /&gt;I'll post more on the subject when I will actually start working. I guess this will be a great experience for me, and I will do my best to contribute  to the project.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-13321528504848376?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/13321528504848376/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=13321528504848376' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/13321528504848376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/13321528504848376'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2008/04/new-job-at-openmoko.html' title='New job at openmoko'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_fDNYVHtzuAI/SA7izJT8y-I/AAAAAAAAArY/Y58eP1DZ5yk/s72-c/openmoko.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8724479949460106754.post-7485947422196050350</id><published>2008-04-23T00:02:00.000-07:00</published><updated>2008-04-23T00:15:45.389-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='openmoko'/><title type='text'>Welcome to my new blog</title><content type='html'>Welcome to Charlie137 (aka Guillaume Chereau) new blog.&lt;br /&gt;I start this new blog in addition to my &lt;a href="http://charlie137.blogspot.com"&gt;other blog&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This blog will be more tech oriented. I will talk about the things I like in computer science, and also about my new job for &lt;a href="http://www.openmoko.com/"&gt;OpenMoko&lt;/a&gt;.&lt;br /&gt;So get ready to hear a lot about linux, OpenMoko, &lt;a href="http://www.python.org/"&gt;Python&lt;/a&gt;, &lt;a href="http://www.digitalmars.com/d/"&gt;D&lt;/a&gt;, &lt;a href="http://live.gnome.org/Vala"&gt;Vala&lt;/a&gt;, &lt;a href="http://www.stellarium.org/"&gt;Stellarium&lt;/a&gt; (among other things.)&lt;br /&gt;&lt;br /&gt;I'll keep updating my old blog with drawings and video games stuffs when I'll get the time. I have been pretty busy (and sick) recently so I didn't take time to post anything.&lt;br /&gt;&lt;br /&gt;Enjoy,&lt;br /&gt;-gui&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8724479949460106754-7485947422196050350?l=charlie137-2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charlie137-2.blogspot.com/feeds/7485947422196050350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8724479949460106754&amp;postID=7485947422196050350' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/7485947422196050350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8724479949460106754/posts/default/7485947422196050350'/><link rel='alternate' type='text/html' href='http://charlie137-2.blogspot.com/2008/04/welcome-to-my-new-blog.html' title='Welcome to my new blog'/><author><name>Guillaume Chéreau</name><uri>http://www.blogger.com/profile/05367152763264281576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
