There's an error in line 1024. The transform strings are not the same length. I'd like to see more sed programs on HN instead of the usual Python, Ruby or Go offerings. I wrote a sed version of the the Python script "youtube-dl". This way I don't need Python installed to download YouTube videos. And it's easy to edit if YouTube suddenly changes their "API"; no need to wait for someone else to fix their Python or Lua…
You have to use Unicode sed.
Chess written in sed
51–57 of 57 posts
Re: Chess written in sed
#52There's an error in line 1024. The transform strings are not the same length. I'd like to see more sed programs on HN instead of the usual Python, Ruby or Go offerings. I wrote a sed version of the the Python script "youtube-dl". This way I don't need Python installed to download YouTube videos. And it's easy to edit if YouTube suddenly changes their "API"; no need to wait for someone else to fix their Python or Lua…
Are you frequently on a unix platform without python? Just out of interest. I agree its nice to see a variety of languages. Gives a fresh perspective on how to do things.
Re: Chess written in sed
#53Earlier quoted context omitted.
On my first game I got an even better bug: a b c d e f g h 8 ♔ ♛ ♝ ♘ 7 ♙ ♙ ♙ ♙ 6 5 ♙ 4 ♟ ♟ ♕ 3 ♟ ♞ 2 ♟ ♟ ♟ ♟ 1 ♜ ♛ ♚ ♝ ♜ After performing en passant the computer went crazy and the King started taking all the pieces between down row 8. I ended up with a very easy checkmate as I walked my pawn the remaining three rows, unfettered even when it was under double pressure from the night and queen. I wonder if this is perh…
The readme says passant isn't implemented, and there's no validation of the player's moves. So you did an illegal move.
Re: Chess written in sed
#54Programmer who did something like that is mad. Or he/she is from Russia.
Re: Chess written in sed
#55Earlier quoted context omitted.
Are you frequently on a unix platform without python? Just out of interest. I agree its nice to see a variety of languages. Gives a fresh perspective on how to do things.
Yes. I never need to install Python permanently.[1] In my experience, there is almost always a way to do what needs to be done with what UNIX provides, without installing more software. This keeps the system smaller, more standardized and hence more portable than one where various dependencies are haphazardly added. 1. Sometimes I have to install it temporarily, for "reverse engineering" a non-Python solution, e.g.,…
Re: Chess written in sed
#56Earlier quoted context omitted.
Yes. I never need to install Python permanently.[1] In my experience, there is almost always a way to do what needs to be done with what UNIX provides, without installing more software. This keeps the system smaller, more standardized and hence more portable than one where various dependencies are haphazardly added. 1. Sometimes I have to install it temporarily, for "reverse engineering" a non-Python solution, e.g.,…
Ya totally! I still telnet to my servers... Don't want to fill my system with extra software. :P
Like sed, all UNIX systems provide ssh. It's not "extra software". There's no need to use telnet.
On the other hand, not all UNIX systems have Python pre-installed. Moreover, as in the case of embedded products, not all systems may have the space for it.