Prolog Tutorial

Поділитися
Вставка
  • Опубліковано 8 вер 2024

КОМЕНТАРІ • 1,2 тис.

  • @derekbanas
    @derekbanas  5 років тому +72

    Learn in One Videos for Every Programming Language
    Subscribe to Bookmark them: bit.ly/2FWQZTx
    C++ : ua-cam.com/video/Rub-JsjMhWY/v-deo.html
    Python : ua-cam.com/video/N4mEzFDjqtA/v-deo.html
    Java : ua-cam.com/video/n-xAqcBCws4/v-deo.html
    PHP : ua-cam.com/video/7TF00hJI78Y/v-deo.html
    MySQL : ua-cam.com/video/yPu6qV5byu4/v-deo.html
    JavaScript : ua-cam.com/video/fju9ii8YsGs/v-deo.html
    C# : ua-cam.com/video/lisiwUZJXqQ/v-deo.html
    HTML5 : ua-cam.com/video/kDyJN7qQETA/v-deo.html
    CSS3 : ua-cam.com/video/CUxH_rWSI1k/v-deo.html
    JQuery : ua-cam.com/video/BWXggB-T1jQ/v-deo.html
    TypeScript : ua-cam.com/video/-PR_XqW9JJU/v-deo.html
    ECMAScript : ua-cam.com/video/Jakoi0G8lBg/v-deo.html
    Swift : ua-cam.com/video/dKaojOZ-az8/v-deo.html
    R : ua-cam.com/video/s3FozVfd7q4/v-deo.html
    Haskell : ua-cam.com/video/02_H3LjqMr8/v-deo.html
    Handlebars : ua-cam.com/video/4HuAnM6b2d8/v-deo.html
    Bootstrap : ua-cam.com/video/gqOEoUR5RHg/v-deo.html
    Rust : ua-cam.com/video/U1EFgCNLDB8/v-deo.html
    Matlab : ua-cam.com/video/NSSTkkKRabI/v-deo.html
    Arduino : ua-cam.com/video/QO_Jlz1qpDw/v-deo.html
    Crystal : ua-cam.com/video/DxFP-Wjqtsc/v-deo.html
    Emacs : ua-cam.com/video/Iagbv974GlQ/v-deo.html
    Clojure : ua-cam.com/video/ciGyHkDuPAE/v-deo.html
    Shell : ua-cam.com/video/hwrnmQumtPw/v-deo.html
    Perl : ua-cam.com/video/WEghIXs8F6c/v-deo.html
    Perl6 : ua-cam.com/video/l0zPwhgWTgM/v-deo.html
    Elixir : ua-cam.com/video/pBNOavRoNL0/v-deo.html
    D : ua-cam.com/video/rwZFTnf9bDU/v-deo.html
    Fortran : ua-cam.com/video/__2UgFNYgf8/v-deo.html
    LaTeX : ua-cam.com/video/VhmkLrOjLsw/v-deo.html
    F# : ua-cam.com/video/c7eNDJN758U/v-deo.html
    Kotlin : ua-cam.com/video/H_oGi8uuDpA/v-deo.html
    Erlang : ua-cam.com/video/IEhwc2q1zG4/v-deo.html
    Groovy : ua-cam.com/video/B98jc8hdu9g/v-deo.html
    Scala : ua-cam.com/video/DzFt0YkZo8M/v-deo.html
    Lua : ua-cam.com/video/iMacxZQMPXs/v-deo.html
    Ruby : ua-cam.com/video/Dji9ALCgfpM/v-deo.html
    Go : ua-cam.com/video/CF9S4QZuV30/v-deo.html
    Objective C : ua-cam.com/video/5esQqZIJ83g/v-deo.html
    Prolog : ua-cam.com/video/SykxWpFwMGs/v-deo.html
    LISP : ua-cam.com/video/ymSq4wHrqyU/v-deo.html
    Express : ua-cam.com/video/xDCKcNBFsuI/v-deo.html
    Jade : ua-cam.com/video/l5AXcXAP4r8/v-deo.html
    Sass : ua-cam.com/video/wz3kElLbEHE/v-deo.html

    • @hypothetic3945
      @hypothetic3945 3 роки тому

      Hi. in 53:17, the answer was supposed to be just 'you guessed it'. You explained the solution as "I should've put 'this is not the number' up here at the top." So, I tried to put that specific code both before and after the X equation and this didn't seem to fix my problem. I'd love to receive a little bit of your help. I'm writing a thesis and using this program.

    • @reasonerenlightened2456
      @reasonerenlightened2456 3 роки тому +1

      ​ The problem of Prolog is that the meaning is assigned by the human .
      loves (stacy, chad).
      for Prolog is different than
      l ( s, c).
      Basically, the meaning remains in the head of the human and Prolog is completely void of capturing the meaning of 'Stacy loves Chad'.
      The same applies to any other programming language I am aware of. THEY ALL FAIL TO CAPTURE MEANING, AWARENESS, CONTEXT, etc. !
      Why the programming languages are still not self-aware in the 21-st century????!!!!??? Somebody Explain.
      (is it because the captains of the software industries are afraid for their empires?)
      It is outrageous that nobody is doing something about it (i.e. as a far as I am aware) !!!!

    • @user-cf8wl9hk2q
      @user-cf8wl9hk2q 2 роки тому

      Could you add 00:00 mark in description. That way we can see the sections in the progress bar

    • @JuubiDimension
      @JuubiDimension 2 роки тому

      how do we get the terminal on windows

    • @eonstar
      @eonstar 2 роки тому

      ​@@hypothetic3945 Your thesis is probably long finished, but to help out those who are looking for answers. This is how I rewrote the number guessing game:
      %rewritting guess number thing
      guess_num:-loop(start).
      loop(start):-
      write('Guess Number '),
      read(Guess),
      loop(Guess).
      loop(15):-write('You guessed it').
      loop(X):-
      X\=15,
      write(X),
      write(' is not the number
      '),
      loop(start).

  • @creeperraper1337
    @creeperraper1337 8 років тому +487

    that video was worth it. learned more in the first 10 min then what i did in my college course after a half of a semester. thank you very much :D

    • @derekbanas
      @derekbanas  8 років тому +36

      Thank you :) I'm very happy that it helped

    • @57ΞνΘ
      @57ΞνΘ 8 років тому

      hey man , is this working on windows or only for mac ?

    • @mucgake8763
      @mucgake8763 7 років тому +2

      works for both windows and mac.

    • @thallan
      @thallan 7 років тому

      why did the c++ tut take me here? I am terribly sorry

    • @Toopa88
      @Toopa88 6 років тому +6

      Seriously? If that's the case either your teacher sucks or you never did anything for the course...

  • @h3w45
    @h3w45 3 роки тому +791

    can't believe my college is making me learn this instead of python in 2020.

    • @derekbanas
      @derekbanas  3 роки тому +106

      I agree

    • @itskathan7940
      @itskathan7940 3 роки тому +9

      Same Bro :/

    • @JITCompilation
      @JITCompilation 3 роки тому +4

      SAME

    • @ManojKumar-qg9bw
      @ManojKumar-qg9bw 3 роки тому +1

      IKR!!!

    • @jardondiego
      @jardondiego 3 роки тому +144

      If all you want to do with your CS major is building Wordpress websites then it's understandable why you don't understand why would you want to learn Prolog.

  • @martinoplaya7805
    @martinoplaya7805 7 років тому +173

    Its so great that you use sound engeneering for your mic and cut the moments when you write code. so the presentation is compact and dense with information that is easy to watch. I really appreciate this quality in your videos (Ive seen few already, like HASKELL) :]

    • @carlrossi
      @carlrossi 5 років тому +1

      None of the editors allow a .pl file to be created that are on my OSX. Looking for the editor this author used.

    • @alice_in_wonderland42
      @alice_in_wonderland42 5 років тому

      @@carlrossi it is sublime text,
      but you can use vs-code

    • @ZenoDovahkiin
      @ZenoDovahkiin 5 років тому +6

      @@carlrossi Lirterally any editor that isn't comlete garbage should be able to edit text files, regardless of suffix.

  • @integralyogin
    @integralyogin 6 років тому +20

    you seriously go above and beyond with these. So high quality in so many ways. The time stamps and cheat sheet I am especially grateful for. Thank you.

    • @derekbanas
      @derekbanas  6 років тому +1

      Thank you very much :)

  • @Shiroach
    @Shiroach 7 років тому +6

    Derek Banas,
    I tried slogging through the "Art of Prolog" but was recommended your video by a friend of mine. You not only effectively concatenated a detailed reading of the first few chapters, but improved upon their clarity. I feel like I can return to the later chapters of the book now with an improved understanding.
    Thanks again.

    • @derekbanas
      @derekbanas  7 років тому +2

      I'm happy I was able to make Prolog easier to understand. Yes that book is very complex I agree

  • @arran3451
    @arran3451 Рік тому +13

    Genuinely would've failed my course if it wasn't for this video. Seems to be so little information about prolog online, and my lecturer was no use at teaching it either. Thanks a lot for making this.

  • @cheatcode9296
    @cheatcode9296 5 років тому +48

    5:30 Tutorial starts (To skip installation process)

    • @PurpleMomgoose
      @PurpleMomgoose 4 роки тому +4

      He has that (and lots of other timestamps) in the video description.

  • @khaiyuw
    @khaiyuw 2 роки тому +10

    It's already 2021 and this video saved me! Thank you.
    As we're taking remote classes, my teachers didn't have enough time to teach it

    • @derekbanas
      @derekbanas  2 роки тому +1

      I'm very happy that I could help :)

    • @khaiyuw
      @khaiyuw 2 роки тому

      @@derekbanas Please make an Oz tutorial haha We really need it. Our teacher decided to teach us that language and there aren't many sources online about it :,)

  • @FracsoMehdi
    @FracsoMehdi 6 років тому +19

    For all you guys asking about the source of the db.pl file, you'll have to create manually, follow these steps:
    1- Go to gnu prolog menu and click on file then change directory
    2- Use a current directory or just create a new folder that will only be used for prolog projects
    3- Create your db.pl file using any text editor on your OS (leave the file empty)

    • @derekbanas
      @derekbanas  6 років тому +1

      Thank you for sharing :)

    • @FracsoMehdi
      @FracsoMehdi 6 років тому

      no problem

    • @charbelalam2648
      @charbelalam2648 3 роки тому

      Also make sure it's db.pl, and not db.pl.txt
      I made that mistake.

  • @robingather6877
    @robingather6877 4 роки тому +2

    Brooo. In contrast to my Logic lecturer you're making Prolog sound logical and usable. Before watching this video I got the impression it was some sort of ancient Vulcan pureblood language.
    Thank you!!!!

  • @abdulelahaljeffery6234
    @abdulelahaljeffery6234 7 років тому +16

    Note: to print out text, you can use writef() instead of format() and % instead of ~ [ just because writef() is close to printf() from C which many would be more familiar with ].

  • @puremarbib
    @puremarbib 8 років тому +15

    Amazing video, sums up a quarter of my semester in an hour! Why don't we have more teachers like you in university! :)

    • @derekbanas
      @derekbanas  8 років тому +6

      +Marb Thank you :) I'm here for free when ever you need me.

  • @aryankashyap7
    @aryankashyap7 3 роки тому +6

    Thanks for making this video, the first 45 mins for enough to cover all the topics that we covered in one semester

  • @marciliodacolneto4290
    @marciliodacolneto4290 6 років тому +2

    Excellent Tutorial, thanks Derek! I had Prolog during College for 6 months and learn nothing at all, now I am trying to keep up to speed with AI and your tutorial was very complete and understandable.

    • @derekbanas
      @derekbanas  6 років тому

      Thank you very much :) I'm very happy it helped

  • @weewoowarrior7023
    @weewoowarrior7023 8 років тому +10

    Reminder:
    2:27 - On this page, Derek already had the packages selected...if this is your first time installing, then these packages would have n/a beside it. In order to get those two boxes with the x in the first one, press 'Skip'...yes, it toggles. Check off all the corresponding packages mentioned in this tutorial.
    5:00 - Notice there are two files, helloworld.cpp and helloworld.h, in the directory. How did helloworld.cpp get there? I could be wrong, but maybe he saved the file as another file with .cpp as the extension. That's what I did and it worked for me when I ran the helloworld.cpp file.

    • @weewoowarrior7023
      @weewoowarrior7023 8 років тому

      +GettnSehway 1. Make sure your file has the .cpp extension
      2. Make sure that file is located in the folder with your name in the home directory for cygwin (ie: cygwin64 --> home --> (your name).
      If that doesn't work, then sorry I'm not too sure what to do.

    • @Walsh2571
      @Walsh2571 8 років тому

      if the compiler doesn't like the line "#include " does that mean the installation hasn't worked?

  • @bitmp
    @bitmp 7 років тому +1

    Just the right amount of detail and explanation for someone who is familiar with imperative languages.
    I definitely prefer watching this tutorial than reading through 80 different sources for documentation on prolog, thanks for the video Derek.

    • @derekbanas
      @derekbanas  7 років тому +1

      Thank you :) I'm happy it helped

  • @Maxens8888
    @Maxens8888 8 років тому +22

    If anyone struggles at 5:00 just save the text file as .h and then save a copy as .cpp :)

  • @JR-mk6ow
    @JR-mk6ow 3 роки тому +3

    Just that example at 12:53 between if and the prolog syntax makes everything much more clear. Why did my prof had to make it look so complicated...
    Love you Derek

  • @guteksan
    @guteksan 4 роки тому +4

    51:35 - there is an error in your count_up implementation, check with value of Low other than 0. You should skip 'Z is ...' statement and go directly for write(Y). With our implementation, Y already starts from the Low, so there is no need to add it.

    • @amarshpedapati
      @amarshpedapati 7 місяців тому

      @@May-zs7rf Sorry if i'm late by 2 years,
      count_down(Low, High):-
      between(Low, High, Y),
      Z is Low+High-Y,
      write(Z), nl.

  • @fhdcbdfkdjnisdnoi
    @fhdcbdfkdjnisdnoi 5 років тому +1

    I need to learn Prolog at the university, i study in language science and although i'm really bad with computer (the level of your grandparents probably) Prolog kinda feel more intuitive to me than Python, java or anything else alike. I could understand programmers could have difficulties understanding the purpose of this kind of language and finding it horrible but it's the best language for things like the automatic treatment of languages.

  • @donguth
    @donguth 8 років тому +8

    I think the name and the sentece are deceptive :
    get_grandparent :-
    parent(X, carl),
    parent(X, charlie),
    format('~w ~s grandparent ~n', [X, "is the"]).
    This is better :
    get_parent :-
    parent(X, carl),
    parent(X, charlie),
    format('~w ~s ~n', [X, "is parent's carl and charlie "]).
    (sorry about my english mistakes, my english isn't perfect)

    • @symelex1965
      @symelex1965 6 років тому +1

      Noticed that too and decided to check the comments. Thanks!

    • @Vandaliah
      @Vandaliah 6 років тому +1

      Here is how to find all who are grandparents :)
      get_grandparents :-
      parent(X, Y),
      parent(Y, Z),
      format('~w ~s ~w~n', [X, "is grandparent of", Z]).

  • @johnflanch3085
    @johnflanch3085 4 роки тому +1

    I wrote a prolog interpreter in python.
    But it was more simular to english.
    i.e
    In prolog:
    Loves(romeo,juliet)
    In my python interpreter:
    Romeo loves juliet

  • @Josh-vc6zl
    @Josh-vc6zl 8 років тому +4

    Wow, thanks a lot! I went from not even knowing where to start with this language because articles I found were very confusing even though I am an experienced programmer. Even though you did not cover installation on Linux I was able to gather enough information as to what I needed and that was enough to get me started. Excellent tutorial as always.

    • @derekbanas
      @derekbanas  8 років тому

      Thank you :) I'm happy I could clear up a very useful language

  • @chendavid9582
    @chendavid9582 8 років тому

    The best tutorial I've ever seen. I'm a learn-by-example guy so your 1 hour video helped more than 5 hours of lectures my professor gave with vague explanations and theories.

    • @derekbanas
      @derekbanas  8 років тому

      +Chen David Thank you for the nice compliment :) I'm happy that it helped.

  • @PaulGraphov
    @PaulGraphov 7 років тому +10

    Good intro.
    p.s. count_up and count_down seem wrong, only work well if Low is 0.

  • @ayoobalkindy2390
    @ayoobalkindy2390 Рік тому

    Thank you so much, on the course of 8 weeks of studying prolog, I barely knew how to write a prolog program, but thanks to your video, I can easily do it now!!!

  • @Mrmegaminergames
    @Mrmegaminergames 8 років тому +44

    20:45 wrong bob is the parent, this code works shows the actual grandparents
    get_grandparent :-
    parent(X, carl),
    parent(X, charlie),
    parent(Y, X),
    format('~w ~s grandparent ~n',[Y, "is the"]).

    • @sergevanhaag6811
      @sergevanhaag6811 7 років тому +5

      lmao. i was confused scrolling through the comments trying to find proof for this flaw.

    • @ujjwalthakur96
      @ujjwalthakur96 6 років тому

      I also got confused at this.

    • @erayk96
      @erayk96 6 років тому +3

      Actually this code is enough as you don't need two children to get the grandparents:
      get_grandparent :-
      parent(X, carl),
      parent(Y, X),
      format('~w ~s grandparent ~n',[Y, "is the"]).

  • @Swampdragon102
    @Swampdragon102 2 роки тому +1

    For those visiting: Windows 10 has WSL, which is a proper linux compatible with windows in both directions.
    With Windows 11, you can even run unix GUI programs out of the box.

  • @parasdsingh
    @parasdsingh 9 років тому +10

    Thanks a lot for the awesome tutorial Derek. Resolved a lot of my confusions! Can you do a video on Assembly please :)

    • @derekbanas
      @derekbanas  9 років тому +5

      Paras D You're very welcome :) Yes I'm moving towards assembly. I'm going to start making a few electronics tutorials as well soon.

    • @emmadabdelkrim3073
      @emmadabdelkrim3073 9 років тому

      Derek Banas I am Looking Forward To it Thank You Mr.Derek

  • @ronaldc8634
    @ronaldc8634 Рік тому

    Wanted to share my implementation of the number guessing game:
    guess_num :-
    write('Guess number'),
    read(Guess),
    play(Guess).
    play(15) :- write('You guessed it!').
    play(X) :-
    X \= 15,
    write(X),
    write(' is not the number'), nl,
    guess_num.

  • @alexandremarques8735
    @alexandremarques8735 9 років тому +18

    Great tutorial!! And I didn't know that penguins produce milk! :-O Thank you Derek

    • @derekbanas
      @derekbanas  9 років тому +17

      +Alexandre Marques Thank you :) They produce milk in a weird way. I love slipping in strange topics like that. It is called crop milk. Crop milk bears little resemblance to mammalian milk, the former being a semi-solid substance somewhat like pale yellow cottage cheese. I'm strange by the way :)

  • @Raphaelshreds
    @Raphaelshreds 6 років тому

    I would have been doomed without this very helpful video. My project was to make a program that a had bunch of facts for symptoms of diseases and we were tasked with adding symptoms to a person and running tests and getting it down to one disease or more that all have the same tests or symptoms and treatments, unfortunately he didn't go over dynamic facts or how to format of I/O. We also didn't have a book for this, greatly appreciated this video.
    Thank you!

    • @derekbanas
      @derekbanas  6 років тому

      Thank you :) I'm very happy that it helped

  • @mariuspetrescu6126
    @mariuspetrescu6126 6 років тому +7

    Great tut but I think that at 9:30 the question you're typing is "who romeo loves" instead of "who loves romeo". But, you know, with love beeing mutual in this case, unlike in the real life :), the answer is the same for both questions.

  • @madjimms
    @madjimms 7 років тому +2

    Thanks for not using the biased Intel C++ compiler that cripples performance for non Intel CPU's.

  • @thanosage4904
    @thanosage4904 7 років тому +5

    His voice sounds so mechanical, nice tutorial as well!

  • @BLUEOVI
    @BLUEOVI 7 років тому

    This is one of the best tutorials ever seen. Please consider joining Udemy. You can earn extra cash, teaching people cool stuff a bit more organized that youtube.

    • @derekbanas
      @derekbanas  7 років тому

      Thank you for the nice compliment :) I make enough money on YT. I'd feel bad if I charged people

  • @ralphclark
    @ralphclark 3 роки тому +3

    If on Windows 10, dont try to install cygwin - turn on the WSL 2 package, install a Linux distro from the windows store, then open a linux terminal and install prolog there using apt install.

  • @joshux3210
    @joshux3210 10 місяців тому

    51:24 count_down only works when Low is 0. Should be "Z is Low+High-Y". Similarly for count_up, should be "Z is Y".

  • @MrMyyBin
    @MrMyyBin 8 років тому +7

    Дякую! Срані держіспити, це лайно вчити!

    • @andrewverden459
      @andrewverden459 3 роки тому

      Like якщо з 3го курсу могиляночки

  • @MultiKB13
    @MultiKB13 3 роки тому +2

    If anyone is getting `existence_error` in the romeo and juliet example, see if you're on version 1.4.5. This version is bugged and using "consult" or "[db]" to load the database is broken for a lot of statements. You'll want to either use an older version like 1.4.4 in the video or compile the database first then run it using `gplc db.pl` then `./db`.

    • @raghunathreddy832
      @raghunathreddy832 3 роки тому

      Can you please tell me the command to install 1.4.4 version?

  • @matt3609
    @matt3609 3 роки тому +4

    Great series of videos! At 22:14 should I read it " X is the grandparent of Y , as long as, Z is the parent of X and Y is the parent of Z." If so should it not be named grand_child? I'm very possibly reading it wrong.. ??

    • @mbatu4
      @mbatu4 2 роки тому

      Nope, you are right.

  • @Vidya1840
    @Vidya1840 9 років тому +2

    I must admit that I'm really impressed with all your broad knowledge. I'm studying CS and I'm focused on AI and I must admit that there is nothing better than watching your videos while lying in bed last thing before going to sleep. I'll barely turn TV on anymore with you here. Really helpful and informative. P.S. what do you do for a living and whats your education if I may ask?

    • @derekbanas
      @derekbanas  9 років тому +6

      ianSD Thank you for all the compliments :) I went to school for electrical engineering and graphic design. Strange pairing I know, but I already knew how to program and wanted to work in special effects in Hollywood many years ago. I have been working as a private consultant for over the last decade. I mainly make online stores and private Android apps.

  • @TS-cg8nt
    @TS-cg8nt 5 років тому +3

    Great lecture. Wish there was more on lists as it relates to recursion.

  • @Meloera
    @Meloera 9 років тому

    For any other beginners that run into the same issue.. For commands like [db]., listing., and consult('db.pl') to work, you need to start gprolog in the terminal in the same directory that you have saved your knowledge base. Otherwise, you will get an uncaught exception.

    • @derekbanas
      @derekbanas  9 років тому

      Paul Cunningham Thanks for taking the time to help others :)

  • @zangruver132
    @zangruver132 5 років тому +21

    I read the thumbnail as "How to prolong one video"
    :/

  • @ig_haxie
    @ig_haxie 4 роки тому

    THIS IS FIRST VIDEO WHICH I FOUND USEFUL FOR ME... AFTER USING UA-cam ALMOST 8 YEARS

  • @jco199
    @jco199 4 роки тому +4

    in 20:35 where you modified the get_grandparents function, it actually became the get_parents function. You forgot to change the string and name to match that.

    • @garth2356
      @garth2356 Рік тому

      True, I was gonna comment just that.

  • @farmerfootball27
    @farmerfootball27 8 років тому +1

    hey dude. this is awesome. i'm not going to say "subbed" or anything, rather i'm going to watch every single video you got.
    one thing you forgot was the environment variables. i already know how to do it, so i was lucky, but i remember a time when i didn't and it took forever and lots of frustration to figure it out.
    thank you so much for the video! you do really well

  • @Welzi1234567890
    @Welzi1234567890 4 роки тому +33

    18:03 So... Alice and bob are siblings, and the parent of carl...?

    • @storyls
      @storyls 4 роки тому +28

      Welzi1234567890 sweet home alabama

    • @norcal6181
      @norcal6181 4 роки тому +39

      Yes, incest is common in prolog

    • @peacemekka
      @peacemekka 3 роки тому +1

      @@norcal6181 lmao.

  • @rjbray01
    @rjbray01 2 роки тому

    Wow that is honestly fantastic. I have looked at tons of tutorials and not one of them actually showed me how to write my first one-line program. Thank you so much - gottit !

    • @derekbanas
      @derekbanas  2 роки тому

      Thank you very much Happy I could help :)

  • @ZenoDovahkiin
    @ZenoDovahkiin 5 років тому +11

    produce_milk(penguin).
    yes
    Ok.

  • @raqha4575
    @raqha4575 3 роки тому

    My Prof was "good" with explaining FOPL, but i didnt understand a thing about Prolog. Thank you for this video

  • @ibm5155
    @ibm5155 8 років тому +11

    why not swi-prolog on Windows?

    • @ibm5155
      @ibm5155 7 років тому +1

      well not in my zone.
      The last dev that I saw using Linux formated his own hdd by mistake while he was trying to format an external hdd on terminal :B
      And the mac ones, ehm, I Always see them Always using dual boot :S
      ...
      And idk why did I made that question rofl, swi-prolog is bad everywhere

  • @deusexvelo
    @deusexvelo 5 місяців тому

    Simply the best Prolog tutorial. This is much much better than my intro Prolog university subject!

  • @travisdelly377
    @travisdelly377 7 років тому +850

    Worst language in the world. But very helpful for that one class you hate.

    • @derekbanas
      @derekbanas  7 років тому +84

      It is quite odd I agree

    • @travisdelly377
      @travisdelly377 7 років тому +17

      You seem to know it quite well though! What is the main purpose of this language? Would you be able to answer that for me? Also thanks again for the video, got me through my homework!

    • @abhichakladar5279
      @abhichakladar5279 7 років тому +61

      It's meant to be used for artificial intelligence to help store information and help robots make decisions. Other than AI though it's basically useless lol

    • @DarkF1b3r
      @DarkF1b3r 7 років тому +25

      I am trying to learn PROLOG to use on constraint logic programs (CLP) in a staff scheduling context, namely to find efficient staff schedules for 24-hour operations given a set number of people and a set budget of available time per person. No robots are involved :-)
      I still have a long way to go. List creation through recursion warps my mind and declarative predicate programming is still a new concept to me.

    • @derekfrost8991
      @derekfrost8991 7 років тому +24

      I really like prolog but example code always shows crappy family trees etc.

  • @Turk656
    @Turk656 3 роки тому

    12 hours of lecture condensed to ~63.5 minutes. Thanks, as always, for doing what you do my guy.
    Now to ponder the life choices of going tens of thousands of dollars into debt and licking tenured boots for 4-5 years to gain knowledge I could've learned in 6 months with youtube...

    • @derekbanas
      @derekbanas  3 роки тому +1

      Thank you :) Happy I could help. I have pondered what universities will become. My mother is a college professor by the way. I think 90% of the value of going to college is found in the networking. If done right that is extremely valuable. Of course there are a few amazing professors that can change a persons life, but they are few and far between. That is why I consider the current zoom college experience to be basically worthless.

    • @Turk656
      @Turk656 3 роки тому

      ​@@derekbanas preach

  • @aybo836
    @aybo836 6 років тому +1

    Dude this is what we call teaching skills! A perfect tutorial! Thanks a lot!

  • @dragonqwan10
    @dragonqwan10 7 років тому +3

    Better than college! Thank you!

    • @derekbanas
      @derekbanas  7 років тому

      Thank you :)

    • @dragonqwan10
      @dragonqwan10 7 років тому +1

      You are helping me a lot! I came back to tell you that in 4 days,with your starting tips on this video i learned much more than i did in half a semester . My skill got from 10% to 90% because i finally understood how Prolog works and i aced the exam.Now i`m working on creating a MySql database project with help from your videos later on watching your Haskell tutorial and who knows what goodies i`m going to find next! I`m reccomending you to my coleagues so they can catch up the things that college unfortunately didn`t manage to teach us ! God knows why.

  • @MANULINHOS
    @MANULINHOS 8 років тому +2

    Derek, Oh man... always there when I need a good old tutorial.
    Kudos for you!

    • @derekbanas
      @derekbanas  8 років тому

      Thank you :) I'm happy I can help

  • @SebasCapo2013
    @SebasCapo2013 9 років тому +8

    Thank you for another video! :D I'm learning so much about different languages with them!
    By the way, What about Unity? :P
    Stay awesome, thanks! :D

    • @derekbanas
      @derekbanas  9 років тому +14

      SebasCapo You're very welcome :) I can't wait to start making games. I'll do it for the rest of the year after I finish the languages.

    • @SebasCapo2013
      @SebasCapo2013 9 років тому

      Derek Banas Looks cool! :D I'l be waiting for them!
      Keep awesome, cya!

  • @dogaarmangil
    @dogaarmangil 9 місяців тому +1

    25:52 That's where I say Prolog is not for me, because data and compute are jumbled together, which they shouldn't be, if only because of AI, data analytics and specialised IT jobs. Also, Prolog tries to represent data in terms of predicate logic, which is odd. Nowadays we have graph databases which are clearly separated from the programs that use them. For me, Prolog is only interesting for historical reasons, because it dates from an early period where software wasn't yet a separate thing from the math/logic realm that gave it birth.

  • @eccentricHellion
    @eccentricHellion 7 років тому +8

    Did you cover how to do what you did @ 4:43 because I don't understand completely what that is.

  • @MrClintM
    @MrClintM 2 роки тому

    Mistake at approx 59:18, after you enter "List1 = [a,b,c]." (note the period) and then queried "?- member(a, List1)". The results are not as expected and you didn't notice this. In fact, List1 is out of scope. I found, if you use a variable, you must put a comma after List1 = [a,b,c], in order to refer to the variable.

  • @ohgrimreaper2878
    @ohgrimreaper2878 8 років тому +8

    @4:34 how do you open that folder

  • @eonstar
    @eonstar 2 роки тому

    I don't think count_down at 51:00 is doing what you'd want it to do. It works for if your lowest is 0, but not when it's anything else.
    I think it should be:
    count_down(Low, High) :-
    X is High - Low,
    between(0,X, Y),
    Z is High - Y,
    write(Z), nl.
    to work with any range given.

  • @perfectketchup
    @perfectketchup 6 років тому +6

    penguins doesnt produce milk,that stuff its not really milk :P great basic tutorial tho, thanks a lot! All other info on control logic programing looks like written in soviet russia

    • @derekbanas
      @derekbanas  6 років тому +1

      That's funny :) I'm glad you liked it

    • @dmitryponyatov2158
      @dmitryponyatov2158 6 років тому

      Totally right, I almost never read _learning_ textbooks on anything written by russian scientists - they can't write tutorials in principle, but dump their brain knowledge porridge onto paper, so you must already know a lot to read that mind flow.

    • @VerthElone
      @VerthElone 6 років тому

      This got me darn confused...

  • @surajmaurya2435
    @surajmaurya2435 7 років тому

    rule at 50:33 is faulty it does not work if the Low is anything other than 0, if you give the query count_down(7,13). it provides answer as 6,5.....0.

    • @derekbanas
      @derekbanas  7 років тому +1

      Sorry if I made a mistake

  • @MatTaNg100
    @MatTaNg100 9 років тому +4

    Where was this when I took my AI class last semester!

    • @derekbanas
      @derekbanas  9 років тому

      Matt Ng Sorry it took so long :)

  • @alex-dn9to
    @alex-dn9to 2 роки тому +2

    this video could really benefit from timestamps, its well organized!

  • @fredericosevergnini9348
    @fredericosevergnini9348 8 років тому +4

    Installation problem:
    I'm checking if cygwin was properly installed. At the terminal, when typing " g++ hellowoworld.cpp -o helloworld", I receive the message "-bash: g++: command not found".
    I also noticed that I only have the helloworld.h file (after creating it with notepad++). How do I get the .cpp file that?
    Thanks for the video!

    • @fredericosevergnini9348
      @fredericosevergnini9348 8 років тому +2

      also, when checking the "Devel" items to download, I couldn't find these options shown in the video. I'm not sure it it's related to the problems I'm having at the installation.

    • @mariav1234
      @mariav1234 8 років тому

      Same thing is happening for me. Did you find the solution for this?

    • @fredericosevergnini9348
      @fredericosevergnini9348 8 років тому

      So, here is what I noticed: the options inside "Devel" that are being worked with are usually minimized. Try finding them by checking the code number or names, that worked for me. But I ran into another problem after installation, so I'm learning C++ using Microsoft Visual Studio instead, and other video tutorials

  • @amarshpedapati
    @amarshpedapati 7 місяців тому +1

    At 51:15 i think the code for count down and count up is wrong, they only work when Low is 0.
    I think these work universally, please let me know if I'm wrong
    count_up(Low, High):- between(Low, High, Z), write(Z), nl.
    count_down(Low, High):- between(Low, High, Y), Z is Low+High-Y, write(Z), nl.

  • @kimy9100
    @kimy9100 8 років тому +5

    Wow, great tutorial! Thanks!

  • @MrMontana1990
    @MrMontana1990 7 років тому

    i came here from java tutorials search
    i watched your prolog tutorials when i had to take that course in university
    its really a fun language because you have to really think different than most other languages but in the end its pure logic
    thats why its called pro(gramming in )log(ic)

    • @derekbanas
      @derekbanas  7 років тому

      I agree Prolog is even a great language to learn if you just want to get better at programming in other languages

  • @krisjanisliepa7969
    @krisjanisliepa7969 9 років тому +5

    Will you cover iOS development any time soon, with objective-c or perhaps even with swift?

    • @ASDFG856
      @ASDFG856 9 років тому +1

      Alberts Klavins he already has a series on swift and object c , check out his channel :)

    • @derekbanas
      @derekbanas  9 років тому

      Alberts Klavins I'll see what I can do.

    • @krisjanisliepa7969
      @krisjanisliepa7969 9 років тому

      Derek Banas That would actually be great because i am new to iOS development and through you i actually learned basics in Android Development and I am grateful about that. So keep your work and thank you for your awesome videos. :)

  • @lyndaa7937
    @lyndaa7937 8 років тому +1

    Thank you so much for this tutorial. I was having trouble with my homework and this helped clear up concepts for me.

    • @derekbanas
      @derekbanas  8 років тому

      I'm very happy it helped :)

  • @spiritwolf448
    @spiritwolf448 9 років тому +5

    CAN YOU PLEEEEASE DO ASSEMBLY. please????

    • @derekbanas
      @derekbanas  9 років тому +7

      How to's for blender I'm working on it as well as a tutorial on electronics.

  • @jaaan2914
    @jaaan2914 Рік тому

    35:29 Penguins don't produce milk... they're BIRDS

  • @psyk2642
    @psyk2642 8 років тому +62

    42:10
    succ

  • @aidenluke4727
    @aidenluke4727 7 років тому

    I had to attend lab tutorials in my college for the whole semester but not learning anything. Here, it takes me 10 minutes for everything to start making sense.

    • @derekbanas
      @derekbanas  7 років тому

      That's awesome! I'm very happy that it helped :)

  • @FireWolfVids
    @FireWolfVids 9 років тому +18

    404 views. Cannot find page

    • @Streta2k11
      @Streta2k11 9 років тому

      FireWolfVids lmao

    • @asadwaqqas7035
      @asadwaqqas7035 8 років тому

      its 404 error i think not 404 view

    • @FireWolfVids
      @FireWolfVids 8 років тому +3

      Asad Waqqas
      you missed the joke a year ago when this had 404 views

    • @asadwaqqas7035
      @asadwaqqas7035 8 років тому

      ok

  • @wirito
    @wirito 5 років тому

    If only professors all over the world were as dedicated as you and many other youtubers who explain things in great detail.....
    In sam cooke’s voice: “what a wonderful world this would be”

    • @derekbanas
      @derekbanas  5 років тому

      Thank you for the nice compliment :)

  • @rohanarcot2955
    @rohanarcot2955 8 років тому +14

    How many proggramming languages do u know?

    • @derekbanas
      @derekbanas  8 років тому +57

      +Rohan Arcot I have used pretty much everything over my 30 years of programming

    • @ayami123
      @ayami123 8 років тому

      +Derek Banas do you know how to install XPCE ?

    • @NaeemAkramAndroidiOSApp
      @NaeemAkramAndroidiOSApp 8 років тому +8

      +Derek Banas is the Zeus of programming! :p

    • @madman6903
      @madman6903 8 років тому +8

      +Derek Banas lol i thought you were 25-30 years old

    • @VaibhavGupta9
      @VaibhavGupta9 8 років тому +3

      How do you remember it all! I keep confusing the syntax between the 2 languages I know!

  • @oddyseus95
    @oddyseus95 6 років тому

    Derek, you are an amazing man! I've just founded your channel, and now there are tons of videos to watch for me and learn them all. Apprecieta that man!

    • @derekbanas
      @derekbanas  6 років тому

      Thank you very much :) I hope you enjoy them

  • @MrQwerty2524
    @MrQwerty2524 9 років тому +61

    I never even heard of this language...

    • @reece4309
      @reece4309 9 років тому +37

      Its taught in university for AI apparently.

    • @derekbanas
      @derekbanas  9 років тому +7

      MrQwerty2524 It is pretty cool. Check this out Building Expert Systems with Prolog www.inf.fu-berlin.de/lehre/SS09/KI/folien/merritt.pdf

    • @outsider1st
      @outsider1st 9 років тому +2

      Derek Banas could you mind about assembly lang tutorial?

    • @derekbanas
      @derekbanas  9 років тому +17

      Nikodem Pierzak Sure, but I want to cover electronics first.

    • @outsider1st
      @outsider1st 9 років тому

      Great!

  • @GauravMahajanAvaron
    @GauravMahajanAvaron 4 роки тому

    When i read the course books that cover this topic, it feels like they are written by an abstract artist who is a little too much into wordplay and overly complicated language. Thanks for putting the topic in simple words man. Nothing is fuzzy anymore.

    • @derekbanas
      @derekbanas  4 роки тому

      Thank you that is the compliment I was most hoping for. I agree prolog books are terrible.

  • @shidajieqing
    @shidajieqing 7 років тому +3

    who's here for csc324?

  • @celsiusfahrenheit1176
    @celsiusfahrenheit1176 4 роки тому +2

    it's definitely not an imperative language, gotta wrap up my head around declarative and functional, I like it but ti's all new to me, thx from 5 years in the future

  • @Dakun
    @Dakun 3 роки тому +2

    You taught this so well and concisely. thank you very much, helped me out a lot

  • @HenriqueJGBelo
    @HenriqueJGBelo 6 років тому

    Exactly what I was searching for: clear and brief intro to understand Prolog throught examples. Thanks.

    • @derekbanas
      @derekbanas  6 років тому

      Thank you :) I'm glad it helped

  • @dmitryponyatov2158
    @dmitryponyatov2158 6 років тому

    It is much simpler to think that predicate(X,atom, another). defines N-ary _relation_ between variable X and two atoms. In that model we can represent classical table of RDBMS as aa lot of tablename(fielda,fieldb,...) with same name and arity

    • @dmitryponyatov2158
      @dmitryponyatov2158 6 років тому

      But every time I'm facing with a list my brain is melting.

  • @sharvanshshukla1679
    @sharvanshshukla1679 2 роки тому +1

    Thanks a lot man, really appreciate this tutorial, still a long way to go but a little hopeful now!

  • @DarshanParajuli
    @DarshanParajuli 7 років тому +1

    I have a final in a few days on Prolog and Haskell, your videos on them are such a great review, thanks!

    • @derekbanas
      @derekbanas  7 років тому

      I'm very happy I could help :) Best of luck on your finals.

  • @ChristianLCroigverg
    @ChristianLCroigverg 8 років тому +2

    Dude, amazing tuto! I love it! Thank you Derek! From an Argentinian guy!
    You've helped me a lot.

    • @derekbanas
      @derekbanas  8 років тому +1

      Thank you:) I'm very happy that it helped

  • @peterkosmas9518
    @peterkosmas9518 3 роки тому

    brother(A,B) :- parent(C,A),parent(C,B). it gives the result of bob -> brother of bob , possibly because alice is also parent of bob . so i suppose you must add more parameters like wife and husbund or mother and father :)

  • @michalnarbutt2057
    @michalnarbutt2057 5 років тому

    Got a Prolog final this coming Monday. This is better than the last 6 weeks of class. Thank you! #lifesaver

    • @derekbanas
      @derekbanas  5 років тому

      Thank you :) Best of luck on your final

  • @gunjansharma9301
    @gunjansharma9301 7 років тому

    Certainly, the best prolog tutorial by far.

  • @joshux3210
    @joshux3210 10 місяців тому

    21:44 the sematics of grand_parent v.s. parent is reveresed. grand_parent(a,b) b is a's grand parent; but parent(a,b) a is b's parent.

  • @emmadabdelkrim3073
    @emmadabdelkrim3073 9 років тому

    Thank You Mr Derek I Don't understand why people dislike you're videos
    what is the best way to learn programming

    • @derekbanas
      @derekbanas  9 років тому +1

      imad krimo You're very welcome :) It is ok. Some people don't like fast videos which is what I specialize in.

  • @austinnicholas2445
    @austinnicholas2445 8 років тому

    Note to anyone watching: the count_down and count_up definition written in this video only work if you use the low value of 0. Otherwise the practice of doing 'High - x' and 'Y - Low' will not start and end where you expected them to. The count down/up will be offset by your min value.

    • @derekbanas
      @derekbanas  8 років тому

      +Austin Nicholas Thanks for taking the time to help :)

    • @austinnicholas2445
      @austinnicholas2445 8 років тому

      +Derek Banas Thanks for helping me study for my final exam. Aced it like a champ!