News for hackers. Stuff that matters.
Re:The Earl Grey programming language by htilford on Thursday May 07, 2015 @07:39PM (#9509133)
What was the inspiration to create yet another compile to JS language?
Re:The Earl Grey programming language by breuleux on Thursday May 07, 2015 @08:05PM (#9509236)
I guess I wanted macros and pattern matching without Lisp syntax, and I wanted to retain and use the JS/node ecosystem.

There's also a few language features I couldn't find anywhere else that I wanted to try out (my % operator, ad hoc exception classes, some pattern matching features like coercion and "match" inside a pattern to define sub-patterns, the each operator, some features of the macro system that I have yet to document, etc.)

It's kind of fun, really.

Re:The Earl Grey programming language by visarga on Friday May 08, 2015 @12:18AM (#9509940)
What does the % operator formally do? All I could find in the documentation was :

> Earl Grey's % operator can be used to easily build HTML, DOM, virtual DOM, and other things:

Re:The Earl Grey programming language by breuleux on Friday May 08, 2015 @12:37AM (#9509976)
There are examples below that statement for common usage, but if you want a deeper understanding:

    tag.xyz %
       property = value
       child1
       child2
Will produce the data structure:

    {tags = {"tag", ".xyz"}
     props = {property = value}
     children = {child1, child2}}
as an instance of the ENode class. Then, transformer functions can process the data structure to generate HTML or other things, e.g.

    require: /html
    html(thing)
    ==> <tag class="xyz" property="value">child1child2</tag>
Re:The Earl Grey programming language by ffn on Thursday May 07, 2015 @08:13PM (#9509280)
Because folks feel there is a need for them, and it's a really good way to get one's feet wet in the compiler pound. Besides, a programming language (dialect) is to a programmer what different size wenches, pipes, or hoes are to a plumber. You need different tools for different jobs and a lot of it depends on your personal preference and what it will take you to be efficient. Besides, how we as engineers solve problems is just as much an expression of our personality as it is a statement about the correct operation of systems. But that's just my view, and I'm definitely biased on the subject because I'm working on a flavor of coffeescript that will compile to msft's typescript as we speak (well, in my spare time).
Re:The Earl Grey programming language by brudgers on Thursday May 07, 2015 @07:49PM (#9509175)
The ubiquity of the browser one would expect.