Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A useful chapter - getting started tutorial #46

Open
dougransom opened this issue Jan 23, 2024 · 0 comments
Open

A useful chapter - getting started tutorial #46

dougransom opened this issue Jan 23, 2024 · 0 comments

Comments

@dougransom
Copy link

I think a useful chapter would be a getting started tutorial.

Start with a working program that does something, using have a dozen predicates with two clauses each.
p1 :- ....
p2 :- ...
p3 :- ...
...
p6 :-...

Exercises, get used to the syntax errors in your toplevel:

  • On line p2, put a % to comment it out, consult, what happens.
    -- On line p2, put a # python comment in error, what happens.
    -- repeat the above after the first clause of a predicate, before the second clause.
    -- replace a :- with a :.

Next exercise: repeat with a DCG example.

Show how to use some debugging features of scryer.

Show how to put a testcase in the file, so when you consult, you can easily run the example.

Next exercise:

A few examples of predicates, like integer, -> , dif, etc, that the reader might want to use later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant