Translated Julia

From Esolang
Jump to navigation Jump to search

Translated Julia is a esolang made by Mihai Popa. It's Julia but horribly translated by Baidu+Google Translate+Yandex+Papago+Microsoft (however you can add more or choose a another pair of translators for a even more horrible translation!)

Steps: 1. Take this program (as a example):

# function to calculate the volume of a sphere
function sphere_vol(r)
    # julia allows Unicode names (in UTF-8 encoding)
    # so either "pi" or the symbol π can be used
    return 4/3*pi*r^3
end

# functions can also be defined more succinctly
quadratic(a, sqr_term, b) = (-b + sqr_term) / 2a

# calculates x for 0 = a*x^2+b*x+c, arguments types can be defined in function definitions
function quadratic2(a::Float64, b::Float64, c::Float64)
    # unlike other languages 2a is equivalent to 2*a
    # a^2 is used instead of a**2 or pow(a,2)
    sqr_term = sqrt(b^2-4a*c)
    r1 = quadratic(a, sqr_term, b)
    r2 = quadratic(a, -sqr_term, b)
    # multiple values can be returned from a function using tuples
    # if the return keyword is omitted, the last term is returned
    r1, r2
end

vol = sphere_vol(3)
# @printf allows number formatting but does not automatically append the \n to statements, see below
using Printf
@printf "volume = %0.3f\n" vol 
#> volume = 113.097

quad1, quad2 = quadratic2(2.0, -2.0, -12.0)
println("result 1: ", quad1)
#> result 1: 3.0
println("result 2: ", quad2)
#> result 2: -2.0

2. Translate this code as follows (you can take on any translator with any language, if you want):

Baidu: English->Arabic
Google Translate: Arabic->Turkish
Yandex: Turkish->Indonesian
Papago: Indonesian->Thai
Microsoft: Thai->Amharic
Google Translate: Amharic->English

3. Result? Here you go, it's horribly translated with 5 translators using a weird pair of languages:

Function to calculate domain size
Environment (r)
Julia is allowed to use Unicode name (UTF-8 code).
You can even use the symbol "P" or "P".
The inverse is 4/3 times pi times r squared
Explain
The job description can also be short.
Squared (a, b) = (b + squared) / 2
x = a *x^2 + b * x + c = 0, you can specify the type of the parameter from the function definition.
2nd Quartile Function (A float64, B float64, C float64)
Unlike other languages, 2(a) is equal to 2*(a).
*** 2 or po use づ2 instead of (a, 2)
square = square unit (b22-4a*c)
R1 = Squared (a, b)
R2 = squared (a, b, sqr_sql)
When answering part of a task, use a series of tasks
訜 If removing the key is a recovery, it will return to another name.
R1 R2
Explain
Ball size
print@ printf allows number formats but does not automatically add numbers to words. See below.
Use the printer
@ @ printf "Volume=0,3%f
(suffering)
Amount = 190,097
1 angle = 2 angles (2, 2, 12)
Println("Result 1 quatre1").
Result 1 3.0
Println("Result 2 quatre2").
Result 2.0

See also

Translated VBS

Translated C#

Translated Python

Translated Batch

Translated ORK