.text
.section .rodata
.LC0:
.string "Hello, world!\n"
.text
.globl main
.type main, @function
main:
.LFB0:
pushq %rbp
movq %rsp, %rbp
subq $16, %rsp
movl %edi, -4(%rbp)
movq %rsi, -16(%rbp)
movl $14, %edx
leaq .LC0(%rip), %rax
movq %rax, %rsi
movl $1, %edi
call write@PLT
movl $0, %eax
leave
ret
Br*****ck
X86 Assembly?
This one has already been shown, but may I add a convoluted version for fun?
DeskCalc &
msg="Hello World!"
sleep 2
hey DeskCalc let Window 0 do 'okmc'
hey DeskCalc set Title of Window 0 to "$msg"
hey DeskCalc set Text '[0' to $(hey DeskCalc count Text of View "expression text view" of Window 0 | sed -n 's/.*result.*:\s*\([0-9]\+\).*/\1/p')']' of View "expression text view" of Window 0 to ""
hey DeskCalc set Text '[0' to "${#msg}]" of View "expression text view" of Window 0 to "$msg"
Well, in SNOBOL:
OUTPUT = "Hello World!"
if you change it to
print ("Hello World\n")
it runs in at least 2 scripting languages available by default on Haiku ![]()
do_some_magick() {
if ! command -v magick &> /dev/null; then
echo "Error: ImageMagick Tool (magick) is not installed."
echo "Try running: pkgman install imagemagick_tools"
else
enc() {
echo "12345" > /tmp/passphrase
magick -size 550x75 canvas:none -font "/boot/system/data/fonts/psfonts/bchb.pfb" \
-pointsize 75 -draw "text 25,60 '$var'" \
-channel RGBA -blur 0x6 -fill yellow -stroke black -draw "text 30,55 '$var'" \
-depth 8 -type TrueColor miff:- | \
magick miff:- -encipher /tmp/passphrase -depth 8 -type TrueColor png:/tmp/enc.png
stored_img_base64=$(base64 -w 0 /tmp/enc.png)
echo "Opening ENCRYPTED window..."
open /tmp/enc.png
}
dec() {
echo "$stored_img_base64" | base64 -d | \
magick png:- -decipher /tmp/passphrase -depth 8 -type TrueColor png:/tmp/dec.png
echo "Opening DECRYPTED window..."
open /tmp/dec.png
}
var="Hello World!"
enc
dec
fi
}
do_some_magick
That’s a really cool one. A bit overcomplicated maybe. Hello World bloat is a real thing nowadays ![]()
Normally:
program Guess_The_Language
print "(a)","Hello World!"
end program Guess_The_Language
which is same as:
program Guess_The_language
print "('Hello World!')"
end program Guess_The_Language
or even:
program Guess_The_language
write(*,"(a)") "Hello World!"
end program Guess_The_Language
or, if you want to be verbose:
program Guess_The_language
use, intrinsic :: iso_*censored*_env, only: output_unit
write(unit=output_unit,fmt="(a)") "Hello World!"
end program Guess_The_Language
The latter includes a censored word (or the language would be revealed).
And I could actually add quite a few more variations. ![]()
No takers? OK, it’s this one:
New rule: answers/guesses to be expressed in Haiku format ![]()
![]()
Formulas Often
Run Through Remarkably
Ancient Notation
figlet -f banner "Hello world"
Is it shell or figlet?
Well, I can always embed it into another language, yab, for example:
system("figlet -f banner \"Hello world\"")
But then you’d still need the shell to run the resulting program
Wrong! It’s not FORTRAN, it’s Fortran. It’s not exactly the same, in fact half of the variations I posted won’t compile in FORTRAN!
#! yab
// helloworld.yab - the "Hello, World" from hell
// A Hello World message so obnoxious that you will want to close it down.
// But the program has evolved the will to live and slips away from the mouse ...
xorigin = 100: yorigin = 100
window open xorigin, yorigin to 400,150, "HelloWorldWindow", "Example Program"
window set "HelloWorldWindow","flags", "Not-Zoomable"
window set "HelloWorldWindow","flags", "Not-Minimizable"
window set "HelloWorldWindow","flags", "Not-Resizable"
window set "HelloWorldWindow","flags", "Accept-First-Click"
window set "HelloWorldWindow","feel", "floating-all"
view 0,0 to 300,50, "HelloWorldView", "HelloWorldWindow"
draw set "bgcolor", 0,0,0, "HelloWorldView"
draw set "highcolor", 255,255,255, "HelloWorldView"
draw set "Noto Sans, Bold, 40", "HelloWorldView"
draw text 5, 40, "Hello, World!", "HelloWorldView"
while(instr(message$, "Quit") =0)
xorigin = setxy("x"):yorigin = setxy("y")
window set "HelloWorldWindow","moveto", xorigin, yorigin
draw set "bgcolor", changecolor(),changecolor(),changecolor(), "HelloWorldView"
if ismousein("HelloWorldView") then
window set "HelloWorldWindow","look", "bordered"
xorigin = int(ran(peek("desktopwidth")))
yorigin = int(ran(peek("desktopheight")))
else
window set "HelloWorldWindow","look", "floating"
endif
sleep 0.2
wend
exit
sub setxy(whichdim$)
local xbound, ybound
xbound = peek("desktopwidth")
ybound = peek("desktopheight")
switch whichdim$
case "x"
xorigin = xorigin + int(ran(40))
if xorigin > xbound - 300 xorigin = 0
return xorigin
break
case "y"
yorigin = yorigin + int(ran(20))
if yorigin > ybound - 50 yorigin = 0
return yorigin
break
end switch
end sub
sub changecolor()
local newcolor
newcolor = int(ran(256))
return newcolor
end sub
We should do it in Braille (and even sign language and blinking lights):
⠠⠓⠑⠇⠇⠕ ⠺⠕⠗⠇⠙
Assembly (VASM/RASM (Z80)):
ORG 32768
START: LD A, 2
CALL 0x1601
LD HL, MSG
LOOP: LD A, (HL)
CP 0
RET Z
RST 10h
INC HL
JR LOOP
MSG: DEFB "Hello, World!", 0
BASIC PLUS 2 (or Yab):
PRINT "Hello World"
Python (using Turtle Graphics):
import turtle
screen = turtle.Screen()
screen.title("My First Turtle Program")
t = turtle.Turtle()
t.write("Hello World!", font=("Arial", 24, "bold"), align="center")
t.hideturtle()
turtle.done()
Python:
print("""
_ _ _ _ __ __ _ _
| | | | ___| | | ___ \\ \\ / /__ _ __ _| | __| |
| |_| |/ _ \\ | |/ _ \\ \\ \\/\\/ / _ \\| '__/ _` |/ _` |
| _ | __/ | | (_) | \\ /\\ / (_) | | | (_| | (_| |
|_| |_|\\___|_|_|\\___/ \\/ \\/ \\___/|_| \\__,_|\\__,_|
""")
Rust:
fn main() {
println!("Hello, world!");
}
ALGOL 68:
BEGIN
print(("Hello, World!", newline))
END
I can give you Morse code:
.... . .-.. .-.. --- .-- --- .-. .-.. -..
Another one from my collection of oddball languages
(do (print "hello world"))
And no, it’s not Common Lisp.
Well, it’s not Common Lisp, but closely just resembles Lisp.