Page 20 of 30 FirstFirst ... 101819202122 ... LastLast
Results 191 to 200 of 297

Thread: "Hello Ubuntu" in every programming language

  1. #191
    Join Date
    Dec 2006
    Location
    Australia
    Beans
    1,097
    Distro
    Xubuntu 15.10 Wily Werewolf

    Re: "Hello Ubuntu" in every programming language

    Quote Originally Posted by Kadrus View Post
    I think you saw that @ digg.com..didnt you?
    Anyway..to answer your question..this thread is "Hello whats your name?",user input,"hello user and welcome to Ubuntu"..the other one is only hello world..so there is a bit of a difference..
    Yes, I wanted something slightly more involving and instructive than just ordinary Hello World.

  2. #192
    WW is offline Iced Blended Vanilla Crème Ubuntu
    Join Date
    Oct 2004
    Beans
    1,532

    Re: "Hello Ubuntu" in every programming language

    whitespace (another version)
    Code:
    ---t--t---ntn-----tt-t--tntn-----t----tntn-----t-----ntn-----t-t-tttntn-----tt-t---ntn-----tt----tntn-----ttt-t--ntn-----t--tttntn-----ttt--ttntn-----t-----ntn-----tttt--tntn-----tt-ttttntn-----ttt-t-tntn-----ttt--t-ntn-----t-----ntn-----tt-ttt-ntn-----tt----tntn-----tt-tt-tntn-----tt--t-tntn-----ttttttntn-----t-----ntn-----nn---tt--t--n-n-tnt--n-ttt---t-t-nt--tnt--tt--t---n---tnt---n-n-tt--t--nn---tt--t---n---t--t---ntn-----tt--t-tntn-----tt-tt--ntn-----tt-tt--ntn-----tt-ttttntn-----t-tt--ntn-----t-----ntn-----nn---t--t-tt--n-n-ttt-n----t-t-nt--tnt--tt--t----ntn-----tnt---n-n-t--t-tt--nn---tt--t----n-nn---t----tntn-----t-----ntn-----t-t-tttntn-----tt--t-tntn-----tt-tt--ntn-----tt---ttntn-----tt-ttttntn-----tt-tt-tntn-----tt--t-tntn-----t-----ntn-----ttt-t--ntn-----tt-ttttntn-----t-----ntn-----t-t-t-tntn-----tt---t-ntn-----ttt-t-tntn-----tt-ttt-ntn-----ttt-t--ntn-----ttt-t-tntn-----t----tntn-----t-t-ntn--nnn
    I used the tr command to convert the blanks, tabs and newlines to -, t and n, respectively. The actual version is attached (with .txt added to allow it to be attached).

    Here it is in action (using the perl implementation of whitespace 0.2):

    Code:
    $ perl whitespace.pl helloubuntu.ws 
    Hi! What's your name? WW
    Hello, WW! Welcome to Ubuntu!
    $
    Attached Files Attached Files

  3. #193
    Join Date
    May 2008
    Location
    Edinburgh, UK
    Beans
    188
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: "Hello Ubuntu" in every programming language

    It used to be possible to do this in Wordstar/Mailmerge, although the input would have to come from a file. Can anyone remember how to do it? It's just so long ago, and i'm getting old...

  4. #194
    Join Date
    Mar 2006
    Location
    Portland, Oregon
    Beans
    34
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: "Hello Ubuntu" in every programming language

    I haven't seen a FORTH version in this thread, so here's one:

    Code:
    ( Welcome to Ubuntu in FORTH )
    : input pad 1+ 127 accept pad c! pad ;
    : getname ." Hi, what is your name? " input ;
    : welcome cr getname cr ." Hello " count type ." ! Welcome to Ubuntu!" ;
    I ran this using gforth from the ubuntu repositories.

  5. #195
    Join Date
    Apr 2006
    Beans
    1,030
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: "Hello Ubuntu" in every programming language

    COBOL !

    Code:
          $ SET SOURCEFORMAT"FREE"
    IDENTIFICATION DIVISION.
    PROGRAM-ID.  HelloWelcomeToUbuntu
    AUTHOR.  Mike Hibbert.
    
    DATA DIVISION.
    WORKING-STORAGE SECTION.
    01 UserDetails.
       02  Name       PIC X(20)
    
    PROCEDURE DIVISION.
    Begin.
        DISPLAY "Enter Your Name".
        ACCEPT  UserDetails.
        DISPLAY "Hello " Name.
        DISPLAY "Welcome to Ubuntu".
        STOP RUN.
    This Makes good bedtime reading

    Mike
    Last edited by Mickeysofine1972; May 26th, 2008 at 04:49 PM.

  6. #196
    Join Date
    Apr 2007
    Location
    Germany
    Beans
    239
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: "Hello Ubuntu" in every programming language

    PIET

    The small image is the actual program, i attached a big one to enjoy
    edit2: imageshack converted the .bmp to .png I added the original picture as attachment





    Piet
    I used Hipi (Hipi Is a Piet Interpreter) to make the program
    edit: I needed to do it in Windows, Hipi didnt run good even with wine 1.0rc.

    Its like assembler, just worse. I couldnt just modify the "hello world" program but had to code "Hello, Ubuntu!" myself.
    Its my first Piet program, so excuse my bad programming style
    Attached Images Attached Images
    Last edited by conehead77; May 24th, 2008 at 07:23 PM.
    NEVER use a command given to you before asking and knowing exactly what it does. Make sure you know what it is that you're telling your system to do before doing it; some commands can be very harmful to your system or leave you vulnerable to attack.

  7. #197
    Join Date
    May 2008
    Location
    Netherlands, Groningen
    Beans
    18
    Distro
    Ubuntu Studio 8.10 Intrepid Ibex

    Re: "Hello Ubuntu" in every programming language

    Quote Originally Posted by Note360 View Post
    C

    runningwithscissors came up with a better one. So here it is.
    Code:
    #include <stdio.h>
    
    int main()
    {
            char name[64];
            printf("Hi! What's your name? ");
            scanf("%s", &name);
            printf("Hello, %s! Welcome to Ubuntu (GNU)/Linux!\n", &name);
    
            return 0;
    }
    That is my really bad C one. Please criticize me via PM if you feel the need.
    Small mistake: you used
    Code:
    &name
    for the string to print, but that is incorrect, as it takes the adress-of the string array, not the array itself. So it needs to read:
    Code:
    #include <stdio.h>
    
    int main()
    {
            char name[64];
            printf("Hi! What's your name? ");
            scanf("%s", name);
            printf("Hello, %s! Welcome to Ubuntu (GNU)/Linux!\n", name);
    
            return 0;
    }
    (or alternatively: &name[0])
    Last edited by robheus; May 25th, 2008 at 08:40 AM.

  8. #198
    Join Date
    May 2008
    Location
    Netherlands, Groningen
    Beans
    18
    Distro
    Ubuntu Studio 8.10 Intrepid Ibex

    Re: "Hello Ubuntu" in every programming language

    Quote Originally Posted by Mickeysofine1972 View Post
    COBOL !

    Code:
          $ SET SOURCEFORMAT"FREE"
    IDENTIFICATION DIVISION.
    PROGRAM-ID.  HelloWelcomeToUbuntu
    AUTHOR.  Mike Hibbert.
    
    DATA DIVISION.
    WORKING-STORAGE SECTION.
    01 UserDetails.
       02  Name       PIC 9(7)
    
    PROCEDURE DIVISION.
    Begin.
        DISPLAY "Enter Your Name".
        ACCEPT  UserDetails.
        DISPLAY "Hello " Name.
        DISPLAY "Welcome to Ubuntu".
        STOP RUN.
    This Makes good bedtime reading

    Mike
    If I am not mistaken (not been coding Cobol in years) the PIC 9(7) format is a decimal format, not alphanum. Need to supply PIC X(20) or so (7 chars is a bit short).

  9. #199
    Join Date
    Apr 2006
    Beans
    1,030
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: "Hello Ubuntu" in every programming language

    Quote Originally Posted by robheus View Post
    If I am not mistaken (not been coding Cobol in years) the PIC 9(7) format is a decimal format, not alphanum. Need to supply PIC X(20) or so (7 chars is a bit short).
    Indeed, I dont suppose I was thinking to seriously about it at the time LMAO!

    Mike

  10. #200
    Join Date
    Aug 2007
    Location
    Manchester, UK
    Beans
    10,285
    Distro
    Ubuntu

    Re: "Hello Ubuntu" in every programming language

    How about LOLCODE?

    I'm sure it'd be something like
    Code:
    HAI
    CAN HAS STDIO
    MAEK NAME
    
    VISIBLE "Hello, What's your name? "
    GET NAME
    VISIBLE "Oh Hai! " NAME " Welcome to Ubuntu GNU/Linux!1"
    
    KTHXBYE

Page 20 of 30 FirstFirst ... 101819202122 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •