Scryer-Prolog: modern Prolog implementation written mostly in Rust

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • scryer-prolog

    A modern Prolog implementation written mostly in Rust.

  • Wow, thank you a lot! I am very glad you find this material useful!

    Scryer Prolog compiles Prolog code to abstract machine code, and executes that. Like SICStus Prolog, GNU Prolog etc., Scryer uses the Warren Abstract Machine (WAM) as the target architecture. Therefore, self referential data structures, linked lists, tail recursion etc. are not directly mapped as such to Rust data structures, but occur in a sense only "indirectly" when Rust interprets the virtual machine instructions, where references to data structures appear as pointers to cells in the virtual machine. Similarly, tail calls correspond to certain abstract machine instructions that allow reuse of portions of the virtual local stack.

    I have made a video that explains this common implementation of memory usage in Prolog systems:

    https://www.metalevel.at/prolog/videos/memory_usage

    Currently, Scryer uses a Rust enum to represent heap cells, here is the definition:

    https://github.com/mthom/scryer-prolog/blob/ca62e54652ace837...

    A more compact representation will use tagged cells that point directly into memory. It is my hope that such an improved representation will soon become available in Scryer Prolog.

    On the use of Rust: I contributed only a few hundred lines of Rust code to Scryer Prolog. My feeling when using Rust was that this is a suitable final form of the implementation: Rust seemed so suitable and natural to implement the low-level facilities of Scryer Prolog that I consider it unlikely that any other language will ever warrant a change in this basic layer of the implementation. It is this feeling that I strive for when using programming languages, and I get it also for example when using Emacs Lisp, PostScript and Prolog. Rust's package manager, the availability of ready-made crates and the easy compilation were also extremely helpful during development.

  • datafrog

    A lightweight Datalog engine in Rust

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • polonius

    Defines the Rust borrow checker.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts