Whos going to attempt to write this in whitespace?
Whos going to attempt to write this in whitespace?
Whos going to attempt to write this in 1's and 0's?
Who is gogin to try and do the Ook version?
CGI using python
hellocgi.py
helloform.htmCode:#!/usr/bin/env python import cgi form = cgi.FieldStorage() print "Content-Type: text/html" print print print "<html><head><title>Hello World CGI</title></head>" print "<body><b>Hello " + form["name"].value + ". Welcome to Ubuntu!</b></body></html>"
HTML Code:<html> <head> <title>Hello World form</title> </head> <body> <form name="input" action="hellocgi.py" method="post"> What is your name? <input type="text" name="name"> <input type="submit" value="Submit"> </body> </html>
Brainf**k
Code:>+++++[<+++++++++++++>-]< //Set first byte to 'A' >+++++[<++++>-]<++. //print 'W' >+++[<----->-]<. //print 'H' -------. //print 'A' >++++[<+++++>-]<-. //print 'T' -. //print 'S' >+++++[<---------->-]<-. //print ' ' >+++++[<++++++++++>-]<+++++++. //print 'Y' ----------. //print 'O' ++++++. //print 'U' ---. //print 'R' >+++++[<---------->-]<. //print ' ' >++++[<++++++++++>-]<++++++. //print 'N' -------------. //print 'A' ++++++++++++. //print 'M' --------. //print 'E' ------. //print '?' ++ //set first byte back to 'A' >>,>,>,>,>,<<<<<< //grab input into next 5 bytes +++++++. //print 'H' ---. //print 'E' +++++++.. //print 'L' 'L' +++. //print 'O' >++++[<---------->-]<-------. //print ' ' >>.>.>.>.>.> //print the 5 input characters
Last edited by Wugglz; July 12th, 2007 at 12:12 AM. Reason: Added more to brainf**k one
Java with the newer Scanner class:
(Who says java's always too long?)Code:import java.util.Scanner; public class NameThing{ public static void main(String[] args){ System.out.println("Hi! What's your name?"); System.out.println("Hello, "+new Scanner(System.in).next()+"! Welcome to Ubuntu!"); } }
Bash Using zenity
Code:#!/bin/bash name=$(zenity --entry --title="Hello Ubuntu" --text="What is your name?") while [ -z $name ]; do zenity --error --title="No name entered" --text="Please enter your name into the box" name=$(zenity --entry --title="Hello Ubuntu" --text="What is your name?") done zenity --info --title="Hello Ubuntu" --text="Hello $name! Welcome to Ubuntu!"
Boo
Code:print "Hello! What is your name?" name = System.Console.ReadLine() print "Hello, ${name}! Welcome to Ubuntu!"
Whitespace
Tabs are heck to typeCode:...
Gambas Console Program
Code:' Gambas class file STATIC PUBLIC SUB Main() DIM sName AS String PRINT "Hi! What's you name?" INPUT sName PRINT "Hello " & sName & "! Welcome to Ubuntu!" END
41 languages and variations so far. Keep rolling them out!
Bookmarks