Skip to content

Conversation

@dougransom
Copy link

A guide for new to Prolog or new to Scryer to get started. Covers a few simple things that might help newbies save some time.

Copy link
Contributor

@Skgland Skgland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting started might also be a good place to list toplevel keybindings i.e. #3155 / #3154

@jjtolton
Copy link
Contributor

So @dougransom I think this is well intentioned but you might not realize that you walked into a minefield. The school of thought that Scryer Prolog belongs to is the absolute strictest there is, and there will be no compromising on that. I have jokingly referred to it as "Vegan Prolog" (though that joke is not too popular with anyone besides me 🤣 ), but I reiterate the joke just to emphasize how seriously that is taken -- but I think it is more properly described as Neoclassical Prolog. This means we celebrate the discipline of the absolute best and most rigorous techniques and inspire each other to reach for that same level of mastery.

The goal of making it accessible to newcomers is welcome. And I appreciate your "defense against the dark arts" approach. But you will find that the pedagogy here is aligned with the message of the content: state what holds, not what doesn't.

In regards to making it accessible to newcomers, I would contend that there are three kinds of newcomers:

  1. Individuals with little to no experience in programming
  2. Experienced programmers seeking to learn a new language
  3. Experienced technical professionals (scientists, engineers, or programmers who are required to use this for work)

I believe in the case of group 3, they primarily want cut and paste examples, and in the absence of that they want extremely clear and easy to use documentation, and ease of use features.

In the case of group 2, they are most likely looking for the correct "idiomatic" usage of the language -- not just how to "write Python in Prolog".

In the case of group 1, which I think is whom you are primarily focusing on:

I think that hands on tutorials are far superior to documentation, as they must "experience" the language rather than reason about it. My experience and background in education and teaching programming has made me a strong believer in Constructionism -- Repetition, drills, and so called Études lead to the development of abstract thought which cannot be communicated directly.

You can feel free to look through my forum posts and find that I was and often still am wrong-headed and belligerent, so I don't mean to say any of this to be discouraging or say that none of this is welcome. Rather, in spirit of the Neoclassical tradition, I would encourage you to take a look at some of our best works and thinking:

Two things -- first, you will find that contributing to the official material is -- deliberately -- a very high bar (more on that in a second). Secondly, once you do embrace that Neoclassical spirit, I think you will find that changing the approach in your tutorial from "how do we align with what people are used to seeing" to "how do we align people with what they should be seeing", you will find that a much easier sell.

Now then -- as a final note, I am still learning myself, and many things I do which I am unsure about how to align with the best standards but I am interested on making progress towards nonetheless. For example, my Scryer async library photon, or my Scryer Python library ScrPy -- I have these as libraries that are adjacent to Scryer but contribute to the ecosystem. The type of feedback you can get for an adjacent project is generally more constructive even if not directly aligned than trying to put an unaligned project directly into the standard.

So again I do hope you receive this with the Neoclassical spirit in which it is intended, which is to inspire you towards the same standards towards which I myself have been inspired. If you have any questions which might be better answered more transiently than on public discussion feel free to get my email from my GH profile or join the IRC chat!

@dougransom
Copy link
Author

I think that hands on tutorials are far superior to documentation, as they must "experience" the language rather than reason about it. My experience and background in education and teaching programming has made me a strong believer in Constructionism -- Repetition, drills, and so called Études lead to the development of abstract thought which cannot be communicated directly.

Completely agree with this, wouldn't hurt to have a series for exercises for Prolog newcomers to go complete, roughly in line with the Power of Prolog.

@haijinSk
Copy link

haijinSk commented Dec 7, 2025

[...] I think that hands on tutorials are far superior to documentation, as they must "experience" the language rather than reason about it. [...] @jjtolton

"In statically typed systems, type is often treated as essence; in Smalltalk, type is experience."

https://thinkingintypes.github.io/Z10_Appendix_Dynamic_Smalltalk_vs_Static_Typing/

I see myself in this category: "Individuals with little to no experience in programming", so I always want something like this: https://docs.racket-lang.org/ end even more...

My main documentation (in a sense, and often literally) was "The power of Prolog" and I tried to understand the essence of logic programming, maybe even more then Prolog itself (in all of the "lower-level" details), by reading books, papers and documentation of other systems (and not only Prolog systems) and sometimes even by trying that other systems (like non-Prolog systems of constraint programming).

But without "The power of Prolog" as the "main power and main magic" I would never do it. Without "The power of Prolog" and Scryer I would never have a courage to try to understand the other "logic programming thing", like, for example, miniKanren, or "constraint programming" like Picat and MiniZinc, even Constraint Handling Rules and Answer set programming; I would never know that things like constraint programming even exists. And in a Shakespearean spirit of "You taught me language, and my profit on't Is I know how to curse...", "The power of Prolog" and Scryer's DCGs (and Scryer people/texts here on GitHub) taught me parsing, what is parsing about. With this "DCGs experience" I can now understand some parsing things outside of Prolog.

I said people... Yes, The power of Prolog/Scryer plus, for me, one very important thing. Amiability of "Scryer people".

Some, for me, inspirational sources:

Design for Amiability: Lessons from Vienna
https://alistapart.com/article/design-for-amiability-lessons-from-vienna/

"[...]
In a study for a conference on the History of the Web, I looked to the origins of Computer Science in Vienna (1928-1934) for a case study of the importance of amiability in a research community and the disastrous consequences of its loss. That story has interesting implications for web environments that promote amiable interaction among disparate, difficult (and sometimes disagreeable) people.
[...]"

https://en.wikipedia.org/wiki/How_to_Design_Programs
https://en.wikipedia.org/wiki/Mindstorms_(book)
https://en.wikipedia.org/wiki/The_Ignorant_Schoolmaster

And of course, there is more things one can read for inspiration, for example reading authors like Ivan Illich, Gregory Bateson ("Mind and Nature: A Necessary Unity"), Humberto R. Maturana & Francisco J. Varela ("The Tree of Knowledge: The Biological Roots of Human Understanding"), etc.

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

Successfully merging this pull request may close these issues.

6 participants