Hacker News new | ask | show | jobs
I've made an interpreted language on top of JS, tailored for beginners
5 points by vasyop 2819 days ago
I've made a tiny interpreted language on top of JS, together with an debugger, heap vizualizer and editor with common IDE shortcuts ( prettification, go to definition...).

Github:

https://github.com/vasyop/mono

Demo (try step over):

https://vasyop.github.io/mono/

It's basically a simplified C with a single data type: int, and it's made to teach fundamental concepts with people with 0 programming experience: expressions, statements, stack, heap, pointers...etc, without having to install anything or get scared by the complexity of a fully-fledged language / IDE.

Initially I just wanted to learn about how to make a language, but I thought I would make something useful out of it. What are your thoughts?

What I plan to do next :

- release tutorials for people with 0 programming experience

- compile it to instruction set and making a small VM ( instead of walking the AST as I am doing now, which is very slow ).

3 comments

> with a single data type: int

I was reading that too literally, because newbies usually find strings more interesting than ints. Anyway, you can use arrays of ints as strings. So :)

Anyway, I think that for new users it's more friendly if the ints, strings and functions have some magical tag to make errors more friendly, for example, what happens if someone uses

  prints(7)
?

The graph with the pointers links looks nice (it even shows the string) but the font is too small. It would be nice to add a zoom to it.

What is the internal representations of functions? If I prints a function I get some weird characters.

The "delete" key is not working. I must use "backspace" to remove some text.

I'd suggest to consider a different name, Mono is already used by a big project related to programming languages: https://www.mono-project.com/
cool, I like the vizualizer