4 added 193 characters in body
source | link

bash, 8166 characters

66 characters, no new lines

Hello(){ H=$FUNCNAME;};World! (){ echo $H $FUNCNAME;};Hello;World!

Previous version (81 characters), left here because I like the $IFS trick :-)

81 characters, no new lines

Hello(){ H=$FUNCNAME;};World! (){ echo $H${IFS:0:$[0**0]}$FUNCNAME;};Hello;World!

81 as well but with (including) new lines and easier to read

Hello(){ H=$FUNCNAME;}
World! (){ echo $H${IFS:0:$[0**0]}$FUNCNAME;}
Hello;World!

Commented version

Hello(){ H=$FUNCNAME;}                        # set $H to function name ("Hello")
World! (){ echo $H${IFS:0:$[0**0]}$FUNCNAME;} # print $H, first char of $IFS (" ") & "World!"
Hello;World!                                  # run the stuff

(strictly speaking the calculation 0**0 should be indeterminate but it evaluates to 1 :-D)

bash, 81 characters

81 characters, no new lines

Hello(){ H=$FUNCNAME;};World! (){ echo $H${IFS:0:$[0**0]}$FUNCNAME;};Hello;World!

81 as well but with (including) new lines and easier to read

Hello(){ H=$FUNCNAME;}
World! (){ echo $H${IFS:0:$[0**0]}$FUNCNAME;}
Hello;World!

Commented version

Hello(){ H=$FUNCNAME;}                        # set $H to function name ("Hello")
World! (){ echo $H${IFS:0:$[0**0]}$FUNCNAME;} # print $H, first char of $IFS (" ") & "World!"
Hello;World!                                  # run the stuff

(strictly speaking the calculation 0**0 should be indeterminate but it evaluates to 1 :-D)

bash, 66 characters

66 characters, no new lines

Hello(){ H=$FUNCNAME;};World! (){ echo $H $FUNCNAME;};Hello;World!

Previous version (81 characters), left here because I like the $IFS trick :-)

81 characters, no new lines

Hello(){ H=$FUNCNAME;};World! (){ echo $H${IFS:0:$[0**0]}$FUNCNAME;};Hello;World!

81 as well but with (including) new lines and easier to read

Hello(){ H=$FUNCNAME;}
World! (){ echo $H${IFS:0:$[0**0]}$FUNCNAME;}
Hello;World!

Commented version

Hello(){ H=$FUNCNAME;}                        # set $H to function name ("Hello")
World! (){ echo $H${IFS:0:$[0**0]}$FUNCNAME;} # print $H, first char of $IFS (" ") & "World!"
Hello;World!                                  # run the stuff

(strictly speaking the calculation 0**0 should be indeterminate but it evaluates to 1 :-D)

3 deleted 49 characters in body
source | link

bash, 9181 characters

9181 characters, no new lines

o=$[0**0];s=${IFS:0:$o};HelloHello(){ H=$FUNCNAME;};World! (){ echo $H$s$FUNCNAME;$H${IFS:0:$[0**0]}$FUNCNAME;};Hello;World!

9181 as well but with (including) new lines and easier to read

o=$[0**0]
s=${IFS:0:$o}
Hello(){ H=$FUNCNAME;}
World! (){ echo $H$s$FUNCNAME;$H${IFS:0:$[0**0]}$FUNCNAME;}
Hello;World!

Commented version

