• Arthur Besse@lemmy.ml
    link
    fedilink
    arrow-up
    46
    arrow-down
    1
    ·
    edit-2
    10 days ago

    The statement in this meme is false. There are many programming languages which can be written by humans but which are intended primarily to be generated by other programs (such as compilers for higher-level languages).

    The distinction can sometimes be missed even by people who are successfully writing code in these languages; this comment from Jeffrey Friedl (author of the book Mastering Regular Expressions) stuck with me:

    I’ve written full-fledged applications in PostScript – it can be done – but it’s important to remember that PostScript has been designed for machine-generated scripts. A human does not normally code in PostScript directly, but rather, they write a program in another language that produces PostScript to do what they want. (I realized this after having written said applications :-)) —Jeffrey

    (there is a lot of fascinating history in that thread on his blog…)

    • N0x0n@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      23 hours ago

      Sorry to chip in and change subjet… But would you recommend that book for learning regular expressions as a non CS guy? I’m working more and more towards bash scripts and I run occasionally into the case where I need to write some regex and I’m getting frustrated not being able to do so and always ask for some help here on Lemmy.

      It really rough sometimes where simply using a regex tester isn’t enough to fill my use case.

      • Arthur Besse@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        16 hours ago

        would you recommend that book for learning regular expressions as a non CS guy?

        Absolutely, it’s an excellent book which I highly recommend.

        The latest edition (3rd) is almost 20 years old, but I don’t think regex has actually changed substantially since then so it should still be very useful. (I read the 2nd edition cover-to-cover and enjoyed it enough that I bought the 3rd when it was released 😀)

        If you’re going to buy a physical copy from amazon you should use the author’s link here to give him slightly more money for it. But if you just want a PDF I see one is available here.