Our life around REPL – Read–Eval–Print Loop

Whenever I see my niece so comfortable with iPhone, Mac, Advance Toys; I usually wonder almost similar feeling our parents must have pondered about us. But what is the biggest disadvantage of being part of GEN X. What? We have best things in the world but the irony is that we don’t enjoy or embrace the inventions/creations done by our forefathers generation. For us TV, Radio, Telephone, Mobile, Desktop was little obvious, now for next generation iPhone, iPad, Smartphone, DSLR, Laptops, Tablets et al are very obvious. Its clearly visible our parents struggle with our generation widgets and I have now started to struggle with next-generation gadgets.

You must be thinking what is it had to do with REPL. During college days, I started coding in C, bit of Java (to clear job interviews incase required), then majorly on PHP, RUBY, PYTHON, JAVASCRIPT, BASH. The moment I started coding on these languages, which are derived from their forefathers C & Lisp, I sensed a sheer bliss while working on them and started promoting them in peer group as soon as I realized the language is always available and it was obvious not to look back at C, C++, Java and many others. We can easily compare it to Gramophone, cassettes, VCR , VCP, Landline but these inventions were the foundation of where we stand today in our life or in programming world.

I was not clear about the term REPL when I started working on these languages and thought of it as a jargon of programming world. Recently, wrote a smallest code on ruby and a REPL was created. This is when I realized the power of REPL and thought to read about their forefathers. Let’s first have a sneak-peek into that smallest piece of ruby repl code.REPL

#!/usr/bin/env ruby
loop {p eval gets }

 

Now read this piece of code in reverse order, READ (gets), EVAL, PRINT (p), LOOP. Save this file as repl.rb and run as`ruby repl.rb`

─$ ruby repl.rb 1 ↵
"akshay Gupta".upcase
"AKSHAY GUPTA"
1+2*3
7

Congratulations, now you understand REPL and underlying fact of  language is always available i.e. no real distinction between read-time, compile-time and run-time. Now, when I start working on any new language, it’s easier to pick up if it’s REPL based and I truly thank Mr. John McCarthy father of Artificial Intelligence, creator of LISP (where lies the roots of REPL) for his immense contribution in the field of computer science, AI, programming languages and so many programming paradigm. If i’m not wrong, he is also the inventor of if-then-else conditional construct and we take these for granted now.

Running code at read-time lets users reprogram; running code at compile-time is the basis of macros; compiling at runtime is the basis of Lisp’s use as an extension language in programs like Emacs; and reading at runtime enables programs to communicate using expressions.

There have been two really clean, consistent models of programming so far: the C model and the Lisp model. As computers have grown more powerful, the new languages being developed have been moving steadily toward the Lisp model. A popular recipe for new programming languages in the past 20 years has been to take the C model of computing and add some parts taken from the Lisp model, like runtime typing and garbage collection.

repl-loop

It’s equally important to look forward and innovate in coming time and respect, embrace the efforts of our remarkable forefathers. To read and practice different languages that support REPL please follow the below links. I primarily depend heavily upon irb and PRY.

In our everyday life we do nothing more than READ (consume knowledge), EVAL ( between right and wrong), PRINT (discuss around), LOOP (day everyday) i.e. REPL 🙂

 

How to study and learn from world’s best Teachers and Professors

When I was in college their was always a desire that If I would have been in Stanford or some great university I would have access to world’s best professors and it would have been a different learning experience altogether.

Or

How great it would be if I can study whatever I feel like outside of our course in a systematic way and can learn the fundamentals that help to grow my knowledge, fundamentals or businesses

Education for all

Education for all

Internet is open and google always helps but still felt their is a lack to find the best course material or community for International Students to learn new courses and subjects that interests you. Life is no better and still lakhs of student who passes out every year have very diminished knowledge about what they study. In most part, Indian Universities and Institutions are unable to provide good Professors or teachers to students. It still continues to be like this and “Quality Education” is still far from anyone without any differences. Students are first categorized on basis of their caste, creed, grades and reservation. Economic condition of a family is always a primary concern besides all these factors.

Recently after 4 years of college education and during my visit Bay area and Stanford. I heard about Coursera, founded by Stanford computer science professors Daphne Koller and Andrew Ng ( StanfordDaily ).

About Coursera

We offer high quality courses from the top universities, for free to everyone. We currently host courses from Princeton University, Stanford University, University of California, Berkeley, University of Michigan-Ann Arbor, and University of Pennsylvania. We are changing the face of education globally, and we invite you to join us.

Then I started with more exploration and soon realized some best part of joining these courses. Mind it it’s free

  • Variety of Courses. I can study about anything and take up course of my choice e.g Algorithms, Pharmacology, Finance, Humanitics etc
  • Course taught by World’s best professors and Universities. Seriously it feels great to have access to best profs.
  • Small Video based tutorial. According to me “Small” videos are the key, as it’s easy to concentrate for shorter time and easy to watch as and when time suits you
  • Interactions with like minded people from the globe on the Discussion Forums
  • Format of the Syllabus and weekly assignment keep the clock ticking
  • Content of the course is way too good and easy to understand for anyone.

Last but not the least, now anyone from anywhere in the world can enroll and (re)study without any hesitation in his/her own time.

Heartiest thanks to the Universities and their Teachers and Professors to impart their knowledge to the world from their schedule and thanks to Coursera for providing it for free without any difference to everyone. Period

