<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Kiran</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/kiran/" />
    <link rel="self" type="application/atom+xml" href="http://blogs.perl.org/users/kiran/atom.xml" />
    <id>tag:blogs.perl.org,2009-11-03:/users/kiran//269</id>
    <updated>2012-11-30T14:36:47Z</updated>
    <subtitle>A blog about the Perl programming language</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 4.38</generator>

<entry>
    <title>Head Gestures in browser based game</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/kiran/2012/11/webrtc.html" />
    <id>tag:blogs.perl.org,2012:/users/kiran//269.4082</id>

    <published>2012-11-30T14:02:13Z</published>
    <updated>2012-11-30T14:36:47Z</updated>

    <summary>Recently I stumbled upon WebRTC. I started looking into this and found some useful libraries on github . I have been creating some games in Javascript so thought why not use one of these libraries to use some gestures to...</summary>
    <author>
        <name>Kiran</name>
        <uri>http://brainturk.com</uri>
    </author>
    
    <category term="html5javascriptbrainturk" label="HTML5 Javascript Brainturk" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/kiran/">
        <![CDATA[<p>Recently I stumbled upon <a href="http://www.webrtc.org/">WebRTC</a>. I started looking into this and found some <a href="https://github.com/auduno/headtrackr">useful</a> <a href="https://github.com/inspirit/jsfeat"> libraries</a> on github . </p>

<p>I have been creating some <a href="http://brainturk.com">games</a> in Javascript so thought why not use one of these libraries to use some gestures to play a game . </p>

<p>I decided to go with <a href="<a href="https://github.com/auduno/headtrackr">headtrackr</a> and thought it might be easy to add this to one of the existing games on <a href="http://brainturk.com">Brainturk.com</a>. Once I started I realized I needed a way to detect a collision between a rotated rectangle and a gradient on HTML5 Canvas . </p>

<p>I have recently started with game programming so did not know where to start . Google led me to <a href="http://gamedev.tutsplus.com/tutorials/implementation/collision-detection-with-the-separating-axis-theorem/">Seperating axis theorem</a> but later I stumbled upon this <a href="http://www.migapro.com/circle-and-rotated-rectangle-collision-detection/">blog</a>  and implemented this in Javascript and came up with this initial version of a picture back game <a href="http://www.brainturk.com/picheadr">here</a> and another variant of the <a href="http://www.brainturk.com/picheadr?spatial=1">same game  </a> .  WebRTC is currently enabled in Google chrome and Opera . </p>

<p>Once you click the start button look at the images in the game and if the image on screen is the same as the previous one move your head over to the green circle and if the image is different move it to the red circle . </p>]]>
        
    </content>
</entry>

<entry>
    <title>Brainturk - Cognitive Games </title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/kiran/2012/06/brainturk---cognitive-games.html" />
    <id>tag:blogs.perl.org,2012:/users/kiran//269.3443</id>

    <published>2012-06-29T06:22:09Z</published>
    <updated>2012-06-29T12:33:51Z</updated>

    <summary>Brainturk.com is yet another perl powered app that I have been working on , These games are taken from various research papers and articles published. Try it out and let me know if you have any comments/suggestions I decided to...</summary>
    <author>
        <name>Kiran</name>
        <uri>http://brainturk.com</uri>
    </author>
    
    <category term="perlgameshtml5brain" label="Perl Games HTML5 Brain" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/kiran/">
        <![CDATA[<p><a href="http://brainturk.com">Brainturk.com</a> is yet another perl powered app that I have been working on , These games are taken from various research papers  and articles published.  Try it out and let me know if you have any comments/suggestions<br />
<br><br />
I decided to go with <a href="http://mojolicio.us/">Mojolicious</a>  as the framework and I have deployed it using starman and nginx.  I am using Moose as the object system and started with  DBIx::Class since I had not used that before and wanted to try it . It was great at the beginning when I was dealing with 1 or 2 tables but once I started to add multiple tables and started doing a little bit of complex queries I was not having fun any more, It's probably because I am not familiar with DBIx::Class and I found I was searching a lot for how to do things  and in some cases I guess I prefer queries over data structures . <br />
I have worked with databases for a long time and am comfortable in writing complex queries and it was easy for me to leverage the database power which I was familiar with , so I decided to  go with DBix::Simple for the complex tasks . <br />
<br><br />
<a href="https://metacpan.org/module/DBIx::Simple">DBIx::Simple</a> is one of my favorite modules , it does not get mentioned often in the perl world but IMHO its a very well designed module , It provides lots of options to get the data into any structure you want and works well with other modules .</p>

<p><br />
</p>]]>
        
    </content>
