Setting up HomeBrew on Mac OS X


Hola Amigos :)

If you are using Mac and are Open Source enthusiast or a developer or want to install any open source packages that are available for Linux-based OS’s through your Terminal.App rather than compiling and installing from source. Well don’t worry HomeBrew comes to your rescue.

In this post, I am going to tell you how to set up Homebrew easily. You might want to have a good internet connection if you are not that patient in waiting, as this is going to download quite a large amount of files on your machine.

What is Homebrew?

It is an alternative version for Mac OS X of apt-get or aptitude that you use in Linux-based systems. It is a command line tool that will install the missing packages from the source that are not available through Mac App Store. It enables you to install latest development tools like wget, git, mysql, python3, and many more easily through your Terminal.App just like you used to do with Linux terminal.

They are simple formulas written using Ruby script so that the packages are easily installed into Mac OS X. It also installing them under a different directory so there is no need to worry about the default packages being replaced or conflict between the default and homebrew versions.

Eg: wget formulae sample

require "formula"

class Wget < Formula
  homepage "http://www.gnu.org/software/wget/"
  url "http://ftp.gnu.org/gnu/wget/wget-1.15.tar.gz"
  sha1 "f3c925f19dfe5ed386daae4f339175c108c50574"

  def install
    system "./configure", "--prefix=#{prefix}"
    system "make", "install"
  end
end

Here the source of wget is fetched from the source and it will automatically run .configure, make, make install for you and saving you the work of executing these commands.

Let me put this in simple terms, homebrew will take the package name as an argument from the user and will fetch the source of the appropriate package from git (or ftp, wherever the package is hosted) run .configure with appropriate arguments, make, make install; and make installing packages simpler for the user. It is basically ruby scripts executing the command line (terminal) commands for you :)

Installing Homebrew:


ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

This command will download the homebrew ruby gem(package written in ruby) using curl, a command line tool (included by default in Mac) for transferring data just like wget. After the download is complete it will execute the package using “ruby -e” (-e being the execution argument for ruby).

It will pause in between installation and tell you about what it is going to do. While using ‘brew install’ too you can see each and every step that the command executes and you can know what is going on behind the curtains (one of my favorite features).

After Installation run:


brew update

This will make sure that you have the updated brew repository and the latest packages are available.

brew update terminal log

brew update terminal log

P.S: There is MacPorts too that you can use, but I would recommend you to use homebrew as lots of technologies are having steps to install latest packages using homebrew.

Reference:

brew.sh

Let the Windows be open, and feel the Freedom.

Installing Scheme on Mac OS X


Hola readers,

Many questions might have come across your mind on seeing the title. It says installing ‘Scheme’. Well I am not talking about any offers or daily schemes :P. Scheme is a functional programming language, a variation to LISP programming language.

And other thing that might come across would be why am I talking about Mac OS when my earlier posts were all related to Open Source or Linux in some or the other way. IMHO, Mac is best of both worlds, an awesome GUI by Apple designers and Linux like command line interface backed by Unix. Most of the developers prefer Mac and hence there are lots of awesome IDE available for it. I do most of my programming on X-Code. Using command line tools I can write programs through terminal too using vi and Emacs (I prefer vi/vim). I run Linux on VBox for my Open Source contributions and enjoy best of both worlds :D.

This is my second post of the day. You would be thinking that I am on some kind of blogging spree, well am also thinking the same :P. Reason to post about this is that I was talking to my friend about MPLAB IDE for Mac and then he mentioned that he couldn’t even get his MIT-Scheme running. Maybe there would be others too facing the same problem, so why not share my knowledge with the world :)

In this post, I am going to help you with setting up MIT-Scheme (implementation of Scheme programming language developed by MIT) for Mac OS X.

First of all, you will need to download the .dmg file of MIT Scheme.

Download link for OS X:

32-bit system

64-bit system

Click on the downloaded dmg file and a finder window will open up like this:

MIT-Scheme disk image

MIT-Scheme disk image

Just drag the MIT/GNU Scheme.app into the Applications folder and it will be installed in your system.

