Mercury-Language / mercury

The Mercury logic programming system.
Other
888 stars 55 forks source link

It's needed some tutorial #42

Open ghost opened 7 years ago

ghost commented 7 years ago

Some people want learn mercury from scratch.

ghost commented 7 years ago

Web oficial's tutorial isn't complete.

wangp commented 7 years ago

That is true.

As an experiment, I have enabled the wiki on this repository in the hope that developers and users alike can to contribute to a basic tutorial. Since it's just a wiki, the idea is that people can quickly write up a short page without fretting too much over quality. On the mercury-users mailing list someone suggested Ralph's book moves too fast, so perhaps that is an indication that short pages covering a little bit at a time is the way to go. That should be easier to work on incrementally anyway.

Feel free to suggest any topics, what needs to be covered first, etc.

phlummox commented 7 years ago

The unpublished material in the "tutorial/book" is extremely useful (i.e., files in the https://github.com/Mercury-Language/books/tree/master/tutorial folder that haven';t yet made it into the main book). Because they're incomplete, I guess the feeling is that they won't be useful to beginners. But to someone who already knows Prolog and/or a functional language, they're massively useful, providing lots of examples that don't seem to be covered elsewhere.
    Perhaps some of them could be quickly pulled out and be added as a "cheat sheet" on the wiki? Not yet fleshed out enoguh to be an actual tutorial, but still very helpful.

wangp commented 7 years ago

That would be useful. Would you mind doing that?

ghost commented 6 years ago

Oh, I am not a programmer and i am interested to learn Mercury as my first programming language.

ghost commented 6 years ago

:( fuckkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk

C4Cypher commented 5 years ago

Are we talking a tutorial for the language, or a tutorial to get started with the mmc (bootstrapping)? If it's just a tutorial for the language, should one start with teaching prolog-like semantics or just jump straight to explaining the structure of a module (interface/implementation) ... pred declarations, modes, and for the implementation explain the prolog semantics cliff notes (this is a goal, see goal flounder)?

:- module tutorial. :-interface. :- type foo. :- pred main(foo::in) is det. :- pred tutorial(foo::out) is det. :- implementation. main(Foo) :- tutorial(Foo).

wangp commented 5 years ago

The tutorial was started here: https://github.com/Mercury-Language/mercury/wiki/Tutorial

I haven't added anything to it for a while. It turns out to take quite a bit of effort to write each page, and I'm not sure if the pages are helpful for anyone. Much of the information is available from the reference manual anyway (perhaps in a less accessible form), so maybe the "example programs" pages like the RPN calculator and Zebra puzzle are more helpful. Feedback would be appreciated.