Note: This is in no way Coursera marketing but genuine feedback from a learning student 🙂

Happy Learning!

Moments, Life and Remarkability

Moments pass by as a drop of water, each one of it make Life. Moments vanishes as you start thinking of it to complete your life. But just analyze WHY? Why are we here ? What we are supposed to be?
Some good saying: Live whole-heartedly, help others, do whatever you like with passion, contribute to the miraculous deeds our ancestors had done once, never give up life will always test your patience and endurance. Is it love, lust, success we are living for? Are we going the right way? Are we destined ?

If one ever think of why Einstein, Faraday, Sachin, Gandhi..name anyone..why were they great?How come respect comes out of its own while remembering them.

  • Simple they discovered something, they were leaders, they were simply different.
  • How come they were different, they were mere humans.

Your answers started sprouting:

  • Things were easier at that time. Nah
  • Easy resources. Not possible.
  • Plenty of time to try out something new. Not sure? same 24 hours.
  • Things was unexplored, now everything is there. Same thoughts prevails over centuries.
Eight Secrets Of Life

View SlideShare presentation or Upload your own. (tags: secrets powerpoint)
It seems they did something different, impossible and remarkable. My thoughts say follow those simple guys who were remarkable, contributer and made their life worth living. Moving against the tide is never easy, but the flew, they were not different rather they were much simpler. Isn’t?
Its just that they analyzed and walked through the path their heart was leading. It was their passion and inner urge to follow their dream that made them remarkable. They never did it to be famous or for wealth, its the satisfaction they were thriving for. This is greatness.Now, lets discuss our life, we are brought up educated, equipped with all resources (most of them one don’t even need), plenty of time (exclude the time spent on cell, chat, bc and complains about life), I belief everything is more easy, approachable, just one click away thanks to Mr Tim Berners Lee. One dont have to travel years to find where India is, on boat with few crew members. Our great remarkable leaders fulfilled all the resposibilities, they did loved some one, they did married, they did whatever a common man spent time upon. So whats missing ??

Passion, Depth of thought, Direction etc
In one thought we have never thought, why are we here for? It was their remarability that made them respectable, different, famous, successful. You know Apple never fell over Newton‘s head, he was just sitting idle under apple tree and looking at calm moon and an Apple and he realized that both are of same size and yet one falls down and one never. So distance can make things look alike but something decreases and he coined the name as Gravity. Remarkable enough for the whole world.In Modern World one try to dress, talk , walk, become rich but surprisingly none of them takes to the path of remarkability other than creating differences, boundaries. Simplicity is the characterstic of being different.

I believe “Simplicity of character is the natural result of profound thought

Job vs Life

Why are we being educated?

Nursery, LKG, UKG, I, II, III, IV, V, VI, VII, VIII, IX, X, XI, XII
What Next ? …IIT, an year dropped:(, Jamia is although good. I, II, III, IV year. B.Tech Comp(uter)lete. What Next?…MS/MBA/Job?I opted for Job 🙂

Being from a middle class family, some how our society gives you an aim to get a “JOB” and work generously to rise and earn decent salaries.

And when I am very near to start with my first job, there is something within myself which is questioning is this the end (as shown by our society) or is this the beginning? Beginning as of…starting of my career, going to company everyday, work and again work. Is this what for I have been educated for so long and awaited to feel the eternal bliss of a Job, what only matters is to earn money, do i also get trapped as millions of people and loose my identity, will it provide me happiness to the rest of my life, will I be able to fulfill my dreams/ambitions within some years from now before marriage specifically.

I felt really disappointing that neither our society nor our education system taught anything in this regard. Always I tried soving Matrix/Differential/Integration problems, mugging history, solving assignments, impress my teachers, having high grade. Unfortunately, it had lead me nowhere and I completely don’t know why did I actually studied all the crap which I have already forgotten long time back and to blame myself, I never took the pain to explore beyond the psychological comfort of a job which somehow flourished in my mindset too and I completely felt a class-I guy who enters new classroom (World), and feels completely strange with no mentor this time and as understanding grows, this is stage where again I have to prove myself where millions of people are already competing to grow by hook or by crook. Remember famous dialogue from RDB: “gate k is taraf hum duniya ko nachate hai and gate k us taraf duniya hamein aur duniya ki is bheed me na jaane laakhon DJ piss gaye“,indeed very true. We are out of the gate, no step backing, now.

Don’t read if you think I’m about to give to an answer or an alternate to situation. What I mean is to understand yourself, organize your thought. Think again and again why have you really been educated? Its only your thought process that can enlighten your path to vision beyond the boundaries.

If I talk about myself, I am closely analyzing all trends of lifestyle, fashion, Gen X, Tech World, Entrepreneurs, Government, India’s “Cool” philosophy (will talk more about it later), Mobile, Internet etc., and will launch myself in the direction I’ll feel myself more aligned to unleash the mystery of life and to achieve 100 percent of my thought. This might be the reason why Americans/Japanese are leading as they walk in that platform they are actually meant for besides merely following others blindly and unknowingly getting trapped.

Remember, job in any way is a medium (not the end) to reach to your dream/ambitions and this is what you exactly need to explore and then one need to keep the SPARK alive to achieve them. Happy Beginning 🙂