Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Examples: Monday, today, last week, Mar 26, 3/26/04
Welcome home! Please contact lincoln@icrontic.com if you have any difficulty logging in or using the site. New registrations must be manually approved which may take several days. Can't log in? Try clearing your browser's cookies.

"I Want Happiness"

ToraldrisToraldris   -`-,-{@     Zen Nud... Buddhist     @}-,-`-  East Coast, USA Veteran
edited May 2014 in General Banter

image

Ran across this image I saved on my hard drive, and thought I'd mess around since I've been learning Java programming. This is just a little thing I threw together for apparently NO good reason:

/* Nothing fancy, just named it Happiness.java... (Aldris Torvalds) */

class Man {

private String text;

public String getText() { return this.text; }

public void setText(String input) { this.text = input; }

public Man() { this.text = ""; }

}

public class Happiness {

public static void main(String[] args) {

    Man johnDoe = new Man();

    // A man once told The Buddha "I Want Happiness".

    johnDoe.setText("I Want Happiness");
    System.out.println(johnDoe.getText());

    // The Buddha replied, "First remove 'I', that's ego."

    johnDoe.setText(johnDoe.getText().replace("I ", ""));
    System.out.println(johnDoe.getText());

    // "Then remove 'want', that's desire."

    johnDoe.setText(johnDoe.getText().replace("Want ", ""));

    // "And now all you're left with is Happiness."
    System.out.println(johnDoe.getText());
}

}

Buddhadragonpommesetorangesmmo