Now to use Scheme through command line, open up Terminal.app from either Launchpad, Spotlight or under Applications folder and run the following command.

For 32-bit package:

sudo ln -s /Applications/MIT\:GNU\ Scheme.app/Contents/Resources /usr/local/lib/mit-scheme-i386

For 64-bit package:

sudo ln -s /Applications/MIT\:GNU\ Scheme.app/Contents/Resources /usr/local/lib/mit-scheme-x86-64

Enter you administrator password and then run this command to link mit-scheme.app to ‘scheme’ command in terminal:

For 32-bit package:

sudo ln -s /usr/local/lib/mit-scheme-i386/mit-scheme /usr/bin/scheme

For 64-bit package:

sudo ln -s /usr/local/lib/mit-scheme-x86-64/mit-scheme /usr/bin/scheme

To use Scheme open up Terminal.app and simply run:

scheme

Happy Coding \m/

Let the Windows be open, and feel the Freedom.

GNOME 3.10 in Ubuntu 13.10


Hola amigos!
I am very greatful to all my readers, I have just hit 2,000 views.

I was working on Android App Development Competition (UMC, University Mobile Challenge) organized by Applied Innovations Institute for few months. We didn’t get selected (Only 14 teams of 2000+ teams worldwide got selected), but still it was a great learning experience and hope to make our idea a reality and release into market soon. Later on, I continued my Open Source contributions and also GSoC (Google Summer of Code) was just near the corner and project submissions had already started. I started reading the ideas on the organization’s wiki page and reading the source code on git, finding out possible modules that can be implemented and prepared the GSoC application. It was an intense job as the application should be legit and better than the others. Will post about these in coming days :)

Anyways, back to the topic :)

Here I am going to post about how to install the latest GNOME desktop manager (GDM, in short) on Ubuntu (13.10 to be specific). This will work on few earlier and the latest versions too, so no need to worry about the release version :).

Why the latest GNOME 3.10 ?
GNOME 3.10 has lots of UI improvements and many new applications are added to GNOME like Photos, Maps, Music, etc. Around 34,786 commits have been contributed by over 985 contributors. IMHO, this is the best Desktop manager till now. You will find bugs, and some things missing but it is upto us to figure things out and it makes it fun to test these softwares and fix them and find workarounds for the issues. Anyways Open Source projects are meant to be made better by our contributions like reporting bugs, fixing bugs, etc. and this indeed improves our knowledge too.

To enjoy GNOME to the fullest extent you might want to have a Physical machine with good graphics and memory configured rather than virtualization like VBox.

Getting the sources ready.
First you need to add the PPA to your sources.list, this can be achieved by running the following command in your terminal.

sudo add-apt-repository ppa:gnome3-team/gnome3-next
sudo add-apt-repository ppa:gnome3-team/gnome3-staging

gnome3-next is enough if you just wanna try out the feel of GNOME. Developers and adventurous people might wanna try out gnome3-staging, but do backup before proceeding.

NOTE: Adding gnome-staging PPA might break your system or make it unstable. So proceed on your own risk. Remember to backup your DATA regularly.

Now to update the sources and upgrade the packages run the following command in the terminal:


sudo apt-get udpate

sudo apt-get upgrade

sudo apt-get dist-upgrade

You can skip dist-upgrade if you already have GNOME desktop manager pre-built with the installation. It might even crash the system if some packages are in transition.

To install GNOME-Music and other applications:

To install specific applications like GNOME-Music and other new applications you might want to take a look at the package list here and run apt-get for appropriate packages.

Example:


sudo apt-get install gnome-shell gnome-music

This will install gnome-shell and gnome-music from GNOME 3.10 repository.

Hope this gives a clear idea about adding PPA to your sources and installing packages under development and testing. Feel free to comment in your queries or mail me :) I’ll be happy to help you with your doubts and questions.

P.S: Some packages might be unstable so be careful before executing any command.

Let the Windows be open, and feel the Freedom.

Contributing to Open Source: First Bug Fix


