text:
Alien Name Generator
Task
Write a function to generate names of aliens and their worlds, so that the output is of the form:
Greetings Earthfolk, I am ____ of the planet _____.

"Rules"
Best space-sounding-ness to code length wins.
The more diversity the better.
Dictionaries/look-up tables count towards code length.
Random number generators definitely allowed, other libraries less so.
Provide examples of the output.

Your question in the current form leaves too much room for interpretation. Especially for code-golf much depends on strict and specific rules. What kind of names are allowed? E.g. "I am X of the planet X" sounds perfect alien for me. How do you quantitatively measure "space-sounding-ness to code"? If you can update your question to meet these requirements I am happy to remove my -1.

Krang demands that you give to Krang the source code that Krang demands that you give to Krang.

I can see why the q. is closed but it has yielded some creative and funny responses. :P

PHP - 283 with line breaks.
Here's my code for alien sounding words. My goal was to make it sound like a legitimate language without difficult pronunciation. The apostrophe's suffix the preceding letter with the 'yeh' sound (e.g. GYEH, DYEH, FYEH, etc.). All vowels are of the long-vowel sound, with the exception of A and E, which are short. Granted, this sounds like a single language rather than many diverse languages, but I don't care.
<?$a=$z="";function w(){$k=array("B","D","F","G","J","K","L","M","N","P","T","V","W","Z");$v=array("A","E","O","U","'");return$k[rand(0,13)].$v[rand(0,4)];}for($i=0;$i<rand(3,8);$i++){$a.=w();}for($i=0;$i<rand(3,8);$i++){$z.=w();}echo"Greetings Earthfolk, I am $a of the planet $z.";

Here's the ungolfed version:
<?php

$a=$z="";

function rk() {
    $k = array("B","D","F","G","J","K","L","M","N","P","T","V","W","Z");
    return $k[rand(0,13)];
}
function rv() {
    $v = array("A","E","O","U","'");
    return $v[rand(0,4)];
}
function rp() { return rk().rv(); }

for ($i=0; $i < rand(3,8); $i++) { $a .= rp(); }
for ($i=0; $i < rand(3,8); $i++) { $z .= rp(); }

echo "Greetings Earthfolk, I am $a of the planet $z.";

?>

Sample outputs:

Greetings Earthfolk, I am NEMEWEJU of the planet N'VUMELULOFU.
Greetings Earthfolk, I am FUM'FELE of the planet WUW'JEDUG'GELA.
Greetings Earthfolk, I am ZUDEWEGUPOGE of the planet LUNOT'ZEJALOTU.
Greetings Earthfolk, I am M'DOMAMO of the planet WUWAGUBU.

Most of those wouldn't look out of place in a Nigerian 419 scam email. :P

Haha, Maybe I should randomly output between 200-500 words and email them to random people and see what happens? I wonder what Google translate would auto recognize this as...

You should golf it a bit. Remove whitespace, use one-character variable names...

APL (72)
Not entirely serious, but I couldn't resist. The names are generated from a subset of the APL charset. The names are between 5 and 14 characters long.
{'Greetings Earthfolk, I am'⍺'of the planet'⍵}/{⎕AV[186+{?25}¨⍳4+?9]}¨⍬⍬

Example output:
Greetings Earthfolk, I am  ⌹⍒|⍟∩⊤∩⍉⊂⊥⌽  of the planet  ∩⌹⍱⍎∪≢⊂∩
Greetings Earthfolk, I am  ⍕≡|⍕⍋!⍟⌹  of the planet  ⊂⊤⊤⌽⍟⊖⍱⊤⊤⍟⊥
Greetings Earthfolk, I am  ≢⍉⊂⍫⊂  of the planet  ⍋⌽!⍟⍉⊂∪≢

This is the most alien-looking thing I have ever seen.  And I mean the program, not the output.

The output seems oddly appropriate.

Save 2 bytes: {⎕AV[186+{?25}¨⍳4+?9]} → {⎕AV[186+?25/⍨4+?9]}

Perl, 51 characters
print"Greetings Earthfolk, I am ~ of the planet ~."

The aliens communicate using a special space language that is not translatable in human text or speech.  It is customary to use the character ~ to represent any word in the aliens' native tongue.  Thus this answer is very space-sounding and also contains a great deal of diversity, which, unfortunately, is not able to be adequately represented using a standard character set.

You could use one of the astral planes in unicode. They're, after all, called "astral".

GolfScript, 85 characters
26,{97+}%{9,{;..,rand=}%@@}2*;;"Greetings Earthfolk, I am "\+" of the planet "+\+"."+

(online test version)
Greetings Earthfolk, I am mfevurnoh of the planet pclqvbpcu.
Greetings Earthfolk, I am niuzigmuu of the planet wdkosibdb.
Greetings Earthfolk, I am tvihxsxhd of the planet depkxwcto.

Pclqvbpcuans and wdkosibdbeans apologise for having chosen such a difficult name for us to pronounce for their planet. Tvihxsxhd's first parent also apologises for the double "x" in tvihxsxhd's name. He said he would never expect their child to travel to Earth.
longer version, but more pronounceable names:
GolfScript, 105 characters
"aeiouy".26,{97+}%\-{5,{;..,rand=2$.,rand=}%@@}2*;;"Greetings Earthfolk, I am "\+" of the planet "+\+"."+

(online test version)
Sample output:
Greetings Earthfolk, I am nirexahuji of the planet hulabasesa.
Greetings Earthfolk, I am xepozidylo of the planet wuxasidape.
Greetings Earthfolk, I am jypakivixy of the planet lutegujyxo.

