1. 10
  1.  

  2. 3

    I find it fascinating, but more because it is a prolog like language that is written in forth.

    I do have trouble following the count example in the manual.

    1. 3

      Although logic programming and stack-based programming are very different paradigms from a user perspective, fast Prolog implementations typically compile to stack-based bytecode, the Warren Abstract Machine. So on the implementation side it’s less of an impedance mismatch than one might expect.

      1. 2

        ‘Stack-based VM’ and ‘stack-based programming language’ are two very different things.

        1. 3

          I’m not saying you’re wrong but your claim is unsubstantiated. Generally it’s more interesting if you explain the differences.

          From my pov it’s programming languages all the way down so the difference is mainly whether you consider your language an IR or a UI.

          1. 2

            In terms of their goals yes, but you can treat a stack-based programming language as basically just a stack-based VM target if you want. For example here’s a paper from 1987 showing how to use a WAM-style compilation strategy to compile Prolog to Forth.

        2. 2

          As a prolog enthusiast, I did enjoy that mind bending aspect of it.

          1. 2

            It doesn’t have all the fun Prolog features like unification, but it may be easier to reason about, and it definitely makes its multithreaded nature easier to implement. Disclaimer: I helped with the ppc64le port.

        Stories with similar links:

        1. An implementation of "Strand", a parallel Prolog dialect authored by bunny351 1 year ago | 26 points | 10 comments