Hey amigos! Well if you reached here by googling ‘Bug fix’ or similar, or are following me:). This might help you get started with contributing to Open Source or bug fixing.

First of all I tried contributing to Debian, as I was already packaging for Debian-Diaspora. But later I found Debian a bit difficult in the beginning. I tried to get help on IRC, got some firing too due to asking silly questions or maybe the other person’s Karma was bad :P. Then I thought that contributing to Open Source need a lot of homework from our side like reading the wiki pages, going through the bug list (which is longer than wiki page, that are already confusing). Then someone referred me to GNOME-Love wiki page as it was well documented.

And then My journey to first bug began at GNOME. A very friendly IRC channel that I have come across; very humble, polite and helpful people on this IRC channel.

@ #Gnome-Love: I asked them that I am new here and would like to do some Open Source Contribution.

They love it when we volunteer to contribute to their projects and fix codes for them and make life easier for the users. They asked me about programming language that I prefer and asked me to join #gnome-music.

Steps to follow:

1. Setup a virtual box machine or install the latest Linux distro of your choice (Latest Fedora is preferred for GNOME development) on your machine.

2. Update the package repositories and upgrade the packages. For steps to do this follow steps here. (For fedora use yum upgrade instead of apt-get upgrade).

3. Install prerequisites and dependencies and setup jhbuild for GNOME applications. For setting up jhbuild follow steps here.(Will be updated soon)

4. Build GNOME-application and test the application.

5. Read the source code and learn playing around with version control system (git, mercurial, svn, etc.).

6. Fork the main repository to your github account and then clone the repository.

7. Select a bug from Bugzilla.

8. Contact the mentor of the bug on IRC and start hacking.

9. Test your patch and when satisfied, commit the changes and push the local changes to your forked repository.

10. Create a pull request in the main repository of the project.

Note: Feel free to ask on IRC when you are stuck or have any errors or problems while following any step.

Let the Windows be open, and feel the Freedom.

FOSSMeet ’14 : A Speaker’s Dairy


Hola Amigos!

Some of our mates missed the FOSSMeet @ NIT-C this year and wanted to know about the same. So here it goes from a Speaker’s POV (that’s me :) talking on ‘Contributing to GNOME-Music‘):

As usual everything happened at the last-minute.

I was in Data Structure’s lecture when they call me and tell that you have to present your talk tomorrow :P.

Same happened with one of our senior, Avani. She got the call one day before me so she had virtually more time, but due to last-minute system crash she had to rebuild everything.

I got my seat in the bus luckily due to some people dropping out at last-minute. Anyways we (2nd years) were there in the CIR getting all the permissions from Biju ji and waiting for first years. We went in the bus and then all the girls entered the bus, we thought that there are 2 buses then we realized that we all have to fit in that one small bus which by the way was not a problem in the end :P

14/2/2014: We left from our campus at around 2130 hours roughly, everyone was exited about FOSSMeet and I was thinking about what should I say during my presentation. After preparing few slides I rewarded myself with ‘Metallica-Through the Never’ concert and headbanging all night \m/. Thanks to Anup’s laptop the bus journey was not all that boring. No one couldn’t sleep either as a result of the bus being from back 90′s maybe. We reached Kochi at midnight and there was this much hyped Lulu Mall :)

Also on the way we had seen some festival or tradition going on, they had round sticks which were set on fire with a weird logo on them that reminded me of ‘Dexter’. Small girls were holding the diya’s and walking in a disciplined way and all dressed up in a traditional way.

15/2/2014: We reached NIT campus early in the morning at around 0430 hours in half sleep and very tired. We got to know that organizers are all asleep and registration will only start at 0800 hours. Yazir, an ex-organizer came by our bus and was talking to Harish, in the meanwhile he recognized me from last year and I asked him to get some room arrangements done as I was speaker and needed rest as my talk was scheduled in few hours. He told me that he will arrange something and by 0630 hours speaker coordinator, Sudev came by and asked for me while I was finally asleep :P

