3 ms·
I was hoping that this would allow one to use the underlying libraries and algorithms directly from Rust, without using Prolog syntax, and that the Prolog synta
by codetrotter 5y ago
I was hoping that this would allow one to use the underlying libraries and algorithms directly from Rust, without using Prolog syntax, and that the Prolog syntax part was sitting on top of everything else. But it looks like this implementation consists of a parser written in Rust and then pretty much everything else looks to be written in Prolog itself.
- triska 5y agoScryer Prolog does delegate a lot of the work to Rust libraries and crates. For example, see the cryptographic functionality from library(crypto): https://github.com/mthom/scryer-prolog/blob/master/src/lib/crypto.pl https://github.com/mthom/scryer-prolog/blob/master/src/lib/c... Note that many of these predicates are only wrappers for internal implementations that use the Rust crates. In fact, these existing Rust crates (notably ring) made it especially easy and convenient to add this functionality. library(sgml) is another example of this approach: https://github.com/mthom/scryer-prolog/blob/master/src/lib/sgml.pl https://github.com/mthom/scryer-prolog/blob/master/src/lib/s... On a general note, it is often an advantage to implement functionality in Prolog, because it helps to improve robustness and efficiency of the underlying engine, and makes changes easier.