Would someone mind giving a quick explanation of how this works? I have only used sed to replace text in files and directories. How do people write interpreters and game loops with this unix utility?
I started playing with the idea of making a programming language out of sed at one point, but then I decided that, even if I succeeded, it would be a waste of time.
the sed language allows conditional jumps to labels. That makes it powerful enough to write programs in.
If you had to just write programs by running a series of sed substitution expressions to a file over and over, and not use conditionals... it might still be possible to program in. Much harder to think about, though.
s2p: expression #1: extra characters after command (d)
Thankfully, I've never had the job of porting a sed script to Perl, so I'm not exactly sure what that's all about. The docs mention this error, but don't explain what it means,
[+] [-] mseri|11 years ago|reply
[+] [-] abecedarius|11 years ago|reply
More sed fun: http://aurelio.net/projects/sedsokoban/
[+] [-] mtdewcmu|11 years ago|reply
[+] [-] nate_martin|11 years ago|reply
[+] [-] mtdewcmu|11 years ago|reply
I started playing with the idea of making a programming language out of sed at one point, but then I decided that, even if I succeeded, it would be a waste of time.
I didn't take into account Hacker News.
[+] [-] rmorell|11 years ago|reply
[+] [-] jes5199|11 years ago|reply
If you had to just write programs by running a series of sed substitution expressions to a file over and over, and not use conditionals... it might still be possible to program in. Much harder to think about, though.
[+] [-] asgard1024|11 years ago|reply
[+] [-] aaronem|11 years ago|reply
[+] [-] justinator|11 years ago|reply
[+] [-] justinator|11 years ago|reply
http://perldoc.perl.org/s2p.html
[+] [-] justinator|11 years ago|reply
https://metacpan.org/pod/CljPerl
(there's a few, actually, because TIMTOWTDI!)
[+] [-] bndr|11 years ago|reply
[+] [-] lengads|11 years ago|reply
[+] [-] unknown|11 years ago|reply
[deleted]
[+] [-] bane|11 years ago|reply
[+] [-] IvyMike|11 years ago|reply
[+] [-] krapp|11 years ago|reply
To what, I don't know.
[+] [-] kateperry|11 years ago|reply
[deleted]