Page 17 of 30 FirstFirst ... 7151617181927 ... LastLast
Results 161 to 170 of 297

Thread: "Hello Ubuntu" in every programming language

  1. #161
    Join Date
    Jan 2008
    Location
    Raytown, MO
    Beans
    460
    Distro
    Ubuntu 8.04 Hardy Heron

    Wink Re: "Hello Ubuntu" in every programming language

    Wish

    (tcl/tk)

    This script should would with every version of tcl/tk from 8.0
    to the current, just released 8.5.0

    There is nothing wrong with the earlier Tcl version in this
    thread. Just wanted to add a little Tk.

    Current practice would be to run with tclsh, and a first line
    "package require Tk", however, the script as written will
    work with older installations. The script could be simpler still,
    and utilize only one toplevel widget, but, I kinda like it this way

    Code:
    #! /usr/bin/wish
    
    wm withdraw .
    wm title . "Welcome!"
    
    toplevel .t
    wm withdraw .t
    
    wm title .t "Sign in Please!"
    
    label .t.l -text "Please enter your name: "
    entry .t.e -textvariable name
    
    grid .t.l .t.e
    
    wm deiconify .t
    
    bind .t.e <Return> myproc
    
    proc myproc { } {
    wm deiconify .
    }
    
    label .l -text "Welcome to Ubuntu"
    label .l2 -textvariable name
    
    button .b -text "Exit" -command {exit}
    
    grid .l .l2
    grid .b -columnspan 2
    Hope someone finds it interesting.

    Steve

  2. #162
    Join Date
    Apr 2007
    Beans
    2,042

    Re: "Hello Ubuntu" in every programming language

    Quote Originally Posted by mike_g View Post
    Blitz Basic
    Code:
    s$=Input("Hi! Whats your name? ")
    Print "Hello "+s$+"! Welcome to Ubuntu!"
    WaitKey
    That's the stuff

  3. #163
    Join Date
    Dec 2006
    Beans
    Hidden!

    Re: "Hello Ubuntu" in every programming language

    VIM

    Code:
    :r! echo $USERNAME
    :s/^/Hello,/ 
    :s/$/. Welcome to Ubuntu!/
    :write
    :quit
    Save this in a file called file.vim and run it like this :
    Code:
    vim -es output < file.vim
    Then, have a look at the output file !

    Also :
    Code:
    map ,M <Esc>aHello,<Esc>:r! whoami<cr>A. Welcome to ubuntu!<Esc>kJ
    Last edited by yannick_LM; February 12th, 2008 at 01:51 AM.

  4. #164
    Join Date
    Nov 2006
    Beans
    153

    Re: "Hello Ubuntu" in every programming language

    Another 64 bit assembly written for yasm:

    Code:
    section .data
        string1 db  "Hello World!",10,0
    
    section .text
        global _start
    
        _start:
            mov     rdi, dword string1
            mov     rcx, dword -1
            xor     al,al
            cld
            repnz scasb
    
            mov     rdx, dword -2
            sub     rdx, rcx
    
            mov     rsi, dword string1
            push    0x1
            pop     rax
            mov     rdi,rax
            syscall
    
            xor     rdi,rdi
            push    0x3c
            pop     rax
            syscall

  5. #165
    Join Date
    Feb 2008
    Beans
    38

    Re: "Hello Ubuntu" in every programming language

    Quote Originally Posted by happysmileman View Post
    I'm poretty sure that should be longer, I think it didn't send properly but I tried a few times, maybe Opera is at fault?
    Hey, don't knock my darling! I've used Opera since 1999 and never had any such trouble. Up until Opera 9.2 there were still 1 or 2 banking/secure pages that wouldn't work, but now I only use Firefox for the webdesign plugins. Opera is soo fast and sexy...

    Far more likely a server/php/isp hiccup. Maybe the editor doesn't like huge chunks of digits with no spaces.

    Back on topic: Is there a Boo vs Python comparison somewhere? Python reminds me a bit of Lingo, especially the variable handling.

    Also, not that I think x86 mnemonics even remotely appeal to my tastes, I would think it only in order to make a proper OS API, libraries and one or two macros to call those functions. Then asm would be like any other language, only running at each machine's true potential, and the choice would be truly free.

    Or maybe there is such an option in Linux - could someone show in this thread how that would look?
    Last edited by maximilion; February 12th, 2008 at 10:53 PM.
    Maximilion loves Opera!
    - webdesign, programming, 3d
    - grinding my first Linux beans and dreaming
    [Xubuntu 8.10.4 on [Opteron 165,2GB,GF6800,Dell 27"]

  6. #166
    Join Date
    Feb 2008
    Beans
    38

    Re: "Hello Ubuntu" in every programming language

    Moderators: please remove this. Accidental double post. Sorry about that.
    Last edited by maximilion; February 12th, 2008 at 10:53 PM.
    Maximilion loves Opera!
    - webdesign, programming, 3d
    - grinding my first Linux beans and dreaming
    [Xubuntu 8.10.4 on [Opteron 165,2GB,GF6800,Dell 27"]

  7. #167
    Join Date
    Aug 2006
    Location
    Pittsburgh, PA
    Beans
    424
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: "Hello Ubuntu" in every programming language

    Scheme

    Been about 2 years since I wrote scheme, so I relearned the basics to write this programs. Improvements welcome.

    (define message "Welcome to Ubuntu, ")

    (begin
    (display "What is your name?: ")
    (let ((name (read)))
    (display
    (string-append message (symbol->string name))
    )
    )
    )
    Always seemed like a weird yet strangely cool language. I have almost totally forgotten it....

    *Edit: the tabs got all messed up in posting. Have fun sorting out all those parens without indentation....

  8. #168
    Join Date
    Oct 2007
    Location
    UK
    Beans
    484
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: "Hello Ubuntu" in every programming language

    Excel / OpenOffice Spreadsheet Formula:

    ="Hello " & A1 & ", welcome to Ubuntu!"
    (Where A1 is the cell with the name in it)

    Quick JavaScript:

    alert('Hello ' + prompt('Please enter your name', '') + ', welcome to Ubuntu!');
    Perl style Regular Expression:

    s/Name:\s+([a-zA-Z0-9 -]+)/Hello $1, welcome to Ubuntu!/
    Format accepted is 'Name:' followed by one or more spaces, followed by your name.
    Lucid Beta 2 powered Studio 15 (Core 2 Duo 2.0GHz, 3 GB RAM, HD 3450) & Windows XP powered Scaleo E (Celeron D 3.06GHz, 1.5GB RAM, Intel GMA 915G). Please see Ubuntu Tutorials (my YouTube channel).

  9. #169
    Join Date
    Feb 2008
    Location
    readlink("/proc/self/exe"
    Beans
    1,120
    Distro
    Ubuntu Development Release

    Arrow Re: "Hello Ubuntu" in every programming language

    Shellcode is still missing

  10. #170
    Join Date
    Aug 2005
    Location
    Sweden
    Beans
    407

    Re: "Hello Ubuntu" in every programming language

    Code:
    #!/bin/bash
    echo Hello World
    then
    Don't peach linux. Melon it!

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