I reached the guest house and OMG here I was in a big A/C room :D, with balcony and bathroom as big as our hostel rooms :P. The room was installed with LAN internet and what lightning speed it had. I updated and built gnome-music in just couple of minutes. I tried to sleep but was too excited about the talk. I got freshened up and then took some rest and left for the registration hall. A lot of crowd was there, and 75% were Amrita students :) \m/

I went and asked for speaker ID and they were searching for it and Avani (our senior) too was waiting there, finally they come and say we are out of speaker ID’s as it was printed long back and will make arrangements ASAP. BTW I got my ID after my talk finished :P

Everyone went for ‘Let’s Contribute’ workshop and few went for Python w/s. Around 1030 hours I went into the Bhaskara hall where my talk was scheduled, and as usual Praveen’s talk scheduled at 0900 hours had just started :P. Few guys came around at 1115 hours while the other talk was still going on and others at Let’s Contribute were still there in lab. I asked the coordinators to call someone and ask them to come. And then they realized that more than half of the people from the workshop are leaving and they were like the workshop would have to be cancelled then :P

Poor Arrangements

They didn’t have the proper projector connectors for my MAC. Me Tony and Anup tried some weird hacks like sharing screen through G+ hangouts and what not, I wanted to show the demo of jhbuild and GNOME-Music.

Contributing to GNOME-Music

I started the talk around 1200 hours and it went on till 1245 hours and using the PowerPoint presentation alone I tried to explain the procedures, I showed them the git repository of GNOME-Music online and few snapshots of the user interface that I had taken while I was bug fixing. I also tried for a live demo through hangout but it didn’t quite work as it was meant to. After my presentation I wanted the juniors to ask questions or doubts so I was like pointing out people and asking them if they had any doubts or questions. All in all the talk was good and audience strength was also good. Thanks to Anup for taking snaps and collecting all the images from everyone and uploading.

Attaching the album at the end.

Everyone liked my presentation and applauded and I was happy to know that my presentation got them interested to know more about GNOME and its projects. We had a brief discussion too at the end, some of them were shy to ask questions but me repeatedly asking them made few of them talk :) I was happy that first year guy shared his idea too about what he understood and what are the benefits of Open Source contribution.

Unfortunate event

After lunch most of us went for RUBY workshop, and in middle we hear the news of unfortunate accident that happened. It was really sad to hear about the accident and that too someone of our age, may his soul rest in peace.

They had cancelled the talks for the day and decided to keep the workshop going on in an informal way. We all went around the campus and saw Chemistry, Physics and Mathematics departments and clicked a lot of pics.

Evening discussion

It was around 1700 hours and the organizers were gonna put up the updated schedule. As usual nothing was put up so I decided to sit in the Bhaskara hall and voilà there was Open DATA talk going on :P. There were only a few present there. The talk went above my head about data and data sets, etc. But by the end of the talk I got a good idea about it. The government of India have all there data’s uploaded online. You can find all the data about population, lok sabha members, etc from the beginning.

Few links are:

http://data.gov.in/

http://theballot.in/ (Do check this out)

The Ballot is maintained by Nirbheek Chauhan whom I met in the talk and another woman. They download the huge data sets that are hosted online and they do an analytic study of these huge data and have put them up in a beautiful graphical manner with all the stats.

After the talk some more people came in and we started discussing about our idea about Free Software.What is Free Software?

The organizers came in and told that they need to close the hall as there was some protest that was gonna happen. We all went back to guest house and the discussion continued. I also learnt about the tradition where the child takes the family name of their mother rather than their father’s family name.

We had to go to the canteen for food as we won’t get food after 2000 hours, and for speakers everything was taken care by them as dinner was not provided on account of event being held cancelled. We returned to guest house and I met new people too and they were like working in companies run by the other speakers after graduating and different projects that they work on using Open Source. Some of them didn’t know about Open Source contribution so I explained to them in detail about it. Some of them recommended that I should have taken up a workshop so that I could have gone deep into the details about the topic. But as it was my first Official talk I rather take up a talk and then think about workshops in coming future:)

Around mid night some organizer came and told that the second day and FOSSMeet is officially cancelled.

16/2/2014: Planned to go Beach, planetarium and Lulu all, but Lulu mall was dropped. In the morning, I went to the registration desk to see what’s going on, they were refunding half the money and preparing the certificates. They had a separate desk for Amrita Students specially as they didn’t want the place to be crowded. Harish got two certificates :P as Hareesh (now void) as well as Harish. Everyone collected their refunds and bought t-shirts with them and collected their certificates. Avani and I got t-shirts for free (advantages of being a speaker).

Return Journey back to home sweet home (rather hostel :P)We left at around 1130 hours for planetarium. Before that we had a pit stop at Paragon \m/ Yummmmm…..Chicken Biryani (CB Arjun, ABC :P). After eating we got a Party music CD (just for namesake party music, rather only a few songs were party type). Maybe you should ask Anup and Arjun as they were our DJ’s, thanks to them we got our legs moving :D. We took some wrong turns too but finally reached planetarium. There we saw Dinosaurs and pre-historic animals and cool scientific stuff too. We had fun there and the movie was awesome except for the guy was speaking in high level Malayalam. We were more interested in taking pics, hence the security guys were behind us all the time :P. After that we left for the beach, at first it was just small empty land and backwater but then on the other side was the real thing waiting for us. Juniors ran away in the water which made everyone join in. Me harish and avani went along the path way deep into the sea or ocean whatever it was :P as we were not that interested in salt water full of sewer water and chemicals. We returned back and everyone was there at the coffee shop, so I decided I should also have something hot as my throat was gone due to screaming and the intense headbanging \m/. Woooo awesome experience.

We stopped at a small restaurant and had dinner, after that again back to dancing and fun. Then we had cheers for FOSS @ Amrita and a last dance where everyone joined in for the great trip we had.

We reached back early in the morning at around 0230 hours and earlier than I had expected :P Wish I could have slept the whole night. The juniors were accompanied by the security faculty and Harish (body builder :D). And there were we Me, Tony and Anup the lone rangers all alone and the warden sleeping hard. Luckily someone was awake and knocked on wardens door and finally we entered the hostel. Slept hard and didn’t want to wake up in the morning. But no worries slept nicely in the lectures as usual :)

Link to my presentation Slides: ‘Contributing to GNOME-Music

FOSSMeet ’14 Album

A Day about Life and Happiness


You would have read about all the technical posts on my blog and some posts from pages of my life. Today I am gonna share something that was really great and something about way of living life and how to be happy.

We had a full day session by Manoj Bro…:) on an unknown secretive topic that none of us was aware of. I had lab exam in the afternoon session and was way too sleepy in the morning too. Our advisor, Ruphiny mam was standing outside the classroom and I thought that there might be some announcement or something. But to our surprise she said that the entire day would be off and we are going to have a session and attendance would be taken during the breaks in between the session.

There are two types of education: Education for Life and Education for Knowledge. Education is incomplete without learning about one’s own self and things about life.I feel lucky that my University teaches us these awesome things about Life and teaches and makes us strong to face challenges in life. Today we learnt the most important thing about our life: being happy and good. Our Manoj Bro even said that life in future is going to be really difficult and we need to be really strong to survive (survival of the strongest and fittest) and that this session would help us to face these challenges and problems.

We all went up to the SaH (Serve an Hour) room and sat eagerly and waiting to know what is going to happen. Everyone started predicting and something related to spirituality came up in everyone’s head. And actually it turned up a spirituality / laughter and enjoyment session. In the beginning some ashramite came inside and looked a bit strict and he was waiting for us to settle down and be completely silent. I slept off even after sitting on the front row, he was seeing me and the guy beside me woke me up and I saw him, he gave a smile and a thumbs up and I was like great he is not that strict or bad as it seemed in the beginning. I was trying to sleep again but no use now as I was awake and he was about to start and he kept on saying that he is just molding us for the session and that the session is yet to start. He started in a somewhat serious mood but later on he promised everyone that he would make us 99.9999% happy guaranteed and I didn’t believe him. But the moment he started I was like ROFL and I enjoyed the entire session. We all were like laughing and holding out stomach the whole day.

