
Modern Prolog Implemented in Rust - xvilka
https://github.com/mthom/scryer-prolog
======
sevensor
This has made me aware of the WAM book
([http://wambook.sourceforge.net/wambook.pdf](http://wambook.sourceforge.net/wambook.pdf))
[PDF], which I didn't know about up to now. I'm intrigued.

------
criddell
Why do _$EXISTING_THING Implemented in Rust_ stories get so much attention
here? It feels like I see one or two of these show up every week.

~~~
Qwertystop
"Reimplement an existing thing" is a decent way to learn a new
language/system. People want to learn Rust.

~~~
lmkg
Furthermore, programming in Rust has some unique challenges (like the borrow-
checker) that make traditional line-for-line or function-for-function re-
writes unfavorable. The average Rust re-implementation tends to do more re-
architecture than the average $FOOLANG re-implementation, which tends to make
them more education.

There's also an aspect that Rust is still seen as "unproven," compared to its
rather bold goals and claims. A re-implementation of something existing is a
good opportunity to see how well Rust-in-practice manages to approach Rust-in-
theory, and in some ways is better for that purpose than a green-field Rust
project.

Personally I prefer post-mortem write-ups rather than links to an active code-
base, but you take what you can get.

~~~
andrekandre
reimplementing is interesting and definitely cool, but what i really want to
see is what _NEW_ previously-almost-impossible-to-achieve products/artifacts
we can create with these new languages...

~~~
FridgeSeal
I think we’ll definitely see that, but I we’ll see that after people get
comfortable with the language, and doing rewrites is one way people get
comfortable with a language.

------
SomeHacker44
Next up: building a Rust compiler in Prolog.

~~~
cpeterso
Chalk is a PROLOG-ish interpreter written in Rust, intended eventually for use
in the rustc compiler. Chalk recasts Rust's trait system in terms of logic
programming. Its goal is to be an executable, highly readable specification of
the Rust trait system.

[https://github.com/rust-lang/chalk](https://github.com/rust-lang/chalk)

[https://rust-lang.github.io/rustc-guide/traits/chalk-
overvie...](https://rust-lang.github.io/rustc-guide/traits/chalk-
overview.html)

------
DannyB2
There needs to be a pronunciation guide for: Scryer.

I can think of several alternatives. I'm currently thinking of: s-crier.
Rhymes with cryer. But it would be nice to know for sure.

~~~
JoshTriplett
I'd suspect "scry-er", based on the word "scry", but I don't know either.

~~~
mthom
Yes, that's right. Scryer as in scry-ing, the practice of gazing into crystals
to communicate with spirits. I wish I'd thought of a better name but it's too
late now.

------
JoshTriplett
Also see [https://github.com/rust-lang/datafrog](https://github.com/rust-
lang/datafrog) .

~~~
xvilka
I tried to use it but wasn't able to understand how to keep the original
Prolog/Datalog syntax, rather than describe it in Rust syntax.

