Live data from Hacker News

Maze-solving algorithm implemented in sed

devpost.com

1–10 of 34 posts

Re: Maze-solving algorithm implemented in sed

#5
post #4

Very cool. For those of you who know sed well, can you actually read the source of this program and understand it, or does it look like garblygook?

It doesn't look that complicated compared to normal sed usage. It's just a series of find/replace for the most part. That said, regex is always pretty hard to read, and putting it together like this is impressive to say the least.

Re: Maze-solving algorithm implemented in sed

#6
post #4

Very cool. For those of you who know sed well, can you actually read the source of this program and understand it, or does it look like garblygook?

It's pretty nicely put together and commented, still trying to work through exactly how the interleave steps work though.

Re: Maze-solving algorithm implemented in sed

#7
post #6
post #4

Very cool. For those of you who know sed well, can you actually read the source of this program and understand it, or does it look like garblygook?

It's pretty nicely put together and commented, still trying to work through exactly how the interleave steps work though.

I’m one of the organizers of Hack N Roll and personally know the guy who built this.

He says that the code on Github is actually broken but he forgot in what way.. I still think it’s pretty cool though

Re: Maze-solving algorithm implemented in sed

#8
post #7
post #6

Earlier quoted context omitted.

It's pretty nicely put together and commented, still trying to work through exactly how the interleave steps work though.

I’m one of the organizers of Hack N Roll and personally know the guy who built this. He says that the code on Github is actually broken but he forgot in what way.. I still think it’s pretty cool though

I tried running this on a Mac but got an error. Assumed it was because of some sed version difference. Perhaps the code on Github is just broken.

Re: Maze-solving algorithm implemented in sed

#9
post #8
post #7

Earlier quoted context omitted.

I’m one of the organizers of Hack N Roll and personally know the guy who built this. He says that the code on Github is actually broken but he forgot in what way.. I still think it’s pretty cool though

I tried running this on a Mac but got an error. Assumed it was because of some sed version difference. Perhaps the code on Github is just broken.

That's probably because you used BSD sed. Running it on my BSD sed also gives an error, presumably because it thinks the `}` is a part of the label in `binput}`.

However it works fine in GNU sed, and now that you mention it, GNU sed's extensions were not used, like the `-z` flag to slurp all input in one "line" to avoid `:input;$!{N;binput}`.

Post reply on HN