He was enacting stories, cracking jokes, calling himself as our BRO and not as sir. He was doing actions while speaking and narrating stories and it was like too great. He made us forget ourselves and we all were like LKG (Learning knowledge about GOD) as he defined LKG with respect to our age :P. He was very calm and happy from outside and inside and he did and said everything from his heart. He teased everyone and we all even enjoyed it. Initially not many people were interested but he was happy with the response from some of us and later on everyone was interactive. He said that his energy is in our response and I don’t know how but somehow it came out to be true. When we were responding with all our energy the mic was working fine but when there was some decline in our energy, the mic would not work properly sometimes.

He taught us 20 kinds of smile: zero smile, minus smiles and positive smiles. He taught us how to face challenges in life and be happy always and not every little hurdle is the end of life or our journey. He covered topics like Positive thinking, Acceptance, Finding satisfaction in whatever little we get, Living in the present moment and not living in past or the future, Spirituality, Meaning of life and the most important how to be happy and he literally made us laugh our stomach’s out. Everyone was massaging their cheeks (can’t even remember when was the last time we laughed this much).

We were not even bothered about if we were feeling thirsty or hungry, we were just enjoying being happy. He gives credit behind all this to AMMA (our spiritual GURU) and it was only because of her we were happy and enjoyed the day. Amma is the energy and power, and the reason for our happiness.

He narrated a small story too, talking about a guy trying to change the nation and committing suicide as he was not successful and asks God for one more chance and he would try to change the people of his state but again he commits suicide at a younger age than the earlier one. Then he again asks God for one more chance to try to change his family members but he dies as soon as he is born. Then he says to God that I failed to change others so I should now try to change myself and be a good person towards others and when I become happy and a better person then automatically the surrounding people would tend to change and become better person in life. I learnt from this that no matter what we should never expect anyone to change for us, in fact we should change ourselves and accept and be satisfied with whatever little we get.

He also showed us few videos (Tom & Jerry) and a small bay trying hard to get his water bottle on top of his play-set. This little kid taught us that we should never stop trying and at a certain point we would achieve our dreams. We should not let the past ruin our present and be sad, rather we should let go off the past and not also live in the future too, having ambition and goals are okay but we should not worry about them and rather live the present moment happily and whatever is meant to happen in our life will happen and we should not get tensed thinking about these things. We should control our thinking and not let thinking and our mind controlling us.

We had small games too in between and some serious issues came up too about this book that is full of lies and rubbish BS named Holy Hell. It is a shame that such books are coming up and people’s mindset are corrupted. There is a very high need to format people’s mind because it is filled with virus and corrupted data. And media supporting such things is never expected. It is only our media that is interested in false stories and lies rather than spreading love and peace and informative news to the mass.

One need to experience and live in presence of a GURU and that too someone like Amma who loves everyone unconditionally. No book can tell you about anything until you live and experience it yourself.

I can proudly say that I am lucky to be in presence of Amma and her mere presence in our life can make great things to happen with us. Only such great personalities can bring peace and harmony in our life.

It is only because of Amma that we are leaning such beautiful things about Life and getting a better view and idea about Life.

OSFY: Top 10 Music Players


This is my first article for Open Source For You (OSFY) magazine.

Here is a raw version of the article. Those who didn’t subscribe to OSFY or doesn’t know about it don’t worry, feel free to read the article attached in this post. This article is about the Top 10 open source music players. I have listed down all the features of the players and have done a comparative study among them and there emerged a winner. To know more read the article Top 10 Music player. This article is part of the 11th anniversary edition of the magazine, hence “Top 10 of everything Open Source” theme for it.

I planned on writing for this topic as I was working on Gnome-Music and had played with almost all the music players and also it was a great opportunity to know about other music players too and think of cool features that one can find.

Let the Windows be open, and feel the Freedom.