Live data from Hacker News

Lisp implementation in sed

github.com

1–10 of 64 posts

Re: Lisp implementation in sed

#5
post #3

This is amazing. Just reading the code makes my head hurt, but you implemented a language with it.

Here, for example, is the implementation of `atom` (I think):

  /(atom /{
    /\[\S\+\]/{
      s/.*/[]/
      bpop_context
    }
    s/.*/t/
    bpop_context
  }

Re: Lisp implementation in sed

#7
post #5
post #3

This is amazing. Just reading the code makes my head hurt, but you implemented a language with it.

Here, for example, is the implementation of `atom` (I think): /(atom /{ /\[\S\+\]/{ s/.*/[]/ bpop_context } s/.*/t/ bpop_context }

If this was (the only available) programming, I'd quit.

Kudos, I think, to the author. His pain tolerance exceeds mine by a vast amount.

Re: Lisp implementation in sed

#8
post #2

Ahahah. Awesome. There is even an 'awk' version: https://github.com/darius/awklisp

I wrote that, and I gotta say sed is a much crazier target. More sed fun: http://aurelio.net/projects/sedsokoban/

Indeed. There are few wide-spread programming languages around any more that lack such things as, say, any form of arithmetic whatsoever.

Re: Lisp implementation in sed

#10
post #7
post #5

Earlier quoted context omitted.

Here, for example, is the implementation of `atom` (I think): /(atom /{ /\[\S\+\]/{ s/.*/[]/ bpop_context } s/.*/t/ bpop_context }

If this was (the only available) programming, I'd quit. Kudos, I think, to the author. His pain tolerance exceeds mine by a vast amount.

> If this was (the only available) programming, I'd quit.

We started with nothing, remember? Just the bare metal. If this were the only available programming, I'd write an interpreter for a better language.

Never imagine that your current suite of tools is all there is.

Post reply on HN