[Question]
  [
**Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers.
 
 
---
 Questions without an **objective primary winning criterion** are off-topic, as they make it impossible to indisputably decide which entry should win.
Closed 7 years ago.
[Improve this question](/posts/18761/edit) 
You need to make three things:
1. Statement of a task, **T**.
2. Solution of the task in language not typically used for golfing, **A**.
3. Solution of the task in language typically used for golfing, **B**. Don't try to just bloat up **B** to pump up the score, instead think as if **B** was written by your competitor.
Use common sense in defining `typically used for golfing`, try to maximize fun for other users.
Other users may propose better `B`s (maybe including in other "golfy" languages).
Scoring is `(length_in_bytes(B)+5)/(length_in_bytes(A)+5)`, more is better. (Maybe the scoring formula should be changed?..)
The main idea is to invent a task where languages that typically perform well in codegolf meet a problem. It can be sudden strength of a usual language in the given task or sudden weakness of some golflang.
Avoid tasks that mention specific programming languages, like `Input a string and execute it as a Scheme code`.
  
[Answer]
My previous question, Print a sinusoidal wave (vertically), qualifies at this moment. I'm posting it here as a solution, also hoping that you guys can come up with some shorter solutions to my original question.
As required by Vi., I will post a summary of the question.  
  
Print a continuous sinusoidal wave scrolling vertically on a terminal. The program should not terminate and should continuously scroll down the wave (except until SIGINT). You may assume overflow is not a problem (i.e. you may use infinite loops with incrementing counters, or infinite recursion).
The wave should satisfy the following properties:
* Amplitude = 20 chars (peak amplitude)
* Period = 60 to 65 lines (inclusive)
* The output should only consist of spaces, newline and `|`
* After each line of output, pause for 50ms
There is a sample output on my original question, but I'm not posting it here, because this will make my answer ridiculously long. My original question can be seen here: [Print a sinusoidal wave (vertically)](https://codegolf.stackexchange.com/questions/18633/print-a-sinusoidal-wave-vertically)
Shortest `A` currently: a Perl solution with 48 chars:
<https://codegolf.stackexchange.com/a/18655/12205>
```
print$"x(25+20*sin).'|
';$_+=.1;`sleep .05`;do$0
```
Shortest `B` currently: a J solution with 54 chars: <https://codegolf.stackexchange.com/a/18649/12205>
```
($:+&0.1[6!:3@]&0.05[2:1!:2~' |'#~1,~[:<.20*1+1&o.)0  
```
  
  
  
Currently, the score of this answer is 1.113 (an awfully low score)
[Answer]
# Add two numbers
Get two numbers from STDIN, and add them together. You have to support floating point numbers, so 0.5 + 1.5 has to equal 2.
## Perl 5 (with `-E`)
```
say<>+<>
```
## GolfScript
```
n%'+'*'"#{
}"'n/\*~
```
[Answer]
# Print 'Hello, World!' to the stdout.
PHP, 13 bytes
```
Hello, World!
```
Golfscript, 15 bytes
```
'Hello, World!'
```
Pyth, 14 bytes
```
"Hello, World!
```
[Answer]
## Score 48/37 or 1.(297)
T: write a code snippet that ends the program after exactly one hour (as close as possible, like within a second) of running. Don't worry about exceptions, they can be unhandled.
A: Java (32)
```
Thread.sleep(3600000);int a=1/0;
```
B: is for Befunge 98, requires the [TIME fingerprint](http://www.rcfunge98.com/rcsfingers.html#TIME) (43)
```
"EMIT"4(HMS00p01p02p#;gS-!01gM-!H-!++3-!j;@
```
This takes the Hour, Minute, and Second at the time of running, and puts the at cells 02, 01, and 00. Then, it skips over the `;` to the second part. The second part works as follows:
```
g          get the value at 00
"EMIT"4(S) get the current time in seconds
-!         subtracts the values and changes a 0 to 1, anything else to 0
```
similarly for the Minute and Hour.
```
++  sums up the values
3-! i the sum is 3, we get a 1, otherwise, we get a 0.
j   jump over the next that many cells
;   skip code execution until the next ;
@   end program
```
Note that Befunge will automatically go back to the beginning of the line when the end of a line is reached.
---
As we can see, Befunge is not good when it comes to waiting for specific times. However, Java is not bad.
[Answer]
# Output a certain text file (498.388888 points)
The goal output is [here](https://bpaste.net/show/a1ba772bec0a).
The Python 3.4.3 script to print it is 49 bytes:
```
for b in dir(__builtins__):print(eval(b).__doc__)
```
The naive CJam program equal to the goal output, by wrapping the output string in `"..."` and escaping each `"` that occurs in it, would be 26908 bytes.
[Answer]
# Say "Hello world!" (50 / 26 ≈ 1.92)
Show a message box to say "Hello world!"
## JavaScript
```
alert('Hello world!')
```
In a browser with support for DOM Level 0+.
## Perl
```
use Win32;Win32::MsgBox('Hello world!','',48)
```
Running on ActivePerl with Win32::GUI.
[Answer]
# Output "Hello world!" until user presses "q", ~~1.842~~ 105/44 = 2.386
1. Print "Hello world!" (including newline).
2. The user presses a key, which is not echoed to the screen.
3. Repeat until the key pressed was "q".
## QBasic (~~52~~ 39 characters)
```
1?"Hello world!":IF"q"<>INPUT$(1)THEN 1
```
Since posting my original answer, I discovered that I could turn off autoformatting in QB64. :^D With the line number and `?` shortcut for `PRINT`, this looks rather like a ternary expression in C-like languages.
First version:
```
PRINT "Hello world!"
IF INPUT$(1) <> "q" THEN RUN
```
## Perl 5 (100 characters)
```
while("q"ne$e){print"Hello world!\n";system"stty cbreak -echo";$e=getc;system"stty -cbreak echo";}
```
The above will only work on (certain?) UNIX systems (tested on Ubuntu 12.04). It's possible that one could go cross-platform and get it down to 91 characters using the [Term::ReadKey](http://search.cpan.org/dist/TermReadKey/ReadKey.pm) module, but I haven't tested it:
```
use Term::ReadKey;while("q"ne$e){print"Hello world!\n";ReadMode 3;$e=ReadKey 0;ReadMode 0;}
```
[Answer]
# Hello, world (3 1/3 points)
Write program that outputs `Hello World.`.
## HQ9+ (1 character)
This is not language "typically used for golfing", so I believe it fits here. Works in [this interpreter, by the way](http://www.almnet.de/esolang/hq9plus.php).
```
H
```
## GolfScript (15 characters)
I doubt it can get any shorter, even if it's GolfScript.
```
"Hello World."
```
[Answer]
## Output "Hello world!", 33/97 = 2.94
Write a program that outputs `Hello world!`
## Arduino or GML
```
Serial.print("Hello world!")
```
or
```
show_message("Hello world!")
```
Both are 28 characters.
## [GTB](http://timtechsoftware.com/gtb "GTB")
I use GTB for golfing a lot (especially since I created it myself, and it is Turing complete). Unfortunately, there is only limited support for lowercase characters (because TI-84 calculator can't deal with it). This is probably the shortest GTB program that can output Hello world!
```
S;"lower",1,1)→_~"H"+S;"expr(",1,1)+_+_+S;"cos(",2,1)+" W"+S;" or ",2,2)+_+S;" and ",4,1)+"!
```
92 characters.
]