InterinGo
"interprester-in-go" or InterinGo (for short) is a new interpreter language by me to chalenge my self with more advanged topics. The command-prompt window is the directed way to interact with InterinGo REPL, which have been broughted to web so you can try it now without the need to download any binary.
To make sure you not get lost with how to use the language, here is a sample craft code to try out in REPL command prompt. Click on Click and run to copy the code into Command prompt and have REPL run the code. The input box will reflect the code being used, while the command prompt will show the evaluation result.
Snippet - Comparation
1 > 2
As you see, the output will be false
because 1 is less than 2. Also, the command-prompt can be annoy in smaller screen, try using Hide checkbox to minimize it, don't be too worry, it still show evaluation result in minimized state (or uncheck sticky box eh... wanna use that?).
Examples
Of course, these examples isn't all of what InterinGo can do, but this home page is just for showing InterinGo REPL to the world, let have some readding in document to learning more about it. The online online REPL won't be there thought, so let head on and downloading REPL build file here
Snippet - Complex calculation
4 * (4 / 2) * (3 + 2) + 1
Snippet - Control flow
if (1 > 2) { return 10 } else { return 3 }
Snippet - Variable
let x = 2 * 2 * 2; return x;
Also, current REPL session is shared with only one backend, so we can reuse our variables even the page is reload. With above code, we currently have x = 8
Snippet - Function
let add = fn (x,y) { x + y }; return add(4,x);
Error throwing is here too
Snippet - Error
let x = 2/0
In-case use didn't see the input box placeholder just yet, try this too
Snippet - Built-in command
help()