Technology http://techtalk.atifhaider.com Let's have some technology talk! posterous.com Fri, 11 Dec 2009 00:00:00 -0800 Universal hacker emblem http://techtalk.atifhaider.com/universal-hacker-emblem http://techtalk.atifhaider.com/universal-hacker-emblem

Conway's game of Life is used as an icon for hackers

Media_httpwwwcatborgh_dvnxd

Permalink | Leave a comment  »

]]>
Fri, 12 Sep 2008 13:00:00 -0700 Happy Programmers Day http://techtalk.atifhaider.com/happy-programmers-day http://techtalk.atifhaider.com/happy-programmers-day

W00t! It's a Programmer's day today. I wish all the programmer's worldwide. The day is unofficially celebrated on the 256th (reason: 256 = 2 to the power of 8 = the number of values representable in a byte of data) day of the Gregorian calender year. Therefore, it usually falls on September 13, and on a leap year it is on September 12.

Permalink | Leave a comment  »

]]>
Mon, 18 Aug 2008 12:58:00 -0700 Grep http://techtalk.atifhaider.com/grep http://techtalk.atifhaider.com/grep

GREP:: Prints line matching a pattern. While digging out for pattern matching stuffs, i came across a brilliant search utility that works fine on Gnu/Linux. Actually all my mobile numbers were scattered in different files and each file containing huge amount of text including mobile numbers!! And i only wanted those numbers.<br />

 

atif@ct:~$ grep [0-9] home/atif/foo home/atif/bar
home/atif/foo:+91 9930001234
home/atif/foo:+91 9833730782
home/atif/foo:+91 9890422344
home/atif/bar:+91 9878565545
home/atif/bar:+91 9890786567

Permalink | Leave a comment  »

]]>
Thu, 14 Aug 2008 12:41:00 -0700 Power of REGEXP http://techtalk.atifhaider.com/power-of-regexp http://techtalk.atifhaider.com/power-of-regexp

When i was in college, i had a topic Regular Expression under the subject Formal system automata! At that time i was so confused with "What exactly this pattern matching is" never understood the concept just mugged up and passed!! After getting into the real world and for writing real application i have been forced to get back to REGEXP again!! Now, after writing few stuffs, i understood the basic concepts!! How powerful this pattern matching thing is!! I am giving an small example "To replace all hyphens with underscores". I have used CL-PPCRE library for this.

cl-user> (cl-ppcre:regex-replace-all "-" "foo-bar-bazz" "_") => "foo_bar_bazz"

w00t! this is really exciting!! one can do wonders by using regexp to get rid of major problems such as one of the problem we face is To split date "14/08/2008" as ("14" "08" "2008").

cl-user> (cl-ppcre:split "/" "14/08/2008") => ("28" "09" "2008")

These are few examples of REGEXP. I will add more of it soon :-)

Permalink | Leave a comment  »

]]>