Really a Markup Language (RML)

Hey JGO,

I’ve been working on this xml-ish scripting language and interpreter library thing.

GitHub Link Here

Purpose:
RML is a language that kinda looks like XML and it doesn’t have any immediate purpose for the general programmer but I don’t care because this project was really just for fun.

A simple script:

Features:

  • functions
  • doubles, booleans, and strings
  • conditional statements
  • printing to the console
  • lists

To be Added:

  • parameters for functions
  • loops

FAQ:

  1. Is this project Gluten free?
    A: no
  2. Can I has recursive functions?
    A: yes
  3. Can i create my own tags and commands with this library?
    A: yes
  4. Download?
    A. no, I’ll release a download when I get around to it.

This has allot of potential… Seeing as its a universal data-driven language, with the simplicity of a mark-up language, it could fit anywhere…

Nice job OP!

Not trying to bash (heh) but I’m not sure the particular brand of “readability of XML” is a desirable property for most.

Question: if functions don’t yet take parameters, then what is print?

Scripting is about convenience, when Java is too verbose or imposes too many rules. You went in the opposite direction.

You should see if you can make it homoiconic, as a scripting language written in a markup language is the perfect opportunity for such.

Another question, as I am always curious about langs and their implementations, are recursive functions possible? Because that’s an easy way to have loops.

Yeah I didn’t really think so, this is more for me and my future projects. I just thought to share this in case anyone else was interested.

As for your question, the print tag is its own separate command not a parameter.

Yep. That’s the point. RML is not about convenience at all, but readability.

I don’t see how:

<double name="index" value="500"/>

is more readable than:

double index = 500;

I’ve used a language like this before, but only because I was paid to :slight_smile:

The below example would be more of what I would want in a scripting language if I used one :slight_smile:

func main(args[]):
    index = 500
    line = "Condition is true"
    bool = false
    func test():
        if [bool] print line
    done
done

CopyableCougar4

So… julia?

I see, I didn’t really think about it like that.

My Thought Process:
1. Java can be cluttered and confusing to read sometimes
- I should fix that
2. What language is not cluttered and confusing most of the time?
- Html-> XML
3. Make something that looks like xml yet functions like java
- RML was born

Maybe “readable” is the wrong word, would “clear” (or “overly clear”) be a better word?

Also, recursion is possible with the latest commit.

It’s cool that you made this parser, but…

My honest thoughts:
It’s cool to use as a fun thing for your own projects. However, there are so many languages out there that, while not being perfectly what people want, are close enough and abundant enough that creating a language that others will use (especially scripting) would be quite difficult (but not impossible).

CopyableCougar4

a markup language is not a programming language. they just share the word “language”.

I think what we’re trying to get at here is that most consider XML to be extremely cluttered.

Of course, but it seems this is another instance of the “I’m not re-inventing the wheel, I’m doing this for fun,” which is a perfectly valid purpose for a project.

[quote]Of course, but it seems this is another instance of the “I’m not re-inventing the wheel, I’m doing this for fun” which is a perfectly valid purpose for a project.
[/quote]
I know, and I think that’s cool. My only point was that, due to the sheer abundance of languages that come close enough to satisfying the needs, this wouldn’t be something that would be used by a large collection of people (no offense meant to the OP).

CopyableCougar4

And that’s where the problem stems because I find xml to be the least cluttered out of all the languages I know and I guess I’m in the minority.

Wrapping actual code in XML isn’t better to read and/or understand. If you think that, try to work with ColdFusion (http://en.wikipedia.org/wiki/Adobe_ColdFusion) for one day.

Don’t use @ in tag names since it would be impossible to use with XSLT.

The only reason to describe code in XML is if you’re going to transform it in some way (because XML is data, not code).

Cas :slight_smile:

Actually, it is not even well-formed XML… so it can’t even be parsed. :frowning: