Live data from Hacker News

Maze-solving algorithm implemented in sed

devpost.com

21–30 of 34 posts

Re: Maze-solving algorithm implemented in sed

#23

This, this is actual hacking. Absolutely useless, and not at all the correct tool for the job, but exceedingly clever. Shame I can't get the code to work for me on Debian.

The visualization is beautifully instructive, too -- the essence of the algorithm explained in about a second.

Re: Maze-solving algorithm implemented in sed

#25
post #22

At Kodak in the 1970's, my father devised the "Bayer filter" used in digital cameras. At the time, he wrote a research system for image processing in sed.

Wow. Can you say more about what it did?

Kodak's goal was to keep customers happy while selling less silver. Less silver means more grain, so they envisioned digital methods for reducing grain, before printing photographs at some centralized facility (obviously not the pocket I keep my phone in). So the sed program did various convolutions on rather coarse images, for playing with ideas.

My dad's other contribution that stuck was ordered dithering: Bit patterns for various gray levels that worked well next to each other, without edge artifacts at the transitions. Long ago replaced by other methods for higher resolutions, but last seen as part of the DEC logo on their product boxes.

I'm sure that choosing characters to represent gray levels in this sed program got him thinking in that direction. I've never been good at complicated, but he taught me to see simple.

Re: Maze-solving algorithm implemented in sed

#26
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.

On macOS: install gnu-sed via Homebrew.

Re: Maze-solving algorithm implemented in sed

#27
It reminds me of this (scroll down to "Regular Expression Pathfinding" section):

http://realgl.blogspot.com/2013/08/battlecode.html

tl;dr: competition counts cycles but excludes certain standard library functions, one of which is a regex matcher, so someone naturally decides to use it for much of his algorithm.

Re: Maze-solving algorithm implemented in sed

#30

Earlier quoted context omitted.

This I would like to see. Do you have the code somewhere right now or do you plan to release it with the article?

If you're interested in things being implemented in non-standard languages, I would check out the Make-A-LISP project on Github [1]. Someone even took it upon themselves to write an implementation in AWK :) [2] [1] https://github.com/kanaka/mal/ [2] https://github.com/kanaka/mal/tree/master/awk

There's even an implementation of lisp in sed :) https://github.com/shinh/sedlisp/
Post reply on HN