<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description></description><title>Dalla Rosa</title><generator>Tumblr (3.0; @dallarosa)</generator><link>http://dallarosa.tumblr.com/</link><item><title>Slackware on ASUS Zenbook Prime UX31A.</title><description>&lt;img src="http://25.media.tumblr.com/7ec184b7149ea1621598c4cb296ea888/tumblr_mmm7waI3BK1r1vst2o1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Slackware on ASUS Zenbook Prime UX31A.&lt;/p&gt;</description><link>http://dallarosa.tumblr.com/post/50140085203</link><guid>http://dallarosa.tumblr.com/post/50140085203</guid><pubDate>Sat, 11 May 2013 12:48:10 +0900</pubDate><category>slackware</category><category>linux</category><category>asus</category><category>zenbook</category><category>ux31a</category><category>tech</category></item><item><title>RPM Packages: Compilation flags</title><description>&lt;p&gt;Since October last year I took over the server management tasks in my &lt;a href="http://maifuri.jp" target="_blank"&gt;project&lt;/a&gt;. Unfortunately, those machines are loaded not with Debian but with Scientific Linux (Why SL is one of the great mysteries of universe). &lt;/p&gt;
&lt;p&gt;One of these days I needed to know which were the compilation flags of a package. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rpm -q --queryformat="%{NAME}: %{OPTFLAGS}\n" PACKAGE_NAME&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Long Version:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;-q or &amp;#8212;query is the flag for querying information about a package.&lt;/p&gt;
&lt;p&gt;&amp;#8212;queryformat is quite obvious but here it is: use this flag to set the the output format of the query result.&lt;/p&gt;
&lt;p&gt;A bit more on &amp;#8212;queryformat:&lt;/p&gt;
&lt;p&gt;According to the docs:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Query formats are modifed versions of the standard printf(3) formatting.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Ok, how can I get a list of the information I can output?&lt;/p&gt;
&lt;p&gt;Again, from the docs:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;rpm will print a list of all of the tags it knows about when it is invoked with the &amp;#8212;querytags argument.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Kinda weird to be writing about RPM based distributions but oh well, at least I&amp;#8217;m not managing Windows servers ;)&lt;/p&gt;</description><link>http://dallarosa.tumblr.com/post/48921643365</link><guid>http://dallarosa.tumblr.com/post/48921643365</guid><pubDate>Fri, 26 Apr 2013 19:42:17 +0900</pubDate><category>centos</category><category>linux</category><category>rpm</category><category>tech</category><category>server</category></item><item><title>Exchanging your notebook LCD screen in Japan</title><description>&lt;p&gt;This is the second time I break the screen of a notebook.&lt;/p&gt;
&lt;p&gt;First time was with this this &lt;span&gt;Asus Eee PC 1000HE I had for a 1 year and a half. The little boy was on beside my bed and so it had an encounter with my foot, long enough just to crack the LCD screen. The second time was a few weeks ago. I was doing some work on the bed before sleeping but I actually fell asleep. The notebook just fell. Here I am again with a broken LCD screen.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The first time I really had no idea of where to buy a new screen, so I just went around the web looking for some japanese site that seemed reliable enough and that was selling notebook LCD screens. The search took a few days but I ended finding &lt;a href="https://www.ekishopro.co.jp/" target="_blank"&gt;液晶プロ&lt;/a&gt;(&lt;/span&gt;&lt;span&gt;Ekishou Pro - &amp;#8220;LCD Pro&amp;#8221;&lt;/span&gt;&lt;span&gt;).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;They specialize on replacement LCD screens for notebooks and have a pretty nice line up, covering most brands like Asus, Dell and even Apple.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The looks of the website don&amp;#8217;t really help but my first buying went really smooth. The screen for my notebook was listed as in &amp;#8220;contact us&amp;#8221; so I sent them an email which was quickly replied by their staff with a link to the an available screen, compatible with my model. Payment can be done through credit card or bank transfer. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The LCD arrived in a few days and worked all pretty well.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So, this time when I got yet another screen broken it was a no brainer. Just went to Ekishou Pro and looked up my model (Dell Inspiron 1122 - or M102z) and quickly found it around the Dell, 11.6 inches category.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can&amp;#8217;t wait for it to arrive soon and get my machine back!&lt;/span&gt;&lt;/p&gt;</description><link>http://dallarosa.tumblr.com/post/34708306980</link><guid>http://dallarosa.tumblr.com/post/34708306980</guid><pubDate>Thu, 01 Nov 2012 02:15:16 +0900</pubDate><category>lcd</category><category>ekishoupro</category><category>tech</category><category>dell</category><category>apple</category><category>asus</category><category>inspiron</category><category>eeepc</category></item><item><title>Dynamically adding attribute accessors in Ruby</title><description>&lt;p&gt;A simple way for adding attribute accessors to a class dynamically:&lt;/p&gt;
&lt;pre&gt;class MyClass
  def add_attr(name, value)
    self.class.send(:attr_accessor, name)
    instance_variable_set("@#{name}", value)
  end
end
&lt;/pre&gt;
&lt;div&gt;just call the add_attr method passing the name of the accessor (as a string) and a value that will be assigned to the variable.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;You can also turn this in to a module so that you can easily add the functionality to all your classes.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;I&amp;#8217;m actually using this in a script I made to easily change data in long csv files.&lt;/div&gt;
&lt;div&gt;I wanted to be able to convert CSV files into Ruby objects before changing the data, even if the fields change from file to change.&lt;/div&gt;
&lt;div&gt;I know some people are gonna say &amp;#8220;just use an existing gem or so&amp;#8221;, but this is being fun.&lt;/div&gt;</description><link>http://dallarosa.tumblr.com/post/34288536914</link><guid>http://dallarosa.tumblr.com/post/34288536914</guid><pubDate>Thu, 25 Oct 2012 18:09:59 +0900</pubDate><category>tech</category><category>ruby</category><category>programming</category><category>accessors</category></item><item><title>I don’t normally reblog random silly stuff but this was...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_m4y5u21zo81qbryieo1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;I don’t normally reblog random silly stuff but this was too good not to&lt;/p&gt;</description><link>http://dallarosa.tumblr.com/post/34202129716</link><guid>http://dallarosa.tumblr.com/post/34202129716</guid><pubDate>Wed, 24 Oct 2012 10:17:34 +0900</pubDate><category>funny</category><category>random</category><category>silly</category></item><item><title>Fixing garbage text on terminal on Linux and Mac</title><description>&lt;p&gt;Sometimes you just happen to cat a binary file and it just messes up your terminal output and all can see and type is garbage.&lt;/p&gt;
&lt;p&gt;Normally here you&amp;#8217;d just give up and reopen your terminal but here&amp;#8217;s another solution: Just type the command below:&lt;/p&gt;
&lt;pre&gt; echo -e \\033c&lt;/pre&gt;
&lt;p&gt;All you&amp;#8217;re doing is sending an ESC(033 is the octal version of the ASCII control key &amp;#8220;ESC&amp;#8221;) + a letter &amp;#8220;c&amp;#8221; to the console, which is a VT100 command to reset the terminal to its default settings. If you&amp;#8217;re curious about other VT100 commands, take a look at &lt;a href="http://www.cse.psu.edu/~kyusun/class/cmpen472/11f/hw/hw7/vt100ansi.htm" target="_blank"&gt;this page&lt;/a&gt;. You can send them all using&lt;/p&gt;
&lt;pre&gt;echo -e &lt;/pre&gt;
&lt;p&gt;followed by the the codes in ASCII. This works in any VT100 compatible terminal which means that you&amp;#8217;re safe to use it on your Linux or Mac machine.&lt;/p&gt;
&lt;p&gt;Edit: As some people said in the comments and at G+, you can just use the &amp;#8220;&lt;em&gt;reset&lt;/em&gt;&amp;#8221; command, which is actually doing the above and some more.&lt;/p&gt;
&lt;p&gt;To read more about the reset command, &lt;a href="http://linux.die.net/man/1/reset" target="_blank"&gt;check the man pages here&lt;/a&gt;.&lt;/p&gt;</description><link>http://dallarosa.tumblr.com/post/34072017200</link><guid>http://dallarosa.tumblr.com/post/34072017200</guid><pubDate>Mon, 22 Oct 2012 10:39:00 +0900</pubDate><category>linux</category><category>mac</category><category>tech</category><category>terminal</category><category>vt100</category><category>memotoself</category></item><item><title>Fibonnaci closure in Go</title><description>&lt;p&gt;I&amp;#8217;m trying to finish the &lt;a href="http://tour.golang.org/#48" target="_blank"&gt;Go Tour&lt;/a&gt; and one of the exercises was to write a Fibonnaci closure, that is, a closure that generates the Fibonnaci sequence.&lt;/p&gt;
&lt;p&gt;It was a cool exercise to learn on closure works in Go, so to remind myself of this later, I&amp;#8217;ll share it here:&lt;/p&gt;

&lt;script src="https://gist.github.com/3866890.js" type="text/javascript"&gt;&lt;![CDATA[// &lt;![CDATA[
 
// ]]]]&gt;&lt;![CDATA[&gt;]]&gt;&lt;/script&gt;</description><link>http://dallarosa.tumblr.com/post/33304785805</link><guid>http://dallarosa.tumblr.com/post/33304785805</guid><pubDate>Thu, 11 Oct 2012 02:05:44 +0900</pubDate><category>programming</category><category>go</category><category>fibonnaci</category><category>closure</category><category>tech</category><category>memo</category></item><item><title>Animated explanation of the Pythagorean theorem</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_m9uacjgG2p1r6psrwo1_500.gif"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Animated explanation of the &lt;a class="l" href="http://en.wikipedia.org/wiki/Pythagorean_theorem" target="_blank"&gt;&lt;em&gt;Pythagorean theorem&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://dallarosa.tumblr.com/post/33301131276</link><guid>http://dallarosa.tumblr.com/post/33301131276</guid><pubDate>Thu, 11 Oct 2012 00:39:57 +0900</pubDate><category>math</category><category>cool</category></item><item><title>Playing around with math and images at  ”a Tour of...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_mboo5aettH1r1vst2o1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Playing around with math and images at  ”&lt;a href="http://tour.golang.org/" title="a Tour of Go" target="_blank"&gt;a Tour of Go&lt;/a&gt;”&lt;/p&gt;</description><link>http://dallarosa.tumblr.com/post/33300538975</link><guid>http://dallarosa.tumblr.com/post/33300538975</guid><pubDate>Thu, 11 Oct 2012 00:24:46 +0900</pubDate><category>golang</category><category>fractal</category><category>tech</category><category>math</category><category>cool</category></item><item><title>Photo</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_mbl3eo9nJw1r1vst2o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;</description><link>http://dallarosa.tumblr.com/post/33167697783</link><guid>http://dallarosa.tumblr.com/post/33167697783</guid><pubDate>Tue, 09 Oct 2012 02:03:59 +0900</pubDate><category>android</category><category>google</category><category>tech</category></item><item><title>plist2ota - Generate OTA Manifests from plists</title><description>&lt;p&gt;A friend of mine was in need of a script to automatically generate the OTA Manifests needed to distribute iOS apps internally through the &lt;a href="https://developer.apple.com/programs/ios/enterprise/" target="_blank"&gt;iOS Developer Enterprise License&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;So I wrote a little Ruby script that uses the &lt;a href="http://rubygems.org/gems/plist" target="_blank"&gt;plist gem&lt;/a&gt; for creating a Ruby Array from the plists information. One limitation I found in the plist gem is that it can&amp;#8217;t parse binary plists. Right now I&amp;#8217;m working on implementing that in Ruby and see if I can get it added to the gem but, for now, I just added to the package this perl script I found, indicated by this &lt;a href="https://viaforensics.com/iphone-forensics/howto-convert-binary-property-list-plist-text-linux.html" target="_blank"&gt;page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If your plist is a binary one, just convert the plist to XML using the plutil.pl script and then using plist2ota.rb to generate your OTA Manifest. &lt;/p&gt;
&lt;p&gt;The link is here: &lt;a href="https://github.com/dallarosa/plist2ota" target="_blank"&gt;&lt;a href="https://github.com/dallarosa/plist2ota" target="_blank"&gt;https://github.com/dallarosa/plist2ota&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Requests, issues and sugestions, please use Github&amp;#8217;s issues page :)&lt;/p&gt;</description><link>http://dallarosa.tumblr.com/post/32870025827</link><guid>http://dallarosa.tumblr.com/post/32870025827</guid><pubDate>Thu, 04 Oct 2012 22:11:30 +0900</pubDate><category>plist</category><category>ota</category><category>manifest</category><category>apple</category><category>ios</category><category>development</category><category>tech</category><category>linux</category><category>macosx</category><category>ruby</category><category>perl</category></item><item><title>CommandT and Ctrl+S on Mac OS X</title><description>&lt;p&gt;One of the best plugins I&amp;#8217;ve found for vim is &lt;a href="https://github.com/wincent/Command-T" title="CommandT on github" target="_blank"&gt;CommandT&lt;/a&gt;.  It lets you open files in a very speedy and intuitive way, making it very simple to search files and open them in tabs, splits or vertical splits. Or so it should be. On OS X, opening a file on a new split doesn&amp;#8217;t really work. You should be able to do it using the Ctrl-S shorcut but it just doesn&amp;#8217;t work.&lt;/p&gt;
&lt;p&gt;Today I decided to go after this problem. Looking around the net, I found &lt;a href="http://apple.stackexchange.com/questions/24310/emacs-ctrl-x-ctrl-s-command-not-working-in-terminal-app/34503#34503" title="Emacs Ctrl-x ctrl-s command not working in Terminal.app" target="_blank"&gt;an article&lt;/a&gt; explaining the reason:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span&gt; I found a related tip indicating that by default, Terminal.app reserves Ctrl-S for old-fashioned XON/XOFF flow control.&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;span&gt;Ok, so the Terminal app doesn&amp;#8217;t allow us to use Ctrl-S because it&amp;#8217;s a reserved shortcut. What to do?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simple, just add the lines below in your ~/.bashrc&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;stty -ixon -ixoff&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It will disable the above behavior and free Ctrl-S and Ctrl-Q for use in terminal apps!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Reminder:&lt;/strong&gt; Just adding that to your bashrc&lt;em&gt; won&amp;#8217;t&lt;/em&gt; change the settings in the &lt;em&gt;currently&lt;/em&gt; open terminal windows. Type the command above on the terminal so you can have the benefits right now, or reopen all your sessions.&lt;/p&gt;</description><link>http://dallarosa.tumblr.com/post/31333511717</link><guid>http://dallarosa.tumblr.com/post/31333511717</guid><pubDate>Tue, 11 Sep 2012 22:13:00 +0900</pubDate><category>vim</category><category>macosx</category><category>commandt</category><category>terminal</category><category>tech</category><category>programming</category></item><item><title>In the end, it's all about DNA</title><description>&lt;p&gt;Today, I want to talk about company culture, and the best analogy I could find was a child. So bear with me until the end and let&amp;#8217;s us not deviate into the field of children psychology.&lt;/p&gt;
&lt;p&gt;They way a child is raised by its parents is very important and decisive in its future. Children tend to take in account their parents tastes and way of thinking when molding their own and most of the we can say that they grown to be just like their parents were, for good or for bad.&lt;/p&gt;
&lt;p&gt;I believe companies are just the same. The founders way of thinking, their DNA is gonna be what&amp;#8217;s going to decide the way a company is going to develop in the future. That DNA will influence the hiring process, it will determine what&amp;#8217;s going to be the primary focus of the company and in no time, that will take a life of its own it will become what people generally call the &amp;#8220;culture&amp;#8221; of the company.&lt;/p&gt;
&lt;p&gt;In a house of teachers and academics, you can say it&amp;#8217;s very probable that the children will tend to go the academic way and it&amp;#8217;s fairly common to find that most singers and musicians were influenced by parents who played instruments or sang in the church choir.  You can see the same phenomenon with companies: The egocentric guy who had an interest in calligraphy and cared for the design of the things created the company that became known for it&amp;#8217;s excellency in design and for it&amp;#8217;s centrism. The two PhD guys who found a company who is known for it&amp;#8217;s focus in engineering, research and experimentation. &lt;/p&gt;
&lt;p&gt;We inherit these ways of thinking and doings things from our parents, but once we&amp;#8217;re grown and take our lives into our own hands we might think that maybe that&amp;#8217;s not the way we should think, that&amp;#8217;s not the way we should act. However, we also find out how hard it is to change our ideas and habits. It&amp;#8217;s not uncommon to see cases of domestic violence involve men and women who were either victims or were witnesses of domestic violence in their own homes, by their own parents. In the same way, it&amp;#8217;s pretty hard for a company to change its way after years of having a defined mentality. So, it can be very easy for a company who has been focused on sales and sales being it&amp;#8217;s primary strength and focus for all its existence to say that it will become a technology company and will make its engineering task force in primary focus. However when that company doesn&amp;#8217;t really have many people (or any person at all) with actual engineer experience and  focus in its decision-making department, as its leadership, that vision might as well be impossible, or at best very hard to implement.&lt;/p&gt;
&lt;p&gt;I won&amp;#8217;t say it&amp;#8217;s impossible, nothing is. However, imagine how hard it is to act in a way that just contradicts what you&amp;#8217;ve being told to be wrong, or at least not the most correct. Do I root for the Miami Heat or the Hornets? To I focus on sales numbers of technical excellency?  What&amp;#8217;s my religion? Do I want a company known for its profitability or for being on the bleeding edge of technology, for offering the best environment for its engineering staff?&lt;/p&gt;
&lt;p&gt;Google, Apple and Facebook are making the billions and everyone knows that but for most people in the tech world those companies are synonyms of &amp;#8220;Engineering excellence&amp;#8221;, &amp;#8220;Design Excellence&amp;#8221;, &amp;#8220;Hacker culture&amp;#8221; (Move fast, break things). So, whenever you&amp;#8217;re invited to work for a company who doesn&amp;#8217;t have an engineering history but who says that it wants to become a company for engineers, remember that in the end it&amp;#8217;s its DNA who will really dictate how things work and make sure you understand what that will mean.&lt;/p&gt;</description><link>http://dallarosa.tumblr.com/post/30938714202</link><guid>http://dallarosa.tumblr.com/post/30938714202</guid><pubDate>Thu, 06 Sep 2012 01:53:00 +0900</pubDate><category>company</category><category>culture</category><category>tech</category></item><item><title>"You get a billion people doing something, there’s lots of ways to make money. Absolutely,..."</title><description>““You get a billion people doing something, there’s lots of ways to make money. Absolutely, trust me. We’ll get lots of money for it.””&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://online.wsj.com/article/SB10001424052748704901104575423294099527212.html" target="_blank"&gt;http://online.wsj.com/article/SB10001424052748704901104575423294099527212.html&lt;/a&gt;&lt;/em&gt;</description><link>http://dallarosa.tumblr.com/post/30344070163</link><guid>http://dallarosa.tumblr.com/post/30344070163</guid><pubDate>Tue, 28 Aug 2012 07:49:42 +0900</pubDate><category>Eric Schmidt</category><category>tech</category><category>google</category><category>quote</category></item><item><title>Code of the day: Circular shift for integers (python)</title><description>&lt;p&gt;&lt;div class="line" id="LC1"&gt;&amp;#8220;x&amp;#8221; is the number you want to rotate. &amp;#8220;n&amp;#8221; is the number of rotations you want to apply.&lt;/div&gt;
&lt;div class="line"&gt;While writing this I actually felt how slow python&amp;#8217;s math lib is. I&amp;#8217;ve wrote this a while ago, but iirc a version I wrote using string operations was actually faster than this.&lt;/div&gt;
&lt;div class="line"&gt;&lt;/div&gt;
&lt;div class="line"&gt;I managed to get to a pretty fast version later on but it involves caching all functions in local variables, replacing range with xrange and a bunch of other little improvements. I&amp;#8217;ll keep this version because it pretty readable and it&amp;#8217;s pretty self-explanatory on how to shift rotate numbers.&lt;/div&gt;
&lt;div class="line"&gt;&lt;/div&gt;
&lt;div class="line"&gt;It was very fun trying to get every little millisecond I could from the code and I might just write a post on the differences of performance for each implementation I did.&lt;/div&gt;
&lt;div class="line"&gt;&lt;span class="k"&gt;&lt;br/&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;&lt;/div&gt;
&lt;div class="line" id="LC2"&gt;  &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;/div&gt;
&lt;div class="line" id="LC3"&gt;  &lt;span class="n"&gt;mag_x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;/div&gt;
&lt;div class="line" id="LC4"&gt;  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;&lt;/div&gt;
&lt;div class="line" id="LC5"&gt;    &lt;span class="n"&gt;mag_res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;/div&gt;
&lt;div class="line" id="LC6"&gt;    &lt;span class="n"&gt;first&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;mag_x&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;mag_res&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nb"&gt;pow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;mag_res&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;/div&gt;
&lt;div class="line" id="LC7"&gt;    &lt;span class="n"&gt;tmp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;first&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nb"&gt;pow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;mag_res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div class="line" id="LC8"&gt;    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tmp&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;first&lt;/span&gt;&lt;/div&gt;
&lt;div class="line" id="LC9"&gt;  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;</description><link>http://dallarosa.tumblr.com/post/30319961744</link><guid>http://dallarosa.tumblr.com/post/30319961744</guid><pubDate>Tue, 28 Aug 2012 01:02:00 +0900</pubDate><category>code</category><category>python</category><category>math</category><category>tech</category><category>integer</category><category>circular</category><category>shift</category></item><item><title>I'm back! and Let's talk about Rails</title><description>&lt;p&gt;For some reason lately I don&amp;#8217;t feel as productive as before. For some reason I don&amp;#8217;t feel as motivated as before.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve been giving some thought to that and I guess it&amp;#8217;s because I haven&amp;#8217;t spoken out loud about the stuff I&amp;#8217;ve been doi.ng. &lt;/p&gt;
&lt;p&gt;I&amp;#8217;m gonna keep this rant short so I get to the point. &lt;/p&gt;
&lt;p&gt;I plan on writing something on this blog every day.Yes. Every day. It can be something short, a memo to myself or some interesting tech news that I saw. I&amp;#8217;ll also try to post code and talk about the projects I&amp;#8217;m working on and the kind of difficulties I&amp;#8217;ve been finding along the road.&lt;/p&gt;
&lt;p&gt;As for today:&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve been re-reading the latest edition of &amp;#8220;&lt;a href="http://pragprog.com/book/rails4/agile-web-development-with-rails" target="_blank"&gt;Agile Web Development with Rails&lt;/a&gt;&amp;#8221;, based on Rails 3.2.6.(I bought the eletronic version which gives me free updates to the latest version). The book evolved a lot since the last time I checked it out. Tests became a main subject since the first chapters which makes the book feel much more solid and focused in turning you into a real ruby/rails programmer than just a person who can make a simple app in rails (A very common phenomenon with PHP &amp;#8220;programmers&amp;#8221; that just learned how to build a CMS from a bunch of tutorials and have no idea about testing.&lt;/p&gt;
&lt;p&gt;Second topic of today is about a project of mine: A site to help people learn about algorithms and their implementations. This one has been taking a while mostly because I thought of making a website that would be an &amp;#8220;authority in algorithms implementation&amp;#8221;. However, I later realized that to do that I&amp;#8217;d have to be an authority on algorithms myself, so I decided to go for a more realistic approach: This will be an website to track my studies about algorithm. A website that will improve together with me and the recommendations I get. It will be more about learning and transmitting that, rather than trying to pretend to be something I&amp;#8217;m not. And as projects need dates and goals, I make it a goal to release this site in the next month, meaning till the end of September.&lt;/p&gt;
&lt;p&gt;Here I start. Let&amp;#8217;s see for how long I can keep up with this.&lt;/p&gt;</description><link>http://dallarosa.tumblr.com/post/30038669068</link><guid>http://dallarosa.tumblr.com/post/30038669068</guid><pubDate>Fri, 24 Aug 2012 01:06:42 +0900</pubDate><category>tech</category><category>rails</category><category>algorithms</category></item><item><title>A new resolution: No more 32 bit software for me.</title><description>&lt;p&gt;10 years ago, when I started dabbling with linux and later decided to make it my main environment, there were things from the Windows world that I couldn&amp;#8217;t let go. Be it games, tools, services. I would spend hours and hours trying to get Wine to work and to run those things I could&amp;#8217;nt live without. Until one day I realized that&amp;#8230;I could live without them. Since that day I decided that if a tool, a service, a game wasn&amp;#8217;t available for Linux it wouldn&amp;#8217;t exist for me. &lt;/p&gt;
&lt;p&gt;10 years later, I see myself having the same problem but now regarding 32 bit applications. My notbook has a 64bit processor and I decided to fully use it with the latest 64bit version of Slackware. However, lately I&amp;#8217;ve been spending just too much time messing around with my machine to get full multilib support so to get a few a applications working properly (namely Skype) that I ended up having more trouble with conflicting packages then with a proper solution to the original problem.&lt;/p&gt;
&lt;p&gt;That led me to a new resolution: I won&amp;#8217;t use anything that doesn&amp;#8217;t have 64bit support. &lt;/p&gt;
&lt;p&gt;I totally don&amp;#8217;t mind compiling packages, I totally don&amp;#8217;t mind making patches for stuff. I don&amp;#8217;t mind writing my own stuff. However, closed source software, like Skype, don&amp;#8217;t really allow me to do any of those things.  Skype 4 came and we still don&amp;#8217;t have a package that supports 64bit Linux. So no more skype for me. I&amp;#8217;ll still be using it on Android and on Mac but at the same time I&amp;#8217;ll be looking for a different solution, one that can offer me a 64bit linux compatible solution.&lt;/p&gt;</description><link>http://dallarosa.tumblr.com/post/25282340218</link><guid>http://dallarosa.tumblr.com/post/25282340218</guid><pubDate>Sun, 17 Jun 2012 17:37:04 +0900</pubDate><category>linux</category><category>skype</category><category>64bit</category><category>32bit</category><category>software</category><category>tech</category></item><item><title>Ruby is accepted as an International Standard</title><description>&lt;p&gt;Ruby, the language created by Yuhikiro &amp;#8220;Matz&amp;#8221; Matsumoto in 1993 has been accepted as and International by the International Standards Organization (ISO) as the ISO/IEC &lt;span&gt;30170 &lt;/span&gt;standard.&lt;/p&gt;
&lt;p&gt;The Information technology Promotion Agency (IPA) has developed the draft standard specification document of Ruby and it was registered as the  JIS (Japanese Industrial Standard) X 3017 on 2011.&lt;/p&gt;
&lt;p&gt;Since 2008 a working group lead by Ikuo Nakata, professor emeritus of University of Tsukuba, has been working on an international standard for Ruby.&lt;/p&gt;
&lt;p&gt;Ruby&amp;#8217;s acceptance marks also the first time a language developed in Japan is accepted as an international standard.&lt;/p&gt;
&lt;p&gt;Ruby was created in 1993 by Yuhikiro &amp;#8220;Matz&amp;#8221; Matsumoto with the goal of making programming fun&lt;a href="http://www.youtube.com/watch?v=oEkJvvGEtB4" target="_blank"&gt;[1]&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;I hope to see Ruby help every programmer in the world to be productive, and to enjoy programming, and to be happy. That is the primary purpose of Ruby language.&amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;My first contact with Ruby was almost 3 years ago, during my Master&amp;#8217;s, where many of the students would prefer programming in Ruby, rather than the more well-known perl or python. The reason most fo them gave me is the abundance of documentation in Japanese, as it&amp;#8217;s a made in Japan language. (I live in Japan) Under their influence I played a bit with it but nothing really deep. It&amp;#8217; wasn&amp;#8217;t until 2010 when I decided to try Rails that I first started to study Ruby more properly. It&amp;#8217;s expressiveness and ease of use really stand out. The flexibility given by the fact that everything is an object and the meta-programming features make Ruby a great language for fast prototyping.&lt;/p&gt;
&lt;p&gt;This announcement comes together with Matz receiving the &lt;a href="http://www.ruby-lang.org/en/news/2012/03/29/matz-earns-the-fsfs-2011-free-software-award/" title="Matz Earns the FSF's 2011 Free Software Award" target="_blank"&gt;FSF&amp;#8217;s 2011 Free Software Award&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Congratulations Ruby, congratulations Matz!&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s the original announcement, from the IPA (in Japanese):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.ipa.go.jp/about/press/20120402_2.html" target="_blank"&gt;&lt;a href="http://www.ipa.go.jp/about/press/20120402_2.html" target="_blank"&gt;http://www.ipa.go.jp/about/press/20120402_2.html&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://dallarosa.tumblr.com/post/20338743300</link><guid>http://dallarosa.tumblr.com/post/20338743300</guid><pubDate>Mon, 02 Apr 2012 15:32:00 +0900</pubDate><category>tech</category><category>ruby</category><category>programming</category><category>language</category></item><item><title>Development Environment: tmux+vim</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_m1ng8b0YKK1r1vst2o1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Development Environment: tmux+vim&lt;/p&gt;</description><link>http://dallarosa.tumblr.com/post/20115677947</link><guid>http://dallarosa.tumblr.com/post/20115677947</guid><pubDate>Thu, 29 Mar 2012 23:00:10 +0900</pubDate><category>tech</category><category>macosx</category><category>vim</category><category>tmux</category><category>linux</category><category>development</category></item><item><title>Maximizing and restoring panes in tmux</title><description>&lt;p&gt;Recently I gave up on &lt;em&gt;screen&lt;/em&gt; for &lt;a href="http://tmux.sourceforge.net/" title="tmux" target="_blank"&gt;tmux&lt;/a&gt;. From the tmux homepage:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span&gt;tmux is a terminal multiplexer: it enables a number of terminals (or windows), each running a separate program, to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattached.&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Tmux is screen on steroids. You can customize just everything, from starting applications automatically to the background color to the key bindings. The multi-pane temrinal thing is pretty cool but sometimes you just wanna focus and work in just one fullscreen pane while keeping the ability to switch back to the multi-pane mode.&lt;/p&gt;
&lt;p&gt;Originally there are no bindings for (or a simple command) to maximize and restore the size of a pane.&lt;/p&gt;
&lt;p&gt;After some googling, I found a perfect solution for the problem and I decided to share it with everyone:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;unbind + &lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;bind + new-window -d -n tmux-zoom 'clear &amp;amp;&amp;amp; echo TMUX ZOOM &amp;amp;&amp;amp; read' \; swap-pane -s tmux-zoom.0 \; select-window -t tmux-zoom &lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;unbind - &lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;bind - last-window \; swap-pane -s tmux-zoom.0 \; kill-window -t tmux-zoom&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;These will bind the &amp;#8220;+&amp;#8221; and &amp;#8220;-&amp;#8221; for maximizing and restoring, respectively. &lt;/p&gt;
&lt;p&gt;My own tmux.conf can be found on &lt;a href="https://github.com/dallarosa/dotfiles/blob/master/tmux.conf" title="tmux.conf on github" target="_blank"&gt;github&lt;/a&gt;.&lt;/p&gt;</description><link>http://dallarosa.tumblr.com/post/19843457464</link><guid>http://dallarosa.tumblr.com/post/19843457464</guid><pubDate>Sun, 25 Mar 2012 02:53:00 +0900</pubDate><category>tmux</category><category>terminal</category><category>multiplexer</category><category>linux</category><category>macosx</category><category>maximize</category><category>restore</category></item></channel></rss>
