by falsissime · 3y ago · 0 comments
run_length_encoding([], []-0):- !.
Yeah, well spotted, that looks stupid. Who knows what I was thinking...While I do not know what you were thinking either, I do know that you insisted on a mode +,- and thus refrained from using the most general query to test your program just in case. Prolog would have shown you the problem right in the first answer!
?- run_length_encoding(L,E).
L = [], E = []-0, unexpected
; ... .
While the most general query often leads to an unfair enumeration of answers/solutions, it is still a useful and effortless way to test a program, just in case.Yes, I think that happens when threads exceed a certain size, perhaps also when replies come at a certain rate. I believe it's a measure put in place to cool down hot heads revving up to a flame war, or something like that.
Or maybe it's just a measure put in place to avoid people kicking a programmer for an error she made in decades-old code >:P
(Thanks for the advice though, it's good advice and useful for programmers at any stage of their evolution).
P.S. I kept thinking of what you said that Kowalski said regarding Colmerauer's knowledge of meta-interpreters. I'm really curious to know and there's a couple other questions I have he might be interested in answering so I plan to write him an email and point him to your comment (https://news.ycombinator.com/item?id=34243808).
Before sending an e-mail, check https://www.softwarepreservation.org/projects/prolog/ there are so many original sources now online that help to reconsider some perceptions. In particular, the Prolog I manual is there, but in a very bad shape (bad scan from a used up chain printer, probably a 3203, all caps, no accents ...).