<?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-3014089280328850201</id><updated>2011-11-17T01:55:59.164+01:00</updated><category term='linux'/><category term='ruby'/><category term='centos'/><category term='cvs'/><category term='grub'/><category term='cv'/><category term='mysql'/><category term='debugging'/><category term='kubuntu'/><category term='cluster'/><category term='vienna'/><category term='perl'/><category term='objects'/><category term='curriculum vitae'/><category term='utf-8'/><category term='fedora'/><category term='benchmarks'/><category term='photos'/><category term='django'/><category term='openoffice'/><category term='netbeans'/><category term='chrome'/><category term='photo'/><category term='job'/><category term='yapceu07'/><category term='strong weak typing'/><category term='adwords'/><category term='dynamic languages'/><category term='git'/><category term='python'/><category term='yapc'/><category term='adsense'/><category term='rails'/><category term='debian'/><category term='chromium'/><category term='windows'/><category term='imagemagick'/><category term='catalyst'/><category term='freebsd'/><category term='unicode'/><category term='ubuntu'/><category term='cmd'/><category term='solaris'/><category term='exif'/><category term='svn'/><category term='google'/><title type='text'>Langs, tech, stuff</title><subtitle type='html'>Talking uses energy, doing creates it</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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>30</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3014089280328850201.post-4905545584177696408</id><published>2011-11-08T11:57:00.000+01:00</published><updated>2011-11-14T11:03:26.164+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='grub'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='kubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Grub, no count down after failed run, how to fix it</title><content type='html'>This default grub behavior could be very annoying especially with virtual machines running headless or whatever should stand up after failure.It could be fixed by modifying make_timeout () in /etc/grub.d/00_header:Original code:****&lt;br /&gt;&lt;pre&gt;make_timeout ()&lt;br /&gt;{&lt;br /&gt;    cat &amp;lt;&amp;lt; EOF&lt;br /&gt;if [ "\${recordfail}" = 1 ]; then&lt;br /&gt;  set timeout=-1&lt;br /&gt;else&lt;br /&gt;  set timeout=${2}&lt;br /&gt;fi&lt;br /&gt;EOF&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;****here is how to fix it:****&lt;br /&gt;&lt;pre&gt;make_timeout ()&lt;br /&gt;{&lt;br /&gt;    cat &amp;lt;&amp;lt; EOF&lt;br /&gt;if [ "\${recordfail}" = 1 ]; then&lt;br /&gt;  set timeout=${2}&lt;br /&gt;else&lt;br /&gt;  set timeout=${2}&lt;br /&gt;fi&lt;br /&gt;EOF&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;****/I know it is a "secure programming" approach in terms of how this code looks like now... and yes, it is/The original hint is taken from here:http://forum.xbmc.org/showthread.php?t=64857&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-4905545584177696408?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/4905545584177696408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=4905545584177696408' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/4905545584177696408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/4905545584177696408'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2011/11/grub-no-count-down-after-failed-run-how.html' title='Grub, no count down after failed run, how to fix it'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-7764134889134095875</id><published>2011-10-11T18:31:00.000+01:00</published><updated>2011-10-11T18:31:01.027+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='cluster'/><category scheme='http://www.blogger.com/atom/ns#' term='kubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>cssh - cluster ssh - do your cluster work easier</title><content type='html'>This is a very simple but powerful tool for interactive work with many machines at once&lt;br /&gt;Just log in to them&lt;br /&gt;&lt;pre&gt;cssh node1 node2 node3&lt;/pre&gt;and do the same operations on all of them.&lt;br /&gt;&lt;br /&gt;It needs x-window (mmm, just wonder if there is a pure-text replacement?) and it is worth to configure ssh keys and perhaps ssh-agent to make your logins easier but still safe.&lt;br /&gt;&lt;b&gt;cssh&lt;/b&gt; comes with packages for ubuntu/debian, not sure if redhat/centos rpms catch up here. This project page is &lt;a href="http://sourceforge.net/projects/clusterssh/"&gt;http://sourceforge.net/projects/clusterssh/&lt;/a&gt;&lt;br /&gt;Many thanks for this tool!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-7764134889134095875?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/7764134889134095875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=7764134889134095875' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/7764134889134095875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/7764134889134095875'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2011/10/cssh-cluster-ssh-do-your-cluster-work.html' title='cssh - cluster ssh - do your cluster work easier'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-2040083889878641253</id><published>2011-09-27T21:38:00.001+01:00</published><updated>2011-09-28T11:49:53.401+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>CPAN of the week</title><content type='html'>&lt;b&gt;Carp::Always&lt;/b&gt; - this is what you need when perl -MCarp=verbose doesn't work the way you expect it. Spotted in some post by JRockway.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Mock::Quick&lt;/b&gt; - mock whatever you want, but also takeover/partially override existing modules and classes. The beauty of certainty for TDD or just when escaping from too many dependencies.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-2040083889878641253?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/2040083889878641253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=2040083889878641253' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/2040083889878641253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/2040083889878641253'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2011/09/c.html' title='CPAN of the week'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-2685441244830782083</id><published>2011-06-05T21:48:00.002+01:00</published><updated>2011-06-05T21:52:22.020+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><title type='text'>Git ignore file</title><content type='html'>I just find myself like searching for this again and again as I am not a very heavy git user now, but setting global core.excludesfile seems to be very similar to svn/cvs approach.&lt;br /&gt;&lt;br /&gt;How to ignore certain types of files in git?&lt;br /&gt;&lt;br /&gt;1) Put the excludes in your $GIT_DIR/info/exclude file (&lt;b&gt;.git/info/exclude&lt;/b&gt;), if this is specific to one tree.&lt;br /&gt;&lt;br /&gt;2) Run &lt;b&gt;git config --global core.excludesfile ~/.gitignore&lt;/b&gt; and add patterns to your ~/.gitignore. This option applies if you want to ignore certain patterns across all trees.&lt;br /&gt;&lt;br /&gt;/taken from StackOverflow by Emil&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-2685441244830782083?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/2685441244830782083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=2685441244830782083' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/2685441244830782083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/2685441244830782083'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2011/06/git-ignore-file.html' title='Git ignore file'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-5919816793663155412</id><published>2011-03-16T11:51:00.007+01:00</published><updated>2011-06-05T21:34:15.417+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Back ticks equivalent in cmd / windows</title><content type='html'>How to get a result of one command and use it in another command in Windows shell, like with backticks in Unix/Linux shell?&lt;br /&gt;&lt;br /&gt;Here is a working example:&lt;br /&gt;&lt;PRE&gt;&lt;br /&gt;for /f "tokens=1* delims=" %%s in ('gnuwin32\date +"%%Y%%m%%d_%%H%%M"') do echo output_%%s.log&lt;br /&gt;&lt;br /&gt;&gt; output_20110215_1057.log&lt;br /&gt;&lt;/PRE&gt;&lt;br /&gt;&lt;br /&gt;Works in Windows XP, Vista, Windows 7.&lt;br /&gt;&lt;br /&gt;Remember:&lt;br /&gt;1) The variable used in a for loop must be a one letter (at least in XP, Vista)&lt;br /&gt;2) gnuwin32 is a set of GNU tools like grep/sed/awk/date which can be run natively in Windows without cost of additonal Cygwin-like layers&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-5919816793663155412?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/5919816793663155412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=5919816793663155412' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/5919816793663155412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/5919816793663155412'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2011/03/back-ticks-equivalent-in-cmd-windows.html' title='Back ticks equivalent in cmd / windows'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-7354631152266765124</id><published>2011-02-10T22:31:00.003+01:00</published><updated>2011-02-10T22:36:51.353+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='openoffice'/><title type='text'>Mr Openoffice is happy with default A4 page</title><content type='html'>This is that kind of thing that you know you want to change, but there is always no time to do it. But it is just a minute, really!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://selinap.com/2008/12/how-to-set-openoffice-default-page-format-to-a4/"&gt;http://selinap.com/2008/12/how-to-set-openoffice-default-page-format-to-a4/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Simply:&lt;br /&gt;1) change page format&lt;br /&gt;2) save it as a template (File -&gt; template)&lt;br /&gt;3) set this template as a default (File -&gt; template -&gt; organize -&gt; commands -&gt; set as a default tpl)&lt;br /&gt;&lt;br /&gt;Do it, do it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-7354631152266765124?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/7354631152266765124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=7354631152266765124' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/7354631152266765124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/7354631152266765124'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2011/02/mr-openoffice-is-happy-with-default-a4.html' title='Mr Openoffice is happy with default A4 page'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-4276852626964928529</id><published>2010-04-05T22:18:00.004+01:00</published><updated>2010-04-05T22:49:34.557+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='debugging'/><title type='text'>Rails, flushing buffer log - what a waste of time to fix it</title><content type='html'>It was so stupid...&lt;br /&gt;&lt;br /&gt;There was a ruby on rails application. There were some changes in a production server. Some missing libraries needed to be added. You are fixing one thing then another, try and fix, try and fix and so on. That is fine as long as we know what needs to be done.&lt;br /&gt;&lt;br /&gt;Finally this application was ready to work in development but not in production mode. There was nothing on screen nor in log/development.log even with enabled -u (debug) flag for script/server (you should have &lt;b&gt;ruby-debug&lt;/b&gt; gem and &lt;b&gt;ruby-dev&lt;/b&gt; package also as a dependency).&lt;br /&gt;&lt;br /&gt;What is wrong as I am still getting "Application error&lt;br /&gt;There is an error in this application. Please let us apologize for this inconvenience and help to fix it by reporting this problem to site-master", why there is NOTHING in the log or maybe - where is this f..$%&amp;amp;* log at all? log/production.log is untouched even after shutting down the server.&lt;br /&gt;&lt;br /&gt;Ok, probably the error is somewhere in differences between environments so maybe this could be a database.yml, different place of connection socket but why I can not see even a simple error message about this?&lt;br /&gt;&lt;br /&gt;After some time for browsing forums, groups and so on the proper solution was to add&lt;br /&gt;&lt;pre&gt;Rails.logger.auto_flushing = 1&lt;br /&gt;&lt;/pre&gt;at the end of my config/environment.rb&lt;br /&gt;&lt;br /&gt;My question is - even if this large buffer is understandable solution for heavy production environments why I cannot see anything after closing down my server? Should not this log be flushed then?&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;If you want to check your logger settings...&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;Run your rails console:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;script/console&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and then type:&lt;br /&gt;&lt;pre&gt;RAILS_DEFAULT_LOGGER.inspect&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;so it looks like:&lt;br /&gt;&lt;pre&gt;script/console production&lt;br /&gt;Loading production environment (Rails 2.3.5)          &lt;br /&gt;&gt;&gt; RAILS_DEFAULT_LOGGER.inspect&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and check &lt;i&gt;@auto_flushing=&lt;/i&gt; value.&lt;br /&gt;&lt;br /&gt;If you have @auto_flushing=1 then you are at home.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-4276852626964928529?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/4276852626964928529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=4276852626964928529' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/4276852626964928529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/4276852626964928529'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2010/04/rails-flushing-buffer-log-what-waste-of.html' title='Rails, flushing buffer log - what a waste of time to fix it'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-2259210169212130389</id><published>2009-06-01T16:40:00.005+01:00</published><updated>2011-03-16T12:59:56.708+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cmd'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Auto-complete cmd in Windows (like in bash)</title><content type='html'>Mostly for Win-XP: It is really handy to have an auto-complete with standard windows shell, cmd. Surprise: it works! The default expand sequence is Ctrl-F.&lt;br /&gt;&lt;br /&gt;To change it to more popular tab, open (win-R) &lt;b&gt;regedit&lt;/b&gt; and go to &lt;b&gt;HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor&lt;/b&gt;, change &lt;span style="font-weight:bold;"&gt;CompletionChar&lt;/span&gt; and &lt;b&gt;PathCompletionChar&lt;/b&gt; to 9.&lt;br /&gt;&lt;br /&gt;That's it.&lt;br /&gt;&lt;br /&gt;Open your cmd window again and enjoy.&lt;br /&gt;&lt;br /&gt;The more detailed description you cand find at http://support.microsoft.com/kb/310530&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-2259210169212130389?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/2259210169212130389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=2259210169212130389' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/2259210169212130389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/2259210169212130389'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2009/06/auto-complete-cmd-with-windows-line-in.html' title='Auto-complete cmd in Windows (like in bash)'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-7053209414541779017</id><published>2008-12-14T00:29:00.007+01:00</published><updated>2008-12-14T00:49:15.867+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='chromium'/><category scheme='http://www.blogger.com/atom/ns#' term='chrome'/><title type='text'>Matrix, Paweł Hajdan, Chromium and Chrome</title><content type='html'>I just heard this news yesterday being in Warsaw for a couple of hours: Paweł Hajdan Jr, the member of "Matrix", became a first external commiter to Chromium Code.&lt;br /&gt;&lt;br /&gt;See &lt;a href="http://blog.chromium.org/2008/12/welcome-pawe-to-team.html"&gt;Chromium Blog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Congratulations!!!&lt;br /&gt;&lt;br /&gt;"Matrix" is a name of the group that I started 5 years ago to improve the software development and internet services delivery for Polish Scouting Association, ZHR.pl. Paweł was the youngest guy at the first Matrix meeting 5 years ago. It was really nice to see him again with his talk about security in web applications given to the members of Matrix group.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-7053209414541779017?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/7053209414541779017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=7053209414541779017' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/7053209414541779017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/7053209414541779017'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2008/12/matrix-pawe-hajdan-chromium-and-chrome.html' title='Matrix, Paweł Hajdan, Chromium and Chrome'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-8831879817147724568</id><published>2008-02-01T20:17:00.001+01:00</published><updated>2008-03-02T02:51:30.770+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exif'/><category scheme='http://www.blogger.com/atom/ns#' term='photos'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='imagemagick'/><title type='text'>Exif auto-rotate &amp; scale your photos</title><content type='html'>Typically after a journey to new place I finish with hundreds of photos from my camera. When I am browsing it on linux (or mac osx) everything is ok - gwenview can read EXIF rotation data and show them in proper direction (rotate on the fly). The problem begin when you upload such "good" portrait image or send it by email - it will be 90deg rotated. Ooops!&lt;br /&gt;&lt;br /&gt;A small script can fix it and create subdirectories with 1280x1024 and 800x600 scaled images. It also rotates original images lossless preserving original EXIF data - don't be afraid about the quality!&lt;br /&gt;&lt;br /&gt;To use this, simply add packages: &lt;span style="font-weight:bold;"&gt;imagemagick&lt;/span&gt;,  &lt;span style="font-weight:bold;"&gt;exiftran&lt;/span&gt; &amp; perl bindings &lt;span style="font-weight:bold;"&gt;Image::Magick&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#!/usr/bin/perl -w&lt;br /&gt;`exiftran -aip *.JPG`;&lt;br /&gt;`exiftran -aip *.jpg`;&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;use Image::Magick;&lt;br /&gt;use Cwd;&lt;br /&gt;&lt;br /&gt;my $currdir = ( getcwd =~ m{([^/]+)$} )[0];&lt;br /&gt;&lt;br /&gt;my $webdir = $currdir . '_to1280';&lt;br /&gt;my $web800 = $currdir . '_to800';&lt;br /&gt;print "Creating dirs: $webdir, $web800\n";&lt;br /&gt;mkdir $webdir;&lt;br /&gt;mkdir $web800;&lt;br /&gt;&lt;br /&gt;print $| = 1;&lt;br /&gt;foreach my $filename (&lt;*.jpg&gt;, &lt;*.JPG&gt;) {&lt;br /&gt;    # read this&lt;br /&gt;    my $image = Image::Magick-&gt;new();&lt;br /&gt;    $image-&gt;read($filename);&lt;br /&gt;&lt;br /&gt;    # scale it&lt;br /&gt;    print "$filename ";&lt;br /&gt;    $image-&gt;Thumbnail(geometry =&gt; '1280x1024&gt;');&lt;br /&gt;    $image-&gt;write($webdir . '/' . lc($filename));&lt;br /&gt;&lt;br /&gt;    $image-&gt;Thumbnail(geometry =&gt; '800x600&gt;');&lt;br /&gt;    $image-&gt;write($web800 . '/' . lc($filename));&lt;br /&gt;    print ".\n";&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/3014089280328850201-8831879817147724568?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/8831879817147724568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=8831879817147724568' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/8831879817147724568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/8831879817147724568'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2008/02/exif-auto-rotate-scale-your-photos.html' title='Exif auto-rotate &amp; scale your photos'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014089280328850201.post-2480942973788597253</id><published>2008-01-31T23:00:00.001+01:00</published><updated>2011-01-31T23:02:36.243+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cvs'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>Reasons to switch from CVS to SVN</title><content type='html'>Plenty of reasons to switch to SVN/subversion as soon as possible.&lt;br /&gt;&lt;br /&gt;SVN is better - easier to usage, no hacks for typical development tasks like&lt;br /&gt;changing file names, directory structure etc.&lt;br /&gt;&lt;br /&gt;What developer can do in SVN compared to CVS:&lt;br /&gt;&lt;br /&gt;- can change file names and their place in project directory structure preserving&lt;br /&gt;  history. ### It is very important if you can make lib named "foo", code it and&lt;br /&gt;  week later rename to more apropiate name. This is more agile.&lt;br /&gt;&lt;br /&gt;- can store more than plain files: symlinks, file rights. ### There are&lt;br /&gt;  still some problems if you would like to store your server files with&lt;br /&gt;  exactly the same permissions, but it is much more better than in CVS.&lt;br /&gt;&lt;br /&gt;- handling with tags and branches is more intuitive. SVN shows them as&lt;br /&gt;  separated directories. ### SVN propose structure for your project where&lt;br /&gt;  the default (HEAD) branch for development is named "trunk". Other branches&lt;br /&gt;  you have in subdirectory "branches" and tagged versions are under "tags".&lt;br /&gt;&lt;br /&gt;- commits in SVN goes together as a "transaction". All files in commit must&lt;br /&gt;  pass to be added to SVN repository. ### This is more safer approach than&lt;br /&gt;  "every file goes own way" like we have in CVS.&lt;br /&gt;&lt;br /&gt;- commits in SVN get unique revision numbers. Single commited files belongs to&lt;br /&gt;  such revision number. Single files don't have own version numbers. ###&lt;br /&gt;  This is just different than in CVS. It has one advantage: revision number&lt;br /&gt;  in SVN means "this exact snapshot of code", the same like tag in CVS.&lt;br /&gt;  Compared to CVS, you can obtain snapshot by date (same in CVS - but you&lt;br /&gt;  know, this is UTC or localtime, and which timezone, huh?) and also by revision&lt;br /&gt;  number, without tagging code.&lt;br /&gt;&lt;br /&gt;- mayby this is admin problem but it is simpler to make SVN working through SSL&lt;br /&gt;  without unix accounts on remote server (SVN repo). Do you know how to do&lt;br /&gt;  it in CVS?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-2480942973788597253?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/2480942973788597253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=2480942973788597253' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/2480942973788597253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/2480942973788597253'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2008/01/reasons-to-switch-from-cvs-to-svn.html' title='Reasons to switch from CVS to SVN'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-6552953263027224278</id><published>2008-01-17T17:15:00.000+01:00</published><updated>2008-12-11T12:17:33.468+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='photo'/><category scheme='http://www.blogger.com/atom/ns#' term='curriculum vitae'/><category scheme='http://www.blogger.com/atom/ns#' term='job'/><category scheme='http://www.blogger.com/atom/ns#' term='cv'/><title type='text'>My photo-CV /yeap, I am looking for a new job/</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_cKr8mJqbR9U/R4-AISUYmJI/AAAAAAAAACM/768H-1uvmnc/s1600-h/dsc_3669.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_cKr8mJqbR9U/R4-AISUYmJI/AAAAAAAAACM/768H-1uvmnc/s320/dsc_3669.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5156480978207152274" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I used to work hard, in a stress and time-critical environment - it is always a challenge for me.&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_cKr8mJqbR9U/R4-BeiUYmLI/AAAAAAAAACc/_8RHs6xUD2E/s1600-h/dsc_3715_edited-1.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_cKr8mJqbR9U/R4-BeiUYmLI/AAAAAAAAACc/_8RHs6xUD2E/s320/dsc_3715_edited-1.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5156482459970869426" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I like to work with others - to cooperate to solve complex problems! IT world is too complicated to go thorough really alone. RTFMs, lists, IRC, friends...&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_cKr8mJqbR9U/R4-DDCUYmMI/AAAAAAAAACk/dPE_pdz6NLY/s1600-h/dsc_3765.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_cKr8mJqbR9U/R4-DDCUYmMI/AAAAAAAAACk/dPE_pdz6NLY/s320/dsc_3765.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5156484186547722434" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It is very practical to document my work...&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_cKr8mJqbR9U/R4-GqiUYmNI/AAAAAAAAACs/vkXP0-U7aZ8/s1600-h/sharing_knowledge.jpeg"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_cKr8mJqbR9U/R4-GqiUYmNI/AAAAAAAAACs/vkXP0-U7aZ8/s320/sharing_knowledge.jpeg" border="0" alt=""id="BLOGGER_PHOTO_ID_5156488163687438546" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;... but it is even better to share my knowledge with other people! /&lt;a href="http://www.slideshare.net/mold/catalyst"&gt;last yapc::eu 2007, vienna&lt;/a&gt;/&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_cKr8mJqbR9U/R4-HrSUYmOI/AAAAAAAAAC0/MJmBRbJaUUY/s1600-h/optimise.jpeg"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_cKr8mJqbR9U/R4-HrSUYmOI/AAAAAAAAAC0/MJmBRbJaUUY/s320/optimise.jpeg" border="0" alt=""id="BLOGGER_PHOTO_ID_5156489276083968226" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It is not so easy to optimize code and databases, to make it better, faster, more efficient and reliable - better for users... but it just need to be done&lt;dot&gt; /all those apache/mod_rewrite/squid/non-forking-light-servers approaches.../&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_cKr8mJqbR9U/R4-IeyUYmPI/AAAAAAAAAC8/YeeYU4uoRRI/s1600-h/p1080204.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_cKr8mJqbR9U/R4-IeyUYmPI/AAAAAAAAAC8/YeeYU4uoRRI/s320/p1080204.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5156490160847231218" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;having my workplace and codebase really nice is also a pleasure to dig more /cvs, subversion, good directory layout, getting best of all /etc/*, .ssh/.rc files/&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_cKr8mJqbR9U/R4-MrCUYmRI/AAAAAAAAADM/jZHd5WUvQBc/s1600-h/p1080751.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_cKr8mJqbR9U/R4-MrCUYmRI/AAAAAAAAADM/jZHd5WUvQBc/s320/p1080751.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5156494769347139858" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;simplicity of architecture &amp; design, good ERM models and libraries can give project a real power! /from 2NF, 3NF to fast ETL tools and database tuning/&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_cKr8mJqbR9U/R4-KYiUYmQI/AAAAAAAAADE/LJJxnZQY7Vo/s1600-h/p1080212.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_cKr8mJqbR9U/R4-KYiUYmQI/AAAAAAAAADE/LJJxnZQY7Vo/s320/p1080212.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5156492252496304386" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As a good developer, I always try to learn something new and get more from my work /enjoy safaribooksonline, free sources, books to do what need to be done the best way/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-6552953263027224278?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/6552953263027224278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=6552953263027224278' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/6552953263027224278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/6552953263027224278'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2008/01/my-photo-cv-yeap-i-am-looking-for-new.html' title='My photo-CV /yeap, I am looking for a new job/'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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/_cKr8mJqbR9U/R4-AISUYmJI/AAAAAAAAACM/768H-1uvmnc/s72-c/dsc_3669.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014089280328850201.post-1081332435438278114</id><published>2007-12-13T03:26:00.000+01:00</published><updated>2008-12-11T12:17:33.599+01:00</updated><title type='text'>No idea for new project?</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_cKr8mJqbR9U/R2CYiKomvAI/AAAAAAAAABU/2A20mmiDz4w/s1600-h/p2180043_wyspianski_stworzenie.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://1.bp.blogspot.com/_cKr8mJqbR9U/R2CYiKomvAI/AAAAAAAAABU/2A20mmiDz4w/s320/p2180043_wyspianski_stworzenie.jpg" alt="" id="BLOGGER_PHOTO_ID_5143278487194745858" border="0"&gt;&lt;/a&gt;&lt;br /&gt;No idea how to solve hard IT problems? Try to do something new.  Open your mind!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/Stanislaw Wyspianski, "The creation of the world", stained glass, Franciszkanow church, Krakow, PL/&lt;a href="javascript:void(0)" tabindex="11" onclick="return false;"&gt;&lt;span&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-1081332435438278114?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/1081332435438278114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=1081332435438278114' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/1081332435438278114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/1081332435438278114'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2007/12/no-idea-for-new-project.html' title='No idea for new project?'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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/_cKr8mJqbR9U/R2CYiKomvAI/AAAAAAAAABU/2A20mmiDz4w/s72-c/p2180043_wyspianski_stworzenie.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014089280328850201.post-1969163335953838786</id><published>2007-09-21T20:54:00.000+01:00</published><updated>2007-09-21T21:30:09.722+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='catalyst'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>What I hate in perl5 and Catalyst</title><content type='html'>&lt;h2&gt;Perl - references&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;Let's remove all simple data-structures like @lists and %hashes. When we think "list" let use list-refs, ref-hashes instead of hashes. Let's keep only scalars and references with implicit dereferencing, like in Python or Ruby. No wantarray context-dependent behaviour! No @{$foo} and \@foo and other nasty code! Perl will be clear and more funny!&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;current perl:&lt;br /&gt;$foo = [ map { ... } @$bar ]&lt;br /&gt;&lt;br /&gt;better perl:&lt;br /&gt;$foo = map { } $bar&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As I see folks have problems why we write:&lt;br /&gt;&lt;pre&gt;%hash = (foo =&gt; 42);&lt;br /&gt;$hash{foo}   # where is hash sign, % ?&lt;br /&gt;&lt;br /&gt;@list = qw/foo bar baz/;&lt;br /&gt;$list[1]     # where is list sign, @ ?&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and there is no much difference between lists and refs, but differences between various forms of using refs are probably bigger than list&lt;-&gt;ref:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$list[1][2]      # wolf&lt;br /&gt;$$list[1][2]     # dog1&lt;br /&gt;$list-&gt;[1][2]    # dog2&lt;br /&gt;$list-&gt;[1]-&gt;[2]  # dog3&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Sure, there is only one dog, welcome to TIMTOWDI world!&lt;br /&gt;&lt;br /&gt;There are also some troubles with&lt;br /&gt;&lt;pre&gt;$ref = \@list;&lt;br /&gt;$ref = [@ref]&lt;br /&gt;# maybe it is @list?&lt;br /&gt;$ref = [ $some-&gt;method ]&lt;br /&gt;# or maybe it is %hash?&lt;br /&gt;$ref = { $some-&gt;method }&lt;br /&gt;&lt;br /&gt;# could be better to make something like&lt;br /&gt;$ref = $some-&gt;method-&gt;return_as_hashref&lt;br /&gt;$ref = $some-&gt;method-&gt;return_as_arrayref&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Maybe I should stop writing perl code because I think too much about all those things? ;)&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Catalyst - index is different than other actions&lt;/h2&gt;&lt;br /&gt;What is a difference between:&lt;br /&gt;&lt;pre&gt;Controller app::foo;&lt;br /&gt;&lt;br /&gt;sub index : Private {&lt;br /&gt;    my ($self, $c, $param1) = @_;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub show : Local {&lt;br /&gt;    my ($self, $c, $param1) = @_;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;?&lt;br /&gt;&lt;br /&gt;Index will not catch arguments, will not work with &lt;b&gt;/foo/123&lt;/b&gt;, although &lt;b&gt;/foo/show/123&lt;/b&gt; will work that way. To fix index, we need to use LocalRegex &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sub index : LocalRegex('^(.*)$') {&lt;br /&gt;    my ( $self, $c ) = @_;&lt;br /&gt;    my ($param1) = @{ $c-&gt;req-&gt;captures };&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/3014089280328850201-1969163335953838786?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/1969163335953838786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=1969163335953838786' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/1969163335953838786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/1969163335953838786'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2007/09/what-i-hate-in-perl5-and-catalyst.html' title='What I hate in perl5 and Catalyst'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-1621764692103944985</id><published>2007-09-04T00:37:00.000+01:00</published><updated>2008-01-18T02:11:48.481+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='yapceu07'/><category scheme='http://www.blogger.com/atom/ns#' term='yapc'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>YAPC::Europe 2007 in Vienna</title><content type='html'>&lt;b&gt;Larry Wall, Damian Conway, many great perl hackers, interesting events, all in one place in one time.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;It was my first YAPC and also first YAPC talk (slides from &lt;a href="http://www.slideshare.net/mold/catalyst"&gt;Catalyst refactoring&lt;/a&gt; are with others from this yapc on &lt;a href="http://www.slideshare.net/tag/yapceu07"&gt;slideshare&lt;/a&gt; - also check &lt;a href="http://perlbuzz.com/"&gt;perlbuzz.com&lt;/a&gt;) and &lt;a href="http://picasaweb.google.co.uk/b.jakubski/YAPCEurope2007Vienna"&gt;Bartosz Jakubski's YAPC::EU 2007 photos&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;However more interesting was to see in real life how this OS world works, met many interesting people from the perl community. There is probably nothing more interesting than long talks about POE, Catalyst and other kinda-like-app-servers or any other stuff during evenings near the Dunau Kanal and in other nice places in Vienna. &lt;br /&gt;&lt;br /&gt;Huh, many words to say how great and cool was this YAPC!!!&lt;br /&gt;&lt;br /&gt;PS: I will try to remember difference between Dbix and (Dbic or Dbix::Class) at least to avoid bot activation on #catalyst /and mst should also be happy ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-1621764692103944985?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/1621764692103944985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=1621764692103944985' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/1621764692103944985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/1621764692103944985'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2007/09/yapceurope-2007.html' title='YAPC::Europe 2007 in Vienna'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-6384928522926670486</id><published>2007-08-16T23:08:00.000+01:00</published><updated>2007-08-16T23:50:37.415+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='catalyst'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='netbeans'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Ruby, Rails and Netbeans (compared to Catalyst)</title><content type='html'>In current time I am working on my bike-"startup" site, rowerem.org (in Polish: by-bike org) which promotes using bicycles in Krakow and cities at all. This is a free project, no money just fun and opportunity to learn something new.&lt;br /&gt;&lt;br /&gt;For long time I was not sure I should do it in perl/Catalyst, some kind of python framework or Ruby/Rails. From the hosting point of view it should be php but... never mind ;) Because I like python, this simplicity, explicit constructions I was checking python frameworks. Unfortunately  Django goes own way of MTV, Turbogears is not so well designed (opinions), Pylons - not so popular to have mature quality of all web-related libs. Inspired by latest billboards ads in the city I chose Rails ;)&lt;br /&gt;&lt;br /&gt;What is good about Rails?&lt;br /&gt;&lt;br /&gt;- Good documentation. You have few good, printed books: &lt;i&gt;Rails Recipes&lt;/i&gt;, &lt;i&gt;Rails Cookbook&lt;/i&gt; and of course &lt;i&gt;Agile Web Development with Rails&lt;/i&gt;. If you have a problem with something, just google for it or check in book. Howtos on rails/doc are also helpful. The step-in cost is very small compared to eg. Perl/Catalyst even when I code in Perl for 10 years when Ruby is still fresh for me.&lt;br /&gt;&lt;br /&gt;- not too deep directory structure. It is simpler compared to Catalyst.&lt;br /&gt;&lt;br /&gt;- model (ActiveRecord) is really simple to use. Maybe DBIx::Class is powerful but hard to use for night development (after typical day in work). Or I am just too lazy ;)&lt;br /&gt;&lt;br /&gt;- good IDE. Have you ever tried Netbeans 6? There are some issues like hard-to-work-without-mouse, hard to (re)define shortcuts / compared to Kdevelop / but... you have good, free IDE for Ruby and Rails projects!&lt;br /&gt;&lt;br /&gt;Now it is very funny to extend Catalyst knowledge based on Rails usage - "there should be something like this in Catalyst", this works also in the opposite direction, because both frameworks are quite similar.&lt;br /&gt;&lt;br /&gt;Do you use Catalayst? Or maybe you use Rails? What do you think about them?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-6384928522926670486?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/6384928522926670486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=6384928522926670486' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/6384928522926670486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/6384928522926670486'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2007/08/ruby-rails-and-netbeans-compared-to.html' title='Ruby, Rails and Netbeans (compared to Catalyst)'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-1832249149190131607</id><published>2007-08-08T21:15:00.000+01:00</published><updated>2007-08-08T21:51:23.680+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='utf-8'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='unicode'/><title type='text'>Mysql, unicode in latin1, bad but not lost!</title><content type='html'>If you just created project, have some unicode data but have just found it is a unicode in latin1 fields - simple repair it in 2 steps:&lt;br /&gt;&lt;br /&gt;1) change text fields (char/varchar/text) format to BLOB to loose coding info&lt;br /&gt;2) change BLOB to varchar/text setting proper coding.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;ALTER TABLE `news` CHANGE `body` `body` BLOB NULL DEFAULT NULL;&lt;br /&gt;ALTER TABLE `news` CHANGE `body` `body` TEXT CHARACTER SET utf8 NULL DEFAULT NULL;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Description:&lt;/b&gt; if we have 2/3-bytes sequences as a one non-ascii character in latin1 field, it means we have unicode (eg. utf8) text but for mysql it is a latin1 string. It can work for some time if you do all operations outside database in programming language. But typically you would like to use SQL for sort/comparisons and have data properly coded.&lt;br /&gt;If you did convert directly unicode-in-latin1 to unicode it would be 4-byte-noise. So we loose coding info by BLOB step to leave data untouched.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-1832249149190131607?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/1832249149190131607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=1832249149190131607' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/1832249149190131607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/1832249149190131607'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2007/08/mysql-unicode-in-latin1-bad-but-not.html' title='Mysql, unicode in latin1, bad but not lost!'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-1634601752541776915</id><published>2007-07-20T20:33:00.000+01:00</published><updated>2007-07-20T21:19:18.206+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='utf-8'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='unicode'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Perl, unicode, utf-8, mysql</title><content type='html'>Handling unicode/utf8 in Perl is quite trivial when you understand "two string approaches".&lt;br /&gt;&lt;br /&gt;Perl 5.8 by default can handle UTF-8 strings like a sequence of bytes (1-4 bytes per one char). You can "compress" them to unicode strings with&lt;br /&gt;&lt;pre&gt;$wide_char_string = Encode::decode_utf8($octets)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Such encoded string has unicode flag, you can check it with:&lt;br /&gt;&lt;pre&gt;Encode::is_utf8($checked_string)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If they have latin1/2/russian/etc. chars after unicode packing:&lt;br /&gt;&lt;pre&gt;length($octets) &gt; length($wide_char_string)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Remember: unicode flag does not mean you MUST have wide characters in string.&lt;br /&gt;Wide characters (ord &gt; 255) can be in such unicode string, but it can also has a set of unicode-octets, "unpacked" in unicode string.&lt;br /&gt;&lt;br /&gt;Use &lt;b&gt;Test::utf8&lt;/b&gt; to check you have wide chars or not.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;FAQ / typical problems:&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;- check &lt;b&gt;all sources in your program are the same&lt;/b&gt;, coded as unicode (wide) or unicode-string. Typically wide-char-strings is a better approach then byte-string (see &lt;b&gt;perldoc Encode&lt;/b&gt;). All inputs/outputs like files, DBI, network need to be converted to your choosen internal format.&lt;br /&gt;&lt;br /&gt;- do not use &lt;b&gt;use utf8&lt;/b&gt; pragma unless you really need it. In this case &lt;b&gt;all strings have unicode flag&lt;/b&gt;, but it does not mean they have wide chars!&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;(octet_string eq unicode_string) == false&lt;/pre&gt; You cannot compare such strings without decode/encode, they are natively different!&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Perl, utf8, MySQL&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;Two approaches to get unicode working with MySQL:&lt;br /&gt;&lt;br /&gt;1) after connecting to database, do("SET NAMES 'utf8');&lt;br /&gt;All unicode strings will be octets, without unicode flag.&lt;br /&gt;&lt;br /&gt;2) use DBI connection with flag: &lt;b&gt;mysql_enable_utf8&lt;/b&gt; (since DBD::mysql &gt;= 4)&lt;br /&gt;All unicode strings will have wide chars and unicode flag.&lt;br /&gt;&lt;br /&gt;Only the second approach works correctly with &lt;b&gt;AutoReconnect&lt;/b&gt; flag.&lt;br /&gt;&lt;br /&gt;Good news: there is no difference for inserts/updates you use octets or wide_char_strings.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;More to read&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;Check also this &lt;a href="http://www.google.com/search?q=cache:rbdUqkwVWLMJ:london.pm.org/lpw/talks/2004/mark_fowler-using_utf8_in_perl.ppt+mark+fowler+unicode&amp;hl=pl&amp;ct=clnk&amp;cd=5&amp;client=opera"&gt;Martin Fowler - utf8 in perl&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-1634601752541776915?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/1634601752541776915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=1634601752541776915' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/1634601752541776915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/1634601752541776915'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2007/07/perl-unicode-utf8.html' title='Perl, unicode, utf-8, mysql'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-8187171258333763534</id><published>2007-07-20T19:07:00.007+01:00</published><updated>2011-07-29T09:26:39.823+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='freebsd'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='centos'/><category scheme='http://www.blogger.com/atom/ns#' term='fedora'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='kubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='solaris'/><title type='text'>Linux - FreeBSD - Solaris - Windows commands</title><content type='html'>Update: Added Solaris (both OpenSolaris and SunOS) and Windows (where applicable) coverage for this set of commands.&lt;br /&gt;Update 2: Coverage for redhat-fedora-centos Linux line / yum package manager.&lt;br /&gt;&lt;br /&gt;Linux groups:&lt;br /&gt;* Redhat base: Redhat, Fedora, Centos (yum/rpm packages)&lt;br /&gt;* Debian based: Debian, Ubuntu, Kubuntu (dpkg/.deb packages)&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Accounts&lt;/h2&gt;&lt;br /&gt;Check what groups do I belong to?&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;{linux, freebsd, solaris}$ groups&lt;br /&gt;{windows - active directory}&gt; dsquery user -samid %USERNAME%|dsget user -memberof&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Disk, filesystem&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;Disk usage &lt;br /&gt;&lt;pre&gt;{linux}$ du -sh&lt;br /&gt;{freebsd}$ du -sh&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Count subdirectories in current directory: &lt;br /&gt;&lt;pre&gt;{linux}$ du --max-depth=1&lt;br /&gt;{freebsd}$ du -d1&lt;br /&gt;{SunOS}$ du&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Typical approach to find biggest directories/files on disk:&lt;br /&gt;&lt;pre&gt;{linux}$ du --max-depth=1 -kx|sort -n&lt;br /&gt;{freebsd}$ du -d1 -kx|sort -n&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Find some kinds of files (regex is a mask for full path, no need for begin/end marks) &lt;br /&gt;&lt;pre&gt;{linux}$ find . -regextype posix-extended -type f -regex ".*\.(java|class)"&lt;br /&gt;{freebsd}$ find -E . -type f -regex ".*\.(java|class)"&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Show open files and programs: &lt;br /&gt;&lt;pre&gt;{linux}$ lsof&lt;br /&gt;{freebsd}$ fstat&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Real time disk usage (is there something which shows results for every disk in linux?):&lt;br /&gt;&lt;pre&gt;{linux}$ vmstat 3&lt;br /&gt;{freebsd}$ iostat 3&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Swap info:&lt;br /&gt;&lt;pre&gt;{linux}$ free&lt;br /&gt;{freebsd}$ swapinfo&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Networking&lt;/h2&gt;&lt;br /&gt;Show open ports and apps connected to them: &lt;br /&gt;&lt;pre&gt;{linux}$ netstat -apne --inet&lt;br /&gt;{freebsd}$ sockstat&lt;br /&gt;{SunOS}$ netstat&lt;br /&gt;{windows}$ netstat -b&lt;br /&gt;netstat -b -v   # slower but with tree of dependencies&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h2&gt;Kernel issues&lt;/h2&gt;&lt;br /&gt;Show loaded modules: &lt;br /&gt;&lt;pre&gt;{linux}$ lsmod&lt;br /&gt;{freebsd}$ kldstat&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Load kernel module: &lt;br /&gt;&lt;pre&gt;{linux}$ modprobe SomeModule&lt;br /&gt;{freebsd}$ kldload SomeModule&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Remove loaded module: &lt;br /&gt;&lt;pre&gt;{linux}$ rmmod SomeModule&lt;br /&gt;{freebsd}$ kldunload SomeModule&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Program development&lt;/h2&gt;&lt;br /&gt;Trace the system calls of a program: &lt;br /&gt;&lt;pre&gt;{linux}$ strace&lt;br /&gt;{freebsd}$ truss   &lt;br /&gt;(strace is also available in /usr/ports/devel/strace)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;libraries - show all paths + libs: &lt;br /&gt;&lt;pre&gt;{linux}$ ldconfig -p&lt;br /&gt;{freebsd}$ ldconfig -r&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Packages management&lt;/h2&gt;&lt;br /&gt;Different linux distros make it own way. I'll focus on debian-based distributions like Debian, Ubuntu, Kubuntu etc. &lt;br /&gt;&lt;br /&gt;Find which package this file belongs to? &lt;br /&gt;&lt;pre&gt;{freebsd}$ pkg_info -W /path/to/checked_file&lt;br /&gt;{debian ubuntu}$ dpkg -S /path/to/checked_file&lt;br /&gt;{redhat centos}$ &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Have we got a package like... (in (k)ubuntu you can use more friendly tools like synaptic, apt-get, kPackageKit) &lt;br /&gt;&lt;pre&gt;{linux}$ apt-cache search your_name&lt;br /&gt;{freebsd}$ cd /usr/ports; make search key=your_name&lt;br /&gt;                          make search name=pear display=name,path&lt;br /&gt;    you can also try simple locate (only in package names):&lt;br /&gt;{freebsd}$ locate -i your_name | grep "/usr/ports/"&lt;br /&gt;{redhat centos}$ yum search name&lt;br /&gt;yum provides name&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Install a binary package &lt;br /&gt;&lt;pre&gt;{debian ubuntu}$ apt-get install package_name&lt;br /&gt;{redhat centos}$ yum install name&lt;br /&gt;{freebsd}$ pkg_add -r package_name&lt;br /&gt;{windows}$ msiexec /i package.msi&lt;br /&gt;&lt;/pre&gt;&lt;i&gt;In FreeBSD you have packages made in distribution release time - unfortunately there are no binary upgrades for released version)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Update binary packages&lt;br /&gt;&lt;pre&gt;{debian ubuntu}$ apt-get update; apt-get upgrade&lt;br /&gt;{redhat centos}$ yum update&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Install a package from sources &lt;br /&gt;&lt;pre&gt;{debian ubuntu}$ apt-src&lt;br /&gt;{freebsd}$ cd /usr/ports/path/package; make install clean&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;...The more I see the less I know... &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-8187171258333763534?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/8187171258333763534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=8187171258333763534' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/8187171258333763534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/8187171258333763534'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2007/07/linux-freebsd-commands.html' title='Linux - FreeBSD - Solaris - Windows commands'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-9202792382919031937</id><published>2007-07-13T20:16:00.000+01:00</published><updated>2007-07-13T20:24:04.216+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='catalyst'/><category scheme='http://www.blogger.com/atom/ns#' term='vienna'/><category scheme='http://www.blogger.com/atom/ns#' term='yapc'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>YAPC Vienna 2007 - my talk</title><content type='html'>I will have a Catalyst talk at Yet Another Perl Conference in Vienna, 28th to 30th August 2007 in Web track.&lt;br /&gt;&lt;br /&gt;More on conference site, &lt;br /&gt;&lt;a href="http://vienna.yapceurope.org/ye2007/talks#18"&gt;http://vienna.yapceurope.org/ye2007/talks#18&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-9202792382919031937?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/9202792382919031937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=9202792382919031937' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/9202792382919031937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/9202792382919031937'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2007/07/yapc-vienna-2007-my-talk.html' title='YAPC Vienna 2007 - my talk'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-2545510135952483518</id><published>2007-06-30T14:42:00.000+01:00</published><updated>2007-06-30T14:48:12.021+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='catalyst'/><title type='text'>Yaml, yaml-syck, catalyst...</title><content type='html'>If you have problem like:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Couldn't instantiate component "app::Model::app", "-&gt;config-&gt;{schema_class} must be defined for this model&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;check if you have YAML::Syck module also. Seems like pure YAML module have bugs and is not enough to parse Catalyst yaml configs.&lt;br /&gt;&lt;br /&gt;Just to remember, you can make hierarchy of config files:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;app.yaml&lt;br /&gt;app_local.yaml&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;to override "default" values (eg. for production environment)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-2545510135952483518?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/2545510135952483518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=2545510135952483518' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/2545510135952483518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/2545510135952483518'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2007/06/yaml-yaml-syck-catalyst.html' title='Yaml, yaml-syck, catalyst...'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-2117899883511135923</id><published>2007-06-04T05:24:00.000+01:00</published><updated>2007-06-04T06:10:03.437+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Ruby &amp; rails - thanks for nice weekend ;)</title><content type='html'>It is early Monday morning and I need to write it (however no one wants to read it).&lt;br /&gt;&lt;br /&gt;My wife spent past 2 days in mountains (Tatry, never mind). I spent it with Rails. Or rather - with ruby. When I dig into Rails I sow all these :foo, :bar so I couldn't move forward without knowing WHAT DOES IT MEAN???&lt;br /&gt;&lt;br /&gt;This is a time when books like "Programming Ruby" comes in hand. What I think now?&lt;br /&gt;&lt;br /&gt;Ruby is really easy especially if you know perl :) I am not a fun of TIMTOWTDI and Ruby seems to be also... However there are ugly constructions like "reverse if/unless" so Ruby programmers can step to the Black World of Many-F^&amp;*-Ways-To-Do-It... but they probably don't want, do they?&lt;br /&gt;&lt;br /&gt;We need some ways in language to make different things looking different and Ruby allow us to do it. Oh, it looks like expressive programmers manifesto ;)&lt;br /&gt;&lt;br /&gt;So once again:&lt;br /&gt;Pretty nice language, with this object logic you thought "how it will be simple to have it done ONE WAY, objective". Really worth trying. Simple. Code looks nice.&lt;br /&gt;&lt;br /&gt;I thought Ruby is too perlish and probably I should focus on clean Python syntax. However Ruby is better designed than Python. There are no "dirties" like:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$&gt; Python&lt;br /&gt;&gt;&gt;&gt; foo = "bla bla bla"&lt;br /&gt;&gt;&gt;&gt; foo.upper()&lt;br /&gt;'BLA BLA BLA'&lt;br /&gt;&gt;&gt;&gt; foo.len()&lt;br /&gt;Traceback (most recent call last):&lt;br /&gt; File "&lt;stdin&gt;", line 1, in ?&lt;br /&gt;AttributeError: 'str' object has no attribute 'len'&lt;br /&gt;&gt;&gt;&gt; len(foo)&lt;br /&gt;11&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In Ruby it is simple:&lt;br /&gt;(even Python's &lt;b&gt;dir(object)&lt;/b&gt; in Ruby is objective: &lt;b&gt;obj.methods&lt;/b&gt; or even better &lt;b&gt;obj.methods.sort&lt;/b&gt;)&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;irb&gt; foo.upcase&lt;br /&gt;=&gt; "BLA BLA BLA"&lt;br /&gt;irb&gt; foo.length&lt;br /&gt;=&gt; 11&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You can write it "Pythonic/java" way with parentheses, but they are optional:&lt;br /&gt;irb&gt; foo.length()&lt;br /&gt;=&gt; 11&lt;br /&gt;&lt;br /&gt;Ok, so what about :foo, :bar and @others?&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;var = 123   # string&lt;br /&gt;$var = 123  # global variable&lt;br /&gt;@var = 123  # class variable&lt;br /&gt;@@var = 123 # package variable&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Classes:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;def class1&lt;br /&gt;   attr_reader :duration&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;# which is a shortcut of:&lt;br /&gt;&lt;br /&gt;def class1&lt;br /&gt;   attr_reader(:duration)&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;# which is a shortcut of:&lt;br /&gt;&lt;br /&gt;def class1&lt;br /&gt;   def duration&lt;br /&gt;       @duration&lt;br /&gt;   end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;# which is a shortcut of:&lt;br /&gt;&lt;br /&gt;def class1&lt;br /&gt;   def duration&lt;br /&gt;       return(@duration)&lt;br /&gt;   end&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;:duration&lt;/i&gt; - means you passing "object symbol" not "value of it" (aiui)&lt;br /&gt;&lt;br /&gt;If you come from Java world, now you know we don't need "make setters/getters" refactoring option in our Ruby editor/IDE ;)&lt;br /&gt;&lt;br /&gt;We can strip methods parentheses(), we can strip returns, we can focus on code logic - this is why frameworks written in Ruby can be pretty nice, easy to understand and to remember. I just wonder when I will see a book named "Ruby best practices".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-2117899883511135923?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/2117899883511135923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=2117899883511135923' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/2117899883511135923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/2117899883511135923'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2007/06/ruby-rails-thanks-for-nice-weekend.html' title='Ruby &amp; rails - thanks for nice weekend ;)'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-182084367408357018</id><published>2007-06-03T00:54:00.000+01:00</published><updated>2007-06-03T01:22:55.796+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dynamic languages'/><category scheme='http://www.blogger.com/atom/ns#' term='strong weak typing'/><title type='text'>Java or Ruby? Perl or C++?</title><content type='html'>&lt;span style="font-style:italic;"&gt;Which of the following positions would you say is most true at your company, assuming (for the moment) that you can only choose one of them: &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Above all, we need stability.&lt;/span&gt; We have enormous scale and massive business complexity. To create order out of inevitable chaos, we need rigorous modeling for both our code and our data. If we don't get the model and architecture mostly correct in the beginning, it will hurt us later, so we'd better invest a lot of effort in up-front design. We need hardened interfaces -- which means static typing by definition, or users won't be able to see how to use the interfaces. We need to maximize performance, and this requires static types and meticulous data models. Our most important business advantages are the stability, reliability, predictability and performance of our systems and interfaces. Viva SOAP (or CORBA), UML and rigorous ERDs, DTDs or schemas for all XML, and {C++|Java|C#|OCaml|Haskell|Ada}. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Above all, we need flexibility.&lt;/span&gt; Our business requirements are constantly changing in unpredictable ways, and rigid data models rarely anticipate these changes adequately. Small teams need to be able to deliver quickly on their own goals, yet simultaneously keep up with rapid changes in the rest of the business. Hence we should use flexible, expressive languages and data models, even if it increases the cost of achieving the performance we need. We can achieve sufficient reliability through a combination of rigorous unit testing and agile development practices. Our most important business advantage is our ability to deliver on new initiatives quickly. Viva XML/RPC and HTTP, mandatory agile programming, loose name/value pair modeling for both XML and relational data, and {Python|Ruby|Lisp|Smalltalk|Erlang}.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;- read all Steve Yegge's (previous Amazon.com, now Google developer) &lt;a href="http://opal.cabochon.com/~stevey/blog-rants/strong-weak-typing.html"&gt;weak vs. strong typing&lt;/a&gt; (not working? check at &lt;a href="http://web.archive.org/web/20060404055219/http://opal.cabochon.com/~stevey/blog-rants/strong-weak-typing.html"&gt;wayback machine&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;***{**}***&lt;br /&gt;Hmm, interesting - i just realized Steve is the same person I suggested reading in first blog entry, "The Next Big Language".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-182084367408357018?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/182084367408357018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=182084367408357018' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/182084367408357018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/182084367408357018'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2007/06/java-or-ruby-perl-or-c.html' title='Java or Ruby? Perl or C++?'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-561895304297343469</id><published>2007-05-11T05:48:00.000+01:00</published><updated>2007-05-11T06:21:17.295+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>When is no Perl 6, we can try Ruby</title><content type='html'>You know perl, all the funny $_ / $&amp; / q{} vars/ops, inline regexps but want to use object-oriented syntax with more typical dot, my_object.my_sub("blabla")?&lt;br /&gt;&lt;br /&gt;There is Ruby, now probably more known as a one of dependency needed to fire up Rails MVC framework ;)&lt;br /&gt;&lt;br /&gt;Start from here&lt;br /&gt;http://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-perl/&lt;br /&gt;&lt;br /&gt;look for some code examples&lt;br /&gt;http://migo.sixbit.org/papers/Introduction_to_Ruby/slide-index.html&lt;br /&gt;&lt;br /&gt;and of course compare solutions in Ruby/Perl from mythical Perl Cookbook, done by PLEAC folks,&lt;br /&gt;http://pleac.sourceforge.net/&lt;br /&gt;&lt;br /&gt;For me Ruby is too perlish - after years of perl programming I fill better when I can do something in more clean Python syntax, with TIOOWTDI. However it's nice to see that Ruby is so close to Perl and there are some hacks you can do in Perl, Ruby but not in Python.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-561895304297343469?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/561895304297343469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=561895304297343469' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/561895304297343469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/561895304297343469'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2007/05/when-is-no-perl-6-we-can-try-ruby.html' title='When is no Perl 6, we can try Ruby'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-6039526899951495997</id><published>2007-04-02T21:10:00.000+01:00</published><updated>2007-04-02T22:02:11.758+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adsense'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='adwords'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><title type='text'>Who use MySQL?</title><content type='html'>This text is especially for folks who belive in Oracle/DB2/SQL_Server_XXXX and typically have some idea of MySQL like "maybe it works, but it is not real database", "you get what you pay for", "i used MySQL 3.x but it lacks foreign keys". Et cetera.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Google&lt;/b&gt;&lt;br /&gt;Is using MySQL for its AdWords/AdSense system. As some xooglers sed they tried to migrate to some "real database"  but after problems with speed and efficiency they come back to MySQL.&lt;br /&gt;"People often ask - do you use Oracle? No, we use MySQL!" - sed Greg Badros at his explanation of Google Ads during Academic Computer Science Festival in Krakow, PL, March 2007.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Yahoo&lt;/b&gt;&lt;br /&gt;is using MySQL for Yahoo Finance.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Cox Communications&lt;/b&gt;, (4th largest cable tv in USA)&lt;br /&gt;is using MySQL for their data warehouses.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Sabre Holdings&lt;/b&gt; (travel/ticket systems)&lt;br /&gt;is using MySQL for their online travel searches&lt;br /&gt;&lt;br /&gt;Lycos Europe, myspace, Orbitz, neckermann, Zdnet... all those companies are using MySQL.&lt;br /&gt;&lt;br /&gt;Every day on many, many pages you can see google ads. They are powered by MySQL. As you can see - they works. Imagine how many requests get these ads-databases every minute, every second...?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-6039526899951495997?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/6039526899951495997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=6039526899951495997' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/6039526899951495997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/6039526899951495997'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2007/04/who-use-mysql.html' title='Who use MySQL?'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-8528730018185625829</id><published>2007-03-21T00:05:00.000+01:00</published><updated>2007-06-03T01:55:36.565+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='catalyst'/><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='benchmarks'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Benchmarks: python. Django vs. perl-&gt; Catalyst</title><content type='html'>Ok so i made the benchmarks proper way.&lt;br /&gt;&lt;br /&gt;Some stuff to know:&lt;br /&gt;&lt;b&gt;Perl&lt;/b&gt;: v5.8.8 built for i486-linux-gnu-thread-multi&lt;br /&gt;&lt;b&gt;Python&lt;/b&gt;: 2.4.4c1 (#2, Oct 11 2006, 21:51:02)&lt;br /&gt;&lt;b&gt;Linux&lt;/b&gt;: ubuntu 2.6.17-11-generic #2 SMP Thu Feb 1 19:52:28 UTC 2007 i686 GNU/Linux&lt;br /&gt;&lt;b&gt;Apache&lt;/b&gt;/2.0.55 (Ubuntu) mod_fastcgi/2.4.2&lt;br /&gt;&lt;br /&gt;Django was deployed in apache such way:&lt;br /&gt;FastCGIExternalServer /path/to/fastcgi.fcgi -socket /tmp/mysite.sock&lt;br /&gt;&lt;br /&gt;Catalyst was deployed that way:&lt;br /&gt;FastCGIServer /path/to/script/mysite_fastcgi.pl -processes 3&lt;br /&gt;&lt;br /&gt;Catalyst was easier to run as a FastCGI - in app/script you have ready to use fastcgi script. With Django you need to find the proper script at their web page. There was also problem problem with template paths - I fixed it by changing to absolute in settings.py. I didn't find on Django webpage the same deployment method as for Catalyst. I tried recipt from "Running Django on a shared-hosting provider with Apache" but got:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;runfastcgi(method="threaded", daemonize="false")&lt;br /&gt;TypeError: runfastcgi() got an unexpected keyword argument 'method'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;All packages were "out of the box" - from system package manager, cpan or loaded from net (flup).&lt;br /&gt;&lt;br /&gt;So how good are these frameworks? How much changed apache compared to own-servers benchmarks I made before?&lt;br /&gt;&lt;br /&gt;Tested with: ab -c 25 -n 5000 http://adam/(django|catalyst)/; w &lt;br /&gt;Numbers belowe are averages from 3 measurements/framework. Every measurement was started when 1m load average was below 2.0 (typically 1.75-1.9)&lt;br /&gt;&lt;br /&gt;DJANGO                  &lt;br /&gt;&lt;pre&gt;&lt;br /&gt;===============================&gt;&lt;br /&gt;Concurrency Level:      25&lt;br /&gt;Failed requests:        21 (in 15k reqs)&lt;br /&gt;Average:                127 requests/sec.&lt;br /&gt;1-min load after:       11.93&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;CATALYST:               &lt;br /&gt;&lt;pre&gt;&lt;br /&gt;=============================&gt;&lt;br /&gt;Concurrency Level:      25&lt;br /&gt;Failed requests:        0 (in 15k reqs)&lt;br /&gt;Average:                118 requests/sec.&lt;br /&gt;1-min load after:       2.49&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Django was little faster however this method of deployment give me quite big number of errors. Catalyst with always 3 fastcgi processes was less CPU consuming and 100% error free.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-8528730018185625829?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/8528730018185625829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=8528730018185625829' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/8528730018185625829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/8528730018185625829'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2007/03/benchmarks-pythondjango-vs-perl.html' title='Benchmarks: python. Django vs. perl-&gt; Catalyst'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-7123079055803019221</id><published>2007-03-19T22:38:00.000+01:00</published><updated>2007-06-03T01:55:07.570+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='catalyst'/><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='benchmarks'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>First benchmarks: Catalyst vs. Django</title><content type='html'>This comparison is little silly because I don't have time to deploy mod_python / fastcgi / lighttpd or anything like such-good-approach. I just wrote the same code (make SQL join, show template with same fields, same logic) and check it with ab (apache benchmark tool) against framework own servers.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Catalyst&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Server Software:&lt;br /&gt;Server Hostname:        localhost&lt;br /&gt;Server Port:            3000&lt;br /&gt;&lt;br /&gt;Document Path:          /gallery/&lt;br /&gt;Document Length:        7185 bytes&lt;br /&gt;&lt;br /&gt;Concurrency Level:      1&lt;br /&gt;Time taken for tests:   64.568406 seconds&lt;br /&gt;Complete requests:      5000&lt;br /&gt;Failed requests:        0&lt;br /&gt;Write errors:           0&lt;br /&gt;Total transferred:      36675000 bytes&lt;br /&gt;HTML transferred:       35925000 bytes&lt;br /&gt;Requests per second:    77.44 [#/sec] (mean)&lt;br /&gt;Time per request:       12.914 [ms] (mean)&lt;br /&gt;Time per request:       12.914 [ms] (mean, across all concurrent requests)&lt;br /&gt;Transfer rate:          554.68 [Kbytes/sec] received&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Django&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Server Software:        WSGIServer/0.1&lt;br /&gt;Server Hostname:        localhost&lt;br /&gt;Server Port:            8000&lt;br /&gt;&lt;br /&gt;Document Path:          /&lt;br /&gt;Document Length:        4981 bytes&lt;br /&gt;&lt;br /&gt;Concurrency Level:      1&lt;br /&gt;Time taken for tests:   61.358104 seconds&lt;br /&gt;Complete requests:      5000&lt;br /&gt;Failed requests:        0&lt;br /&gt;Write errors:           0&lt;br /&gt;Total transferred:      25625000 bytes&lt;br /&gt;HTML transferred:       24905000 bytes&lt;br /&gt;Requests per second:    81.49 [#/sec] (mean)&lt;br /&gt;Time per request:       12.272 [ms] (mean)&lt;br /&gt;Time per request:       12.272 [ms] (mean, across all concurrent requests)&lt;br /&gt;Transfer rate:          407.84 [Kbytes/sec] received&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;With some modifications (eg: running together) the timings are like 100:96 for Django. A little faster. Will it differ much if we deploy it with Apache-and-the-fastest-way?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-7123079055803019221?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/7123079055803019221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=7123079055803019221' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/7123079055803019221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/7123079055803019221'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2007/03/first-benchmarks-catalyst-vs-django.html' title='First benchmarks: Catalyst vs. Django'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-6698133732110685115</id><published>2007-03-18T15:07:00.000+01:00</published><updated>2007-06-03T01:56:48.230+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='catalyst'/><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Django (python) vs. Catalyst (perl)</title><content type='html'>&lt;h2&gt;Intro&lt;/h2&gt;&lt;br /&gt;I spend many days with Perl MVC framework - Catalyst. Catalyst for perl is like Rails for ruby but without all this marketing hype &amp; noise (and unfortunatelly with lack of good books, tutorials and doc). I tried to use Rails for some easy-but-existing database. I was surprised that Rails ActiveRecord was not able to quote SQL names to get data from - as I remember - "lines" column in MySQL. Little stupid, hmm?&lt;br /&gt;&lt;br /&gt;Anyway Ruby is too perlish. I know perl and know how much cost all this TIMTOWTDI when your project is growing up. Python is like clean, better Perl (however Python libraries are not at this quality level like Perl libs in CPAN - eg. unicode translations). So this is "why python".&lt;br /&gt;&lt;br /&gt;Few days ago I started small project with Django. Here are first thoughts and differences:&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Django view = Catalyst controller&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;Django call itself MTV framework (model-view-template). Going this way Catalyst is Model-Controller-(View)-Template - the only difference is: Django models == Rails &amp; Catalyst controllers. &lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Django global switch&lt;/h2&gt;&lt;br /&gt;- In Django you need to define every URL action in urls.py and create appropiate "views"&lt;br /&gt;&lt;br /&gt;Example of urls.py (aka "global switch"):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;urlpatterns = patterns('',&lt;br /&gt;    ('', 'hnl.photos.views.index'),                      # root page&lt;br /&gt;    (r'^admin/', include('django.contrib.admin.urls')),  # admin&lt;br /&gt;    (r'^photo/update', 'hnl.photos.views.update'),       # update&lt;br /&gt;)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;- In Catalyst, there is no such "global switch". You just create controllers (perl classes), put methods with "local" attribute inside - and they are visible in your URL namespace. Why you should define this namespace mapping if it is enough to do it only by proper view class-function naming? For me it looks like Catalyst dispatcher is more "pythonic" than Django.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Output validation&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;I created view to import some data from Yaml data-dump to MySQL database. Everything works however Django cannot display some rows because of problems with validation. Message error is not so helpfull - &lt;br /&gt;&lt;br /&gt;ValueError at /&lt;br /&gt;year is out of range&lt;br /&gt;&lt;br /&gt;Hmm, but which field (i have 2 dates in every record) in which row? Exception is caught in template (first line)&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;{% for repo in gallery_list %}&lt;br /&gt;    * {{ repo.galleryname }}&lt;br /&gt;{% endfor %}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;but as you see - I do not fetch any date-time values here!&lt;br /&gt;&lt;br /&gt;After looking into data I found '0000-00-00' date. Who pasted this record into database without problems? Django db model. Who was not able to show it? Django! I think it's a better idea to validate/filter data at input rather than output. Or in both places.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-6698133732110685115?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/6698133732110685115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=6698133732110685115' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/6698133732110685115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/6698133732110685115'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2007/03/django-python-vs-catalyst-perl.html' title='Django (python) vs. Catalyst (perl)'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-6820326504357789797</id><published>2007-03-14T19:00:00.000+01:00</published><updated>2007-03-14T22:57:27.928+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='objects'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Objects in perl 5</title><content type='html'>There are many ways to do it. The old-school approach&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;b&gt;blessed hash&lt;/b&gt;&lt;/h2&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;sub new {&lt;br /&gt;    my $classname = shift;&lt;br /&gt;    my $rh = {};      # Reference to Hash, rh :)&lt;br /&gt;    bless $rh, $classname;&lt;br /&gt;    return $rh;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;All variables can be created just by assigning something to blessed hash:&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;my $foo = my_class-&gt;new();&lt;br /&gt;$foo-&gt;{bar} = 42;&lt;br /&gt;print $foo-&gt;{bar};&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Unfortunatelly there is lack of encapsulation - you have access to all methods and properties.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;b&gt;Get control of object properties - use fields&lt;/b&gt;&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;package my_class;&lt;br /&gt;use fields qw(bar);     # declare used object vars&lt;br /&gt;sub new {&lt;br /&gt;    my $classname = shift;&lt;br /&gt;    return fields::new $classname;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;# usage:&lt;br /&gt;my my_class $foo = my_class-&gt;new();&lt;br /&gt;$foo-&gt;{baz} = 42;  # trying to use not declared field - error!&lt;br /&gt;print $foo-&gt;{bar}; # works&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;We have control on object properties. Anyway, we still do not have private variables.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;b&gt;Private variables (scalar-bless)&lt;/b&gt;&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;package my_class;&lt;br /&gt;{&lt;br /&gt;   my %bar;  # All vars are declared as hashes&lt;br /&gt;   sub new {&lt;br /&gt;       my $classname = shift;&lt;br /&gt;       my $rs = \do{ my $scalar }; # reference to scalar&lt;br /&gt;       bless $rs, $classname;&lt;br /&gt;       return $rs;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   sub set_bar {&lt;br /&gt;       my $this = shift;&lt;br /&gt;       $bar{$this} = shift;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   sub get_bar {&lt;br /&gt;       my $this = shift;&lt;br /&gt;       return $bar{$this};&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And now all variables are private!!!&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Potential problem: it's not working with threads. To have a copy of such object instance in threads, you need to workaround this closure with get_all_data()/set_all_data() methods - and all object data need to be passed as additional parameters when creating new thread.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;my $foo = my_class-&gt;new();&lt;br /&gt;$foo-&gt;{bar} = 42;      # sorry, no bonus! Use set/get method instead.&lt;br /&gt;print $foo-&gt;{bar};     # This is private variable, not accessible outside class.&lt;br /&gt;print $foo-&gt;get_bar(); # works!&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;b&gt;Private, public, protected - objects like in perl6:&lt;/b&gt;&lt;/h2&gt;&lt;br /&gt;like in manual:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;use Perl6::Classes;&lt;br /&gt;&lt;br /&gt;class Composer {&lt;br /&gt;    submethod BUILD { print "Giving birth to a new composer\n" }&lt;br /&gt;    method compose { print "Writing some music...\n" }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class ClassicalComposer is Composer {&lt;br /&gt;    method compose {&lt;br /&gt;        print "Writing some muzak...\n";&lt;br /&gt;        $_-&gt;do_private;&lt;br /&gt;    }&lt;br /&gt;    method do_private is private { print "really private thing\n" }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class ModernComposer is Composer {&lt;br /&gt;    submethod BUILD($) { $.length = shift }&lt;br /&gt;    method compose() { print((map { int rand 10 } 1..$.length), "\n") }&lt;br /&gt;    has $.length;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;my $beethoven = new ClassicalComposer;&lt;br /&gt;my $barber    = new ModernComposer 4;&lt;br /&gt;my $mahler    = ModernComposer-&gt;new(400);&lt;br /&gt;&lt;br /&gt;$beethoven-&gt;compose;   # Writing some muzak...&lt;br /&gt;$barber-&gt;compose;      # 7214&lt;br /&gt;#$beethoven-&gt;do_private;&lt;br /&gt;compose $mahler;       # 8927586934796837469875&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Pretty well, uhh? For me it was like &amp;quot;look, this is almost like in Java!&amp;quot; Just change &lt;i&gt;is&lt;/i&gt; to &lt;i&gt;extends&lt;/i&gt;. &lt;br /&gt;&lt;p&gt;&lt;br /&gt;Perl6::Classes works as a filter for code and do all this translation job. Well, we pay for it - it is 20x slower than hash/scalar blessed objects. If this latency doesn't matter - use it.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-6820326504357789797?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/6820326504357789797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=6820326504357789797' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/6820326504357789797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/6820326504357789797'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2007/03/objects-in-perl-5.html' title='Objects in perl 5'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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-3014089280328850201.post-6801284338792665805</id><published>2007-03-14T01:21:00.000+01:00</published><updated>2007-03-14T01:34:59.146+01:00</updated><title type='text'>1, 2, 3, start</title><content type='html'>For nice start - some text to read - what about language of the future - see &lt;a href="http://steve-yegge.blogspot.com/2007/02/next-big-language.html"&gt;Steve Yegge's The Next Big Language&lt;/a&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3014089280328850201-6801284338792665805?l=langs-tech-stuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://langs-tech-stuff.blogspot.com/feeds/6801284338792665805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3014089280328850201&amp;postID=6801284338792665805' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/6801284338792665805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014089280328850201/posts/default/6801284338792665805'/><link rel='alternate' type='text/html' href='http://langs-tech-stuff.blogspot.com/2007/03/1-2-3-start.html' title='1, 2, 3, start'/><author><name>Adam Bartosik</name><uri>http://www.blogger.com/profile/11558024914053663393</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></feed>
