Live data from Hacker News

2048 in sed

github.com

21–30 of 39 posts

Re: 2048 in sed

#21
post #3

Sed awesome. Also, disappointed no one has blatantly embedded https://github.com/progranism/Bitcoin-JavaScript-Miner to put all this time wasting to good u$e.

[deleted]

Re: 2048 in sed

#22
post #12
post #4

We just need now the 2048 in assembler, and we'll be done! Just joking, I love these and I'm unemployed. Keep'em coming!

Well, there's this: https://github.com/Sanqui/2048-gb It was posted on HN but didn't really take off, sadly: https://news.ycombinator.com/item?id=7434529

I bet had they left "Show HN: " off, it would've gained more traction. I have several theories behind that:

1) It looks more like a discovery.

2) It doesn't look like a self promotion.

3) The point of the article is at the beginning. I.e. a certain percentage don't read past "Show HN".

Again, just theories. No idea if this is really the case. But I don't remember many (maybe any) of the other 2048 clones making it to the first page being "Show HN" submissions.

Re: 2048 in sed

#24
I also like his poker hand sed script.

Best part is he uses BSD sed. No newlines as patterns.

We use tr(1) for that.

Re: 2048 in sed

#26
post #8

Have someone made Emacs version? Isn't it more easy to write it in elisp compared to sed.

Well, writing in sed has essentially the "heh, look what I did in sed!" value. Elisp would be a far more simple place to build it (we already have tetris there, there's even a very old simple version of Elite in emacs lisp!)

Yep. "Real programmers write games in sed".

Re: 2048 in sed

#27
post #6

I think this game is a bit different than http://gabrielecirulli.github.io/2048/ Take a look at this situation: ___________________ |___2|____|____|____| |___2|____|____|____| |___2|____|____|____| |____|____|____|____| in the original the result of going up would be ___________________ |___4|____|____|____| |___2|____|____|____| |____|____|____|____| |____|____|____|____| but in this game it's ___________________ |_…

This bug is now fixed! Thanks for pointing it out!

Re: 2048 in sed

#28
post #7
post #6

I think this game is a bit different than http://gabrielecirulli.github.io/2048/ Take a look at this situation: ___________________ |___2|____|____|____| |___2|____|____|____| |___2|____|____|____| |____|____|____|____| in the original the result of going up would be ___________________ |___4|____|____|____| |___2|____|____|____| |____|____|____|____| |____|____|____|____| but in this game it's ___________________ |_…

no score too! :( how am i suppose to know when i break my own record [i.e. 3012 - never got passed 512 on the tiles]

I'll look into adding this. (I think I'll have to add it to the bash wrapper.)

Re: 2048 in sed

#29
post #24

I also like his poker hand sed script. Best part is he uses BSD sed. No newlines as patterns. We use tr(1) for that.

Author here - glad you like it! I actually found the poker hand identifier more challenging to write than 2048, but I also tried to make it as compact as possible.

https://github.com/themattrix/poker_hand

Re: 2048 in sed

#30
post #24

I also like his poker hand sed script. Best part is he uses BSD sed. No newlines as patterns. We use tr(1) for that.

Author here - glad you like it! I actually found the poker hand identifier more challenging to write than 2048, but I also tried to make it as compact as possible. https://github.com/themattrix/poker_hand

[deleted]
Post reply on HN