Comments

  • misecmisc1misecmisc1 I am a Hindu India Veteran

    But the question arises - if there is no 'I' in the end, then whether in the end remains happiness or sadness, what difference does it make - after all, there is no 'I' in the end to be happy with happiness or to be sad with sadness?

  • federicafederica Seeker of the clear blue sky... Its better to remain silent and be thought a fool, than to speak out and remove all doubt Moderator

    Reside in a blissful state no matter what.

    Buddhadragonshanyin
  • BuddhadragonBuddhadragon Ehipassiko & Carpe Diem Samsara Veteran

    We look for happiness in all the wrong places, aka outside, and fail to realize that we are already happiness.

    poptartJeffreymmo
  • ToraldrisToraldris   -`-,-{@     Zen Nud... Buddhist     @}-,-`-   East Coast, USA Veteran
    edited May 2014

    @misecmisc1 said:
    But the question arises - if there is no 'I' in the end, then whether in the end remains happiness or sadness, what difference does it make - after all, there is no 'I' in the end to be happy with happiness or to be sad with sadness?

    That doesn't seem to be the question. All this "I" stuff is just metaphysical mumbo-jumbo. The fact is that there's suffering... that much we've agreed upon or we wouldn't be here... and the question is "can that suffering be alleviated?". And, again, I think we've agreed on the answer!

    Buddhadragon
  • anatamananataman Who needs a title? Where am I? Veteran

    You already have it...

    wangchuey
  • federicafederica Seeker of the clear blue sky... Its better to remain silent and be thought a fool, than to speak out and remove all doubt Moderator

    Light switch.

  • lobsterlobster Veteran

    Bravo on the coding. I hope this won't make you unhappy but I think that may be a pseudo quote outside the official dogma. Not that it matters.

    An easy thing to do with programming is similar to cyber prayer wheels. For example the java equivalent of this in BASIC:

    10: PRINT 'OM MANI PEME HUM'

    20: GOTO 10

    . . . who said GOTO is bad programming style . . . pah! ;)

    . . . m m m I have a JavaScript (not the same as Java) implementation on my ipad . . . I have a use for it . . . H a p p i n e s s here comes Nothing . . .

  • ToraldrisToraldris   -`-,-{@     Zen Nud... Buddhist     @}-,-`-   East Coast, USA Veteran
    edited May 2014

    @lobster Like the Buddha said: "don't believe everything you read on the internet". I just thought it was a good quote! =) The coding is really simple/basic, the kinda stuff you'd know after reading a couple chapters in a beginner's Java programming book (which happens to be exactly what I've done, HA!). All it does is create a "Man" object, assign to it the text "I Want Happiness" (and print), and then modify the string in the same order the "Buddha" advises, printing out the new value each time.

    This is the simple output of the compiled/run program:

    I Want Happiness

    Want Happiness

    Happiness

    Here's a couple useful resources:

    Learn Java -- https://www.udacity.com/course/cs046

    Learn JavaScript -- http://www.codecademy.com/tracks/javascript

  • lobsterlobster Veteran
    edited May 2014

    @AldrisTorvalds‌ understood :)

    wrote, well modified some code, however not able to test without an FTP Account or maybe when I use my real computer.

    Here is my untested web page, with code . . . theoretically should print mantra 108 times

    <!DOCTYPE html>



    <

    script>
    while (i<109)
    {
    x=x + "OM MANI PEME HUM" + i + "
    ";
    i++;
    }

  • federicafederica Seeker of the clear blue sky... Its better to remain silent and be thought a fool, than to speak out and remove all doubt Moderator

    (I'm in a fog again.... said the world's worst techno-fudge-wit....and then some...)

    Toraldris
  • ToraldrisToraldris   -`-,-{@     Zen Nud... Buddhist     @}-,-`-   East Coast, USA Veteran

    @federica I'm so sorry I'll probably be putting you in the fog a lot, ever since I started learning programming I've just fallen in love with it. This surely won't be the only general banter post where I throw up some code, and then other people throw code in too!

  • ToraldrisToraldris   -`-,-{@     Zen Nud... Buddhist     @}-,-`-   East Coast, USA Veteran
    edited May 2014

    @lobster I basically would do this for the same effect, though I'm not far along in my JavaScript:


    <script>
    var i = 0;
    while(i < 109) { document.write("OM MANI PEME HUM<br>"); i += 1; }
    </script>

    I'm not even far enough in my JavaScript to know that var++ works to increment the same as in C++! I'll be concentrating more on Java so I may never finish the JavaScript stuff. :)

  • lobsterlobster Veteran

    apologies to federica . . . this is what 'dharma dogma' sounds like to beginners . . .

    @AldrisTorvalds‌ I tried to use the Markdown button and used the code display option but did not work/display too well . . . we needs help from our resident vanilla forum coder . . .

    Will load a Linux machine and see if my code and yours works later. I am sure yours does.

    I am a lousy programmer but love programming. Strange eh. Ah of course, we can provide as pic - not ideal as no access to text . . . even so . . . enclosed code within HTML

  • ToraldrisToraldris   -`-,-{@     Zen Nud... Buddhist     @}-,-`-   East Coast, USA Veteran
    edited May 2014

    @lobster I tested mine by throwing it in an HTML file (tried testing yours, but something didn't work, EDIT: fixed in next post!).

    When you need to show greater-than and less-than signs to show up right when you post code (<code> btw), I found that you need to use "&lt" and "&gt" each followed by a semicolon to do it. Thank goodness for Google, that's all I can say.

    Also found out all you need is the <html> at the beginning and </html> at the end (and of course the script tags), without all the head/title/body stuff or even the DOCTYPE thing, and it still works.

    So something simple like this would work:

    <html>
    <script>
    document.write("Hello World!");
    </script>
    </html>

  • ToraldrisToraldris   -`-,-{@     Zen Nud... Buddhist     @}-,-`-   East Coast, USA Veteran
    edited May 2014

    @lobster Managed to get your code working, with a couple fixes.

    First declare and initialize your variables before the loop:

    var i = 0;
    var x = "";

    Then print after the loop:

    document.write(x);

    ...and this is your output:

    OM MANI PEME HUM0

    OM MANI PEME HUM1

    OM MANI PEME HUM2

    OM MANI PEME HUM3

    OM MANI PEME HUM4

    OM MANI PEME HUM5

    OM MANI PEME HUM6

    OM MANI PEME HUM7

    OM MANI PEME HUM8

    OM MANI PEME HUM9

    OM MANI PEME HUM10

    OM MANI PEME HUM11

    OM MANI PEME HUM12

    OM MANI PEME HUM13

    OM MANI PEME HUM14

    OM MANI PEME HUM15

    (removed for brevity, you're welcome)

    OM MANI PEME HUM100

    OM MANI PEME HUM101

    OM MANI PEME HUM102

    OM MANI PEME HUM103

    OM MANI PEME HUM104

    OM MANI PEME HUM105

    OM MANI PEME HUM106

    OM MANI PEME HUM107

    OM MANI PEME HUM108

  • lobsterlobster Veteran

    you are ahead of me, the inability to just add text without modifying code was too much.
    I got the code working a different way, part of which might display below.

    Many thanks



    var i=1 while (i<=108) { document.write("OM MANI PEME HUM may all at NewBuddhisst Be Well and Happy" + i) document.write("<br />") i=i+1 }



  • federicafederica Seeker of the clear blue sky... Its better to remain silent and be thought a fool, than to speak out and remove all doubt Moderator

    Well Java-loop this, smart-ass;

    phukk off.

    (I'm kidding. :p...)

  • nice work on the coding. Personnaly i found that quote a bit quizicle. To remove 'want' seems obvious because wanting something doesn't necessarily bring the deep satisfaction of having something. And only makes sure that the person finds himself in a constant spiral of greed and wanting. But removing the 'I'...if you remove that how can you speak of happiness on your person if your let go of the idea of a self, then how are you happy if there is no you anymore? Are you 'happiness' embodied? is that what it means, and you shine happiness outwards without knowing that you actually are happy?

    of couse i understand to let go of the 'want' you need to let go of the 'i', but it would seem if you let go of the 'i'. How or when can you say: I am happy? :)

  • ToraldrisToraldris   -`-,-{@     Zen Nud... Buddhist     @}-,-`-   East Coast, USA Veteran

    @Cobaltsword‌ It means letting go of the false conception of "I", obviously "you" (whatever you are) would still exist. I don't know why people get all metaphysical about it and turn it into paradoxes... ;) Maybe people just need longer exposure to Buddhist ideas before it clicks for everyone.

  • @AldrisTorvalds said:
    Cobaltsword‌ It means letting go of the false conception of "I", obviously "you" (whatever you are) would still exist. I don't know why people get all metaphysical about it and turn it into paradoxes... ;) Maybe people just need longer exposure to Buddhist ideas before it clicks for everyone.

    Fair enough. Maybe it's just me overthinking stuff like this. Perhaps i do need to delve more into buddhism before it clicks ^^ that's what i'm here for.

  • ToraldrisToraldris   -`-,-{@     Zen Nud... Buddhist     @}-,-`-   East Coast, USA Veteran
    edited May 2014

    @lobster You can compress it even further by including the increment as an "i++" while concatenating the strings, and also add the line-break.

    <html>
    <source>
    var i=1;
    while(i<=108) {document.write(i++ +" OM MANI PEME HUM may all at NewBuddhist Be Well and Happy<br>");
    </source>
    </html>

    It ain't exactly pretty, but it works! Here's the output:

    1 OM MANI PEME HUM may all at NewBuddhist Be Well and Happy

    2 OM MANI PEME HUM may all at NewBuddhist Be Well and Happy

    3 OM MANI PEME HUM may all at NewBuddhist Be Well and Happy

    4 OM MANI PEME HUM may all at NewBuddhist Be Well and Happy

    5 OM MANI PEME HUM may all at NewBuddhist Be Well and Happy

    etc.

    Oooor you could make it a countdown, and get rid of one of the numbers entirely, by changing those two lines:

    var i=108;
    while(i>0) {document.write(i-- +" OM MANI PEME HUM may all at NewBuddhist Be Well and Happy<br>");}

    Which would give you:

    108 OM MANI PEME HUM may all at NewBuddhist Be Well and Happy

    107 OM MANI PEME HUM may all at NewBuddhist Be Well and Happy

    106 OM MANI PEME HUM may all at NewBuddhist Be Well and Happy

    105 OM MANI PEME HUM may all at NewBuddhist Be Well and Happy

    104 OM MANI PEME HUM may all at NewBuddhist Be Well and Happy

    103 OM MANI PEME HUM may all at NewBuddhist Be Well and Happy

    etc.

    ANYWAY, I'M GOING TO SLEEP NOW! GOOD NIGHT NB AND @lobster‌!

    lobster
  • federicafederica Seeker of the clear blue sky... Its better to remain silent and be thought a fool, than to speak out and remove all doubt Moderator

    @Cobaltsword, There's a concept of duality....
    Some people refer to it as Self/Not-Self.

    The simplest way I can explain it, is for you to look at your armchair.

    What is it?

    Well, it's a damn armchair, of course.

    Ok. carefully remove the cover/fabric.

    Put it on the floor.

    There may be a second layer of fabric, known as ticking. This is to contain all the stuffing.

    Remove that, and put it on the floor.

    Now, carry on, removing each component of the arm chair until you have several piles of different materials; floral cover, ticking, stuffing, springs, and every different piece of the wooden frame.

    Now?

    Jumble them all up together into a mess, in your huge, giant sized blender.

    Tip the mixture out.

    Is it still an armchair?

    No.

    All the components are still there.
    But even though you can identify wood, stuffing, ticking... they're all separate entities....

    So it is with you.

    You are your 'Self'.

    But you're also not-self.

    If (heaven forbid) you lose an arm in an accident - are you any the less 'Cobaltsword'...?

    Ok, hopefully we've scratched the surface there, but there's more depth to it than that. (Of course there is, you didn't really think it would be that simple, do you?? There's also the matter of the separate senses, how they interact, what 'arises' first, and so on. Don't worry about that for now....!)

    There's also the minor matter of 'Co-Dependent Arising, or Dependent Origination.

    Put very simply, it's a question asked in Zen (called a Koan):

    "If a tree falls in a forest, and there is no-one there to witness it, does it still make a noise?"

    This is a question some might interpret as a teaching of Dependent Origination.

    For something to be evident, there has to be someone there to see the evidence.

    It cannot 'be' unless you make it 'be'. And if you do not make it 'be', then it isn't.

    This is particularly good when wondering how emotions can arise and overwhelm 'you'. (You generic, not you specific).

    If you feel anger, do not permit anger to arise, if you refuse to be present to the anger.

    Maybe that's labouring the point....

    Cobaltsword
  • misecmisc1misecmisc1 I am a Hindu India Veteran
    edited May 2014

    my thinking says: when 'I' is gone, then other is gone, so samsara is gone, so nirvana is also gone - what is there left can't be said, because to say something, needs 'I' at the first place.

  • lobsterlobster Veteran

    @AldrisTorvalds many thanks for code improvements.

    You seem to have the programming bug :)
    I have booted up Puppy Linux to play with the code a little :)

  • CittaCitta Veteran

    @AldrisTorvalds said:
    image

    Ran across this image I saved on my hard drive, and thought I'd mess around since I've been learning Java programming. This is just a little thing I threw together for apparently NO good reason:

    /* Nothing fancy, just named it Happiness.java... (Aldris Torvalds) */

    class Man {

    private String text;
    
    public String getText() { return this.text; }
    
    public void setText(String input) { this.text = input; }
    
    public Man() { this.text = ""; }
    

    }

    public class Happiness {

    public static void main(String[] args) {
    
        Man johnDoe = new Man();
    
        // A man once told The Buddha "I Want Happiness".
    
        johnDoe.setText("I Want Happiness");
        System.out.println(johnDoe.getText());
    
        // The Buddha replied, "First remove 'I', that's ego."
    
        johnDoe.setText(johnDoe.getText().replace("I ", ""));
        System.out.println(johnDoe.getText());
    
        // "Then remove 'want', that's desire."
    
        johnDoe.setText(johnDoe.getText().replace("Want ", ""));
    
        // "And now all you're left with is Happiness."
        System.out.println(johnDoe.getText());
    }
    

    }

    I am unable to comment re Java script @ArvisTorvalds..but I guarantee you 100% that those words attributed to the Buddha are completely bogus.

  • How do you view those codes? Nice quote.. I question the author though.

  • ToraldrisToraldris   -`-,-{@     Zen Nud... Buddhist     @}-,-`-   East Coast, USA Veteran
    edited May 2014

    @Citta Of course they are, as I've said earlier in the thread. It's the content that I found useful, not the author (and it hardly matters if someone did say the Buddha said it... every single Buddhist tradition says their texts came from the Buddha, no matter how varied).

    Also that's not JavaScript (the bits that @lobster and I were working on were... but the initial program is just Java). You'd need the Java Development Kit installed (and added to your PATH) in order to put that text in "Happiness.java", compile with "javac Happiness.java", and run with "java Happiness", which is a lot of work to go to since all the program does is print these three lines:

    I Want Happiness

    Want Happiness

    Happiness

    It's the internal process of removing "I" and then "Want" that was following along with the meme.

    If I had uploaded Man.class and Happiness.class, the compiled "bytecode" files, you could've put them in a directory and run (java Happiness), since most computers have Java already installed (just not the JDK for compiling).

  • ToraldrisToraldris   -`-,-{@     Zen Nud... Buddhist     @}-,-`-   East Coast, USA Veteran
    edited May 2014

    @wangchuey It would be a bit of trouble for no appreciable return (see above post). However if you wanted to learn Java programming, then it might be worth getting the JDK and also following one of the links I provided earlier in this discussion...

    Here's where to download the Java Development Kit (currently 8u55): http://www.oracle.com/technetwork/java/javase/downloads/index.html?ssSourceSiteId=otnjp


    Optionally at the same site, you can get JDK bundled with "NetBeans", a popular IDE/GUI that helps you write, compile and test more efficiently.


    Elsewhere, you can get the JDK bundled with "BlueJ", a more beginner-friendly IDE that goes along with the Java programming course from my earlier post: http://www.bluej.org/


    I don't know much about it, but there's also a program called "Greenfoot" that might make learning Java even easier for anyone completely new to programming (it's a graphical approach): http://www.greenfoot.org/overview

  • ToraldrisToraldris   -`-,-{@     Zen Nud... Buddhist     @}-,-`-   East Coast, USA Veteran
    edited May 2014

    @lobster said:
    AldrisTorvalds many thanks for code improvements.

    You seem to have the programming bug :)
    I have booted up Puppy Linux to play with the code a little :)

    You're welcome. Yeah I do seem to have the bug...

  • howhow Veteran Veteran
    edited May 2014

    "I Want Happiness"

    @AldrisTorvalds

    A small submission from Howard's heresies.

    I think** wanting** happiness is either an oxymoron or the evidence of how different each of our definitions of happiness probably are.

    Because In my world where I have yet to see a "want" that doesn't eventually feed sufferings cause, real happiness is better defined as the transcendence of wants.

    I think that the teachers who recommend the fostering of a "want" towards happiness are really offering comfort & hope in the place of happiness..

    lobster
  • ToraldrisToraldris   -`-,-{@     Zen Nud... Buddhist     @}-,-`-   East Coast, USA Veteran
    edited May 2014

    @how Or more simply, the wanting itself is the cause of unhappiness. A void to be filled. Happiness is the state of temporarily filling that void... but it never lasts. So happiness, thus defined, isn't the solution. That's where the Four Noble Truths come in. :) We turn our mind's eye to the real problem, desire/thirst, and see why it keeps pestering us and making us feel unfulfilled and frustrated with life. There's nothing wrong with life, only how we respond to it.

    lobsterBuddhadragon
  • @AldrisTorvalds Thank for all that info, and the links..

    metta

  • lobsterlobster Veteran

    xx you guys

    I think I am being reprogrammed . . .

  • JeffreyJeffrey Veteran
    edited May 2014

    The I is not the skhandas and it is ungraspable. It is mirror like awareness where everything appears in it without affecting the mirror.

    The yoga cara has 8 level of consiousness. The six senses including mind. That is traditional of the early Buddhism.

    The 7th level is the manos consciousness and it causes all the problems with the constructed I.

    The 8th level I think is what is reborn and it is the seeds from which all beings arise.

    The 7th level is transformed during practice. The 7th level does not disappear rather it is transformed into something else.

    Ok now time to make a video game of Buddhism.. "Level Up" "more powers :) "

Sign In or Register to comment.