orange888
Re:Google Dart, JavaScript and Web Assembly (2011)
on Thursday January 12, 2017 @07:03PM (#13387309)
Interesting, as it looks like the first time the term and maybe the idea itself of a "web assembly" was used
Re:Ask HN: What do you want to learn in 2017?
on Sunday December 25, 2016 @08:50PM (#13256455)
patronising
Re:Ask HN: What do you want to learn in 2017?
on Sunday December 25, 2016 @08:49PM (#13256450)
There are only two types of programming languages: those people complain about, and those no one uses.
Re:Leonardo Da Vinci’s To Do List (circa 1490)
on Thursday December 15, 2016 @05:03PM (#13188910)
If he lived today, most items on that list would be googled and forgotten about in one morning. We take our access to endless info for granted.
Re:Why we chose Vue.js over React
on Tuesday December 13, 2016 @05:16PM (#13171660)
Explicit closing tags are only needed when dealing with more complex examples, like basic conditional or loops (arrays). Rather than try to teach you on a hackernews forum, you can learn all you need to know about the syntax in 5 minutes here: https://mustache.github.io/mustache.5.html
There is even a ClojureScript implementation: https://github.com/fotoetienne/cljstache
Yes mustache, JSX and all the other templating syntax aren't pretty, but my point was that Mustache is the best I've come across so far. elegance and simplicity are in the eyes of the beholder though, so to each their own.
Re:Why we chose Vue.js over React
on Tuesday December 13, 2016 @06:26AM (#13166052)
I simply responded in kind. Notice the difference in tone from your first response, and this one.
To answer you question, you use JS! Or PHP! Or any of the other 2 dozen languages Mustache supports. Mustache is all about logic-less templates, which by definition assumes the logic is being written elsewhere. Edited my example to make that clearer.
EDIT:
const tpl = "{{#loggedIn}}Hello{{userName}}{/loggedIn}}{{^loggedIn}}Please log in{{/loggedIn}}";
Mustache.render( tpl, state );
Re:Why we chose Vue.js over React
on Sunday December 11, 2016 @05:09PM (#13153660)
Once again: apples and oranges
Re:Why we chose Vue.js over React
on Sunday December 11, 2016 @04:15PM (#13153298)
When I see examples like this, it reminds me just how elegant & simple Mustache.js template can be:
Mustache.render( "{{#loggedIn}}Hello{{userName}}{/loggedIn}}
{{^loggedIn}}Please log in{{/loggedIn}}", state );
Re:Why we chose Vue.js over React
on Sunday December 11, 2016 @04:05PM (#13153207)
Vue is a frontend framework.
jQuery is a library, with a very specific goal (DOM access)
What happened when you were using jQuery, is you created your own homegrown "framework" on top of it. Thats what you should be comparing Vue with, not jQuery.