</entry>

<entry>
    <title>make test errors failed to map segment from shared object</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/kiran/2012/04/make-test-errors-failed-to-map-segment-from-shared-object.html" />
    <id>tag:blogs.perl.org,2012:/users/kiran//269.3089</id>

    <published>2012-04-12T06:08:33Z</published>
    <updated>2012-04-12T06:15:46Z</updated>

    <summary>I had to install a version of Storable 2.30 for a client on their server and was getting the following error failed to map segment from shared object: Operation not permitted Can&apos;t load &apos;/tmp/del/Storable-2.30/blib/arch/auto/Storable/Storable.so&apos; for module Storable: /tmp/del/Storable-2.30/blib/arch/auto/Storable/Storable.so: failed to...</summary>
    <author>
        <name>Kiran</name>
        <uri>http://brainturk.com</uri>
    </author>
    
    <category term="perllinux" label="perl linux" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/kiran/">
        <![CDATA[<p>I had to install a version of Storable 2.30 for a  client on their server and was getting the following error</p>

<p>failed to map segment from shared object: Operation not permitted<br />
Can't load '/tmp/del/Storable-2.30/blib/arch/auto/Storable/Storable.so' for module Storable: /tmp/del/Storable-2.30/blib/arch/auto/Storable/Storable.so: failed to map segment from shared object: Operation not permitted at</p>

<p>The error was due to the fact that I was trying to build and run the tests on a /tmp directory which had noexec enabled , moving to a different directory solved this issue</p>]]>
        
    </content>
</entry>

<entry>
    <title>gdb basics</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/kiran/2011/08/gdb-basics.html" />
    <id>tag:blogs.perl.org,2011:/users/kiran//269.2125</id>

    <published>2011-08-21T01:07:38Z</published>
    <updated>2011-08-21T01:17:47Z</updated>

    <summary>Getting started with gdb , some notes on this objdump (otool on osx) is a program to examine a binary. To examine perl run the command objdump -D /usr/bin/perl |grep -A40 main.: Interesting to see the function call objdump -D...</summary>
    <author>
        <name>Kiran</name>
        <uri>http://brainturk.com</uri>
    </author>
    
    <category term="gdbperl" label="gdb perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/kiran/">
        <![CDATA[<p>Getting started with gdb , some notes on this</p>

<p>objdump (otool on osx) is a program to examine a binary.<br />
To examine perl run the command</p>

<p>objdump -D /usr/bin/perl |grep -A40 main.:</p>

<p>Interesting to see the function call<br />
objdump -D /usr/bin/perl |grep -A400 main.: |grep call</p>

<p>to get the output in intel syntax add the option -M</p>

<p>objdump -M intel ...</p>

<p><b>GDB </b><br />
for the following c program<br />
<code><br />
main() {<br />
  printf("hello world \n");<br />
}<br />
</code><br />
 -g flag to give gcc access to source code<br />
gcc -g prog.c </p>

<p>gdb commands to debug a c program<br />
gdb -q a.out<br />
set disassembly intel</p>

<p>list <br />
break main<br />
run<br />
disassemble main</p>

<p>    to dump a string stored in memory<br />
    x/s 0x... (memory address) in this prog we can check the string hello world stored at instruction mov</p>

<p><b> debugging perl </b><br />
- Get the latest bleadperl from git<br />
 - Configure and install perl with debugging support sh Configure -DEBUGGING=both<br />
gdb -q /usr/local/bin/perl<br />
set disassembly intel<br />
break main or break line number</p>

<p>nexti  or n to step through<br />
s to step through a subroutine</p>

<p>x/s variable to print the contents of a var<br />
</p>]]>
        
    </content>
