Feedback for my custom language Yoru

Hello! I’ve created a programming language known as Yoru. Yoru is a programming language intended for use while away from Studio on a mobile device. I’d like to have some opinions on this first build. I’d also like to see some examples of code people can create with it.

You can find some example files at:

but here’s some screenshots if you prefer:

local message is $Hello! Thank you for visiting the Yoru sample file!$

print .message. 

image

If you’d like to give it a try yourself, you can use the code on Github or this module:

Thanks for the feedback in advance!

9 Likes

Thank you. You have now inspired me to make my own coding language.


Cool :+1:

3 Likes

as soon as I saw this I saw the same thing-

1 Like

Update - I just created a plugin that makes it easier to use this language! I’d also like some feedback on this if anyone would like to try it!

1 Like
v = v:gsub("absolute ", "abs ") -- abs
	v = v:gsub("arc cosine", "acos") -- acos
	v = v:gsub("arc sine", "asin") -- asin
	v = v:gsub("alternate arc tangent", "atan2") -- atan2
	v = v:gsub("arc tangent", "atan") -- atan
	v = v:gsub("ceiling ", "ceil ") -- ceil
	v = v:gsub("collect garbage", "collectgarbage") -- collectgarbage
	v = v:gsub("concatenate", "concat") -- concat
	v = v:gsub("cosine ", "cos ") -- cos
	v = v:gsub("hyperbolic cosine", "cosh") -- cosh
	v = v:gsub("degrees ", "deg ") -- deg
	v = v:gsub("difference of time", "difftime") -- difftime
	v = v:gsub("value types", "Enum") -- Enum
	v = v:gsub("elapsed time", "elapsedTime()") -- elapsedTime()
	v = v:gsub("second alternate exponent", "ldexp") -- ldexp
	v = v:gsub("for each it", "foreachi") -- foreachi
	v = v:gsub("for each", "foreach") -- foreach
	v = v:gsub("alternate exponent", "frexp") -- frexp
	v = v:gsub(" execute ", ":") -- colon
	v = v:gsub("exponent ", "exp ") -- exp
	v = v:gsub("floor modulo", "fmod") -- fmod
	v = v:gsub("from ", "") -- from (just here to make the language more logical-sounding)
	v = v:gsub("get function environment", "getfenv()") -- getfenv
	v = v:gsub("get meta table", "getmetatable") -- getmetatable
	v = v:gsub("get number", "getn") -- getn
	v = v:gsub("global match", "gmatch") -- gmatch
	v = v:gsub("global sub", "gsub") -- gsub METAAAAAA!
	v = v:gsub("length ", "len ") -- len
	v = v:gsub("is greater than or equal to", ">=") -- >=
	v = v:gsub("is less than or equal to", "<=") -- <=
	v = v:gsub("is less than", "<") -- <
	v = v:gsub("is greater than", ">") -->
	v = v:gsub(" minus ", " - ") -- minus
	v = v:gsub(" times ", " * ") -- times
	v = v:gsub(" divided by ", " / ") -- divided by
	v = v:gsub("repeat string", "rep") -- rep
	v = v:gsub("huge number", "math.huge") -- math.huge
	v = v:gsub("is equal to", "==") -- ==
	v = v:gsub("it pairs", "ipairs") -- ipairs
	v = v:gsub("load string", "loadstring") -- loadstring
	v = v:gsub("base 10 logarithm", "log10") -- log10
	v = v:gsub("split number", "modf") -- modf
	v = v:gsub("modulo", "%%") -- modulo
	v = v:gsub(" %.", "("):gsub("%. ", ")") --()
	v = v:gsub("get pi", "math.pi") -- math.pi
	v = v:gsub(" plus ", " + ") -- plus
	v = v:gsub("print identity", "printidentity()") -- printidentity
	v = v:gsub("profile begin", "profilebegin") -- profilebegin
	v = v:gsub("profile end", "profileend") -- profilebegin
	v = v:gsub("protected call", "pcall") -- pcall
	v = v:gsub("random seed", "randomseed") -- randomseed
	v = v:gsub("raw equal", "rawequal") -- rawequal
	v = v:gsub("raw get", "rawget") -- rawget
	v = v:gsub("raw set", "rawset") -- rawset
	v = v:gsub("settings", "settings()") -- settings()
	v = v:gsub("set function environment", "setfenv()") -- setfenv
	v = v:gsub("set meta table", "setmetatable") -- setmetatable
	v = v:gsub("hyperbolic sine", "sinh") -- sinh
	v = v:gsub("sine", "sin") -- sin
	v = v:gsub("square root", "sqrt") -- sqrt
	v = v:gsub("hyperbolic tangent", "tanh") -- tanh
	v = v:gsub("tangent", "tan") -- tan
	v = v:gsub("to number", "tonumber") -- tonumber
	v = v:gsub("to string", "tostring") -- tostring
	v = v:gsub("trace back", "traceback") -- traceback
	v = v:gsub("type of", "typeof") -- typeof
	v = v:gsub("user settings", "UserSettings()") -- UserSettings()
	v = v:gsub("get version", "_VERSION") -- _VERSION
	v = v:gsub("x pcall", "xpcall") -- xpcall
	v = v:gsub(" has ", ".") -- dot notation
	v = v:gsub(" is ", " = ")

dude…?
if you were to revamp this module to actually make it useful + efficient then i would probably look into it

2 Likes

Could you explain how gsubbing out auto-corrected words is not useful for programming on a mobile device? Besides, the module also checks for strings and is fully functional. It’s definitely not efficient but I can’t think of many better solutions that can be quickly implemented.

Yoru snippet:

local test is $This is not useful.$ 
local this is string has global sub .test, $not$ , $very$ . 

print .this. 

“Could you explain how gsubbing out auto-corrected words is not useful for programming on a mobile device?”
elaborate i dont get this part

“Besides, the module also checks for strings and is fully functional.”
yes its functional but its a pointless module

“It’s definitely not efficient but I can’t think of many better solutions that can be quickly implemented.”

local stuff = {'help', 'please'}
local msg = 'hello i need help please'
for _, v in ipairs(stuff) do
      msg = msg:gsub(v, 't')
end
1 Like

also this isnt actually a programming language, you’re just gsubbing stuff with other stuff very inefficiently

The table for each of the solutions would be nearly as long as the original script. Yes, I could convert everything, but at the moment it isn’t worthwhile. I would be convinced if you can show major performance issues.

A sample of what this would look like for the most basic functions (adds 6 lines):

local replaces = {
    [" has "] = ".";
    [" execute "] = ":";
    [" plus "] = "+"
}
local msg = 'game has CreatorId'
for k, v in pairs(replaces) do
      msg = msg:gsub(k, v)
end

If you seriously think it needs improving, then why didn’t you pull on Github?

I can’t make that much more clear: how is this “language” not useful for mobile programming?

Because of how your “language” is constructed.

So you’re saying that calling gsub 50+ times is faster than declaring a table and looping through it? Well… then I don’t know what to tell you.

Because you would still have to rewrite that code from your mobile device onto your computer and then decode yoru into Lua which will waste even more time.

Plus, you are already probably aware that your “language” makes no sense because of the from keyword that you added which acts as nothing but tries to make the language “more logical-sounding”.

1 Like

No? That’s what the point of the module is. It executes Yoru code as Lua.

Again… no? I’m not saying it’s any faster. I’m not even saying there aren’t major differences. I’m simply unaware.

Wow… if one keyword makes a language make no sense, I guess that just threw Luau out the window with getfenv which is useless.

1 Like