o=$[0**0]Hello(){ H=$FUNCNAME;}                      # 0**0 should# beset indeterminate$H butto itfunction evalsname to("Hello")
World! 1(){ :-D
s=$echo $H${IFS:0:$o$[0**0]}                  $FUNCNAME;} # $IFS contains aprint space$H, characterfirst atchar indexof 0$IFS (length" 1)
Hello("){ H=$FUNCNAME;}          # function sets $H to& "Hello""World!"
WorldHello;World! (){ echo $H$s$FUNCNAME;} # function will print $H ("Hello"), $s (" ") and "World!"
Hello;World!                    # executerun the stuff

(strictly speaking the calculation 0**0 should be indeterminate but it evaluates to 1 :-D)

bash, 91 characters

91 characters, no new lines

o=$[0**0];s=${IFS:0:$o};Hello(){ H=$FUNCNAME;};World! (){ echo $H$s$FUNCNAME;};Hello;World!

91 as well but with (including) new lines and easier to read

o=$[0**0]
s=${IFS:0:$o}
Hello(){ H=$FUNCNAME;}
World! (){ echo $H$s$FUNCNAME;}
Hello;World!

Commented version

o=$[0**0]                       # 0**0 should be indeterminate but it evals to 1 :-D
s=${IFS:0:$o}                   # $IFS contains a space character at index 0 (length 1)
Hello(){ H=$FUNCNAME;}          # function sets $H to "Hello"
World! (){ echo $H$s$FUNCNAME;} # function will print $H ("Hello"), $s (" ") and "World!"
Hello;World!                    # execute the stuff

bash, 81 characters

81 characters, no new lines

Hello(){ H=$FUNCNAME;};World! (){ echo $H${IFS:0:$[0**0]}$FUNCNAME;};Hello;World!

81 as well but with (including) new lines and easier to read

Hello(){ H=$FUNCNAME;}
World! (){ echo $H${IFS:0:$[0**0]}$FUNCNAME;}
Hello;World!

Commented version

Hello(){ H=$FUNCNAME;}                        # set $H to function name ("Hello")
World! (){ echo $H${IFS:0:$[0**0]}$FUNCNAME;} # print $H, first char of $IFS (" ") & "World!"
Hello;World!                                  # run the stuff

(strictly speaking the calculation 0**0 should be indeterminate but it evaluates to 1 :-D)

2 deleted 49 characters in body
source | link

bash, 9891 characters

9891 characters, no new lines

read o < <(seq 0);s=$o=$[0**0];s=${IFS:0:$o};Hello(){ H=$FUNCNAME;};World! (){ echo $H$s$FUNCNAME;};Hello;World!

9891 as well but with (including) new lines and easier to read

read o < <(seq 0)o=$[0**0]
s=${IFS:0:$o}
Hello(){ H=$FUNCNAME
H=$FUNCNAME;}
World! (){ echo $H$s$FUNCNAME
$H$s$FUNCNAME;}
Hello;World!

Commented version

reado=$[0**0] o < <(seq 0)              # seq 0 outputs '1\n0' so# by0**0 takingshould linebe 1,indeterminate webut getit aevals oneto in1 $o:-D
s=${IFS:0:$o}                   # ifs$IFS contains a space incharacter positionat index 0 (length 1)
Hello(){ H=$FUNCNAME H=$FUNCNAME;}          # define func Hello whichfunction sets $H to "Hello" as side-effect
}
World! (){ echo $H$s$FUNCNAME  $H$s$FUNCNAME;} # define func World!function whichwill outputsprint $H ("Hello"), $s, (" ") and "World!"
}
Hello;World!                    # Runexecute boththe functionsstuff

bash, 98 characters

98 characters, no new lines

read o < <(seq 0);s=${IFS:0:$o};Hello(){ H=$FUNCNAME;};World!(){ echo $H$s$FUNCNAME;};Hello;World!

98 as well but with (including) new lines and easier to read

read o < <(seq 0)
s=${IFS:0:$o}
Hello(){ H=$FUNCNAME
}
World!(){ echo $H$s$FUNCNAME
}
Hello;World!

Commented version

read o < <(seq 0)              # seq 0 outputs '1\n0' so by taking line 1, we get a one in $o
s=${IFS:0:$o}                  # ifs contains a space in position 1
Hello(){ H=$FUNCNAME           # define func Hello which sets $H to "Hello" as side-effect
}
World!(){ echo $H$s$FUNCNAME   # define func World! which outputs $H, $s, and "World!"
}
Hello;World!                   # Run both functions

bash, 91 characters

91 characters, no new lines

o=$[0**0];s=${IFS:0:$o};Hello(){ H=$FUNCNAME;};World! (){ echo $H$s$FUNCNAME;};Hello;World!

91 as well but with (including) new lines and easier to read

o=$[0**0]
s=${IFS:0:$o}
Hello(){ H=$FUNCNAME;}
World! (){ echo $H$s$FUNCNAME;}
Hello;World!

Commented version

o=$[0**0]                       # 0**0 should be indeterminate but it evals to 1 :-D
s=${IFS:0:$o}                   # $IFS contains a space character at index 0 (length 1)
Hello(){ H=$FUNCNAME;}          # function sets $H to "Hello"
World! (){ echo $H$s$FUNCNAME;} # function will print $H ("Hello"), $s (" ") and "World!"
Hello;World!                    # execute the stuff
1
source | link