<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Seven steps &#187; food for thought</title>
	<atom:link href="http://trevoke.net/blog/category/food-for-thought/feed/" rel="self" type="application/rss+xml" />
	<link>http://trevoke.net/blog</link>
	<description>Martial arts and technology, $DEITY what a mix!</description>
	<lastBuildDate>Wed, 01 Feb 2012 03:43:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>AT&amp;T: A ten-year customer says goodbye</title>
		<link>http://trevoke.net/blog/2011/05/10/att-a-ten-year-customer-says-goodbye/</link>
		<comments>http://trevoke.net/blog/2011/05/10/att-a-ten-year-customer-says-goodbye/#comments</comments>
		<pubDate>Wed, 11 May 2011 03:13:40 +0000</pubDate>
		<dc:creator>Trevoke</dc:creator>
				<category><![CDATA[food for thought]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://trevoke.net/blog/?p=282</guid>
		<description><![CDATA[I just moved into a new apartment where the AT&#38;T reception is, well, atrocious. Still, I like AT&#38;T, so I&#8217;m dragging my feet to switch to Verizon (or something else). Today, I spoke in live chat to some AT&#38;T employee. I believe the name was Monica Garnett but I could be wrong &#8212; and it <a href='http://trevoke.net/blog/2011/05/10/att-a-ten-year-customer-says-goodbye/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I just moved into a new apartment where the AT&amp;T reception is, well, atrocious. Still, I like AT&amp;T, so I&#8217;m dragging my feet to switch to Verizon (or something else).</p>
<p>Today, I spoke in live chat to some AT&amp;T employee. I believe the name was Monica Garnett but I could be wrong &#8212; and it probably doesn&#8217;t matter. My issue was that I didn&#8217;t seem to have a mailbox for my phone number. She says my data plan is unsupported for smart phones.</p>
<p>&#8230; Wait, what? I&#8217;ve been using this data plan for over a year with this phone. Maybe I never got voicemail, but who cares! It WORKED. I had unlimited text and unlimited data. Now, yes, I know, this plan had been removed and AT&amp;T wasn&#8217;t offering it anymore, but I am an existing customer, I get the perk of keeping that, right?</p>
<p>&#8230; No. I was told I could switch to their 200Mb/month or 2Gb/month plan, which I did, but what I wasn&#8217;t told is that THESE PLANS DO NOT INCLUDE MESSAGING.</p>
<p>Now, I want to fix this. I got screwed by a company, big whoop, whatever, I&#8217;ll just limit myself a little. THE WEBSITE DOES NOT GIVE ME REASONABLE OPTIONS. I can get unlimited text, or unlimited text with any mobile-to-mobile calling, or 1000 texts.</p>
<p>I could pay $15 for 200 megs and $10 for 1000 texts, and then I&#8217;d have $25 &#8212; which is, $5 less than unlimited data and unlimited texts. Huh. NO.</p>
<p>I could pay $25 for 2Gb and $10 for 1000 texts, or $20 for unlimited texts. So .. $35 or $45? NO.</p>
<p>Seriously? So I have to pay MORE now to have LESS than I used to have? Well, goodbye, AT&amp;T. Guess who&#8217;s going to go say hi to another phone service provider tomorrow?</p>
]]></content:encoded>
			<wfw:commentRss>http://trevoke.net/blog/2011/05/10/att-a-ten-year-customer-says-goodbye/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Work and martial arts</title>
		<link>http://trevoke.net/blog/2010/05/10/work-and-martial-arts/</link>
		<comments>http://trevoke.net/blog/2010/05/10/work-and-martial-arts/#comments</comments>
		<pubDate>Mon, 10 May 2010 15:25:11 +0000</pubDate>
		<dc:creator>Trevoke</dc:creator>
				<category><![CDATA[food for thought]]></category>
		<category><![CDATA[Martial Arts]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://trevoke.net/blog/?p=242</guid>
		<description><![CDATA[Funny how, when I&#8217;m busy, I stop updating this blog, isn&#8217;t it. I&#8217;m learning a good amount on HTTP, Perl (specifically CGI) and working on using TDD with Ruby/Rails: it&#8217;s a mindset. Regarding martial arts, sensei helped me figure out that my punches are all wrong, and the issue has been traced to lower back <a href='http://trevoke.net/blog/2010/05/10/work-and-martial-arts/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Funny how, when I&#8217;m busy, I stop updating this blog, isn&#8217;t it.</p>
<p>I&#8217;m learning a good amount on HTTP, Perl (specifically CGI) and working on using TDD with Ruby/Rails: it&#8217;s a mindset.</p>
<p>Regarding martial arts, sensei helped me figure out that my punches are all wrong, and the issue has been traced to lower back muscles. Thankfully, I&#8217;ve got tons of subway time now, so I can practice standing. For those of you who don&#8217;t study martial arts&#8230; That last sentence is not a joke.</p>
<p>On an unrelated note: I always enjoy the fact that &#8216;martial arts&#8217; is commonly mistyped as &#8216;marital arts&#8217;. I knew the two were similar (*grin*), but some sentences are downright hilarious.</p>
]]></content:encoded>
			<wfw:commentRss>http://trevoke.net/blog/2010/05/10/work-and-martial-arts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inter-array permutations in Ruby</title>
		<link>http://trevoke.net/blog/2009/12/17/inter-array-permutations-in-ruby/</link>
		<comments>http://trevoke.net/blog/2009/12/17/inter-array-permutations-in-ruby/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 17:51:06 +0000</pubDate>
		<dc:creator>Trevoke</dc:creator>
				<category><![CDATA[food for thought]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[permutations]]></category>

		<guid isPermaLink="false">http://trevoke.net/blog/?p=193</guid>
		<description><![CDATA[I don&#8217;t really have a better name for this. It&#8217;s also not completely clean, but it works. I had, almost a year ago (362 days ago), written a blog post about lexicographic permutations. That was about permutations of elements within one array. Someone on ruby-forum asked about permutations between multiple arrays. I found something in <a href='http://trevoke.net/blog/2009/12/17/inter-array-permutations-in-ruby/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t really have a better name for this. It&#8217;s also not completely clean, but it works. I had, almost a year ago (362 days ago), written a blog post about 
<a  href="http://trevoke.net/blog/2008/12/20/lexicographic-permutations-in-ruby" onclick="javascript:pageTracker._trackPageview('/external/trevoke.net/blog/2008/12/20/lexicographic-permutations-in-ruby');" >lexicographic permutations</a>. That was about permutations of elements within one array.<br />
Someone on ruby-forum asked about permutations between multiple arrays. I 
<a  href="http://stackoverflow.com/questions/710670/c-permutation-of-an-array-of-arraylists" onclick="javascript:pageTracker._trackPageview('/external/stackoverflow.com/questions/710670/c-permutation-of-an-array-of-arraylists');" >found something in C#</a>, which I was happy to transcribe to Ruby and tweak a little.</p>
<pre class="brush: ruby; title: ; notranslate">def array_permutations array, index=0
  # index is 0 by default : start at the beginning, more elegant.
  return array[-1] if index == array.size - 1 # Return last element if at end.
  result = []
  array[index].each do |element| # For each array
    array_permutations(array, index + 1).each do |x| # Permute permute permute
      result &lt;&lt; &quot;#{element}, #{x}&quot;
    end
  end
  return result
end</pre>
<p>So, we get this:</p>
<pre class="brush: ruby; title: ; notranslate">first = ['one', 'two']
second = ['three', 'four']
third = 'five', 'six']
result = array_permutations [first, second, third]
=&gt; [&quot;one, three, five&quot;, &quot;one, three, six&quot;, &quot;one, four, five&quot;, &quot;one, four, six&quot;, &quot;two, three, five&quot;, &quot;two, thre
e, six&quot;, &quot;two, four, five&quot;, &quot;two, four, six&quot;]</pre>
<p>Magic!</p>
<p>&#8212;&#8212;<br />
Edit &#8211; of course, my solution is hackish, and someone came up with a quicker and more elegant solution:</p>
<pre class="brush: ruby; title: ; notranslate">def fancy_array_permutation array
  return array[0] if array.size == 1
  first = array.shift
  return first.product( fancy_array_permutation(array) ).map {|x| x.flatten.join(&quot; &quot;)}
end</pre>
<p>This gives the same result as above.</p>
]]></content:encoded>
			<wfw:commentRss>http://trevoke.net/blog/2009/12/17/inter-array-permutations-in-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why do I study martial arts?</title>
		<link>http://trevoke.net/blog/2009/10/03/why-do-i-study-martial-arts/</link>
		<comments>http://trevoke.net/blog/2009/10/03/why-do-i-study-martial-arts/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 22:28:47 +0000</pubDate>
		<dc:creator>Trevoke</dc:creator>
				<category><![CDATA[food for thought]]></category>
		<category><![CDATA[Martial Arts]]></category>

		<guid isPermaLink="false">http://trevoke.net/blog/?p=163</guid>
		<description><![CDATA[I am watching Rocky III and IV (the only ones I really like), and the driving theme is the power of the human spirit. Rewatching it now, I see a lot of other ideas. They&#8217;re not particularly hidden, but I never really noticed them before. This started to make me think about my choices. My <a href='http://trevoke.net/blog/2009/10/03/why-do-i-study-martial-arts/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I am watching Rocky III and IV (the only ones I really like), and the driving theme is the power of the human spirit. Rewatching it now, I see a lot of other ideas. They&#8217;re not particularly hidden, but I never really noticed them before. This started to make me think about my choices.<br />
<span id="more-163"></span><br />
My lasting decision to study martial arts was made in college, and I took a Physical Education class of self-defense taught by shifu Christopher Goedecke, who studies and teaches isshin kempo. During the first class, we sat and he asked us why we chose to study martial arts. My answer was, &#8220;I want to develop discipline over my mind and body.&#8221;<br />
I can tell you today that this answer was probably not the truth. It was probably what I thought shifu wanted to hear so he&#8217;d think that I was special, or would be a good, dedicated student.<br />
Why this behavior? Saying that everyone wants to be special would be a bit of a cop-out answer here. I always, always liked the idea of the martial arts, and the dedication, the Way.<br />
A more refined thought is that I wanted a mentor. A senior figure I could respect, who could teach me and guide me. For all my mental independence and ambition, I want to be somebody&#8217;s pupil.<br />
When I was barely beginning, I had the self-centered thought that shifu Goedecke would instantly take a liking to me and take me under his wing. I was, what, 20 years old or so? Most of my thoughts back then were self-centered. For that matter, most of them now are, too.</p>
<p>I graduated, and shifu Goedecke told me it was silly to drive two hours each way for a class, that I should find a teacher closer to me, and that we&#8217;d see what the future brought. I dutifully did so, and found sensei Marilyn Fierro, who teaches and studies isshinryu karate. I&#8217;ll skip all the martial arts lineage drama. Isshin kempo and isshinryu karate have close ties, so I found the same kata (forms), and I did not have to relearn everything from scratch.</p>
<p>I joined the dojo and studied for a few years with no questions, no doubts. I reached the rank of first degree black belt, and kept on studying. As I near the exam for second degree black belt, questions appear. The timing, as far as belt tests, is possibly coincidental. As the rest of life happened around me and to me, and as I looked at my behavior, and how I felt about things.. Questions appeared. As my view of the world becomes less self-centered &#8211; as the world grows beyond my belly button and encompasses others, and as I become aware more fully of other people, I see how I relate to other people.</p>
<p>So.. Why do I study martial arts? In a world and a society where fighters are a specific group of people, and the average person doesn&#8217;t fight, why? In a world where a living is made from the product of thoughts.. Why a physical discipline? What is the point?<br />
I always believed in a society, or a social circle, or at least people who would accept and respect each other based on a similar culture, mindset, and skillset. I see this happen in the hacker/programmer culture and in the martial arts culture. This being said, I&#8217;m only talking about martial arts here.<br />
So, I want to just be me and my skills, and not be respected for some other reason. And someday, I believe it&#8217;ll happen. It&#8217;s a long way up, but that&#8217;s the point &#8211; that skill cannot be faked.</p>
<p>So now, we come to a major doubt of mine, something that&#8217;s been nurtured for a while and which is the ghost I now need to face.<br />
As an introduction, we have the Rocky movies, and there&#8217;s a manga called &#8216;The Breaker&#8217; which I am reading, as recommended by a friend of mine. That manga talks about a kid who apparently has no physical skill, no innate ki, but develops tremendous spirit, determination, mental resistance, and learns through that. At the point where I am in the movie, he fights a kid who is a super-genius of the martial arts, has mastered five at the age of fifteen, has amazing amounts of ki and physical prowess, and is essentially perfect &#8211; but he relies on logic and doesn&#8217;t really understand the power of sheer spirit.</p>
<p>Well. As the second degree exam approaches&#8230; Slowly but surely, my training has become a little more intense, and I have felt things become more difficult. And I don&#8217;t like it. I do it, but I don&#8217;t like it. I am naturally a lazy person, and I want to change that. I just don&#8217;t put in that much effort. I rely on the fact that I am naturally &#8216;good enough&#8217;. I want to change that. I want to push myself further. But where&#8217;s my spirit? My will to not stop when it hurts? I&#8217;ve always lacked that. Oh &#8211; I don&#8217;t mean that I am a wuss, but &#8230; I doubt myself.</p>
<p>There has been improvement. I will not deny it. I have seen myself improve. I can stretch further than I used to, more than I used to.. I can do more push-ups, my stamina&#8217;s improved. I can do more.. But it&#8217;s not enough. I need to be more. More. More. Always more.</p>
<p>I get the feeling I&#8217;m reaching my limit. And this feeling has to be a mental block, an illusion. It can&#8217;t be real, but it seems so real. How do I get rid of this? Ugh. How do I convince myself that my limit is further away? </p>
]]></content:encoded>
			<wfw:commentRss>http://trevoke.net/blog/2009/10/03/why-do-i-study-martial-arts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Christopher Moore&#8217;s Lamb</title>
		<link>http://trevoke.net/blog/2009/06/27/christopher-moores-lamb/</link>
		<comments>http://trevoke.net/blog/2009/06/27/christopher-moores-lamb/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 06:46:12 +0000</pubDate>
		<dc:creator>Trevoke</dc:creator>
				<category><![CDATA[food for thought]]></category>

		<guid isPermaLink="false">http://trevoke.net/blog/?p=119</guid>
		<description><![CDATA[Well, I just finished the book. Apparently I do that with a lot of books &#8211; finish them at the wee hours of the morning. &#8220;Alright.. I have half the book left to go.. I&#8217;ll pick it up tomorrow.&#8221; &#8220;Alright.. I&#8217;ve got a quarter of the book left to go&#8230;&#8221; &#8220;Well, only 35 pages&#8230;&#8221; So, <a href='http://trevoke.net/blog/2009/06/27/christopher-moores-lamb/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Well, I just finished the book. Apparently I do that with a lot of books &#8211; finish them at the wee hours of the morning.<br />
&#8220;Alright.. I have half the book left to go.. I&#8217;ll pick it up tomorrow.&#8221;<br />
&#8220;Alright.. I&#8217;ve got a quarter of the book left to go&#8230;&#8221;<br />
&#8220;Well, only 35 pages&#8230;&#8221;</p>
<p>So, it&#8217;s 2:30 am and in less than 8 hours I have to be beating up little kids.<br />
Raven recommended Lamb by Christopher Moore.</p>
<p>I was really happy to have picked it up, and enjoyed reading about Jesus Christ as a child, and then as things evolved, I first really liked reading about the eastern religions. Then I realized things didn&#8217;t fit. Some things about which I&#8217;m too young and stupid to have a sense of humor (like chronology and History) weren&#8217;t right. There were some absolutely terrible puns.<br />
Then it hit me that this idea of his wasn&#8217;t really new &#8211; I&#8217;d read something quite similar in one of Aleister Crowley&#8217;s books : 
<a  href="http://www.leary.ru/download/crowley/%5BeBook%5D%20Aleister%20Crowley%20-%20Meditation.pdf" onclick="javascript:pageTracker._trackPageview('/external/www.leary.ru/download/crowley/%5BeBook%5D%20Aleister%20Crowley%20-%20Meditation.pdf');" >Meditation</a> Give it a read.</p>
<p>In the end, all the magic was gone from the book, and while I did enjoy the way it was written, and how well everything is put together, and how believable everything is.. It had become just a story.</p>
<p>I don&#8217;t know what to think of the fact that I didn&#8217;t get any new spiritual concepts from this book; I was kinda hoping I&#8217;d get something new. On a personal note, as I&#8217;ve thought and written somewhere before, I think now&#8217;s the time for me to -do-.. Enough with the theorizing.</p>
<p>Thankfully, there&#8217;s an epilogue in which Christopher Moore explains that he had to play with History and chronology, as well as scriptures and accepted &#8220;knowledge&#8221;, to get things to fit the way he wanted them. It&#8217;s not perfect and he apologizes.<br />
There&#8217;s even a second epilogue, because I bought a special edition (looks neat!), and he explains how he did it all, his trip to Israel, his thoughts during the trip&#8230;</p>
<p>Overall, I must admit, I&#8217;d probably recommend the book &#8211; it makes one smile, definitely -, but the epilogues really gave me a lot of respect for the author. And that was before he self-proclaimed a &#8220;not particularly devout Buddhist with Christian tendencies&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://trevoke.net/blog/2009/06/27/christopher-moores-lamb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two videos &#8211; a change in the world?</title>
		<link>http://trevoke.net/blog/2009/03/31/two-videos-a-change-in-the-world/</link>
		<comments>http://trevoke.net/blog/2009/03/31/two-videos-a-change-in-the-world/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 03:01:50 +0000</pubDate>
		<dc:creator>Trevoke</dc:creator>
				<category><![CDATA[food for thought]]></category>
		<category><![CDATA[playing for change]]></category>
		<category><![CDATA[shrinking world]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[where the hell is matt]]></category>

		<guid isPermaLink="false">http://trevoke.net/blog/?p=96</guid>
		<description><![CDATA[Those two videos have been brought to my attention within maybe two weeks of each other, and I hate thinking of random coincidences.. So here they are, together so I can find them again in several years. Playing for change: Stand by me Where the hell is Matt? The first one fills my heart with <a href='http://trevoke.net/blog/2009/03/31/two-videos-a-change-in-the-world/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Those two videos have been brought to my attention within maybe two weeks of each other, and I hate thinking of random coincidences.. So here they are, together so I can find them again in several years.<br />

<a  href=" http://www.youtube.com/watch?v=Us-TVg40ExM" onclick="javascript:pageTracker._trackPageview('/external/ http//www.youtube.com/watch');" >Playing for change: Stand by me</a><br />

<a  href="http://www.youtube.com/watch?v=zlfKdbWwruY" onclick="javascript:pageTracker._trackPageview('/external/www.youtube.com/watch');" >Where the hell is Matt?</a></p>
<p>The first one fills my heart with a warm feeling &#8211; the song was recorded by all these people around the world simultaneously (or so they say, but it sure is well edited in any case).<br />
The second one brings tears to my eyes, I&#8217;m not sure why.. I&#8217;ll let you guys watch it</p>
]]></content:encoded>
			<wfw:commentRss>http://trevoke.net/blog/2009/03/31/two-videos-a-change-in-the-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Who follows who?</title>
		<link>http://trevoke.net/blog/2009/03/26/who-follows-who/</link>
		<comments>http://trevoke.net/blog/2009/03/26/who-follows-who/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 01:36:29 +0000</pubDate>
		<dc:creator>Trevoke</dc:creator>
				<category><![CDATA[food for thought]]></category>
		<category><![CDATA[Martial Arts]]></category>
		<category><![CDATA[sparring]]></category>

		<guid isPermaLink="false">http://trevoke.net/blog/?p=92</guid>
		<description><![CDATA[Whose behavior influences whose? You always have a choice - you can always choose how to behave. It may have a greater impact than you think. Like gandhi said - be the change you want to be in the world.]]></description>
			<content:encoded><![CDATA[<p>In the past couple of weeks, I&#8217;d gotten to spar progressively harder with a blue belt who is twice my age, but has been in dojos where sparring and self-defense were more important than kata. As a result, I consider him somewhat dangerous to spar with.. And, well, I let myself get caught up. I stopped being the watcher..<br />
I hid behind the excuse that I was just sparring as hard as he wanted to spar, and so it just escalated.<br />
Yesterday I took a different approach; I resolved to work on what I wanted to work, which turns out to be distance/range evaluation and shifting.. And I sparred at half-speed. He followed my speed, only speeding up a little as he got into it. I did not.<br />
I asked him after sparring what he thought of the first minute or so of sparring with me, and he said he didn&#8217;t remember much.. But it enlightened me to hear &#8220;At first, I always take a few seconds to see if we&#8217;re going hard or soft, and then I get going&#8221;.<br />
Here I was, thinking I was following him, and here he was, thinking he was following me! It sure is a good thing I took a step back from the vicious cycle.</p>
]]></content:encoded>
			<wfw:commentRss>http://trevoke.net/blog/2009/03/26/who-follows-who/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(Lexicographic) Permutations in Ruby</title>
		<link>http://trevoke.net/blog/2008/12/20/lexicographic-permutations-in-ruby/</link>
		<comments>http://trevoke.net/blog/2008/12/20/lexicographic-permutations-in-ruby/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 02:13:19 +0000</pubDate>
		<dc:creator>Trevoke</dc:creator>
				<category><![CDATA[food for thought]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[permutations]]></category>

		<guid isPermaLink="false">http://trevoke.net/blog/?p=42</guid>
		<description><![CDATA[Taking the code from this other blog &#8230; It&#8217;s pretty elegant Ruby! I won&#8217;t waste your time repeating what the guy wrote in his blog &#8211; you&#8217;re welcome to go read it. I just felt that I should help spread a little this elegant implementation of the standard permutation algorithm, fixing a small bug within <a href='http://trevoke.net/blog/2008/12/20/lexicographic-permutations-in-ruby/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Taking the code from 
<a title="Permutations in Ruby and Python"  href="http://abachman.disqus.com/simple_permutations_in_python_and_ruby/" target="_blank" onclick="javascript:pageTracker._trackPageview('/external/abachman.disqus.com/simple_permutations_in_python_and_ruby/');" >this other blog</a> &#8230; It&#8217;s pretty elegant Ruby!</p>
<p>I won&#8217;t waste your time repeating what the guy wrote in his blog &#8211; you&#8217;re welcome to go read it. I just felt that I should help spread a little this elegant implementation of the standard permutation algorithm, fixing a small bug within it in the process. If, like me, you have issues understanding how to use this, well &#8211; you have to use this function and call a block of code on it. It runs the block of code on each permutation it finds.</p>
<pre class="brush: ruby; title: ; notranslate">def permutations array
  if array.size &lt; 2
    yield array
  else
    array.each do |element|
      permutations(array.select() {|n| n != element}) \
      {|val| yield([element].concat val)}
    end
  end
end</pre>
]]></content:encoded>
			<wfw:commentRss>http://trevoke.net/blog/2008/12/20/lexicographic-permutations-in-ruby/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Can You See With Your Tongue?</title>
		<link>http://trevoke.net/blog/2008/12/01/can-you-see-with-your-tongue/</link>
		<comments>http://trevoke.net/blog/2008/12/01/can-you-see-with-your-tongue/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 16:44:14 +0000</pubDate>
		<dc:creator>Trevoke</dc:creator>
				<category><![CDATA[food for thought]]></category>
		<category><![CDATA[medical]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://trevoke.net/blog/2008/12/01/can-you-see-with-your-tongue/</guid>
		<description><![CDATA[Can You See With Your Tongue? &#124; Senses &#124; DISCOVER Magazine. This is an amazing article &#8211; a scientist who managed to make people react to light-based input without using their eyes. The human brain is &#8230; limitless within its limits ? It&#8217;s definitely worth the read.]]></description>
			<content:encoded><![CDATA[<p>
<a  href="http://discovermagazine.com/2003/jun/feattongue" onclick="javascript:pageTracker._trackPageview('/external/discovermagazine.com/2003/jun/feattongue');" >Can You See With Your Tongue? | Senses | DISCOVER Magazine</a>.</p>
<p>This is an amazing article &#8211; a scientist who managed to make people react to light-based input without using their eyes. The human brain is &#8230; limitless within its limits ? It&#8217;s definitely worth the read.</p>
]]></content:encoded>
			<wfw:commentRss>http://trevoke.net/blog/2008/12/01/can-you-see-with-your-tongue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An old-school 6th dan</title>
		<link>http://trevoke.net/blog/2008/11/04/an-old-school-6th-dan/</link>
		<comments>http://trevoke.net/blog/2008/11/04/an-old-school-6th-dan/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 20:44:55 +0000</pubDate>
		<dc:creator>Trevoke</dc:creator>
				<category><![CDATA[food for thought]]></category>
		<category><![CDATA[Martial Arts]]></category>

		<guid isPermaLink="false">http://trevoke.net/blog/?p=17</guid>
		<description><![CDATA[Yesterday evening a man who trained about as long as sensei came to train with us. Black obi, rather frayed to white. He&#8217;d trained a long time under his uncle, and then ~15 years under sensei&#8217;s sensei. He&#8217;d taken a break for a while, so he was a bit out of shape, but his mindset, <a href='http://trevoke.net/blog/2008/11/04/an-old-school-6th-dan/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday evening a man who trained about as long as sensei came to train with us. Black obi, rather frayed to white. He&#8217;d trained a long time under his uncle, and then ~15 years under sensei&#8217;s sensei. He&#8217;d taken a break for a while, so he was a bit out of shape, but his mindset, his attitude, his devotion were 100% into everything he did &#8211; an important lesson which I forget all too often.</p>
<p>He left, very happy to have joined us. I hope we&#8217;ll see him again.</p>
]]></content:encoded>
			<wfw:commentRss>http://trevoke.net/blog/2008/11/04/an-old-school-6th-dan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.326 seconds -->

