7 ms·
2048 As A Service
- fragmede 13y agoNot sure if I'm doing it right, but http://2048.semantics3.com/2048/ http://2048.semantics3.com/2048/ (their mvp) just returns {"message":"Please say hi..."}
- goldfeld 13y agoI think when they say MVP they might really mean AFJ, which would make the behavior you observed more understandable. Some AFJ purists would even claim it's the right way to do it under the methodology, which is arguably one of its major differences from the MVP credo.
- ojbyrne 13y agohttps://github.com/Semantics3/2048-as-a-service#zest-principles https://github.com/Semantics3/2048-as-a-service#zest-princip... Which seems to suggest April 1 protocol.
- zaptheimpaler 13y agoThis is actually documented in the API. Turns out the API just wants your program to be polite and say hi when calling it. https://github.com/Semantics3/2048-as-a-service#zest-principles https://github.com/Semantics3/2048-as-a-service#zest-princip...
- HCIdivision17 13y agoIt is nice to see the INTERCAL way of doing things making a comeback.
- davidm 13y agoDrop the /2048 from the end of the url and replace it with /hi/start/json It really does appear to respond as advertised! Is this the most elaborate April fool of the day?
- netvarun 13y ago2048-as-a-service author here. Type curl -L http://2048.semantics3.com/hi/start http://2048.semantics3.com/hi/start to get started. Here is a full example on how to play it: https://github.com/Semantics3/2048-as-a-service#full-example-gameplay https://github.com/Semantics3/2048-as-a-service#full-example... If you want a full game on the console: perl -e 'my $host = "http://2048.semantics3.com/hi/";my $cmd = "curl --silent -L $host"."start";my $output = `$cmd`;my $session_id = $output;$session_id=~s/.*?ID:\s(\w+).*/$1/si;my %keyMap = ( 'w' => 0, 'd' => 1, 's' => 2, 'a' => 3);print STDERR $output,"\n";while(1) { print STDERR "Input (w - up, a - left, d - right, s - down):\n"; my $userInput = <STDIN>; chomp ($userInput); if(defined($keyMap{$userInput})) { $userInput = $keyMap{$userInput}; } else { print STDERR "Invalid move.. w - up, a - left, d - right, s - down\n"; next; } my $cmd = "curl --silent $host"."state/$session_id/move/$userInput"; my $output = `$cmd`; print STDERR "\n$output\n"; if($output=~/Message:/si) { exit(0); }}'
- javindo 13y agoThis feels like HN satire but someone has actually gone and written the code so it's fairly elaborate...
- korethr 13y agoIMO, the best April 1st jokes are both good satire and well thought out enough to actually be implemented. Consider that RFC 1149 was intended as a joke, only to actually be successfully implemented years later.
- symmetricsaurus 13y agoThis is hilarious. This probably won't be, but should be the final entry in the series of 2048 clones. I guess that you could de-servicify it and create own2048, not that I know how it would differ from the original version...
- OnACoffeeBreak 13y agoA desktop application that is distributed exclusively on floppies?
- ekianjo 13y agoWe are still missing the C64 version.
- alttab 13y agoBookmarklet. Play 2048 on any website, because.
- cs702 13y agoIn hindsight, this seems... inevitable ;-) (I can't help but wonder where and how 2048 will show up next.)
- keehun 13y ago10/10 would trust a ginormous 1-line Perl script again
- BobChubby 13y agoI remember I used to play hangman by texting letters to a phone number and it would reply with how much of the word I had figured out. It would be awesome to be able to play 2048 over SMS (but painstakingly slow to complete).
- pearjuice 13y agoAre there seriously people running obfuscated Perl scripts from third parties in a terminal with root access? You might as well open up a SSH daemon on the default port without root password.
- JeremyMorgan 13y agoYes, you see Perl is hip now. And since the hipsters barely learned how to make an alert in JS before calling themselves a "full stack dev" they really don't know any better. Perl one liner bro - check it out.
- kremlin 13y agoI was just thinking about trying to write a command line 2048 and then I see this.
- mimiflynn 13y agohttps://github.com/bfontaine/term2048 https://github.com/bfontaine/term2048 is a good one ;)
- largote 13y agoThat "Sexy Perl one-liner" is hilarious.
- largote 13y agoFor reference: perl -e 'my $host = "http://2048.semantics3.com/hi/";my http://2048.semantics3.com/hi/";my $cmd = "curl --silent -L $host"."start";my $output = `$cmd`;my $session_id = $output;$session_id=~s/.?ID:\s(\w+)./$1/si;my %keyMap = ( 'w' => 0, 'd' => 1, 's' => 2, 'a' => 3);print STDERR $output,"\n";while(1) { print STDERR "Input (w - up, a - left, d - right, s - down):\n"; my $userInput = <STDIN>; chomp ($userInput); if(defined($keyMap{$userInput})) { $userInput = $keyMap{$userInput}; } else { print STDERR "Invalid move.. w - up, a - left, d - right, s - down\n"; next; } my $cmd = "curl --silent $host"."state/$session_id/move/$userInput"; my $output = `$cmd`; print STDERR "\n$output\n"; if($output=~/Message:/si) { exit(0); }}'
- netvarun 13y agoHN formatting screws up the code :( This will work: perl -e 'my $host = "http://2048.semantics3.com/hi/";my $cmd = "curl --silent -L $host"."start";my $output = `$cmd`;my $session_id = $output;$session_id=~s/.*?ID:\s(\w+).*/$1/si;my %keyMap = ( 'w' => 0, 'd' => 1, 's' => 2, 'a' => 3);print STDERR $output,"\n";while(1) { print STDERR "Input (w - up, a - left, d - right, s - down):\n"; my $userInput = <STDIN>; chomp ($userInput); if(defined($keyMap{$userInput})) { $userInput = $keyMap{$userInput}; } else { print STDERR "Invalid move.. w - up, a - left, d - right, s - down\n"; next; } my $cmd = "curl --silent $host"."state/$session_id/move/$userInput"; my $output = `$cmd`; print STDERR "\n$output\n"; if($output=~/Message:/si) { exit(0); }}'
- eCa 13y agoMore readable: my $host = "http://2048.semantics3.com/hi/"; my $cmd = "curl --silent -L $host"."start"; my $output = `$cmd`; my $session_id = $output; $session_id =~ s/.*?ID:\s(\w+).*/$1/si; my %keyMap = ( 'w' => 0, 'd' => 1, 's' => 2, 'a' => 3); print STDERR $output, "\n"; while(1) { print STDERR "Input (w - up, a - left, d - right, s - down):\n"; my $userInput = <STDIN>; chomp ($userInput); if(defined($keyMap{$userInput})) { $userInput = $keyMap{$userInput}; } else { print STDERR "Invalid move.. w - up, a - left, d - right, s - down\n"; next; } my $cmd = "curl --silent $host"."state/$session_id/move/$userInput"; my $output = `$cmd`; print STDERR "\n$output\n"; if($output=~/Message:/si) { exit(0); } }
- malkia 13y agoI would like to see an Excel extension with boss-mode key.
- netvarun 13y ago2048-as-a-service author here. Do also checkout our demo showcase app built using the 2048-as-a-service API: 2048 - Startup Growth Edition (MVP) - http://2048.semantics3.com/2048.html http://2048.semantics3.com/2048.html
- ycaspirant 13y agoDoesn't work for me. I'm using Safari on iOS 7.1.
- Achshar 13y agoIt seems to flash the tiles upon movement instead of sliding them. Which is kind of annoying when I try to play it fast.
- hcarvalhoalves 13y agoThis API follows ZEST principles. All requests must begin with a /hi. Failure to do so will result in a 800 'Please say hi...' error. Priceless!
- userbinator 13y agoFinally, 2048 is now enterprise-ready.
- aspensmonster 13y agoEdit: It's missing a snarky game over message. Something like "you pivoted too late" would be perfect for a game like this, don't you think? "Unstoppable! You are the next Rap Genius!" "Growth Hacker Extraordinaire! You are the next Optimizely!" I like it more than the other offers that April Fools has provided thus far. Somewhat reminiscent of this thread: http://chan.installgentoo.com/g/thread/38087806 http://chan.installgentoo.com/g/thread/38087806
- tromp 13y agoSlightly off-topic, but even this month's Ponder This challenge http://domino.research.ibm.com/Comm/wwwr_ponder.nsf/Challenges/April2014.html http://domino.research.ibm.com/Comm/wwwr_ponder.nsf/Challeng... is devoted to 2048...
- jordanlev 13y agoI get that this is a joke, but I do think a really cool concept for a game would be one where there is just an API for the "state" and that is responsible for the mechanics and rules of the game, but that you would build your own custom client for the UI. For example, some kind of spaceship battle game where you create your own interface for controlling the ship... it would be kind of a meta-game where creating the interface a certain way might give you advantages in terms of efficiency versus others.
- hatu 13y agoI'm just worried in reality it would just mean a flood of a thousand clones in the appstore.
- edraferi 13y agoSure, but maybe that could be a good thing. For example, you could provide an API for Chess that ranks players across apps. You could use a Facebook ID or similar to merge identities across applications. Then players could choose the chess app they prefer and still be engaged with the larger community.
- alttab 13y agoYou actually have something here.
- chch 13y agoSchemaverse[1] could be considered something similar, I think, down to the "space-based strategy game", although it is controlled by raw SQL queries instead of an API. [1] https://schemaverse.com/ https://schemaverse.com/
- jordanlev 13y agoWow, that's really cool -- thanks!
- saraid216 13y ago
- li-ch 13y agoAnd Threes!'s creators becomes more bitter and sour...
- barretts 13y agoThis seems like a lot of work for a joke.