Recent Updates Toggle Comment Threads | Keyboard Shortcuts

  • yogeshwersharma 22:31 on 2013/05/03 Permalink | Reply
    Tags:   

    Some curious facts about C++ 

    I am reading and learning about C++ and rvalue references and move semantics and stuff like that. Here are some things that took me by surprise.

    Some rvalues can appear on the left side of an assignment operator. This, in hindsight, is less surprising than it looks. Let us say TClass is a class, and f() returns an object (by value) of type TClass. Then, we are used to calling f().someFunctionOnTClass() all the time. Assignment is another function called on the object, so it is like f().operator=(otherObject). It is kind of silly to call it, since the rvalue f() is temporary and changing it does not give us anything (we cannot use the changes).

    Next one is less surprising, but interesting nonetheless. Some lvalues cannot appear on the left hand side of the assignment operator. What is the example? A couple:

    • A user defined type (TClass say) that does not have operator=() defined.
    • An array.

     

     

     
  • yogeshwersharma 21:13 on 2012/10/21 Permalink | Reply
    Tags: human nature   

    We are all selfish? 

    It is somewhat of a “given fact” to assume that we all are “by nature” selfish. I am not saying that it is true or false, but I definitely contend the truth of it. Most of our behaviors are influenced by society and what we learn growing up, and societal norms are formed by our behaviors. So, there is kind of a “spiral” effect in our “nature”.

    Here are a couple example were tribes and small scale societies have lived in a culture which will seem impossible to our present day mind. How would somebody not take advantage of the situation if they were not restrained… well, because may be we don’t understand human nature just quite right!

    “If we generalize to all areas of life this power of tradition, which we now seldom feel outside matters of attire, we shall have a picture of the tradition-oriented life of tribal societies. Two things about this life are of particular interest here. The first is its phenomenal capacity to keep asocial acts check. There are tribes among the Eskimos and the Australian aborigines that do not even have words for disobedience. The second impressive thing is the spontaneous, unthinking way socialization by this means proceeds. No law are formulated with penalties attached; no plans for the moral education of children intentionally devised. Group expectations are so strong and uncompromising that the young internalize them without questions or deliberation. The Greenlanders have no  conscious program of education, nevertheless anthropologist report that their children are impressively obedient, good-natured, and ready to help. American Indians are still living who remember a time when in their regions’ social controls were entirely internal. “There were no laws then. Everybody did what was right.”

    – p 161-162 The World’s Religions by Huston Smith

     
  • yogeshwersharma 08:43 on 2012/10/21 Permalink | Reply
    Tags:   

    Suffering as Grace! 

    Suffering stinks but it is grace from the Universe! Suffering is what makes us grow immensely. Suffering prepares the ground for exercising compassion, courage, and humility. In my life at least, suffering has made me grow immensely… I will go farther and say that most spiritual (or personal) growth has come from suffering.

    Despite that, there is no way in hell that I will knowingly cause suffering to someone.

    http://login.ramdass.org/blog/2010/12/13/dealing-with-suffering-and-seeing-it-as-grace/

     
  • yogeshwersharma 22:59 on 2012/09/28 Permalink | Reply
    Tags:   

    One song a day: kisi raah mein, kisi mod par… 

    Beautiful song…

    Oh my soul-mate, don’t leave me alone on some turn on some unknown path…

    My life is meaningful only because of togetherness with you…

     
  • yogeshwersharma 23:31 on 2012/09/15 Permalink | Reply
    Tags: ,   

    One song a day: Bodyguard – teri meri meri teri prem kahani hai mushkil… 

    तेरी मेरी मेरी तेरी प्रेम कहानी है मुश्किल,
    तो लफ्जों में ये बयां ना हो पाए…

     
  • yogeshwersharma 16:36 on 2012/09/09 Permalink | Reply
    Tags: ,   

    One song a day: Hoobastank – Never There 

    And I doubt
    That I will ever find out
    If there’s a way to get out
    Of feeling all alone
    Cause lately
    I’ve been thinking
    Maybe
    That no one’s going to save me
    I’ll do it on my own…

     
  • yogeshwersharma 01:11 on 2012/09/08 Permalink | Reply
    Tags: instrumental   

     
  • yogeshwersharma 21:07 on 2012/09/06 Permalink | Reply
    Tags: ,   

    Close your eyes
    Just feel and realize
    It is real and not a dream
    I’m in you and you’re in me
    It is time
    To break the chains of life
    If you follow you will see
    What’s beyond reality

     
  • yogeshwersharma 00:32 on 2012/09/06 Permalink | Reply
    Tags: ,   

    One song a day: Dido – Life for rent 

    Well I deserve nothing more than I get
    Cos nothing I have is truly mine

    I’ve always thought
    that I would love to live by the sea
    To travel the world alone
    and live more simply
    I have no idea what’s happened to that dream
    Cos there’s really nothing left here to stop me

     
  • yogeshwersharma 02:11 on 2012/09/05 Permalink | Reply
    Tags:   

    One song a day: Damien Rice – The Blower’s Daughter 

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel
Follow

Get every new post delivered to your Inbox.