Page 7 of 30 FirstFirst ... 5678917 ... LastLast
Results 61 to 70 of 297

Thread: "Hello Ubuntu" in every programming language

  1. #61
    Join Date
    Dec 2005
    Beans
    301
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: "Hello Ubuntu" in every programming language

    Assembly (using Randall Hyde's HLA)

    Code:
    program hello;
    
    
    
    #includeonce( "stdlib.hhf" )
    
    
    
    static
    
    	inputString:string;	//Storage for user supplied string
    
    
    
    begin hello;
    
    	stdout.put( "Hi! What's your name?" );
    
    	stdin.a_gets();		//Dynamically allocated storage; 1,024 char max
    
    	mov( eax,inputString );
    	stdout.put( "Hello, ",inputString,"! Welcome to Ubuntu!", nl );
    
    	strfree( inputString );	//Don't forget to free the storage when done
    
    end hello;
    --
    Where's there's smoke, There are mirrors.
    Give me Free as in Freedom not Speech or Beer.
    Thank You and Welcome to the Internet.

  2. #62
    Join Date
    Jun 2006
    Location
    CT, USA
    Beans
    5,267
    Distro
    Ubuntu 6.10 Edgy

    Re: "Hello Ubuntu" in every programming language

    HQ9+

    Well, as we say frequently, use right tool for the job. There is one language, HQ9+, optimized for just this kind of tasks.

    So here is the code for obligatory "hello, world!" program:

    Code:
    h
    Extremely straightforward! The shortest solution!

    You can find many more jewels like that here

    See: piet

  3. #63
    Join Date
    Oct 2006
    Beans
    44

    Re: "Hello Ubuntu" in every programming language

    Allow me to cheat...
    common lisp
    Code:
    (defmacro Hi!-what-is-your-name? (name)
    `(quote (Hello ,name Welcome to Ubuntu!)))
    (defmacro Hi!-what-is-your-name? jasper) => (HELLO JASPER WELCOME TO UBUNTU!)

    As i said, me is cheatin' those are symbols and not strings too

  4. #64
    Join Date
    Nov 2006
    Beans
    Hidden!

    Re: "Hello Ubuntu" in every programming language

    MSIL/CIL
    Code:
    .assembly HelloUbuntu
    {
    }
    .method public static void Main(string[] args)
    {
    	.entrypoint
    	.maxstack 2
    	ldstr "Hello, {0}! Welcome to Ubuntu!"
    	ldstr "Hi! What's your name?"
    	call void [mscorlib]System.Console::WriteLine(string)
    	call string [mscorlib]System.Console::ReadLine()
    	call void [mscorlib]System.Console::WriteLine(string, object)
    	ret
    }

  5. #65
    Join Date
    Mar 2006
    Location
    Sheffield, UK
    Beans
    322

    Re: "Hello Ubuntu" in every programming language

    LabView

    Ok folks... I hope all is well with you...
    This is the LAbView version...
    -you can see the 'True' case, the 'false' case and the execution...

    It is the windows version... but it is more important the Spirit of Ubuntu...

    cheers
    Attached Images Attached Images

  6. #66
    Join Date
    Dec 2005
    Beans
    527
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: "Hello Ubuntu" in every programming language

    I was going to try parrot, but I figured that would be pointless as it will probably never become stable.

  7. #67
    Join Date
    Jan 2007
    Beans
    139

    Re: "Hello Ubuntu" in every programming language

    Applescript

    Code:
    set yourName to text returned of (display dialog "Hi! What's your name?" default answer "")
    display dialog "Hello, " & yourName & "! Welcome to Ubuntu!"
    Last edited by Torajima; August 13th, 2008 at 10:14 PM.

  8. #68
    Join Date
    Mar 2007
    Location
    somewhere cold
    Beans
    70
    Distro
    Kubuntu 8.10 Intrepid Ibex

    Re: "Hello Ubuntu" in every programming language

    Windows Shell Script

    Code:
    @echo off
    set /P ANSWER="Please enter your name: "
    echo. 
    echo Welcome to Ubuntu, %ANSWER%
    pause
    for beer in $(ls /home/fridge); do
    drink $beer
    done

  9. #69
    Join Date
    Feb 2007
    Location
    Edinburgh, Scotland
    Beans
    391

    Re: "Hello Ubuntu" in every programming language

    Probably been done but

    LOLCODE

    Code:
    HAI
    CAN HAS STDIO?
    I HAS A FISH
    I HAS A WELCOME ITZ "HELLO" 
    I HAS A WELCOME2 ITZ ", WELCOME TO UBUNTU"
    GIMMEH FISH
    VISIBLE WELCOME
    VISIBLE FISH
    VISIBLE WELCOME2
    KTHXBYE
    Nedcode

    Code:
    ORITE
    GIES A VAR
    WHIT YOU SAYIN VAR
    HERE "HELLO".VAR."WELCOME TO UBUNTU"
    AFF
    Last edited by bobbocanfly; July 31st, 2007 at 02:13 PM.
    Today we have 15 minutes of fame, tomorrow 15 minutes of anonymity.
    My Blog | Veza - Opensource TinyURL clone with sensible URLs

  10. #70
    Join Date
    Jun 2007
    Beans
    4

    Re: "Hello Ubuntu" in every programming language

    VBA (Visual Basic for Applications)

    Running in excel...

    Code:
    Sub hello()
    Dim name As String
    name = InputBox("Hi!  What is your name?", "Hello Ubuntu", "Enter Name Here")
    MsgBox "Hello, " & name & "!  Welcome to Ubuntu!"
    
    End Sub

Page 7 of 30 FirstFirst ... 5678917 ... 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
  •