News for hackers. Stuff that matters.
Re:HTML5 game written in 0 lines of JS by golergka on Friday November 22, 2013 @05:49AM (#6780142)
Obligatory information:

I'm not the original author. It was posted on russian HN/Reddit clone Habrahabr: http://habrahabr.ru/post/203048/ Habrahabr featured translations of "30 LOC of javascript" topics from HN, some people continued it for a bit, and this one was created as an ironic answer to that.

Re:HTML5 game written in 0 lines of JS by pash on Friday November 22, 2013 @08:54PM (#6784880)
Here's a (partial) translation of the author's post on Habra Habr.

-----

I didn't want to take part in this week's trend on Habra: "We can write everything in 30 lines of code!" I didn't have the time to spare.

But theaqua's post [0] about writing a "Hello, World" in a single line of pure JavaScript inspired me to beat that record. I had already written a game using JavaScript, HTML, and CSS, and here it is now with a grand total of zero lines of code.

After reading theaqua's post, I couldn't sleep. I was agonized by insomnia, so I gathered myself and sat down to re-write the game. Mindful that I had to use exactly zero lines of JavaScript, I was very scared. Writing a program in 1000 lines or more is no problem. But writing zero lines of code ... that's insane. It turns your brain inside out. It changes the way you look at the web. You realize that, before, you didn't do things right.

For those of you who don't like to wait, here's a demo [1].

It's not a fake. It's a full game. Details after the cut.

...

I've been programming for a long time. And it was for just that reason that I believed that I could manage a complex task like taking a game that was originally written using JS and re-writing it with zero lines of code.

Before this project I looked down on HTML programmers†. But now I realize that they'll soon rule the world. You'll remember how there was a time when JS programmers weren't taken seriously. Do you remember those dark ages? But now take a look ... JavaScript is not just a trend. It's everywhere. In the browser, on the server, running on microcontrollers and mobile OSes. You can write operating systems in it, and games. ... And now, HTML programming is quietly creeping up on it.

One of these days writing zero lines of JS will be the norm. JS will fall out of fashion in the same way Flash did. Why write JavaScript if it's slower than an HTML program written by an HTML programmer with the aid of CSS?

Repository: https://github.com/i0z/nojsgame

-----

† — The comment thread is dominated by responses to this one: "'HTML programmer'—are you serious? :)"

0. http://habrahabr.ru/post/202736/

1. http://jsfiddle.net/0dmin/9dQx3/embedded/result/

Re:HTML5 game written in 0 lines of JS by paxcoder on Saturday November 23, 2013 @07:52AM (#6785798)
I have a hard time understanding how someone so familiar with HTML can claim that "HTML programming" is creeping up on JavaScript. Perhaps it has to do with lack of computer science education (more specifically not understanding Truing completeness)? Perhaps you don't need it to write games?
Re:HTML5 game written in 0 lines of JS by golergka on Saturday November 23, 2013 @02:07PM (#6787030)
It's a joke. This phrase, and the whole post as well.
Re:HTML5 game written in 0 lines of JS by trentmb on Saturday November 23, 2013 @12:54AM (#6785406)
Off topic, sorry, but Russian (and many others) to English translations sound so emotional and dramatic and captivating and inspiring.

To the point I want to learn Russian!

Re:HTML5 game written in 0 lines of JS by recon517 on Friday November 22, 2013 @12:15PM (#6782107)
It cannot be a HN clone, as HH appeared in 2006 and HN in 2007.
Re:HTML5 game written in 0 lines of JS by golergka on Saturday November 23, 2013 @02:08PM (#6787035)
Thanks for the correction! But while I'm technically wrong, I hope it still describes the idea to those unfamiliar with it.
Re:HTML5 game written in 0 lines of JS by iends on Friday November 22, 2013 @02:38PM (#6783212)
Sadly I do not speak Russian. I often wonder what great things I miss out only only speaking English.
Re:HTML5 game written in 0 lines of JS by talmand on Friday November 22, 2013 @04:56PM (#6784041)
Technically, as long as we have multiple languages with different people knowing different languages then this is a problem for everyone. There might be Russians out there wondering about the interesting things they are missing out on because they don't know English.

I for one want to watch TV programming from around the world just to experience the differences in culture and what they find humorous, sad, exciting, and so on. Sub-titles just don't always translate emotions very well.

Re:HTML5 game written in 0 lines of JS by iends on Friday November 22, 2013 @07:17PM (#6784599)
Ah, yes, but since I'm an American the idea of learning a foreign language was not impressed on me as I was growing up. Contrast this with some Europeans I run into on my travels and they speak 2, 3, & 4 languages.
Re:HTML5 game written in 0 lines of JS by talmand on Monday November 25, 2013 @09:56AM (#6794291)
That's probably because they likely need to know those languages. At best only a percentage of Americans could find a second language, Spanish, useful in their day-to-day lives.
Re:HTML5 game written in 0 lines of JS by kazagistar on Friday November 22, 2013 @06:23PM (#6784416)
Subtitles seem fine to me: they contain the content, and the emotion in the voices crosses linguistic boundaries.