For those who are claiming that they wrote us a letter, not spoke to us (and thus capitalisation is important), this can be fixed in as few as six characters:
26,{97+}%{9,{;..,rand=}%(32-\+@@}2*;;"Greetings Earthfolk, I am "\+" of the planet "+\+"."+

(test)
"aeiouy".26,{97+}%\-{5,{;..,rand=2$.,rand=}%(32-\+@@}2*;;"Greetings Earthfolk, I am "\+" of the planet "+\+"."+

(test)

Javascript
golfed ( 186 bytes )
function f(){for(c=[],b=0;new Date%30+2>b;)c[++b]=String.fromCharCode(Math.random()*25|0+(b<2?65:97));return c.join('')}alert('Greetings Earthfolk, I am '+f()+' of the planet '+f()+'.')

Example Output:

Greetings Earthfolk, I am Kugwegoysuseq of the planet Esagqwsakeges.
  Greetings Earthfolk, I am Ui of the planet Oq.
  Greetings Earthfolk, I am Qeuseoswwusk of the planet Gsyuemaeqqwa.
  Greetings Earthfolk, I am Usyssacemsiiokk of the planet Mgscemkaooaggku.
  Greetings Earthfolk, I am Egugskkgmk of the planet Ecakmkayys.

Keep in mind without the bulky text in the output, the function alone is 121 bytes.
Also the names and the planet names are the same character len so I can save a few characters and use new Date%30+2 however if this is an issue just run them a ~hundred ms apart.

Nice, that's the kind of solution I was hoping for :)

Python Code :
This code will generate random words of random length .

from random import *;t=range;l=map(chr,t(97,123));k=m="";r=randint
for i in t(r(1,100)):k+=l[r(0,25)]
for i in t(r(1,100)):m+=l[r(0,25)]
print "Greetings Earthfolk, I am",k," of the planet",m

Sample output:

Greetings Earthfolk, I am ixpygrfoswpkby  of the planet kanhkcg
Greetings Earthfolk, I am ijojukgjfxcbdt  of the planet zvllqgtqihkxy
Greetings Earthfolk, I am svbwsgrwgedfshw  of the planet inepzkdzerbkscy
Greetings Earthfolk, I am srixnnlqendbnbcqbghpdfotvxhfjidpdypzhkoddtbfhbjneaagnxtfqlbikfmrfrjwkwjoordvmks  of the planet qxyrvaxwnktqffbwcloeznkzuhkwzbwusksaychspjedtvrwxzjeoxtymrgfhqelqrwhquxrlvjbnbghiml

The last one  is most "aliener" among the random outputs :D ..
We can even shorten the code more by adding the  restriction of having the length of the planet's and alien's name of same length

from random import *;t=range;l=map(chr,t(97,123));k=m="";r=randint
for i in t(r(1,100)):k+=l[r(0,25)];m+=l[r(0,25)]
print "Greetings Earthfolk, I am",k," of the planet",m

Sample outputs :

Greetings Earthfolk, I am grtmsmjxbcvfcqfrvnmxuburprkgofstzemaflrbwtxabpdmmkhohntmvgkwcntjhefvrbcuzbdkrrgbxgsbwkrevi  of the planet mzuykipozdfhzalajaarqlrcoebmalrmfdvevieldqmuojwsfjbcfxdwwxakilcpwprdyedzplhxyafstcbpwdfzor
Greetings Earthfolk, I am rltfsxhaiybpqthmkwprepkchbeprxnkiaoyaujwehgsbafxwikenohviyxnj  of the planet qdgoyjqcwlopfgciethfqfaffhloqbmjkkonwutabozgbmzpyrsftiunucnse
Greetings Earthfolk, I am ynyhetukywsfgllbzejrmqygbzerhbrnorflri  of the planet qgihkeymaujjgltgzaeyfhnbqyzjtlpsnpnmbl

Note this is, in part, a code golf. Four-space indentation is such a waste of characters. I'm also wondering if k="";m="" could be replaced by k=m=""

Thanks for pointing that out.. I have removed the unnecessary code.

I'd hate to have to address a letter to one of those planets.

Lua, 211
m,c=math.random,("").char print(((" "):rep(9):gsub(".",function()return c(("aeiouy"):byte(m(1,6)))end):gsub(".-",function()return c(m(97,122))end):gsub("^.......","Greetings Earthfolk, I am %1 of the planet ")))

Greetings Earthfolk, I am toqujor of the planet aeilywyvuief
Greetings Earthfolk, I am kyvirux of the planet ymofoyyxidyw
Greetings Earthfolk, I am hooikoe of the planet exucedimetez
Greetings Earthfolk, I am dytudiu of the planet ueitebeyoben
Greetings Earthfolk, I am denecub of the planet ufolyvooutab


text:
Guess my Number - Code Golf
The puzzle is as follows:
Create the traditional 'Guess my Number' game in as little keystrokes as possible. The player should input a guess between and including 1 and 100, and the computer should reply with either + (meaning the player needs to guess higher), - (meaning the player needs to guess lower) or = (meaning the player has guessed the number. The game continues until the player has guessed the number. The number that the computer generates MUST be a random number between and including 1 and 100.
Sample gameplay
50
+
75
-
60
-
55
+
57
=

Happy Golfing!

Whoever can post an answer fastest with the OSK in most OSes gets my vote. That's like, 3 keystrokes to open

@Howard this one is basically a simplified version of the one you found. Not an exact duplicate, though

@JanDvorak, I feel its not a significant enough variant to warrant a different question.

@zzzzBov how does that work on a puzzle site, this is a slightly different question though I agree it's pretty close. However the other one has an accepted answer. what if people want to work this puzzle but not the other one?

@ryan, I don't know how it works on a site such as [CodeGolf.SE]. I fully understand the predicament of posing a challenge similar to an existing one, however in this case, I feel that this one is too similar to the existing one. It's an opinion, and in the end the votes are what will decide whether or not this gets closed or stays open.

Ruby: 63 58 52 49 characters
puts"=-+"[r=$_.to_i<=>n||=1+rand(100)];r==0&&exit

Sample run:
bash-4.2$ ruby -ne 'puts"=-+"[r=$_.to_i<=>n||=1+rand(100)];r==0&&exit'
50
-
25
+
37
+
43
-
40
+
42
=

A few small improvements: exit if r==0 -> r==0&&exit, and there is no whitespace needed in puts"=-+".

I remembered the && trick just this morning. Seems I'm getting slow.

Ups, sorry. I read the code wrong.

Is 1+$$%100 random enough?

+1 for 42 as a random number :)

Python 84 83 characters
import os
a,c=0,ord(os.urandom(1))%100+1
while c-a:a=input();print'=-+'[c!=a:][c>a]

I can not make it work with python 3. Here is my solution
a,c=0,ord(os.urandom(1))%10+1
while c-a:a=int(input());print("not ok")
print("ok")```

Can you please try to run your code?

Perl 57 53 50 (thanks to @manatwork) Characters
$_=qw(= + -)[$^T%100+1<=>$_];print"$_
";exit if/=/

Note You need to invoke with -n option
Alternate version as suggested by @primo
Perl 40 Characters
$_=chr 44-($^T%100+1<=>$_||exit print'=')

qw(= - +) is shorter than ('=','-','+')

@manatwork: I am not a perl expert. Thank you for the advise :-)

You not need while, if is enough. And please change the response logic.

@manatwork: I think you can use this answer to post a new one (you deserve it). Once you are done, I will delete it. As I said am not an expert of Perl :-)

Just keep it. I really like the $^T trick. (Note to myself: it's time to read man perlvar again.)

Bit of a re-work, but essentially the same for 41 (actually 40, because ^T can be replaced with character 20), requires -pl: $_=chr 44-($^T%100+1<=>$_||exit print'=')

@primo's suggestion makes me wonder whether would count as rule bending to use die"=\n" instead of exit print'='. After all, the question says “the computer should reply”, but no restriction on how.

@primo: I am not incorporating your suggestion as because that would amount to a different answer altogether. But in any case I need to learn more of perl :-)

@Abhijit I can't post it separately either, because it's basically a copy of yours ;)

@primo: How about if I delete it? The Best should rule :-)

@Abhijit or just add it as an alternate. That would be my preference.

JavaScript, 52
for(u=r=1+new Date%100;u=r-prompt(u<0?'-':'+'););'='

Just paste it in the console.

Nice one! Even if skips some of the rules: uses 0..99 interval instead of 1..100 and not displays “=” on success.

@manatwork now I guess I can read the rules :) I edited for the 1..100.

@manatwork I edited for the = too. Much less elegant. I'll try later to make it shorter.

You can save 1 character by using a reference to prompt(): first p=prompt, then just p(). But something is wrong with the logic, as the “=” only appears if you guess the number on first try.

I must leave for a moment. But this version should work (less user friendly, though).

Nice one, +1! Btw, you can save two more characters by doing "u=r=1+new Date%100" as we don't really care about starting value of u.

@XzKto Right. I edit :)

I was unsuccessful at making it shorter, but I did find an alternate expression for u=r-prompt(u<0?'-':'+'); if someone wants to try and explore it further: u=r-prompt('+-'[u<0|0]);.

I had found this one, and a very similar I used in some iterations for distinction between 0 and not 0 : '=+'[u/u|0].

APL (28)
{'='≠⎕←'+=-'[2+×⎕-⍵]:∇⍵}?100

I can't read this, but it looks cool.

C#: 147 136 Characters
It won't beat most other languages, but here's a C# solution for fun:
var r=new Random().Next(1,100);var g=0;while(g!=r){g=int.Parse(Console.ReadLine());Console.WriteLine(""+g+'\n'+(g<r?'+':g>r?'-':'='));}

Is that a complete C# program source ?

I remember seeing a post on meta about ignoring standard overhead/bloat from languages like C#/Java (can't find the link now). It will copy-paste into LINQPad.

If you remove overhead from other, they'll be shorter too. The Go one for example could be reduced to 105 chars. But it would be hard to define a unique line, so I don't think that really makes sense.

You can trim another 27 by changing your definition, loop handling, and unnecessary echo of the input.  int r=new Random().Next(1,100),g=0;while(g!=r){g=int.Parse(Console.ReadLine());Console.WriteLine(g<r?'+':g>r?'-':'=');}

Your code will never choose the number "100", it should be Next(1,101) or Next(100)+1. :)

You can reduce it to 131 by declaring both variables in the same sentence: int r=new Random().Next(1,101),g=0;while(g!=r){g=int.Parse(Console.ReadLine());Console.WriteLine(""+g+'\n'+(g<r?'+':g>r?'-':'='));}

Haskell, 128
Won’t be winning any awards, but here it is.
main=fix.(.)(=<<(read<$>getLine)).f=<<(`mod`100).fst.next<$>newStdGen where p=putStrLn;f y r x|x<y=p"+">>r|x>y=p"-">>r|True=p"="

Ungolfed logic and imports:
import Control.Applicative
import Data.Function
import System.Random

main :: IO ()
main = do
  random <- newStdGen
  let number = fst (next random) `mod` 100
  fix $ \loop -> do
    guess <- read <$> getLine
    check number guess loop
  where
    check number guess loop
      | guess < number = do
        putStrLn "+"
        loop
      | guess > number = do
        putStrLn "-"
        loop
      | otherwise = putStrLn "="

C89 92 90 89 (Thanks to @ugoren) 84 characters
running on OS and linked with Linker supporting ASLR
main(c,g){g=g/8%100+1;while(scanf("%d",&c)&&printf("%c\n",g-c?"-+"[c<g]:'=')&&c-g);}

I don't think that will produce very random numbers in many OSes, unless address space randomization is turned on.

@fluffy: I already mentioned in my most. And IMHO, all modern OSes except RTOS supports ASLR

main(c,g) would save int. Or maybe main(g,c), assuming the argument vector is randomized by ASLR.

However, ASLR will not randomize the low bits.The address of main will always be a multiple of 4 (at least).

@ugoren: Yes I agree and so changed my code accordingly. On another context I have not acceoted your edit, cause the particular bahaviour of missing type defaulting to int is not accepted in C99.

Are you forced to use C99? If older C helps you shorten it, why not? 2. change while to for, and use the initialization part to save a character. 3. '=' -> 61.

Clojure (117 characters)
java -jar clojure.jar  -e "(loop[n(int(*(rand 100)))]((get{-1#(prn '+)0#(do(prn '=)(System/exit 0))1#(prn '-)}(compare(eval(read))n)))(recur n))"
50
+
75
+
90
-
86
-
82
=

Clojure (74 characters)
Guessing a real number. Nobody will be patient enought to solve to "=", so nobody notice the missing exit.
java -jar clojure.jar  -e "(loop[n(rand)](prn (get{-1 '+ 0 '= 1 '-}(compare(eval(read))n)))(recur n))"
0.5
+
0.8
-
0.6
+
0.7
+
0.75
-
0.72
+
0.74
+
0.745
+
0.748
-
0.746
-
0.7455
-
...

R, 89 85 chars
s=sample(1:100,1);while(s!=(a=as.real(readline())))cat(ifelse(a>s,"-","+"));cat("=")

+1 putting the user guess in the while condition is indeed a good idea! However defining cat as a variable here actually cost you 2 characters: w=cat; (6) + 2 times w are 8 characters while 2 times cat is only 6 characters! :) I think you can also get rid of the curly braces since your while loop now contains only 1 line.

@plannapus Good points! The w= made a lot more sense when I was using write, but your way is better.

K, 69
b:1b;g:1+*1?100;while[b;-1(*$[g<f:"I"$m:0:0;"-";g>f;"+";("=";b:0b)])]

Could definitely be golfed more
k)b:1b;g:1+*1?100;while[b;-1(*$[g<f:"I"$m:0:0;"-";g>f;"+";("=";b:0b)])]
50
+
75
-
60
+
65
-
63
+
64
=

Tcl, 96 chars
set n [expr int(rand()*100)+1];while {[gets stdin g]&&$g!=$n} {puts [expr $g<$n?"+":"-"]};puts =

Ok, and now guessing a real number (91 chars):
set n [expr rand()*100+1];while {[gets stdin g]&&$g!=$n} {puts [expr $g<$n?"+":"-"]};puts =

And here a small script to test this: (Solver)
set fd [open "| /usr/local/bin/tclsh hilo.tcl" RDWR]
fconfigure $fd -buffering none
lassign 0\ 100 + -
while 1 {
    puts "-> [set new [expr {(${-} - ${+}) / 2. + ${+}}]]"
    puts $fd $new
    gets $fd in
    puts "<- $in"
    if {$in in {+ -}} {set $in $new} break
}

Change the 2. to 2 for integers.

Go, 152
Golfed :
package main
import(f"fmt";"os")
func main(){
c:=1+os.Getpid()%100
u:=0
for u!=c{
f.Scanf("%d",&u)
s:="="
if u<c{s="+"}else if u>c{s="-"}
f.Println(s)}}

Ungolfed :
package main

import (
    f "fmt"
    "os"
)

func main() {
    c := 1 + os.Getpid()%100
    u := 0
    for u != c {
        f.Scanf("%d", &u)
        s := "="
        if u < c {
            s = "+"
        } else if u > c {
            s = "-"
        }
        f.Println(s)
    }
}

Session :

guess
4
+
88
-
66
+
77
-
71
+
73
+
75
=

Hard to golf when you start any program with package main and a list of imports...

But real golf has big bags full of heavy clubs. There are even wheels on the bags. What's more they are "imported" for you by your caddy. And you drive around a big, reserved field in electric carts. Let's not even speak about the annual fee.

R: 88 characters
r=sample(1:100,1);i=scan(n=1);while(i!=r){cat(ifelse(i<r,"+","-"));i=scan(n=1)};cat("=")

Ex:
> r=sample(1:100,1);i=scan(n=1);while(i!=r){cat(ifelse(i<r,"+","-"));i=scan(n=1)};cat("=")
1: 23
Read 1 item
+
1: 46
Read 1 item
-
1: 35
Read 1 item
-
1: 31
Read 1 item
-
1: 28
Read 1 item
+
1: 30
Read 1 item
-
1: 29
Read 1 item
=
>

Look at my answer; this can be shortened by (1) defining a cat variable and (2) defining i in the while loop. You can also use the quiet option to remove the "Read 1 item" notice, but I don't think you can turn off scan's "1:" prompt.

PHP: 95 91 87 73 71 65 chars
<?php $n=rand(1,100);while(@$g!=$n){$g=trim(fgets(STDIN));echo$g==$n?'=':($g>$n?'-':'+')."\n";}
<? for($n=rand(1,100);@$g!=$n?$g=trim(fgets(STDIN)):0;)echo$g==$n?'=':($g>$n?'-':'+')."\n";
<? for($n=rand(1,100);$n!=$g=trim(fgets(STDIN));print(($g>$n?'-':'+')."\n"));echo"=\n";
<? for($n=rand(1,100);$n!=$g=fgets(STDIN);print(($g>$n?'-':'+')."\n"))?>=
<? for($n=rand(1,100);$n!=$g=fgets(STDIN);print($g>$n?'-':'+')."\n")?>=

<?for($n=rand(1,100);$n!=$g=fgets(STDIN);print$g>$n?"-
":"+
")?>=

89: <? for($n=rand(1,100);($g=trim(fgets(STDIN)))!=$n;print$g==$n?'=':($g>$n?'-':'+')."\n");

You don't need to call trim, since 8 == "8\n". That brings it down to 81 characters: <? for($n=rand(1,100);$n!=$g=fgets(STDIN);print(($g>$n?'-':'+')."\n"));echo"=\n";

You can get it down to 73 characters by exiting PHP mode at the end instead of calling echo: <? for($n=rand(1,100);$n!=$g=fgets(STDIN);print(($g>$n?'-':'+')."\n"))?>=

C: 86 characters
i;main(r){r+=(7*time(0)+3)%100;while(scanf("%d",&i)&&puts(i<r?"+":i>r?"-":"=")&&i-r);}

It is well-behaved, implements a simple LCG and compiles under both Clang (Clang is much more picky than GCC) and GCC.

R 70
n=sample(1e2)[1];while(n-(g=scan(n=1)))cat(if(n>g)"+"else"-");cat("=")

VB.net      146
Dim r,g As Integer:Dim s As String:r=New Random().Next(1,100):Do Until g=r:g=InputBox(s):If g<r Then s="+" Else If r=g Then s="-" Else s="="
Loop

Your code will never choose the number "100", it should be Next(1,101)

Javascript (75 74 chars):

for(n=1+Math.random(a=alert)*100>>0;(g=+prompt())-n;)a('+-'[+(g>n)]);a('=')
for(n=1+Math.random(a=alert)*100>>0;(g=+prompt())-n;)a(n>g?'+':'-');a('=')

Numbers are actually random

J: 64 characters
r=.>:?100
while.(t=.{&'<=>'>:*-&r".(1!:1)1)~:'='do.t(1!:2)2 end.t

Doing I/O in J is sort of bulky compared to the rest of the language.

vbScript 115  110
Randomize:dim n,r,s:r=(Int)((100*Rnd+1)*2):do until(r=n*2):n=inputbox(s):If(n*2>r)Then:s="-":else:s="+":end if:loop

Randomize:dim n,r,s:r=Int(100*Rnd+1)*2:do until r=n*2:n=inputbox(s):If(n*2>r)Then:s="-":else:s="+":end if:loop

Mathematica 66
n=RandomInteger@100;For[,(i=Input[])!=n,Print@If[n>i,"+","-"]];"="

vba, 95
(immediate window)
randomize:z=int(rnd()*100)+1:while q<>z:q=cint(inputbox(q)):?iif(q<z,"+",iif(q>z,"-","=")):wend

You can use Int instead of CInt. ;-)

GWBASIC, 104
1 RANDOMIZE TIMER:Z=INT(RND*100)+1:WHILE Q<>Z:INPUT Q:IF Q<Z THEN ?"+" ELSE IF Q>Z THEN ?"-"
2 WEND:?"="

(just because I can)

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
"Cowsay" in short
Simulate cowsay in the default mode.
$ cowsay <<< Hello
 _______
< Hello >
 -------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

$ perl -e 'print "Long text "x20' | cowsay
 __________________________________________
/ Long text Long text Long text Long text  \
| Long text Long text Long text Long text  |
| Long text Long text Long text Long text  |
| Long text Long text Long text Long text  |
\ Long text Long text Long text Long text  /
 ------------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

How short can be the code? The cow and the balloon can be slightly different, but all elements should be present. Dynamic/multiline balloon is a plus.
Explicit list of the required elements:

Text;
Balloon;
Line from the cow to the balloon;
The cow (eye[s], month, ears, body, legs (minimum two), udder, tail).

/usr/share/cowsay/cows/ may be accessed, but obviously not /usr/games/cowsay itself.
Note: here is the /usr/share/cowsay/cows/default.cow file:
$the_cow = <<"EOC";
        $thoughts   ^__^
         $thoughts  ($eyes)\\_______
            (__)\\       )\\/\\
             $tongue ||----w |
                ||     ||
EOC

Usage of the file is optional. When used, it must be accessed by full path. (Windows users may copy it to something like C:\usr\share\cowsay\co\default.cow, for fairness).

I'm voting to close this as off-topic because the specification for the format is extremely non-descriptive, which makes it impossible to determine validity of outputs.

Mathematica: Work in progress
I'll pin down the balloon once I can get the cow to settle:
ExampleData[{"Geometry3D", "Cow"}]

...is it done yet?

Any further development on that balloon?

Perl, 84 characters
print$a='-'x52,<>=~s/.{1,50}\b/sprintf"
|%-50s|",$&/rge,"$a
\\
]:p
| )=
| P=
 ¬"

Output:
----------------------------------------------------
|Long text Long text Long text Long text Long text |
|Long text Long text Long text Long text Long text |
|Long text Long text Long text Long text Long text |
|Long text Long text Long text Long text Long text |
----------------------------------------------------
\
]:p
| )=
| P=
 ¬

Admittedly, I golfed the cow as much as I golfed the code.  But the Mathematica cow is going to win anyway :)
Note: Requires Perl 5.16 for the /r non-destructive substitution flag.

Can you tell us please what is that r after the s///? Can not find such flag in the documentation. Thank you.

Upvoted. Not everyone is brave enough to call that "a cow"

Bow your head left to see the cow.

@manatwork the r flag returns the result, instead of modifying the operand in place (<> is of course read-only, and can't be modified).

Thank you for the explanation, Vi. @belisarius, it gets a dachshund look here because the line-height: 1.4em set for the code blocks, but in terminal it looks better.

@manatwork I've got it! :D

Ruby: 152 150 149 146 143 characters
load'/usr/share/cowsay/cows/default.cow'
p=%w{U~ o* o o}
puts l=?-*44,gets.gsub(/(.{1,40})\b\s*/){"( %-41s)\n"%$1}+l,$the_cow.gsub(/\$\w+/){p.pop}

The cow art is read from the default.cow file and decorated in after-12-rounds-vs-Mike-Tyson manner, similar with a cowthink -e 'o*' -T 'U~' invocation.
The text is read from standard input and wrapped at most 40 characters. Line breaks in the input text are not supported.
Sample run:
bash-4.2$ perl -e 'print "Long text "x15' | ruby cow.rb
--------------------------------------------
( Long text Long text Long text Long text  )
( Long text Long text Long text Long text  )
( Long text Long text Long text Long text  )
( Long text Long text Long text            )
--------------------------------------------
        o   ^__^
         o  (o*)\_______
            (__)\       )\/\
             U~ ||----w |
                ||     ||

With art bending: 138 135 136 characters
load'/usr/share/cowsay/cows/default.cow'
puts l=?-*44,gets.gsub(/(.{1,40})\b\s*/){"( %-41s)\n"%$1}+l,$the_cow.gsub(/\$.+?([use]+)\b/,'\1')

As the elements have to be just present, we can use what we have in place instead of defining realistic ones.
Sample run:
bash-4.2$ ruby cow.rb <<< 'Hello poor little cow'
--------------------------------------------
( Hello poor little cow                    )
--------------------------------------------
        s   ^__^
         s  (es)\_______
            (__)\       )\/\
             ue ||----w |
                ||     ||

APL 133 140 138 122
This one liner takes screen input in the form of a character vector or array enclosed in quotes via: ←⍎⍞ The appearance of the output is improved by including leading and following spaces in the input.
('∘'⍪'∘',((¯2↑1,⍴t)⍴t←⍎⍞),'∘')⍪'∘'⋄5 19⍴(,⍉(19⍴2)⊤323584 196592 63503 4072 3096)\'∘^__^∘(oo)\_______(__)\)\/\||----w|||||'

The cow character locations on each row of the array are specified as 19 bit boolean vectors.
To use input the one liner followed by the bubble text in quotes:
' Hello '

°°°°°°°°°
° Hello °
°°°°°°°°°
°  ^__^
 ° (oo)\_______
   (__)\       )\/\
       ||----w |
       ||     ||

Multi-line text is input as an array.
3 36⍴' Multi-line text input as an array. '

°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
° Multi-line text input as an array. °
° Multi-line text input as an array. °
° Multi-line text input as an array. °
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
°  ^__^
 ° (oo)\_______
   (__)\       )\/\
       ||----w |
       ||     ||

This version can be tested via the free APL interpreter at www.nars2000.org

How to properly count the characters? I counted 171 UTF-8 bytes and 141 Unicode codepoints here (newlines included). /* Also haven't found what I need to apt-get install to run APL... */

@Vi. The APL+WIN v5 character set is based on single byte characters. I have to convert them to UTF-8 to get them to render properly on this site. Therefore I believe I am justified in counting characters including newline characters as single bytes. I am not sure how you can run APL. I normally recommend the free version at http://www.nars2000.org but it does not appear to support relative assign.

K, 178
{-1'g,({"+ ",x,((&/(c-4;60-#x))#" ")," +"}'l),(g:,(&/(64;4+c::#*l:(60*!-_-(#x)%60)_x))#"+"),("+  ^__^";" + (oo)\\_______";"   (__)\\       )\\/\\";"       ||----w |";"       ||     ||");}

.
k){-1'g,({"+ ",x,((c-#x)#" ")," +"}'l),(g:,(&/(64;4+c::#*l:(60*!-_-(#x)%60)_x))#"+"),("+  ^__^";" + (oo)\\_______";"   (__)\\       )\\/\\";"       ||----w |";"       ||     ||");}"Hello codegolf.stackexchange.com"
++++++++++++++++++++++++++++++++++++
+ Hello codegolf.stackexchange.com +
++++++++++++++++++++++++++++++++++++
+  ^__^
 + (oo)\_______
   (__)\       )\/\
       ||----w |
       ||     ||

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Rosetta Stone Challenge: Draw a Box Plot
The goal of a Rosetta Stone Challenge is to write solutions in as many languages as possible. Show off your programming multilingualism!
The Challenge
Your challenge is to implement a program that will input a list of numbers and output a box plot of the data, in as many programming languages as possible.  The box plot will display the quartiles and outliers in the data, and it will even have a scale.  You are allowed to use any sort of standard library function that your language has, since this is mostly a language showcase.
What is a "box plot?"
A box plot is a way of graphing data.  A box plot has a few essential features.  The first feature is a box, with either side being located at the first and third quartiles of the data.  There is a line down the center of the box plot that gives the median.  On either end of the box plot, there are "whiskers" that help show the variance of the data.  The whisker extends from the box to the least and greatest points in the data set, excluding the outliers. The outliers are plotted as individual points.
First, take the median of the data.  Then, take all of the data points that are strictly less than the median, and compute the median of this set to become the first quartile (Q1).  Take all of the data points that are strictly greater than the median, and compute the median of this set to become the third quartile (Q3). Find the value of R = 1.5*(Q3 - Q1). Any numbers less Q1 - R this are outliers. Any numbers greater than Q3 + R are outliers.  Take the set of all data points that are not outliers, and the minimum and maximum of this set determines the ends of the two whiskers.
Input
Input will begin with n= followed by a number.  There will then be n numbers, one per line.  All of the numbers will be integers from 0 to 63, inclusive.
n=8
29
1
22
18
12
16
16
22

Output
Output will be a rendition of the box plot.  One possible way to draw the plot is by rendering it in ASCII.  You can render the box plot in many ways other than ASCII, but the main requirement is that drawn large enough so that it is possible to tell the exact locations of the important features.  The box plot should have a scale, consisting of around 5-10 numbers equally spaced.  Here is one example plot of the above data:
              +--+----+
              |  |    |
 X          +-+  |    +------+
              |  |    |
              +--+----+

0    0    1    1    2    2    3
0    5    0    5    0    5    0

The Objective Winning Criterion
As for an objective winning criterion, here it is: Each language is a separate competition as to who can write the shortest entry, but the overall winner would be the person who wins the most of these sub-competitions. This means that a person who answers in many uncommon languages can gain an advantage. Code-golf is mostly a tiebreaker for when there is more than one solution in a language: the person with the shortest program gets credit for that language.
Rules, Restrictions, and Notes
Your program can be written in any language that existed prior to April 11th, 2013. I will also have to rely on the community to validate some responses written in some of the more uncommon/esoteric languages, since I am unlikely to be able to test them.

Current Leaderboard
This section will be periodically updated to show the number of languages and who is leading in each.

Julia (604) - plannapus
Mathematica (71) - chyanog
Python2.X (85) - Abhijit
R (34) - plannapus

Current User Rankings

plannapus - 2
Abhijit - 1
chyanog - 1

I love it! A very nice configuration of rules. Now to learn some languages ...

R: 34 characters
Of course, R being a language used for statistics, it comes with a function boxplot to do this (which needs a wrapper here to accomodate the input style):
f=function(x)boxplot(scan(x,sk=1))

Usage:
Given a file input1.txt containing the following:
n=10
29
1
22
19
9
13
15
22
63
2

Then f("input1.txt") produces:

Julia: 604 characters
This is my first ever function in Julia, so my apologies to fans of Julia if this is badly written.
function g(f)
a=int(split(readall(open(f)),'\n')[2:])
b,c,d=int(quantile(a,[.25,.5,.75]))
w=1.5*(d-b)
o=a[a.<b-w]
O=a[a.>d+w]
t=int(b-w>0?b-w:0)
u=int(d+w<63?d+w:63)
S=s=""
if !isempty(o)
for i in 1:length(o)
s=s*lpad('x',[0,o][i+1]-[0,o][i]-1,' ')
end
end
if !isempty(O)
for i in 1:length(O)
S=S*lpad('x',[0,O][i+1]-[0,O][i]-u-1,' ')
end
end
x="0"
for i in 9:9:63
x=x*lpad(string(i),i-(i-9)," ")
end
v=isempty(o)?b-1:b-o[length(o)]-1
print(x*"\n"*lpad('+'*'-'^(d-b-1)*'+',d,' ')*'\n'*s*lpad('-'^(b-t-1),v,' ')*'|'*lpad('|',c-b,' ')*' '^(d-c-1)*'|'*'-'^(u-d)*S*'\n'*lpad('+'*'-'^(d-b-1)*'+',d,' '))
end

Usage:
g("input1.txt")
0        9       18       27       36       45       54       63
         +-----------+
---------|      |    |------------------                     x
         +-----------+

Python2.X 85 Characters, using matplotlib
import matplotlib.pylab as p
p.boxplot(map(input,['']*int(raw_input()[2:])))
p.show()

Mathematica 71
BoxWhiskerChart[Input/@x~Array~FromDigits@StringTake[InputString[],-1]]


text:
Eight Queens Obsfucation
You've probably heard of the classic Eight Queens Puzzle. For those of you who haven't it goes something like this:

Position 8 queens on an 8×8 chessboard so that no two queens threaten
  each other (no two queens appear on the same row, column or diagonal
  as each other).

Here is one answer that is very close:
X - - - - - - -
- - - - X - - -
- X - - - - - -
- - - - - X - -
- - X - - - - -
- - - - - - X -
- - - X - - - -
- - - - - - - X

As you can see, two queens appear on the long diagonal between the top left corner and the bottom right corner.
Your task is to solve the Eight Queens Puzzle (using any programming language) in a unique or obfuscated manner. The first answer to 15 up-votes wins (the number may be subject to change depending on the popularity of this question).
Your output must be like the example above (empty squares represented by -, queens represented by X and a space between each X or -). Good luck!!

How much obfuscation is required?

Can I use pre-solved results, or do I HAVE to solve this programmatically? Just wondering because I found a solution in my head pretty quickly.

It's a popularity contest so, as much or as little as you like @jdstankosky

This is not very interesting, because there are 12 unique, known solutions. There is no variability at all, so just printing out a solution will always win.  Why not generalize it, like: chess board size and number of queens are taken as input, and the program has to solve or say there is no solution?  Also, why not give a good winning criterion?

Similar to http://codegolf.stackexchange.com/questions/10/n-queens-problem

http://www.ioccc.org/1990/baruch.c ..................... http://www.ioccc.org/1990/baruch.hint

I'm voting to close this question as off-topic because there are only 12 possible outputs, and a correct solution just has to print one of them. There's no variation of inputs, and therefore none of outputs.

Mathematica
The following implementation challenges the player to find one or more solutions to the eight queens problem. (It was too easy to simply have the program output the answers.)
Clicking on any of the squares in the chessboard toggles between "queen" and .
When show attacks is checked, any attacks between queens are highlighted.
The following picture queenImg.

In the board below, no queen attacks another:

Placing a fourth queen on a conflicting square results in two reciprocal attacks.

The following is one of the solutions.

DynamicModule[{qns = ConstantArray[0, {8, 8}]},
Manipulate[
ClickPane[
Dynamic[ArrayPlot[
 Array[Boole[(Mod[#1, 2] == 0 \[And]
       Mod[#2, 2] == 0) \[Or] (Mod[#1, 2] == 1 \[And]
       Mod[#2, 2] == 1)] &, {w, w}],
 ColorRules -> {1 -> White, 0 -> LightBrown}, Mesh -> True,
 Epilog -> {Red, Thickness[.005],
   If[attacks,
    Line[Cases[
       Tally@Flatten[z[##] & /@ (Reverse /@ Position[qns, 1]),
         1], {a_, n_} /; n > 1][[All, 1]]], {}],
   Table[Inset[queenImg, p, Automatic, 10/w], {p,
     Position[qns, 1] - .5}]}]], (qns = flip[qns, Ceiling@#]) &],
{{attacks, True, "show attacks"}, {True, False}},
Initialization -> (w = 8;
z[{r_, c_}] := {row[r], col[c], diag1[r, c], diag2[r, c]};
row[r_] := {{0, r - .5}, {8, r - .5}};
col[c_] := {{c - .5, 0}, {c - .5, 8}};
diag1[r_, c_] := {{0, r - c}, {8 - (r - c), 8}};
diag2[r_, c_] := {{0, c + r - 1}, {c + r - 1, 0}};
flip[a_, pos_] := MapAt[(# - 1)^2 &, a, pos])]]

+1, nice program. Perhaps you could add some kind of feature to move the user-entered queens into an acceptable position. Then it would fulfill the challenge, too.

dc
[sSdlS*]sw[d252-lwx26482+lwx1504824-lwx50051569+lwx982283196-lwx10821394332+lwx58071763728-lwx99637122816+]sa10 0:d0[laxd*453%;d1100.8*11552+P1+d8%;dPd64>s]dssx

Also at 160 characters it's decently short.

Ruby >=1.9
queens = %w[Anne-Marie Mary Elizabeth Victoria Maleficent Gertrude Alexandra Latifa]
SQUARES_ON_A_CHESSBOARD = 64

queens.permutation.find do |succession|
  i = SQUARES_ON_A_CHESSBOARD
  [-1,1].map{ |m| succession.map{ |queen| queens.index(queen) + m*i+=1}}.map(&:uniq).map(&:size).inject(&:*) == SQUARES_ON_A_CHESSBOARD
end.each do |queen|
  r=queens.map{queens[SQUARES_ON_A_CHESSBOARD & 1][SQUARES_ON_A_CHESSBOARD % 10]}
  r[queens.index(queen)]=(queens*SQUARES_ON_A_CHESSBOARD.to_s)[SQUARES_ON_A_CHESSBOARD]
  puts r.join(" ").upcase
end

Outputs one solution in the required format.

The queen names are a nice touch.  :)

Ruby
Q=8;$><<[*0...Q].permutation.select{|u|u.each_with_index.map{|a,b|[a-b,a+b]}.transpose.map{|z|z.uniq.size}==[Q,Q]}.map{|s|s.map{|f|(["-"]*(Q-1)+["X"]).rotate(f)*"\040"}*$/}*($/*2)

A not so much obfuscated but unique code - it contains function uniq ;-) but not a single whitespace! Prints all solutions to console. Maybe I'll start to obfuscate it somehow.

Haskell
import Data.List
import Control.Monad
import Control.Applicative

q8 = (sequence_ . (<$> (head.(foldM.flip.const)
       (\_' -> join<$>sequence [(:[])<$>(((\_''-> [_''|
                 foldr (\(_''',_')->( (((==)<*>(\\[0,_''',-_''']))[_''-_']) &&))
                   (((/=)<*>((\\)>>=id)) [_']) $ zip [1..] _'])<$>[1..8])>>=id),
                   [_'] ]) [] $ [1..8])))
       (\_' -> putStrLn$concat$replicate(_'-1)" -"++[" X"]++replicate(8-_')" -")

Output:
 - - - X - - - -
 - X - - - - - -
 - - - - - - X -
 - - X - - - - -
 - - - - - X - -
 - - - - - - - X
 - - - - X - - -
 X - - - - - - -

Here is my solution in Python. This outputs every possible solution to the problem.
from itertools import permutations

def board(vector):
print ("\n".join('- ' * i + 'X ' + '- ' * (8-i-1) for i in vector) + "\n\n= = = = = = = =\n")

cols = range(8)
for vector in permutations(cols):
    if 8 == len(set(vector[i]+i for i in cols)) \
         == len(set(vector[i]-i for i in cols)):
        board (vector)

Here is a short sample of the output.
X - - - - - - -
- - - - X - - -
- - - - - - - X
- - - - - X - -
- - X - - - - -
- - - - - - X -
- X - - - - - -
- - - X - - - -

= = = = = = = =

X - - - - - - -
- - - - - X - -
- - - - - - - X
- - X - - - - -
- - - - - - X -
- - - X - - - -
- X - - - - - -
- - - - X - - -

= = = = = = = =

X - - - - - - -
- - - - - - X -
- - - X - - - -
- - - - - X - -
- - - - - - - X
- X - - - - - -
- - - - X - - -
- - X - - - - -

k
Relatively trivial solutions, For 32 characters:
-1'"-X"@0b\:'0x1002200140088004;

Slightly better (more painful to read than obfuscated):
((-).*:'(c;i))'@'[(*i)#,:(*i)#10h$45i;2/:'i#(*/(i:8 4))_0b\:*/c:7 129790099;:;10h$88i];

Python, Obfuscation through Complexity
Though you would see magic numbers in my code, they are not the hard-coded solution. On running the code, you would get the list of all possible positions of the queens
from itertools import*
from math import*
def foo():
    def bar(x):
        k1,k2,k4 = 6148914691236517205L,3689348814741910323L,1085102592571150095L
        x = ((x >> 1) & k1) | ((x & k1) << 1)
        x = ((x >> 2) & k2) | ((x & k2) << 2)
        x = ((x >> 4) & k4) | ((x & k4) << 4)
        return x
    op = [(9259542123273814144L,4,1,0),(9241421688590303745L,7,1,8),(9241421688590303745L,7,-1,-8)]
    for o in op:
        d=o[0]
        m=18446744073709551615L
        for n in range(o[1]):
            yield d
            yield bar(d)&18446744073709551615L
            m=(m<<o[3] if o[3]>0 else m>>-o[3])&18446744073709551615L
            d=(d>>o[2] if o[2]>0 else d<<-o[2])&(m)
for e in (int(''.join("{0:08b}".format(n) for n in p),2) for p in permutations((2**n for n in range(8)),8)):
    if all((round(log(m & e)/log(2),8)).is_integer() for m in foo() if m&e):
        print '\n'.join(''.join(e) for e in  zip(*[iter("{0:064b}".format(e))]*8))
        print '-'*8

You should make all your list comps into maps since that's always harder to read

this is a wrong solution, since it prints positions in which queens attack themselves:
10000000
00100000
00001000
01000000
00010000
00000100
00000010
00000001

Q
Obfuscation through hideousness
nq:{
    f:{[]
        b:.[;;:;"X"]/[-1_'16 cut 128#"- ";flip (til 8;2*neg[8]?8)];
        v:{"X" in (x[;first where y="X"] each (til 8) except z)}[b]'[b;til 8];
        d:{"X" in x ./:{$[null r:1+last where raze (1#'x)=7;enlist -1 -1;x til r]}raze 1_{x,/:y}'[rotate[z;til 8];flip@[;(first where y="X")]@/:((+;neg@-)@\:2*til 8)]}[b]'[b;til 8];
        e:{"X" in x ./:{$[null r:1+last where raze (1#'x)=0;enlist -1 -1;x til r]}raze 1_{x,/:y}'[reverse rotate[z+1;til 8];flip@[;(first where y="X")]@/:((+;neg@-)@\:2*til 8)]}[b]'[b;til 8];
        (not any v,d,e;b)};
    while[not first q:f[];];
    -1 last q;
    }

.
q)nq[]
- - - X - - - -
- - - - - - - X
- - - - X - - -
- - X - - - - -
X - - - - - - -
- - - - - - X -
- X - - - - - -
- - - - - X - -

⍴Script (rhoScript)
You wanted obfuscated, well...
��ˠo����}���e���

Hexdump, for obvious reasons:
00000000: a991 cba0 6f87 c1fb e97d 82c1 cd65 e2f8  ....o....}...e..
00000010: 90

In less-obfuscated form:
8 range permutations
    (with-index
        (sum) map uniq arg-a with-index
                (*exploding subtract) map uniq concatenate length)
keep-maxes-by

Yeah, I don't really know what it does either.


text:
Hello World socket server
Write the shortest program that answers "Hello, World" to a network connection.
Conditions:

Program shall listen on port 12345
When a client connects, program shall write "Hello, World" to the newly opened socket connection and then close the connection
Program shall accept connections in a loop, i.e. handle any number of connects
Program does not need to handle parallel connections

Test:
prompt> telnet localhost 12345
Hello, World
prompt>

This is essentially a less interesting version of http://codegolf.stackexchange.com/questions/3988

Does it have to close the connection after the Hello World! Or can it just hang?

@carusocomputing Second point.

I just think it's worth pointing out that this question was recently necro'd from 2013.  That only means what it means, but I want to make sure people aren't missing this.

Bash (34)
nc -l 12345 <<<Hello,\ World;. $0

At least one and probably two characters of whitespace there are unnecessary.

If you mean nc -l12345<<<Hello, that doesn't work. nc needs the space between -l and 12345, and removing the space before <<< gets bad file descriptor from Bash.

I suppose that nc is from BusyBox. The GNU netcat requires -p switch too. And with my bash 4.2.42 there is no such error if you remove the space before <<<.

this is the great thing with bash. you can never be sure that it works on an other machine.

what does the . $0 at the end do?

@professorfish . is the same as source. So basically it sources itself.

I don't think this can handle any number of connects, as . $0 will quickly segfault your shell, due to a stackoverflow see here for more details.

Java, 268 Bytes
import java.io.*;import java.net.*;
class S{public static void main(String[]args)throws Exception{ServerSocket s=new ServerSocket(12345);while(1>0){Socket t=s.accept();PrintWriter u=new PrintWriter(t.getOutputStream());u.println("Hello World!");u.flush();t.close();}}}

Ungolfed:
import java.io.*;import java.net.*;
class S{
    public static void main(String[]args)throws Exception{
        ServerSocket s = new ServerSocket(12345);
        while(true) {
            Socket t = s.accept();
            PrintWriter u = new PrintWriter(t.getOutputStream()) ;
            u.println("Hello World!");
            u.flush();
            t.close();
        }
        s.close();
    }
}

Why the "?"? And yours ended up nearly exactly like mine. I guess there's only so many ways to do this in Java.

The ? was me contemplating whether or not to post it heh. Also, necrotic?

Ya, I bumped this from like 3 years ago. Seemed like a good challenge to put back out there. I guess they didn't say count units back then? And whoops, that was a swypo. Meant "nearly".

Won't while(1) work?

@Carcigenicate maybe in Java 8 not Java 7 though.

But for(;;) will!

-1 no freehand circle

@SeeOneRhino I have a tool called "SnagIt" haha. If it's on the computer and overrides my PrtSc button, might as well use it instead of paint!

Tcl, 78 chars
socket -server r 12345;proc r {s a b} {puts $s Hello,\ World;close $s};vwait r

the vwait r enters the event loop (not necessary with Tk) until the variable r is set.
Usually you use the variable forever.
And the Hello,\ World is the same as {Hello, World} or "Hello, World"

Go, 133 bytes
package main
import(n"net")
func main(){l,_:=n.Listen("tcp",":12345")
for{c,_:=l.Accept()
c.Write([]byte("Hello, World"))
c.Close()}}

LiveScript (node.js), 73 bytes
(require(\net)createServer ->it.write 'Hello, World';it.end!)listen 12345

C# 220
using System.Text;namespace System.Net.Sockets{class P{static void Main(){var s=new TcpListener(IPAddress.Any,12345);s.Start();while(true){using(var c=s.AcceptSocket()){c.Send(Encoding.UTF8.GetBytes("Hello World"));}}}}}

Ungolfed:
using System.Text;
namespace System.Net.Sockets
{
    class P
    {
        static void Main()
        {
            var s = new TcpListener(IPAddress.Any, 12345);
            s.Start();
            while (true)
            {
                using (var c = s.AcceptSocket())
                {
                    c.Send(Encoding.UTF8.GetBytes("Hello World"));
                }
            }
        }
    }
}

Pretty straightforward. I could have saved 14 characters by removing IPAddress.Any, but that would rely on using deprecated API ...

Python, 103
import socket
s=socket.socket()
s.bind(('',12345))
s.listen(1)
s.accept()[0].sendall(b'Hello, World')

Clojure, 153 148 bytes
-5 byte using macros. See comments.
(let[s(java.net.ServerSocket. 12345)](while 1(with-open[c(.accept s)](doto(java.io.PrintWriter.(.getOutputStream c))(.write"Hello, World").flush))))

Full program that listens in a loop for incoming connections, and outputs as required. The Java-interop is killer here. I don't need the same libraries enough to justify an import though.
Pregolfed:
(defn server []
  (let [ss (java.net.ServerSocket. 12345)]
    (while 1
      ; Auto closes the client
      (with-open [c (.accept ss)]
         ; Passes the PrintWriter as the first argument to each function
         (doto (java.io.PrintWriter. (.getOutputStream c))
           (.write "Hello, World\n")
           ; Parentheses are optional if the function only takes 1 argument
           ; Ugly, but shorter
           .flush)))))

This is basically word-for-word what it'd be in Java but less verbose haha. Clojure is now on my list of things to check out.

@carusocomputing I can't recommend Clojure enough. Probably the language I'm going to write with for the next few years. It's just awesome.

Have you tried Groovy :)? It's my favorite for short-hand Java.

@carusocomputing I think I checked it out at some point, but I didn't like the aesthetics of it. Same reason a haven't learned Ruby yet; I just shudder when I look at it it.

@carusocomputing I think I was thinking of a different language. It actually looks like of nice.

http://codegolf.stackexchange.com/a/107414/59376 is my answer ported to Groovy, it's just shorthand Java :).

Groovy, 119 bytes
{s=new java.net.ServerSocket(12345);while(1){(u=(t=s.accept()).getOutputStream())<<"Hello, World";u.flush();t.close()}}

Port of my java answer.

Oh ya. Looks like a pretty simple syntax.

@Carcigenicate the best thing Groovy does is collections manipulations with additions like Python's map and lambda along with shorthand iteration like 1..100.each{println(it)} or vectorizing commands like 1..100.collect{it/2} results in 1 through 100 divided by 2 in a list.

Ya, that's pretty tiny. The Clojure equivalent to the first would be (mapv println (range 1 100)), or more correctly (doseq [n (range 1 100)] (println n)). Unfortunately, Clojure is far from a good golfing language. I just use it to practice.

Racket, 111 bytes
(do([l(tcp-listen 12345)])(#f)(let-values([(i o)(tcp-accept l)])(display"Hello, World"o)(close-output-port o)))

It always surprises me when the do form is shorter than explicit recursion. I'm not entirely certain if I'm required to close the input port. Please comment if you think I need to.
Ungolfed
(do ([l (tcp-listen 12345)]) (#f)
  (let-values ([(i o) (tcp-accept l)])
    (display "Hello, World" o)
    (close-output-port o)))

Wolfram (102)
#[[2]] contains OutputStream of the incoming socket
<<SocketLink`;
CreateAsynchronousServer[CreateServerSocket@12345,(#[[2]]~Write~"Hello world";Close/@#)&]

Wolfram? Link to language page?

Perl, 118 bytes
$s=new IO::Socket::INET LocalPort=>12345,Listen=>5,Reuse=>1;{$c=$s->accept;$c->send("Hello World");shutdown $c,1;redo}

Example:
$ perl -MIO::Socket -e '$s=new IO::Socket::INET LocalPort=>12345,Listen=>5,Reuse=>1;{$c=$s->accept;$c->send("Hello World");shutdown $c,1;redo}'

$ telnet localhost 12345
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Hello WorldConnection closed by foreign host.
$

Ruby, 83 bytes
require'socket';s=TCPServer.new 12345;loop{t=s.accept;t<<"Hello, World\n";t.close}

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Count characters in lo..ol and print a phrase
Assuming 'lol' with a variavle number of 'o's. Print a the following phrase:
What does 1st, 2nd, 3rd, 4th ... 'o' stand for?

Examples:
lol    -> What does 1st 'o' stand for?
loooool -> What does 1st, 2nd, 3rd, 4th, 5th 'o' stand for?

So far I managed to write a 128 characters solution in Perl:
$l=(<>=~tr/o//);print"What does ";print$_,$_==1?'st':$_==2?'nd':$_==3?'rd':'th',$_<$l?', ':''for(1..$l);print " 'o' stand for?";

and a 123 characters solution in Haskell:
p 1="1st";p 2="2nd";p 3="3rd";p n=show n++"th";main=putStr$"What does "++(foldr(++)"'o' stand for?"[p i++", "|i<-[1..23]]);

How short can you write it?

Does it work for 'll'? I assume not

You can assume number of 'o' to be >0.

Yes. But that increases difficulty, somehow...

GolfScript, 82 characters
"What does "\,2-,{)..10/10%1=!\10%`"123"\?)*"thstndrd"2/=+}%", "*" 'o' stand for?"

Works even for >100 'o's, test it online.

Python, 112
print'What does '+', '.join(`n+1`+['th','snrtdd'[n::3]][n<3]for n in range(len(raw_input())-2)),"'o' stand for?"

very nice slicing trick...

Unfortunately does not work for number of 'o's greater than 20.

Perl 104 (+1) bytes
s/l?ol?/($`?', ':"What does the ").++$n.((0,st,nd,rd)[$n%(10<<($n%100<20))]||th)/ge;s/$/ 'o' stand for?/

Correctly handles 11th, 12th, 13th, 21st, 22nd, 23rd, 111th, 112th, 113th etc. Takes input from stdin, and requires a -p command line switch:
$ echo loooool| perl -p loool.pl
What does the 1st, 2nd, 3rd, 4th, 5th 'o' stand for?

$ echo looooooooooooooooooooooooooooooooooooooooool| perl -p loool.pl
What does the 1st, 2nd, 3rd, 4th, 5th, 6th, 7th, 8th, 9th, 10th, 11th, 12th, 13th, 14th,
15th, 16th, 17th, 18th, 19th, 20th, 21st, 22nd, 23rd, 24th, 25th, 26th, 27th, 28th, 29th,
30th, 31st, 32nd, 33rd, 34th, 35th, 36th, 37th, 38th, 39th, 40th, 41st, 42nd 'o' stand for?

If it is not required that 21st, 22nd, 23rd be reported correctly (as in the example code), this can be reduced to 87 bytes:
s/l?ol?/($`?', ':"What does the ").++$n.((0,st,nd,rd)[$n]||th)/ge;s/$/ 'o' stand for?/

PHP 107 bytes
What does the <?for(;$argv[1][++$n]>l;$f=', ')echo$f,$n,date(S,~-$n%(10<<($n%100<20))*9e4)?> 'o' stand for?

Input is taken by command line argument:
$ php loool.php loooool
What does the 1st, 2nd, 3rd, 4th, 5th 'o' stand for?

$ php loool.php looooooooooooooooooooooooooooooooooooooooool
What does the 1st, 2nd, 3rd, 4th, 5th, 6th, 7th, 8th, 9th, 10th, 11th, 12th, 13th, 14th,
15th, 16th, 17th, 18th, 19th, 20th, 21st, 22nd, 23rd, 24th, 25th, 26th, 27th, 28th, 29th,
30th, 31st, 32nd, 33rd, 34th, 35th, 36th, 37th, 38th, 39th, 40th, 41st, 42nd 'o' stand for?

Once again, if correctly handling n>20 is not required, this can be reduced to 87 bytes:
What does the <?for(;$argv[1][++$n]>l;$f=', ')echo$f,date(jS,~-$n*9e4)?> 'o' stand for?

R - 158 characters
f=function(s){n=1:(nchar(s)-2);v=c("st","nd","rd",rep("th",7));cat("What does the",paste0(n,c(v,rep("th",10),rep(v,8))[n],collapse=", "),"\"o\" stand for?")}

Works until 100 "o"s.
Usage:
f("looooooooooooooooooooooooooooooooool")
What does the 1st, 2nd, 3rd, 4th, 5th, 6th, 7th, 8th, 9th, 10th, 11th, 12th, 13th, 14th, 15th, 16th, 17th, 18th, 19th, 20th, 21st, 22nd, 23rd, 24th, 25th, 26th, 27th, 28th, 29th, 30th, 31st, 32nd, 33rd, 34th "o" stands for?


text:
Sibling Rivalry
Objective Requirements

A main 'parent' file and a 'child' file.
The parent file creates a new child file that contains code that must execute after creation.
The child file that is created must delete the existing sibling file. It wants all the attention, afterall.
No matter how many times the parent file is executed, a new child file must be created and executed.
Every time a child file is executed, it must delete it's sibling.
Since no two siblings are ever truly identical, each child file must also be unique.
No matter how many child files are created, their names and file contents MUST be unique.
Only the parent file may explicitly know the child names. (Parent may tell the new child it's older sibling's name.)
Child files may not simply be renamed.

Things to consider

The parent may be modified by the child (children give us all grey hairs anyways, right?), but it's methods may not change.
The child has to kill its sibling. It cannot force its sibling to commit suicide.
No human interaction may occur beyond the execution of the parent (such as manual input).

Winning Requirements

Only the parent file character length / byte size will be measured.
Fewest bytes/shortest length wins.

Inspired by this challenge.

For clarification: may the parent modify itself, or are only the children allowed to modify the parent?

Hmm. I think it will be alright for the parent to modify itself however it sees fit, but the child should not be allowed to change the parent methods. Does anyone have different thoughts on this?

I've seen that before! Glad you could do something better than I did. +1!

Perl, 4 characters
Parent file (parent.pl):
do a

Initial child file (named a):
if ($0 =~ /parent\.pl$/)
{
    $ARGV[0]=(-f 'a' ? 'a' : <a*>);
    open B,'>'.($a='a'.time);
    print B <>,'a';
    exec "perl $a";
}
else
{
    open PARENT,'>parent.pl';
    print PARENT "do <a*>";
    close PARENT;

    while (<a*>)
    {
        if ($0 !~ /\Q$_\E$/)
        {
            unlink $_;
        }
    }
}
#

Nowhere does the question state that a child file does not exist at the beginning.  Further, it might even be interpreted as requiring an initial child file (it states that the child must delete its sibling, never mentioning a special case when a sibling does not exist).
I assert that this fulfills all the requirements stated in the question.
One might object that "the child creates its own sibling"; however, this is not true.  The parent is the program which is being executed when the child is created.  It just gets some code stored in another file and runs that code.
This child not only kills its sibling; it also kills anyone else who is unlucky enough to have a name starting with a (consider that collateral damage).  This is an artifact of my earlier attempts at the problem. Obviously, any method of killing the sibling could be implemented without changing the score.

+1 for thinking inside the box ^^. naming the sibling '_' or '%' could lead to far less collateral damage in a typical system.

Perl 68 bytes
utime$a+open(C,'>',$a=(stat$0)[8]),print(C"unlink~-$a"),$0;`perl $a`

Works in a similar fashion to the PHP script below, by updating its own access time to keep track of children names. As with all solutions below, the parent script may be named anything you choose.

PHP 87 bytes
It seems that since our parent is reproducing asexually, all it really needs to do is touch itself.
<?touch($f=__FILE__,1+$t=filemtime($f));fputs(fopen($t,w),"<?@unlink($t-1);");`php $t`;

PHP 110 (104) bytes
<?$f=$g=AAAAAAAA;fputs(fopen(++$f,w),"<?@unlink($g);fputs(fopen('".__FILE__."',c),'<?\$f=\$g=$f');");`php $f`;

If the parent is allowed to self-modify, a few bytes can be saved, mainly on quotation marks:
<?$f=$g=AAAAAAAA;fputs(fopen(++$f,w),"<?@unlink($g);");fputs(fopen(__FILE__,c),"<?\$f=\$g=$f");`php $f`;

Admittedly, the parent isn't very creative when naming its children. The first will be called AAAAAAAB, the second AAAAAAAC and so forth. The created child will delete its previous sibling, and modify its parent, making it somewhat 'older'.
The first child will contain the following (if the parent script is named parent.php):
<?@unlink(AAAAAAAA);fputs(fopen('parent.php',c),'<?$f=$g=AAAAAAAB');

Cut mine in more than half! hurk! /me dies.

Correct me if I'm wrong, but can't you also start with $f=$g=0 ? The parent would grow in size, surely, but wouldn't AAAAAAAA eventually roll over as well?

@jdstankosky If the file started with 0, after just the tenth iteration the semicolon would be overwritten, resulting in syntax error. Yes, AAAAAAAA will eventually roll over as well... after 200795254400 iterations. Executing the script one thousand times per second would take over six years to error.

Solutions based on file time seem to require inserting wait 1 sec operation in parent script to be sure all file times are different.

@EgorSkriptunoff This is why the parent script manually sets its own file time - to overcome this limitation.

Shit! Why Perl is always first? :-)

+1 for making me laugh out loud at work with the touch() joke!

Lua, 80
n=io.open(0,'a'):write' ':seek()os.execute('echo rm '..n-1 ..' >'..n..'&sh '..n)

Parent file (filename 0) appends one character to its own body on each run and treats its new length as name of next child file (so, first child file will be given name 82 and will contain rm 81).
Lua 5.2 required.
Usage: lua 0.

Does the code of the child change as well as it's name?

@jdstankosky - Yes.  My answer was updated to clarify this.

python2 - 154
Needs a subdirectory called c to be at the same directory.
Generates sh. I took the liberty of calling the file contents unique when it contains the files random (enough?) name. Seems to work although I never close the generated file.
import os,binascii
l=os.listdir("c")
n="c/"+binascii.b2a_hex(os.urandom(15))+".py"
open(n,"w+").write("rm $1\n#"+n)
for v in l:os.system("sh "+n+" c/"+v)

If we know there is ALWAYS one child, we can shorten the script to 146 bytes:
import os,binascii
l=os.listdir("c")[0]
n="c/"+binascii.b2a_hex(os.urandom(15))+".py"
open(n,"w+").write("rm $1\n#"+n)
os.system("sh "+n+" c/"+l)

Trying to read this (I need to learn python), the child file removes everything in the /c/ directory that isn't itself? Or is the parent doing the deleting?

@jdstankosky What, I must have been very tired. Only now I see how horribly wrong this is doing its business. I think it should be corrected now. The created files are effectively alias for rm and the parent calls the new file for each old file in c directory.

PHP 279
<?php $s="00000000.php";$c="11111111.php";$n=fopen($c,"w");fwrite($n,"<?php \$h=fopen('p.php','r');\$d=fread(\$h,328);\$h=fopen('p.php','w');fwrite(\$h,'<?php \$s=\"'.basename(__FILE__).'\";\$c=\"'.hash('crc32',microtime(true)).'.php\";'.substr(\$d,42));unlink('$s');");`php $c`;

It uses crc32 as a hash function, so it's not ENTIRELY 100% unique... I'll try to think of another solution. This one does cause a warning on the first execution, but works as expected every time there-after.
Here is a semi-ungolfed readable version (changed substr() start point so it would work ungolfed as a bit of copy+pasta):
<?php
$s="02204f88.php";
$c="4b2e0cfb.php";
$n = fopen($c, "w");
fwrite($n,"<?php
\$h=fopen('p.php','r');
\$d=fread(\$h,328);
\$h=fopen('p.php','w');
fwrite(\$h,'<?php
\$s=\"'.basename(__FILE__).'\";
\$c=\"'.hash('crc32',microtime(true)).'.php\";'.substr(\$d,43));
unlink('$s');
");
exec("php $c");

python 2.7 - 110 Characters
c=0
import os
i=`c+1`
o(__file__,'r+').write('c='+i)
o('c'+i,'w').write('rm c'+`c`)
os.system('sh c'+i)

The above code would throw an error that can be ignored, the first time it is run.
A slightly longer modified version (128 characters) won;t complain the first time its run
c=0
import os
i=`c+1`
o(__file__,'r+').write('c='+i)
o('c'+i,'w').write('rm c'+`c`)
os.system('sh c'+i+'>/dev/null 2>&1')

@primo: Yes, I misunderstood the problem. I corrected it, and now stands the same size as yours :-)

After running 10 times, this version will error.

Tcl - 131 chars
set n c[expr rand()].tcl;set f [open $n w+];puts $f [string map "@ $n" {lmap f [glob -ta -di . c*] {if {$f ne {@}} {file del $f}}}]

Not sure if I understand this correctly. (Delete all siblings, or only delete last one?)
I use glob and kill all other siblings in the same directory.
Names are unique, files are unique (contains own file name).


text:
Write a function that reduces compositions of linear operators
You are given two functions \$g(x)\$ and \$h(x)\$, each of which takes an integer \$x\$ and returns the number \$ax + b\$ (where \$a\$ and \$b\$ are integers defined in the function).
Your task is to write a function \$f(g, h)\$ that takes these two functions, and returns a function \$k(x) = g(h(x))\$, but where the procedure of \$k(x)\$ is also simply of the form \$ax + b\$.
For example, given \$g(x) = 2x + 3\$ and \$h(x) = 3x + 4\$, you would need to return \$k(x) = 6x + 11\$, and not \$k(x) = 2(3x + 4) + 3\$.

Yes. There is a way to extract those two constants without accessing the AST.

May I suggest clarifying that the return value is of function type as well, as I'm guessing is your intent? Two of the current answers return strings.

@KevinReid Done.

I'm thinking of rewarding a bounty for an answer in binary lambda calculus...

I don't understand how you want the output. If it's as a function, you could just black-box compose the inputs. Do you want the pair (a,b) for which k(x)=ax+b? A function that must be written in the form k(x)=ax+b? If the second, do a and b have to be given explicit assignments in that function?

GolfScript, 41 40 23 19 characters
{2,0+%/-{@*+}++}:k;

Thanks to Peter Taylor for pointing out this solution. Accepts two function bodies as arguments.
The following examples show how to use function k:
# As function
{2*3+} {3*4+} k         # => {11 6 @*+}

# Apply to value
5 {2*3+} {3*4+} k ~     # => 41

If one wants to retain the original output format, the following 22 character solution is possible:
{2,0+%/-{*}+\+{+}+}:k;

{2*3+} {3*4+} k         # => {6 * 11 +}

Explanation of the code:
{                       # on stack are functions g h
  2,                    # build array [0 1] -> g h [0 1]
  0+                    # append 0 -> g h [0 1 0]
  %                     # apply function h to each element -> g [h(0) h(1) h(0)]
  /                     # apply function g to each element
                        # and break up the array -> g(h(0)) g(h(1)) g(h(0))
  -                     # subtract last two -> g(h(0)) g(h(1))-g(h(0))
  {@*+}++               # append function body to these values
}:k;                    # save function to variable k

Save 4: {2,%/1$-{@*+}++}:k; or {2,0+%/-{@*+}++}:k;

Your explanation makes me never want to learn Golfscript. It would make my head explode trying to figure it out.

@jdstankosky Do you mean the explanation is not clear (in which case I'd be happy to amend if you could point out what is unclear) or that GolfScript is - well - special (in which case you'll miss a lot of fun).

@Howard It's definitely interesting, incredibly confusing, and far more advanced than anything I think I'll ever be able to figure out.

Mathematica 15
Define g, h as pure functions
g and h are defined as pure functions (awaiting a value or independent variable to be assigned)
g = 2 # + 3 &;
h = 3 # + 4 &;
g[x]
h[x]

3 + 2 x
4 + 3 x

Method #1: Compose g of h directly (15 chars)
g@h@x//Simplify

11 + 6 x

Or, alternatively: (17 chars)
g[h[x]]//Simplify

Method #2: Define f (25 chars= 13 + 10 chars for Simplify)
f=Composition

f[g, h][x]
f[g, h][x] // Simplify
Composition[g, h][x]//Simplify
f[g, h][1]
Table[f[g, h][x], {x, 1, 13}]

3 + 2 (4 + 3 x)
11 + 6 x
11 + 6 x
17
{17, 23, 29, 35, 41, 47, 53, 59, 65, 71, 77, 83, 89}

Your f(g, h, x) should be f(g, h)(x).

Ok. I'll adjust accordingly

Haskell, 31
(f%g)x=f(g 0)+x*(f(g 1)-f(g 0))

Version in which the function body contains only variables (equivalent at run time, but closer to the question's form), 38 characters:
(f%g)x=a*x+b where h=f.g;b=h 0;a=h 1-b

Note that in both cases, since Haskell uses curried functions, there is no explicit construction of the composed function as it is implicit in % being defined with three arguments: function f, function g, value x.
Example use:
> ((\x -> 2*x + 3)%(\x -> 3*x + 4)) 0
11
> ((\x -> 2*x + 3)%(\x -> 3*x + 4)) 4
35

Ungolfed second form:
(f % g) x = a * x + b        -- equivalent: (f % g) = \x -> a * x + b
  where
    h = f . g                -- use built in function composition to bootstrap
    b = h 0                  -- constant term of composed function
    a = h 1 - h 0            -- linear term of composed function

This can be shortened to f%g=f(g 0)!(f(g 1-g 0)-f 0);(z!y)x=y*x+z (40 chars) by replacing the where clause with a function call (which also gets rid of the lambda) and defining infix operators instead of plain functions. Also, I'm not sure if it's necessary to share the values of y and z, so you may be able to improve it further by inlining them as well.

@hammar I have my doubts that putting the expressions inline is in the spirit of the question (“the procedure of k(x) is also simply of the form ax + b”) but OK, I'll take the edit, unless Joe Zeng disagrees.

Either way, f(g 1)-f(g 0) is one char shorter than f(g 1-g 0)-f 0.

@PeterTaylor Good point! In fact, that made me realize I was missing a trick in the original version: I now define h = f . g and derive all results from h, saving another two characters — I was previously stuck on the notion of extracting the coefficients of each function individually.

vba, 89
Function f(g,h,x)
f=Evaluate(Replace(g,"x","*("&Replace(h,"x","*"&x)&")"))
End Function

usage/result

?f("2x+3","3x+4",1)
   17

The functions aren't supposed to be strings. Can you evaluate the string directly with a number and get the result of the function out?

@JoeZeng, I think that is more what you were after

Lua, 87
function f(g, h)local a,b=g(h(1))-g(h(0)),g(h(0))return function(x)return a*x+b end end

Ruby >=1.9, 55
f=->g,h{a=(g[1]-g[0])*(h[1]-h[0]);b=g[h[0]];->x{a*x+b}}

Less golfed:
def c(f,g)
  f_a=f[1]-f[0]
  g_a=g[1]-g[0]
  a=f_a*g_a
  b=f[g[0]]
  ->x{a*x+b}
end

You can shorten even further by inlining a: f=->g,h{->x{(g[h[1]]-b=g[h[0]])*x+b}}

I wasn't sure that'd be permitted.

SML (60 chars)
fun f g h=let val c=g(h 0)val m=g(h 1)-c in fn x=>m*x+c end;

Ungolfed:
fun f g h =
    let val c = g (h 0)
        val m = g (h 1) - c
     in fn x => m*x + c
    end;

Jelly, 22 13 bytes
vØ.v@µI,Ḣż⁾×+

Try it online!
I think I understand what the question is asking for, but it really isn't clear exactly how the program is supposed to return \$a\$ and \$b\$, and it seems as though (given the functional-programming tag) that this is an unobservable requirement)
11 bytes sacrificed to clumsy I/O formats.
-9 bytes thanks to Howard's method
This takes \$g\$ and \$h\$ in Jelly's most natural form for non-black-box functions, as a string representing a Jelly link. As \$g(x)=ax+b\$ (and similar for \$h\$), this is equivalent to a×b+. We also return \$k\$ in the form a×b+. If this can instead take input and output as two lists [a, b] representing \$g\$ and \$h\$, we can reduce this to 8 bytes.
How it works
vØ.v@µI,Ḣż⁾×+ - Main link. Takes h ("c×d+") on the left and g ("a×b+") on the right
 Ø.           - [0, 1]
v             - Run h over each; [h(0), h(1)]
   v@         - Run g over each; [g(h(0)), g(h(1))]
     µ        - New link. Call this pair l and use it as the argument
      I       - Differences; g(h(0)) - g(h(1))
        Ḣ     - Head; g(h(0))
       ,      - Pair; [g(h(0)) - g(h(1)), g(h(0))]
          ⁾×+ - Yield "×+"
         ż    - Zip together; [g(h(0)) - g(h(1)), "×", g(h(0)), "+"]
                Implicitly smash together and print

PHP 72
Apparently I completely missed the point of this code-golf. I'm STILL not sure if I understand it correctly. Is no output required? Can I assume the methods of g and h? Here's a new version based off the old one:
<?=$f=function($g,$h,$x){return$k=($g[0]*$h[0]*$x)+($g[0]*$h[1])+$g[1];}

If this is still wrong, I give up.

PHP 176
The requirements are kind of confusing, but here's what I think you meant:
<?=f($argv);function f($a){$x=$a[3];$g=explode("x",$a[1]);$h=explode("x",$a[2]);return$k=($g[0]*$h[0])."*$x+".(($g[0]*$h[1])+$g[1])."=".(($g[0]*$h[0]*$x)+($g[0]*$h[1])+$g[1]);}

Usage: php f.php 2x+3 3x+4 5
Output: 6*5+11=41
Another Example
Usage: php f.php 4x-7 3x+4 2
Output: 12*2+9=33
Method
As you described, we can't simply output the answer with g(h(x)), we had to create function f(g,h) which determines what both the functions would be together, and return that as a new function: k(x).
Is this what OP meant?
Ungolfed
<?php

function f($a) {
    $x=$a[3];
    $g=explode("x",$a[1]);
    $h=explode("x",$a[2]);
    $k  = $g[0]*$h[0];
    $k .= "*";
    $k .= $x;
    $k .= "+";
    $k .= ($g[0]*$h[1])+$g[1];
    $k .= " = ";
    $k .= ($g[0]*$h[0]*$x) + ($g[0]*$h[1])+$g[1];
    return $k;
}

echo f($argv);

In PHP terminology, the requirements are asking for a function which takes two callbacks as arguments and returns a callback. As an implementation note, I would expect to see a couple of calls to call_user_func and probably a call to create_function.

Erlang 54:
1> F = fun(G,H)->B=G(H(0)),A=G(H(1))-B,fun(X)->A*X+B end end.
2> (F(fun(X) -> 2*X+3 end, fun(X) -> 3*X + 4 end))(0).
11
3> (F(fun(X) -> 2*X+3 end, fun(X) -> 3*X + 4 end))(1) - v(2).
6

Common Lisp (108)
(defun f(g h)(let*((d(g 0))(c(-(g 1)d))(z(h 0))(e(-(h 1)z))(a(* c e))(b(+(* c z)d)))(lambda(x)(+(* a x)b))))

It could be shorter if I assumed expressions would have constants folded...but I didn't make that assumption to make sure I met the spec.  Also, I have implemented Clojure's literal anonymous function syntax as a read macro.  I decided against using that as well.

Postscript, 120
/f{1 index 0 get dup
2 index 0 get mul exch
3 2 roll 2 get mul
3 2 roll 2 get add[3 1 roll/mul cvx exch/add cvx]cvx}def

Ungolfed and commented with testing.
/g{2 mul 3 add}def
/h{3 mul 4 add}def

/f{
    1 index 0 get % g h g[0]
    dup 2 index 0 get mul % g h g[0] g[0]*h[0]
    exch 3 2 roll 2 get mul % g g[0]*h[0] g[0]*h[2]
    3 2 roll 2 get add % g[0]*h[0] g[0]*h[2]+g[2]
    [ 3 1 roll /mul cvx exch /add cvx ] cvx
}def

//g //h f ==

Output:
GPL Ghostscript 9.10 (2013-08-30)
Copyright (C) 2013 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
{6 mul 11 add}
GS>

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Advanced Code Golf - Disk Operations, and File Allocation
Good Afternoon Golfgeneers.
This is reasonably long and detailed question. Given what it was asking, it needed to be. If you have any questions, please ask them. If there is anything that isn't clear, please alert me to it so I can fix it. This is probably on the tougher side of codegolf.
We are building a lightweight computer, and we need the lightest weight file system possible. The shortest code will be chosen.
We are providing a cutting edge 65536 byte hard drive. For the sake of this prototype, it will be a direct image file, which your program can assume exists, and is in whichever location suits you - ie, a binary file representing the entire hard disk. You may assume that this image is already 'formatted' - ie. if your program relies on something being in the file to work, it can be. If you require the initial empty state to be something other then all-zeros, please state what it is.
There is no memory limit as to RAM used by your application.
The input and output commands will require an interface to the actual hard drive. Like the disk image, your program can assume that the file for input exists, and is wherever you want it to be. Likewise, your program can output wherever is convenient. It must however close the file after executing the input or output command.
You are not being provided with a format which you must use for the disc image - you are free to develop your own. It must be capable of storing up to 248 files. Any file greater then 256 bytes can count as a new file for the sake of this limit for every 256 bytes or part thereof. A file can be up to 63488 bytes. Basically - it must be as capable as a hard drive with 248 sectors of 256 bytes each.
The reasoning behind these seemingly sizes is to give you 2048 bytes of 'administration' - to store details of the files. Each file/folder must be accessible by a name of 4 alphanumeric characters, which may be case sensitive or insensitive as per your preference. If your program supports names of 4 or less characters, then there is bonus of a 0.95 multiplier.
Your program must accept, via stdin, the following commands. Parameters will be separated by a space. The command will be terminated by a newline.

L - List the names to stdout of all the current files and their sizes in bytes, separated by newlines.
C a b - Copy file a to new file b.
D a - Delete file a
R a b - Renames file a to new name b
I a - Adds the input file (see note above) as file a
O a - Outputs file a to the output file

The following errors may be reported to STDOUT or STDERR as valid reasons for a command to fail to execute. You may choose to only print ERR# where # is the number of the error:

1 - File doesn't exist
2 - File already exists
3 - Out of space*

* Note that your program can not issue this just because it is out of continuous space. If you still have sectors available, you must defragment the disk to make it work.
A folder system is optional - however, will net a bonus of a 0.8 multiplier to your score. If it supports more then 1 level of directory, it will net a bonus of a 0.7 multiplier (not in addition to the 0.8). For the bonus, you must have

L, R, C and D only work within the current directory. L must list folders in the current directory, as well as the files.
New command M a b moves file a to folder b. If b is '.', moves file to the parent director
New command G a goes to folder a. If a is '.', goes to parent folder
R must also rename folders
D must also delete folders, and any files/folders within them
C must also copy folders, and any files/folders within them

The following additional errors may be reported to STDOUT or STDERR as valid reasons for a command to fail to execute.

4 - Folder doesn't exist
5 - File, not folder required - where, I and O require file names, and a folder was given

Your score is:

The size, in bytes, of your source code
Multiplied by

0.95 if you support names of 4, or less characters
0.8 if you support a single level of folders
0.7 if you support multiple levels of folders
0.95 if you support commands (not necessarily file names) in lower or uppercase

Good luck.

I am willing to make allowances for languages which do not support something required by this challenge. Unfortunately, I don't think I can make it work just via command line parameters for GolfScript.

Looks complex enough to need a good test suite.

I'll start working on one - but may not be done today

Are the score multipliers compounded?

Compounded. Note that you can only get one of the single level or multiple levels of folders though.

Ruby, score 505.4 (560 characters)
x,a,b=gets.chomp.split
f=IO.read('F')
e=f[0,4*X=248].unpack 'A4'*X
s=f[4*X,2*X].unpack 's'*X
d=f[6*X..-1].unpack 'A'+s*'A'
u,v,w,y=[[N=nil,q=e.index(a),!t=e.index(""),"e[t]=a;s[t]=(d[t]=IO.binread('I')).size"],[!q,r=e.index(b),!t,"e[t]=b;d[t]=d[q];s[t]=s[q]"],[!q,N,N,"e[q]=d[q]='';s[q]=0"],[!q,r,N,"e[q]=b"],[!q,N,N,"IO.binwrite('O',d[q])"],[N,N,N,'X.times{|i|e[i]>""&&puts(e[i]+" #{s[i]}")}']]['ICDROL'=~/#{x}/i]
u&&$><<"ERR1\n"||v&&$><<"ERR2\n"||w&&$><<"ERR3\n"||eval(y)
d=d*""
d.size>63488&&$><<"ERR3\n"||IO.write('F',(e+s+[d]).pack('A4'*X+'s'*X+'A63488'))

Notes:

Filesystem is located in file F in the current directory. F must exist and may be created/formatted via the following command: IO.write('F',(([""]*248)+([0]*248)+[""]).pack('A4'*248+'s'*248+'A63488')).
Input file is always I also in the current directoy, output file is O.
Since it wasn't required to check errors, be sure to type correct commands (i.e. no unsupported commands, no missing arguments, too long filenames).
The file system implementation is extremely simple - for each command the full hard drive is read into memory and rebuild upon (successful) completion.

Bonuses:

Filenames may be 1-4 chars
Commands may be upper or lower case

The code is not yet fully golfed but shows already that for a substancial better score I'd try a completely different approach.
Test session (only STDIN/STDOUT is shown but of course each command is prepended by calling the above program):
> L
> I F001
> L
F001 558
> I F001
ERR2
> C F002 F003
ERR1
> C F001 F003
> L
F001 558
F003 558
> C F001 F003
ERR2
> R F002 F003
ERR1
> R F001 F003
ERR2
> R F001 F002
> L
F002 558
F003 558
> O F001
ERR1
> O F002
> L
F002 558
F003 558
> D F001
ERR1
> D F002
> L
F003 558
> C F003 F001
> L
F001 558
F003 558
> D F001
> L
F003 558
> D F003
> L

Tcl, score 487,711 (772 bytes)
{*}[set a {interp alias {}}] s {} dict se f
{*}$a u {} dict un f
{*}$a h {} dict g
proc 0 {} {return -level 1}
proc p {n a b} {foreach l $n {proc $l $a "global f c;$b;S"}}
p L\ l {} {puts [join [dict k [h $f {*}$c]] \n]}
p C\ c a\ b {s {*}$c $b [h $f {*}$c $b]}
p D\ d a {u {*}$c $a}
p R\ r a\ b {s {*}$c $a [h $f {*}$c $b];u {*}$c $b}
p I\ i a {set i [open i rb];s {*}$c $a [read $i];close $i}
p O\ o a {set o [open o wb];chan puts $o [h $f {*}$c $a];close $o}
p M\ m a\ b {set d $c;if {$b eq "."} {set d [lrange $c 0 end-1]};s {*}$d $a [h $f {*}$c $a];u {*}$c $a}
p G\ g a {if {$a eq "."} {set c [lrange $c 0 end-1]} {lappend c $a}}
p S {} {puts [set o [open F wb]] $f;close $o;return}
set f [read [set i [open F rb]]]
close $i
set c {}
while 1 {{*}[split [gets stdin]]}

Bonuses (gotta catch them all):

support file names with 4 byte or less - or more. I don't care. 0.95
support multilevel folders 0.7
support lower and upper case commands 0.95

Known limitations:

File system F must already exist. Empty or whitespace is fine.
I don't check the size of the file system - I don't care.
Input file is i, outputfile is o and the filesystem is in F
Errors will crash the program.
No checks if file/directory exist, might be an error.
No difference between a file and a directory. Yes, you can write a directory to output and use this as file system.
Using a file as directory that is not a valid file system will result in an error.
No input validation. Invalid commands may throw an error. Or not: eval puts [expr 1+2]
No command to create a directory (was not my idea), but will be created implicit by I (also not my idea, and G doesn't create)
G does not validate the directory.
Filenames could contain spaces, but the interface does not support them.
Concurrent modification of the same file system is not supported.

Some hacks:

eval puts $c -> current directory, separated by spaces.
exit - no comment.
lappend c . -> switches into the subdirectory .

Python 2.7 373 (413 bytes)
from pickle import*
E=exit;o=open;D,I,W='DIw'
def T(i):w[i]in d and E('ERR2')
d=load(o(D))
w=raw_input().split();b=w[0].upper()
if b=='L':
 for k in d:print k,len(d[k])
elif b==I:T(1);d[w[1]]=o(I).read()
else:
 a=w[1];a in d or E('ERR1')
 if b in'RC':T(2);d[w[2]]=(b<D and d.get or d.pop)(a)
 if b==D:d.pop(a)
 if b=='O':o(I,W).write(d[a])
d=dumps(d,-1)
x=65536-len(d)
x>-1or E('ERR3')
o(D,W).write(d+I*x)

The disk is saved in the Python pickle-Format: to create an empty disk you have to put these two bytes '}.' at the beginning and optionally 65534 fill bytes afterwards. Supports arbitrary large filenames (*0.95), upper and lowercase commands (*0.95) and hard links (:-).


text:
Calculate the date of Easter
Your function or program should take a year as input and return (or print) the date (in the Gregorian calendar) of that years Easter (not the Eastern Orthodox Easter). The date returned should be formatted according to ISO 8601, but with support for years greater than 9999 (such as 312013-04-05 or 20010130), and it only needs to work with years greater than or equal to 1583 (the year of the adoption of the Gregorian calendar), and years less than or equal to 5701583 (as that is when the sequence of Easter dates starts to repeat itself).
Examples:
e(5701583) = 5701583-04-10
e(2013)    = 2013-03-31
e(1583)    = 1583-04-10
e(3029)    = 30290322
e(1789)    = 17890412
e(1725)    = 17250401

The use of built-in functions for returning the date of easter is boring and therefore disallowed. Shortest answer (in characters) wins.
Resources:

http://en.wikipedia.org/wiki/Computus#Algorithms
http://web.archive.org/web/20150227133210/http://www.merlyn.demon.co.uk/estralgs.txt

Do you realise that some languages have a built-in function to do this?

Such as? The only one I am aware of is PHP, but the easter_date and easter_days functions are quite limited, easter_date only works for years after 1970 and easter_days doesn't return the correct amount of days for years prior to 1753. But I will edit the question to disallow the use of such functions.

R has a function Easter in package timeDate that works for any year of the gregorian calendar.

resource: http://en.wikipedia.org/wiki/Computus#Algorithms

So this is Gregorian and NOT Julian? Also, I'm not Catholic, what is the "Catholic Tradition?"

What's the scoring method?  Fewest characters?

@jdstankosky, I wrote "according to the Catholic tradition" just to imply that it is Gregorian, I could perhaps clarify it a little.

Peter Taylor is correct. The function in Mathematica's Calendar package is EasterSunday[year].  No, I won't be submitting it.

More functions

Bearing in mind that ISO 8601 doesn't naturally support years greater than 9999, is the answer required to support them?

@PeterTaylor, a good question. But I do think that the answer at least needs to support years up to 5,701,583, as that is when the cycle of dates recur (and it is doable using signed 32-bit integers). I will update the question and add a couple of test cases.

txt file link is an empty file.

@sergiol That's fixed now, I replaced the link with a version cached by archive.org, which should future proof it for quite a while.

GolfScript (85 chars)
~:^100/.)3*4/.@8*13+25/-^19%.19*15+@+30%.@11/+29/23--.@-^.4/++7%97--^0@.31/100*\31%)+

Sample usage:
$ golfscript.rb codegolf11132.gs <<<2013
20130331

Note that this uses a different algorithm to most of the current answers. To be specific, I've adapted the algorithm attributed to Lichtenberg in the resource linked by Sean Cheshire in a comment on the question.
The original algorithm, assuming sensible types (i.e. not JavaScript's numbers) and with an adaptation to give month*31+day (using day offset of 0) is
K = Y/100
M = 15 + (3*K+3)/4 - (8*K+13)/25
S = 2 - (3*K+3)/4
A = Y%19
D = (19*A+M) % 30
R = (D + A/11)/29
OG = 21 + D - R
SZ = 7 - (Y + Y/4 + S) % 7
OE = 7 - (OG-SZ) % 7
return OG + OE + 92

I extracted a common subexpression and did some other optimisations to reduce to
K = y/100
k = (3*K+3)/4
A = y%19
D = (19*A+15+k-(8*K+13)/25)%30
G = 23+D-(D+A/11)/29
return 97+G-(G+y+y/4-k)%7

This approach has slightly more arithmetic operations than the other one (Al Petrofsky's 20-op algorithm), but it has smaller constants; GolfScript doesn't need to worry about the extra parentheses because it's stack-based, and since each intermediate value in my optimised layout is used precisely twice it fits nicely with GolfScript's limitation of easy access to the top three items on the stack.

It has a small issue, when the date of Easter lies between the 1st of april and the 10th of april, it returns dates such as 1725041, when it should return 17250401. But upvoted for the different approach!

@Fors, oops. Now fixed.

Python 2 - 125 120 119 chars
This is Fors's answer shamelessly ported to Python.
y=input()
a=y/100*1483-y/400*2225+2613
b=(y%19*3510+a/25*319)/330%29
b=148-b-(y*5/4+a-b)%7
print(y*100+b/31)*100+b%31+1

Edit:  Changed last line from print"%d-0%d-%02d"%(y,b/31,b%31+1) to save 5 characters.  I would have loved to represent 10000 as 1e4, but that would produce floating point necessitating a call to int.
Edit2:
Thanks to Peter Taylor for showing how to get rid of that 10000 and save 1 character.

If you split 10000up to 100*100 you can put the last line into Horner's form as (y*100+b/31)*100+b%31+1. The leading parenthesis allows you to remove the space after print, and you can pull out the three instances of 100 to a variable for an overall saving of 1 char.

@PeterTaylor: Excellent suggestion.  Updated my answer.

You can make it a function e(y) and save a few bytes

PHP 154
150 chars if I switch to YYYYMMDD instead of YYYY-MM-DD.
<?$y=$argv[1];$a=$y/100|0;$b=$a>>2;$c=($y%19*351-~($b+$a*29.32+13.54)*31.9)/33%29|0;$d=56-$c-~($a-$b+$c-24-$y/.8)%7;echo$d>31?"$y-04-".($d-31):"$y-03-$d";

With Line Breaks:
<?
$y = $argv[1];
$a = $y / 100 |0;
$b = $a >> 2;
$c = ($y % 19 * 351 - ~($b + $a * 29.32 + 13.54) * 31.9) / 33 % 29 |0;
$d = 56 - $c - ~($a - $b + $c - 24 - $y / .8) % 7;
echo $d > 31 ? "$y-04-".($d - 31) : "$y-03-$d";

Useage: php easter.php 1997
Output: 1997-03-30
Useage: php easter.php 2001
Output: 2001-04-15

Great algorithm golfing, not so great code golfing. I took the freedom to chop off 18 bytes: <?=$y=$argv[1],"-0",3+$m=($d=56-($c=($y%19*351-~(($a=$y/100|0)*29.32+($b=$a>>2)+13.54)*31.9)/33%29)-~($a-$b+$c-24-$y/.8)%7)>>5,31*$m-$d;

Fails to meet output format. The leading zero for the day is missing where needed. E.g. for year 1725 it outputs 1725-04-1 instead of 1725-04-01.

dc: 106 characters
?[0n]smdndsy100/1483*ly400/2225*-2613+dsa25/319*ly19%3510*+330/29%sb148lb-5ly*4/la+lb-7%-d31/0nn31%1+d9>mp

Usage:
> dc -e "?[0n]smdndsy100/1483*ly400/2225*-2613+dsa25/319*ly19%3510*+330/29%sb148lb-5ly*4/la+lb-7%-d31/0nn31%1+d9>mp"
1725
17250401
>

This should be able to be shortened by using 'd' and 'r' instead of all the loads and stores.

C: 151 148 characters
y;a;b;main(){scanf("%d",&y);a=y/100*1483-y/400*2225+2613;b=(y%19*3510+a/25*319)/330%29;b=148-b-(y*5/4+a-b)%7;printf("%d-0%d-%02d\n",y,b/31,b%31+1);}

And the same code, but better formatted:
#include <stdio.h>

int y, a, b;

int main() {
    scanf("%d", &y);

    a = y/100*1483 - y/400*2225 + 2613;
    b = (y%19*3510 + a/25*319)/330%29;
    b = 148 - b - (y*5/4 + a - b)%7;

    printf("%d-0%d-%02d\n", y, b/31, b%31 + 1);
}

There are frightfully many algorithms for calculating the date of Easter, but only a few of them are well suited for code golfing.

Javascript 162 156 145
function e(y){alert(y+"0"+((d=56-(c=(y%19*351-~((b=(a=y/100|0)>>2)+a*29.32+13.54)*31.9)/33%29|0)-~(a-b+c-24-y/.8)%7)>(f=31)?4:3)+(d-f>0&d-f<10?0:"")+(d>f?d-f:d))}

Inspired by @jdstankosky's PHP solution...
Provides YYYYMMDD result...
Now narrowed down to:
alert((y=prompt())+0+((d=56-(c=(y%19*351-~((b=(a=y/100|0)>>2)+a*29.32+13.54)*31.9)/33%29|0)-~(a-b+c-24-y/.8)%7)>(f=31)?4:3)+(d-f>0&d-f<10?0:"")+(d>f?d-f:d))

Now asks for input... reduced literal string of "0" to 0 and let loose typing work to my advantage! :)
Reduced further to take ES6 into account...
e=y=>y+"0"+((d=56-(c=(y%19*351-31.9*~((b=(a=y/100|0)>>2)+29.32*a+13.54))/33%29|0)-~(a-b+c-24-y/.8)%7)>(f=31)?4:3)+(d-f>0&d-f<10?0:"")+(d>f?d-f:d)

APL 132
This algorithm calculates the number of days Easter lies relative to the beginning of March. The date is returned in the YYYYMMDD format as allowed in the question:
E y
(a b)←⌊((3 8×⌊y÷100)+¯5 13)÷4 25
c←7|y+(⌊y÷4)-a-e←⌊d-((19×d←30|(227-(11×c)-a-b))+c←19|y)÷543
+/(10*4 2 0)×y,(3+i>31),(61⍴⍳31)[i←e+28-c]

Taking the original test cases:
      E 2013
20130331
      E 1583
15830410
      E 3029
30290322
      E 1789
17890412

Javascript 134 Characters
Using a slightly modified Al Petrofsky's 20-op algorithm to allow a simpler conversion into the year-month-date format.
This provides additional 14 characters shorter code from the answer provided by WallyWest
The Original Al Petrofsky's Code:
    a =Y/100|0,
    b =a>>2,
    c =(Y%19*351-~(b+a*29.32+13.54)*31.9)/33%29|0,
    d =56-c-~(a-b+c-24-Y/.8)%7;

Last line changed to:
d =148-c-~(a-b+c-24-Y/.8)%7;

1. 138 Characters With the format YYYY-MM-DD

e=y=>(c=(y%19*351-31.9*~((b=(a=y/100|0)>>2)+29.32*a+13.54))/33%29|0,d=148-c-~(a-b+c-24-y/.8)%7,y+'-0'+(d/31|0)+"-"+((o=d%31+1)>9?o:'0'+o))

console.log(e(2021));
console.log(e(2022));
console.log(e(5701583));
console.log(e(2013));
console.log(e(1583));
console.log(e(3029));
console.log(e(1789));
console.log(e(1725));

2. 134 Characters With the format YYYYMMDD

e=y=>(c=(y%19*351-31.9*~((b=(a=y/100|0)>>2)+29.32*a+13.54))/33%29|0,d=148-c-~(a-b+c-24-y/.8)%7,y+'0'+(d/31|0)+((d=d%31+1)>9?d:'0'+d))

console.log(e(2021));
console.log(e(2022));
console.log(e(5701583));
console.log(e(2013));
console.log(e(1583));
console.log(e(3029));
console.log(e(1789));
console.log(e(1725));

Fortran (GFortran), 179 bytes
READ*,I
J=I/100*2967-I/400*8875+7961
K=MOD(MOD(I,19)*6060+(MOD(MOD(J/25,59),30)+23)*319-1,9570)/330
L=K+28-MOD(I*5/4+J+K,7)
WRITE(*,'(I7,I0.2,I0.2)')I,(L-1)/31+3,MOD(L-1,31)+1
END

Try it online!
Uses the "Emended Gregorian Easter" algorithm (Al Petrofsky) from the second resource link. Strangely, it fails for year 5701583 (and, apparently, only for this year), predicting the Easter as one week earlier. Prints the date in YYYYYYYMMDD format, with some leading spaces if the year has less then seven digits.