</entry>

<entry>
    <title>Allowing anonymous comments</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/kiran/2011/08/allowing-anonymous-comments.html" />
    <id>tag:blogs.perl.org,2011:/users/kiran//269.2121</id>

    <published>2011-08-19T14:17:55Z</published>
    <updated>2011-08-19T14:32:07Z</updated>

    <summary>Gabor has a post here where he points out that the level of interaction is lower than the other blogs, he mentions blogs.perl.org and chromatic&apos;s blog as an example. On more than one occasion I have typed in my comment...</summary>
    <author>
        <name>Kiran</name>
        <uri>http://brainturk.com</uri>
    </author>
    
    <category term="commentsanonymous" label="comments anonymous" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/kiran/">
        <![CDATA[<p>Gabor has a  <a href="http://szabgab.com/blog/2011/08/3-simple-ways-to-help-the-perl-community.html"> post here</a> where he points out that the level of interaction is lower than the other blogs, he mentions blogs.perl.org and chromatic's blog as an example. <br />
<br><br />
On more than one occasion I have typed in my comment only to realize that you need to be logged in to comment ( Gabor's , blogs.perl.org and chromatic's blog all require login) . I understand spam is a issue but if you want me to login to comment I will most probably not do it .  <br />
<br><br />
I am not saying that one should be preferred over another but am wondering if there is any correlation between allowing anonymous comments vs logging in<br />
</p>]]>
        
    </content>
</entry>

<entry>
    <title>YAPC - Lightning workshop</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/kiran/2011/07/yapc---lightning-workshop.html" />
    <id>tag:blogs.perl.org,2011:/users/kiran//269.1933</id>

    <published>2011-07-01T03:10:20Z</published>
    <updated>2011-07-01T03:20:13Z</updated>

    <summary>After attending YAPC::NA at asheville I got an email for the YAPC feedback survey. I filled it yesterday and later thought of something that could be tried but am not sure if it&apos;s a good idea so here is a...</summary>
    <author>
        <name>Kiran</name>
        <uri>http://brainturk.com</uri>
    </author>
    
    <category term="yapcworkshop" label="YAPC workshop" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/kiran/">
        <![CDATA[<p>After attending YAPC::NA at asheville I got an email for the YAPC feedback survey. I filled it yesterday and later  thought of something that could be tried but am not sure if it's a good idea so here is a brain dump :-).</p>

<p> The idea is to combine social as well as technology aspect together to make it fun for the participants as well as being a learning experience since you actually get to try out something .<br />
Lets say there are 200 attendees.<br />
Reserve a 50 minute (or less) slot for this in the main hall</p>

<p>- Specify a task (or many tasks like an exercise in Modern Perl, Moose , Plack, Event Driven, MVC framework ...  )</p>

<p>-100 people are designated places and they have the pre-requisites (modules ? ) installed on their laptops </p>

<p>- The other 100 people join the people and pair program or one works while the other watches , discuss for 10 minutes or argue over why their ide is better</p>

<p>- After 10 minutes the participants are moved either left/right and start with a new partner while the ones with the laptop do not move</p>

<p> So in theory after the designated 50 minutes , each person has worked with 5 people, I believe this has a lot to offer as you actually get to program/discuss and you can pick up a lot of useful stuff like how people use their IDE  their configuration , their style of programming and it is also fun you get to meet different people. Imagine a newbie getting a chance to pair program with some well known perl hackers. <br />
<br><br />
I think if some more thought is put in to this and planned it could work and be a fun exercise. What do you think ?<br />
</p>]]>
        
    </content>
</entry>

