Live data from Hacker News

Chess written in sed

github.com

41–50 of 57 posts

Re: Chess written in sed

#41
post #17

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…

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

#42
post #18

sed, and also awk, and ed, are worth learning. I mean coding a chess game in those tools is just a novelty, but you can do so much really useful text processing with just those tools, and they are pretty much guaranteed to be available on almost any *nix machine.

novelty yes, but let's not detract from the man's prowess; writing a chess game in sed is entirely non-trivial.

Re: Chess written in sed

#44
post #17

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.

Re: Chess written in sed

#45

This is a bit like that fellow who did pixel art by manually writing coloured table cells in HTML in Notepad - very, very impressive, but it does make one wonder a little about the person who has done it.

Do you have a link to that?

There's an English translation (in .doc) at the bottom of the wikipedia article:

http://www.auburn.edu/~mitrege/russian-culture/lefty.doc

Re: Chess written in sed

#47
post #17

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…

either it's fixed or you are having unicode issues. looks fine to me.

Re: Chess written in sed

#50
post #17

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…

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., when someone decides to use Python as a substitute for make.

Post reply on HN