Xml 2.0



  • Article is pure wtf.



  • I only read the headline and already was out of:

    Seriously?

    With Relevant we are breaking existing paradigms

    Oh, you're breaking something, alright.


  • sockdevs

    How we turned JSON into a full programming language



  • It was mostly making sense, and then I came across:

    Some of them use pagination, while others take an explicit page parameter.

    And following their link:

    ##Navigating through the pages

    Now that you know how many pages there are to receive, you can start navigating through the pages to consume the results. You do this by passing in a page parameter.

    :wtf:



  • From the docs:

    Because of the simplicity and readability of REL, as long as variables are conveniently named, it should not be necessary to use comments. However, one way to write comments is to define variables that are never used.

    Riiiight.



  • @RaceProUK said:

    How we turned JSON into a full programming language

    I'm pissed that I can't comment my JSON config files without my Application JSON parser having a hissy fit and chucking everything out of it's pram



  • I suppose, now I have actually verbalised the issue, I could use the dreaded regular expression paradigm to remove them all before I bottle feed it to the parser, but why should I have to?



  • This article. I don't even... This Is the dumbest thing I've ever read.

    1. Take ecma script.
    2. Extract json
    3. Build another fucking programming language, presumably in js, to parse json-is-lies (REL)
    4. ???
    5. PROPHET


  • @swayde said:

    This article. I don't even... This Is the dumbest thing I've ever read.

    1. Take ecma script.
    2. Extract json
    3. Build another fucking programming language, presumably in js, to parse json-is-lies (REL)
    4. ???
    5. PROPHET

    6 . And verily yonder man shall come to tear out his hairs in frustration. Thus spaketh the lord.

    You missed the last step. Or made a slip of the pen.



  • Pontificating from a totally ignorant point of view: Haven't / don't want to read the Article. The whole concept sounds like troll bait to me. It's a bit like saying "....hmmm '$' '@' and '#' are pretty cool sigils to use to clearly indicate data type. Let's build a structured programming language around them with another structured programming language..."

    No!....Wait!....They did that already.



  • Code as data? Sounds like somebody's reinvented lisp again. http://www.defmacro.org/ramblings/lisp.html

    Filed under Sometimes the old ways really are best.



  • Interesting. They have an iOS app and need to add programibility into it. Their idea seems to be to allow anyone to write this glue parser between some external API and their mobile app.

    So they needed something versatile, like a real programming language, but also speedy (its a phone, after all) and safe.

    Hmm... ok, I guess their options vere limited. JSON format is well understood and already comes with a parser. Its probably a better choice than trying to implement an entire language from scratch, or isolate an existing runtime.

    The only real alternative that comes to mind is javascript. Theres already a stable optimized engine on the phone, isolated in a web view. Im pretty sure Facebook is doing something similar for their new 'native react' thing.

    But if js couldnt be made to work for some reason, I guess this json thing is a viable alternative.



  • @cartman82 said:

    I presume they have an iOS app and need to add programibility into it.

    Wait, I think I see what's going on here: they're trying to sneak arbitrary code execution past the walled-garden customs officials, right? “No officer, this here's just data, see: plain old JSON, just like you'd find in any regular old fart app.”



  • @Buddy said:

    @cartman82 said:
    I presume they have an iOS app and need to add programibility into it.

    Wait, I think I see what's going on here: they're trying to sneak arbitrary code execution past the walled-garden customs officials, right? “No officer, this here's just data, see: plain old JSON, just like you'd find in any regular old fart app.”

    I love the security doesn't apply to us because we are special snowflakes mindset.

    Apparently an update on their page:

    It seems this article got a far stronger response than we expected, so it merits an update: We are not aiming to recreate horrors like XSLT, or to disrupt JSON in any way.

    "we are not aiming" because you already fucking did.



  • @Buddy said:

    Code as data? Sounds like somebody's reinvented lispthe concept of computer programming again.

    FTFY



  • Ok while everybody's busy throwing their hands up and going crazy, I'd just like to point out that there are several query languages in JSON, and at least one of those (MongoDB's) allows execution of "code" expressed only in JSON format.



  • The eval function in JavaScript can run code expressed as JSON strings.



  • This post is deleted!


  • @Buddy said:

    reinvented lisp

    :thumbsup: Can't like enough.



  • That's because:

    JSON

    (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999.

    JSON




  • area_deu

    @RaceProUK said:

    How we turned JSON into a full programming language

    And they don't even mean JS ...



  • JSON as a programming language? WAT?
    Wait, MongoDB does it in a rather fucked way.
    Computers of today are oh so busy, let's make the programmer turn his ideas into AST.



  • @article said:

    universal API aggregator

    That's when you know there's a :wtf: below the fold.

    @article said:

    So after much trial and error, the core chucks of a Relevant Card’s JSON ended up looking something like this:

    :fa_ambulance: :fa_ambulance: :fa_ambulance: Develop a language by trial and error.
    They ended up with a really ugly {"_PREFIX": "syntax"}.
    @article said:

    Possibilities are Endless
    We’re excited to see REL at its full potential.

    I remember back when XSLT was so hip, they had to teach it at our school. I asked the lecturer whether XSLT is Turing equivalent. He blinks, says "it might as well be", and quickly moves on. He wouldn't share any enthusiasm for the concept. Now these guys ended up with a similar monster, and they are proud of it.



  • One could also use Lua. There exist Lua bindings for Objective-C, although they're mainly used by game developers.

    Either one of those real programming languages would have made things far easier.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.