<entry>
    <title>Cognitive tasks and Dual N Back</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/kiran/2011/06/cognitive-tasks-and-dual-n-back.html" />
    <id>tag:blogs.perl.org,2011:/users/kiran//269.1878</id>

    <published>2011-06-21T10:37:21Z</published>
    <updated>2011-06-21T11:01:07Z</updated>

    <summary>A few days back I stumbled on this blog post about increasing your intelligence and the Dual N Back task I had a dot cloud invite that I had not used and I wanted to learn some HTML5 and looking...</summary>
    <author>
        <name>Kiran</name>
        <uri>http://brainturk.com</uri>
    </author>
    
    <category term="dualnbackhtml5dotcloud" label="Dual-n-back HTML5 dotcloud" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/kiran/">
        <![CDATA[<p>A few days back I stumbled on this blog post about <a href="http://www.scientificamerican.com/blog/post.cfm?id=you-can-increase-your-intelligence-2011-03-07&WT.mc_id=SA_CAT_MB_20110309">increasing your intelligence </a> and the  <a href="http://en.wikipedia.org/wiki/N-back#Dual_n-back">Dual N Back task </a></p>

<p>I had a <a href="http://www.dotcloud.com/">dot cloud invite </a> that I had not used and I wanted to learn some HTML5 and looking around there did not seem to be a N-back version in HTML5 (most of them use flash) so I created a web app <a href="http://bodhi.microangels.in"> Bodhi </a> . The intent is that this app works on the browser as well as mobile devices ( at least iPad). This is the initial version and I am looking for some feedback on improving this or adding some more tasks.</p>

<p>I am pretty impressed with the dot cloud infrastructure, it's  easy to get started and deploying is simple.<br />
</p>]]>
        
    </content>
</entry>

<entry>
    <title>Phenona Perl platform on the cloud</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/kiran/2011/06/phenona-perl-platform-on-the-cloud.html" />
    <id>tag:blogs.perl.org,2011:/users/kiran//269.1853</id>

    <published>2011-06-15T15:14:04Z</published>
    <updated>2011-06-15T15:24:20Z</updated>

    <summary> Phenona is acquired by Active state . I have not seen anyone mention this in their blog or in any other feeds that I have so mentioning it here in case you have not heard about it . It&apos;s...</summary>
    <author>
        <name>Kiran</name>
        <uri>http://brainturk.com</uri>
    </author>
    
    <category term="cloudphenona" label="Cloud Phenona" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/kiran/">
        <![CDATA[<p>  <a href="http://www.activestate.com/blog/2011/06/activestate-acquires-perl-cloud-company-phenona?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+activestate%2Fblog+%28ActiveState+Blog%29&utm_content=Google+Feedfetcher"> Phenona is acquired by Active state </a>  .  I have not seen anyone mention this in their blog or in any other feeds that I have so mentioning it here in case you have not heard about it . It's built by a 15 year old and IMHO is a very good marketing material for an application built with perl.</p>]]>
        
    </content>
</entry>

<entry>
    <title> python2.6  for dotcloud</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/kiran/2011/04/upgrade-python-for-dotcloud.html" />
    <id>tag:blogs.perl.org,2011:/users/kiran//269.1708</id>

    <published>2011-04-28T15:19:40Z</published>
    <updated>2011-04-28T15:47:54Z</updated>

    <summary>Dotcloud now supports perl. Dotcloud command-line interface requires python 2.6. Here are the steps I used to install python2.6 on mac 10.5.8 wget http://python.org/ftp/python/2.6/Python-2.6.tgz tar -xvf Python-2.6.tgz cd Python-2.6 ./configure --prefix=/usr/local/python2.6 make sudo make install #add /usr/local/python/bin to your ~/.bash_profile...</summary>
    <author>
        <name>Kiran</name>
        <uri>http://brainturk.com</uri>
    </author>
    
    <category term="python26dotcloud" label="python2.6 dotcloud" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/kiran/">
        <![CDATA[<p><a href="http://www.dotcloud.com/">Dotcloud</a> now supports <a href="http://blog.dotcloud.com/dotcloud-introduces-camel-as-a-service-with-i">perl</a>. Dotcloud command-line interface requires python 2.6.  Here are the steps I used to install python2.6 on mac 10.5.8</p>

<p> wget http://python.org/ftp/python/2.6/Python-2.6.tgz<br />
  tar -xvf Python-2.6.tgz <br />
 cd Python-2.6<br />
  ./configure --prefix=/usr/local/python2.6<br />
  make<br />
  sudo make install</p>

<p> #add /usr/local/python/bin to your ~/.bash_profile<br />
wget http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg#md5=bfa92100bd772d5a213eedd356d64086</p>

<p>sudo su -<br />
#make sure python -V is 2.6 <br />
sh setuptools-0.6c11-py2.6.egg</p>

<p>#now you can use the easy_install which is installed under /usr/local/python/bin/easy_install to install dotcloud<br />
 sudo easy_install dotcloud</p>

<p>Now follow the instructions <a href="http://docs.dotcloud.com/tutorials/firststeps/#create-and-setup-your-account"> Here </a>  on  getting started with dotcloud.<br />
</p>]]>
        
    </content>
</entry>

<entry>
    <title>Useful Links</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/kiran/2011/01/useful-links.html" />
    <id>tag:blogs.perl.org,2011:/users/kiran//269.1377</id>

    <published>2011-01-19T01:07:34Z</published>
    <updated>2011-01-19T01:29:06Z</updated>

    <summary>Here are some useful resources. Khan Academy If you have or know any children who are in school, this is an awesome resource, Sal is an excellent and talented teacher . The video&apos;s are ten minutes in length and of...</summary>
    <author>
        <name>Kiran</name>
        <uri>http://brainturk.com</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/kiran/">
        <![CDATA[<p>Here are some useful resources.<br />
 <br />
<a href="http://khanacademy.org">Khan Academy</a> If you have or know any children who are in school, this is an awesome resource, Sal is an excellent and talented teacher . The video's are ten minutes in length and of very good quality. </p>

<p><a href="http://ejohn.org/apps/learn/">This</a> Javascript exercise by John Resig ( Jquery creator) is a good way to learn some advance javascript   </p>

<p>This <a href="http://clj.heroku.com/">Clojure </a> article is a pretty good way to get your feet wet in getting started with Clojure programming.</p>

<p>If you want to get started with <a href="http://diveintohtml5.org/">HTML5</a> this is a pretty good book , You can also order a print version <a href="http://oreilly.com/catalog/9780596806033"> here </a></p>]]>
        
    </content>
</entry>

<entry>
    <title>Perl on Android</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/kiran/2010/03/perl-on-android.html" />
    <id>tag:blogs.perl.org,2010:/users/kiran//269.361</id>

    <published>2010-03-15T03:03:21Z</published>
    <updated>2010-03-15T03:29:44Z</updated>

    <summary>I got a new Nexus One phone . Installed ASE (android scripting environment) and perl. Here is the hello_world.pl that is installed in the /sdcard/ase/scripts $ cat hello_world.pl use Android; my $a = Android-&gt;new(); $a-&gt;makeToast(&quot;Hello, Android!&quot;); The adb shell seems...</summary>
    <author>
        <name>Kiran</name>
        <uri>http://brainturk.com</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/kiran/">
        <![CDATA[<p>I got a new <a href=http://www.google.com/phone >Nexus One phone  </a> .<br />
 Installed ASE (android scripting environment) and perl.<br />
 Here is the hello_world.pl that is installed in the /sdcard/ase/scripts</p>

<p>$ cat hello_world.pl<br />
use Android;<br />
my $a = Android->new();<br />
$a->makeToast("Hello, Android!");</p>

<p>The adb shell seems to be very restrictive , I get a permission denied for any command that I try. </p>

<p>opening the interpreter from the ASE app give the following<br />
/data/data/com.google.ase/perl/perl -de 1<br />
and opens the debugger .</p>]]>
        
    </content>
</entry>

</feed>
