5 ms·
Prolog's Eternal September (2017)
- JadeNB 1y agoIt seems strange to make "let's make it easier for people to teach Prolog who don't understand it." At very best, this'll lead to students with a minimal factually correct knowledge of Prolog, and no idea why it matters. If we're imagining changing teachers' practice, why not aim a little higher and try to convince faculty that Prolog is interesting, at which point anyone qualified to teach computer science can learn about it themselves, and teach it better than from material designed around their ignorance?
- passivegains 1y agothe author is pretty up front about this: I would like to live in a world where professors consider Prolog worth knowing and put in the effort. That probably isn’t realistic. He clearly wishes he's wrong, which makes three of us.
- JadeNB 1y agoRight, but thinking you can change how people teach a subject without their believing it's worth knowing seems unrealistic, too!
- Arch-TK 1y ago"I think the underlying problem is that Prolog is part of a mandatory curriculum, but the professor doesn’t understand it. How do you teach something you don’t understand?" Same problem with C and probably other languages. Although by far the most annoying is that lots of people who also get paid to write C don't know it and have no interest in actually learning it. (Worst of all, they don't realise how little they know about C and think they know it very well.)
- Bootvis 1y agoWhat is something such a person should know but doesn’t? I don’t write C but the language is fairly small so I can imagine a professional keeping 99% of it in their head at all time.
- remexre 1y agoIdiomatic design would be a big one; there are a lot of ways to design a program in a higher-level OO language that, if followed in C, will lead to a program with lots of bugs around error handling and resource cleanup. This kind of ties into the argument made by some in the Rust community that "the ownership was there the whole time" -- in a language without automatic memory management, you really do need to be aware of the life-cycle of an object in memory. Rust's specific rules aren't fundamental, but "even when an error occurs, I know what cleans up this object / this state" is.
- layer8 1y agoThey should know what the C abstract machine does and doesn’t guarantee, for one.
- anthk 1y agoC it's highly machine dependant. Something like Scheme, CL or even Forth would be preferable. At least with some bare metal Forth you can inspect the machine from high level to ASM levels.
- codr7 1y agoI agree Forth could make a more optimal first language to learn. I often recommend beginners to learn all of Forth, C, Lisp & SmallTalk. Because they're all conceptually clean local maximums in the language design space.
- anthk 1y agoWith Forth (Starting Forth and Thinking Forth) and Lisp (especially CLOS or Scheme with SICP) you cover them all. Even Subleq+Eforth it's fine, you'll learn EForth (it can be set at muxleq.fth/subleq.ftj with some compatibility with do...loop and floats) and Subleq as a VM. It's highly documented and it even has a book to play with. EDIT: as a nice example, I had some pas.f example with a Pascal triangle. In order to get it working under eforth, I just had to define .r as u.r on top like: : .r u.r ; and that was it. It ran on both PForth and EForth. Eforth on a subleq (muxleq for performance) under an n270 Atom netbook.
- ggerules 1y agoI agree with you! Having spent decades writing C and sometimes teaching C at the university level, to really understand the "why" of things in C you have to spend some time,separately, writing / studying some assembly language. In many universities teaching assembly language has fallen out of favor.
- NooneAtAll3 1y agoyou mean "C with new"? the one that's even worse than C-with-classes...
- deleted 1y ago[deleted]
- cbarrick 1y agoOne of my many probably-going-nowhere hobby projects is a modern Prolog. I think the module system especially is a place where we need innovation. I'd like to see someone do for Prolog what Clojure did for Lisp.
- brudgers 1y agowhat Clojure did for Lisp Hickey’s goal was improving JVM programming ergonomics. It was not changing Common Lisp (or Scheme). Sure, Clojure exposed some programmers to lisp, but lisp shops didn’t convert to Clojure. JVM shops did adopt it in part because Clojure “is just a Java library.”
- tyre 1y agoYep. The parallel here would be taking logic programming and opening it to new users. Prolog or systems like CLIPS are super powerful and map to common problems better than other tools, but are Scary and Niche and Unknown.
- pjmlp 1y agoWhich is why the Clojure community is the coolest from guest languages on the JVM, as they embrace the platform, instead of dissing the platform like the other one used to bootstrap a mobile SDK ecosystem.
- zbentley 1y agoNot entirely wrong, but … only one of Clojure and Kotlin is close enough to Java that it’s inspiring meaningful improvements in the upstream ecosystem. If the “dissing” hypothesis were true I’d expect Clojure to be the one influencing the most change, but it’s not.
- pjmlp 1y agoOh boy are they so true, one of the reasons I don't care about the Kotlin Virtual Machine any longer. So full of themselves on how much better they are than Java.
- oh_my_goodness 1y agoI hear this and I agree. It's obviously a serious problem. As a side issue. There's also a different, deeper problem. Any Q&A site that's actively hostile to people who ask questions is going to become toxic and intolerable within a few years. I'm pretty sure that's true even if the hostility is reasonable and justified. As a newsgroup user since 1986: The problem with the original Eternal September was not only a tidal wave of ignorant new users. It was also that a large fraction of the experienced user base were smug lunatics long before September finally arrived. Sorry for the like "radical candor" here.
- jamespo 1y agoTheres actively hostile and then there's indifference to a certain class of questions. Anyway AI models don't suffer from this nowdays
- oh_my_goodness 1y agoYes, that is a big difference. From what I've seen indifference leads to much better outcomes. :) Agreed, the AI models have great "people skills." Every user is a genius!
- melenaboija 1y agoI wish I still had the curriculum from my logic class in computer science from 20 years ago. It was clearly structured to build a deep understanding of how Prolog works, starting from the fundamentals of tautology, then moving on to unification and backtracking implementations in Prolog and so on. The practical classes involved solving different problems ending with simulating the Enigma encryption machine. The approach really worked and I know it did because whenever I revisit Prolog, it only takes me a few hours to get back up to speed on the fundamentals. For something as abstract as logic and Prolog I think it says a lot.
- billfruit 1y agoSounds very interesting, which text book did you use for your course?
- melenaboija 1y agoI don't remember sorry :(
- agumonkey 1y agowould you accept telling us which university you went to ? unless you want to keep that private
- sitkack 1y agoMany of these course websites are still around and/or recycled to later courses.
- neilv 1y ago> The pre-beginners are not at Stack Overflow to look at existing solutions (which is what Stack Overflow wants you to do). They just want someone to do their homework for them. This is/was also a thing in the Scheme (and Racket) community, where maybe half the users in the world, at any given time, just want to pass the class and then never see it again. The funny part was that it's a fairly small world, and the forums the students were asking include the people who wrote the textbooks and often the problem sets, as well as probably knew the students' professors. Fortunately, :) "AI" is now doing all the lazy students' homework for them. So now: 1. The AI plagiarizes from books, open source code, and forums; 2. then the student plagiarizes from the AI; 3. then the forums are left to people who are actually interested; 4. then the AI companies come and again steal whatever the interested people do; 5. and repeat.
- mcswell 1y agoI wonder whether a way to get around this problem would be to show the student buggy Prolog programs, maybe even buggy solutions to textbook problems--whether the "solutions" are produced by AI or by humans might not matter. The student's task is first to find out where the program produces the wrong results, and second to fix the code. From what I've heard (I haven't used AI programs much myself), telling an AI chatbot to fix a program seldom results in the correct fix. So at least until the AIs are greatly improved, would this work?
- neilv 1y agoI think the solution involves raising children to have integrity, and then not then discouraging that with tons of artificial gatekeeping theatre on the way to good jobs. The first obvious thing I'd destroy is LeetCode interviews. Maybe the protagonist in the article would've thought differently about school and jobs and integrity, if he hadn't had to spend 600 hours on LeetCode rehearsals.
- subjectsigma 1y agoSomeone, quick, perform the mtriska summoning ritual I have no idea if he’s read this post but his YouTube channel provides, I feel, the missing link between a “day one” Prolog tutorial and an expert-level Prolog guide. It’s exactly what the author is talking about. http://metalevel.at http://metalevel.at
- crustycoder 1y agoI hadn't come across that, In general I'm not a great fan of programming videos (life is too short) but the website content looks interesting - thanks!
- subjectsigma 1y agoEnjoy. I could see not liking programming videos, but they are very informative and sometimes veer into the philosophical or even political, but always in a level-headed way. Markus semi-regularly posts on HN about Scryer and I always enjoy reading what he comments.
- crustycoder 1y agoCoincidentally, on Friday I pulled my dusty 1987 copies of Sterling & Shapiro and Bratko off the bookshelf for the first time in literally decades, and built myself a copy of SWI so that I could have a tinker with it for something where I think it may be a good fit. Sure there are now some shinier toys in the Prolog box but the problems with Prolog seem to be the same now as they were 35+ years ago - it's seen as a niche CS-only tool, where to get any traction at all you have to absorb reams of terminology that's mostly unknown outside of academia, or has been forgotten post-graduation - Prolog really doesn't do itself any favours, and never has. I think expecting academia to ever "sell" Prolog is a bust - if it hasn't happened by now, it never will. Better to directly target people earning their crust writing code, and sell the benefits to them, with real examples, not Towers of Hanoi and N-Queens. And as far as practicable, try to relate them to things that they are more likely to already know, such as SQL or Functional programming?
- JadeNB 1y ago> Coincidentally, on Friday I pulled my dusty 1987 copies of Sterling & Shapiro and Bratko off the bookshelf for the first time in literally decades, and built myself a copy of SWI so that I could have a tinker with it for something where I think it may be a good fit. If you care for recommendations to complement those two, O'Keefe's The craft of Prolog is my favorite Prolog book.
- crustycoder 1y agoThanks for the recommendation :-)
- thesz 1y agohttps://github.com/stassa/louise https://github.com/stassa/louise "Louise is a machine learning system that learns Prolog programs." For example, it can infer context-free grammar from half a dozen examples, one positive and several negatives.
- jrapdx3 1y agoBack in the ancient 80s Prolog made a splash for a time. There was Turbo Prolog (Borland) that I used for a couple of years, wrote some useful programs with it. I also have "The Art of Prolog" and pull it out once in a while. My Prolog skills seem subject to rapid decay with disuse. While the appeal of declarative programming is still there, the most that can be said is Prolog's influence is evident in subsequent languages. The incorporation of pattern matching is one example that comes to mind.
- chuckadams 1y agoTeaching prolog in the context of modern type systems might be more worthwhile, since to my understanding, there's quite a bit of overlap, to where you can write arbitrary prolog in Haskell or Scala's type systems. Probably even holds for C++ and TypeScript too. But I don't think there's a technological solution for teaching a subject for which the school cares so little that it won't hire anyone who actually understands it.
- klodolph 1y ago“Arbitrary prolog in Haskell’s type system” is overselling it. There are a lot of GHC extensions out there, so maybe some combination of extensions can bring this statement closer to reality. But, as stated, it’s pretty far away. There’s an important common thread shared by Prolog and type certain systems, which is unification, but Prolog gives you a lot of tools to control what happens when you go forward and backward: +---+ >---| |---> | | <---| |---< +---+ Prolog is, after all, Turing complete by design. I don’t know if Haskell’s type system is Turing complete with enough GHC extensions enabled, but if it is, then it’s by accident.
- syrak 1y agoYou need very little to make a Prolog-like language Turing-complete (lists and recursive predicates). And so Haskell's type system only needs one (or two) extensions to be Turing-complete, `UndecidableInstances` (and maybe `FlexibleInstances` or `MultiParamTypeClasses`). It is no accident. The name "undecidable" shows that the authors of that extension were well aware that it enables Turing-completeness.
- klodolph 1y agoExactly—Haskell’s type checker can be made Turing-complete, but that won’t make it much like Prolog.
- fc417fc802 1y agoI'm not sure how useful it is in practice but even C++ templates are turing complete. https://rtraba.com/wp-content/uploads/2015/05/cppturing.pdf https://rtraba.com/wp-content/uploads/2015/05/cppturing.pdf > I don’t know if Haskell’s type system is Turing complete with enough GHC extensions enabled, but if it is, then it’s by accident. Undecidable instances? I don't think that's an accident. https://stackoverflow.com/questions/42356242/how-can-undecidable-instances-actually-hang-the-compiler https://stackoverflow.com/questions/42356242/how-can-undecid... Also see. https://github.com/seliopou/typo https://github.com/seliopou/typo
- CyberDildonics 1y ago"I think the underlying problem is that Prolog is part of a mandatory curriculum, but the professor doesn’t understand it. How do you teach something you don’t understand?" Or the underlying problem is prolog itself. If students are constantly learning it for a class and never wanting to touch it again, maybe it's time to face facts. Some people get caught up in the pageantry of programming and forget to spend their mental energy building the software instead of doing clever stuff with a programming language.
- Bjartr 1y agoOf the things that can expand your problem solving skills as a programmer, learning a language that's extremely unlike languages you already know is extremely powerful. It gives you new ways to think about problems, even if you never touch the language again.
- charcircuit 1y agoWhy does it have to be via a new language? Why not instead do it via teaching about constraints solvers?
- adgjlsfhk1 1y agoIMO it is important to learn that the world of programming languages is bigger than bcpl descendents where they statement correspondence to a few assembly instructions.
- Jtsummers 1y ago> Why does it have to be via a new language? Prolog is not a new language, it's been around for 53 years. > Why not instead do it via teaching about constraints solvers? Prolog is used for more than just constraint solving. If that's all you think it does, perhaps you could consider studying it and finding out what it can do.
- charcircuit 1y ago
- disambiguation 1y agoI'll keep shilling the idea that someone should find a way to glue LLMs and prolog together to create better reasoning agents. I say this as someone who cant write a single prolog program, but i get the gist of it and afaik it hasn't been done yet. The idea is based on the following simple logic: LLMs are bad at counting the number of "r's" in "strawberry" but good at writing code that counts letters in a string. It follows that while LLMs are also bad at solving reasoning problems, maybe they're good at writing the prolog code (or driving a hypothetical prolog engine) that solves those types of problems instead. Maybe one day ill stop being lazy and do it myself, but until then I'm putting the idea out there - to OP's request, that's one reason to learn prolog.
- johnecheck 1y agoThis idea feels obvious enough that people must be trying it. It's probably just hard to train such a model that performs as you'd want it to.
- dmd 1y agohttp://www.incompleteideas.net/IncIdeas/BitterLesson.html http://www.incompleteideas.net/IncIdeas/BitterLesson.html
- sirwhinesalot 1y agoThis is a very important article but not one that applies to what the person is saying. They're not suggesting hardcoding knowledge into the system (i.e. through a predefined prolog program) but by having the LLM learn to use it as a tool, same as how an LLM will write and run Python instead of guessing the output of a program. I don't think Prolog is the right tool for this, actually for the very reason stated in the Bitter Lesson (effective Prolog use requires imperative constructs like cuts). It makes much more sense to have the LLM learn how to use a constraint solver or (automated) theorem prover which have really powerful search algorithms (the search part of the bitter lesson), same as how humans use them.
- disambiguation 1y ago
- NooneAtAll3 1y agoWhile I was never taught Prolog, I did did have programming teacher that was really bad at explaining And yet, I fell in love with code and the language I was taught and everything else The secret? GOOD and LARGE set of exercises Having teacher diligent enough to ask correct tasks in correct order to be done in-class (and check them being done) is a lot more valuable than you think it is
- throw10920 1y agoThe idea of a kind of higher-order Eternal September, where the flood of newbies and low-value content is from educators, instead of students/"true newbies", is interesting. I wonder what causes it? Maybe some vague desire by educators to "teach something old for the sake of seeing alternate technologies" or something.
- K0balt 1y agoIt sounds like the writer has a good idea on how to extract a lot more value from the subject for students, but I think we might be missing the value of tools like prolog in the LLM era. It seems to me that tool use of prolog for logic and python or R for math would be extremely helpful for LLMs (especially smaller local ones) to solve problems.