Live data from Hacker News

Lisp Prolog and Evolution

blog.samibadawi.com

1–10 of 40 posts

Re: Lisp Prolog and Evolution

#3
I absolutely love programming in Prolog. I've never needed to write anything large in it at all (which is where most prolog interpreters fail), but when it comes together so beautifully at the end, its quite amazing.

I thoroughly recommend "The Art of Prolog" which is an engaging and fun read.

Re: Lisp Prolog and Evolution

#4
On the subject of why amazingly-powerful, ahead-of-their-time languages don't catch on.. I'd be interested to know if a study has ever been done on the "accessibility" of a language and its popularity.

By which I mean: A total novice, even a non-programmer, can be given a simple bit of PHP/Javascript, and work out what it does and how to make minor changes to it. But something like Lisp & Haskell, you just can't do that - you need to spend some time learning the syntax before you can do anything with them.

I'd be surprised if the ramp-up time to be able to do useful things with a language didn't have more of an effect than how powerful and useful it is.

Re: Lisp Prolog and Evolution

#5
post #3

I absolutely love programming in Prolog. I've never needed to write anything large in it at all (which is where most prolog interpreters fail), but when it comes together so beautifully at the end, its quite amazing. I thoroughly recommend "The Art of Prolog" which is an engaging and fun read.

When I first learned about Prolog in AI class, the first thing that struct me was how beautiful Prolog/logic programming solutions are.

In non-declarative languages like Java, you have to build up the different pieces of computations, while you keep maintaining a mental picture of how the various pieces fit together.

In Prolog, you declare the entities and the relationships/constraints between them, and the system will build the solution for you through inference.

David Nolen has done some awesome work writing the core.logic[1] library, which makes those Prolog gooodies accessible to Clojure programmers.

-- [1] https://github.com/clojure/core.logic

Re: Lisp Prolog and Evolution

#6

On the subject of why amazingly-powerful, ahead-of-their-time languages don't catch on.. I'd be interested to know if a study has ever been done on the "accessibility" of a language and its popularity. By which I mean: A total novice, even a non-programmer, can be given a simple bit of PHP/Javascript, and work out what it does and how to make minor changes to it. But something like Lisp & Haskell, you just can't do t…

"you need to spend some time learning the syntax"

But Lisp has rather less syntax than most other programming languages - and that's possibly a weakness rather than a strength when it comes to anyone new to the language.

I suspect there is a sweet spot when it comes to the syntactic complexity of programming languages - too little and people get lost in the generality and abstractions, too much and its difficult to remember it all and you end up with coding standards desperately trying to close down on the features that should be used (e.g. banning the ternary conditional operator).

Re: Lisp Prolog and Evolution

#7
I find Prolog a marvel in "look what I can do!" Writing stupidly fun code in it is almost a no-brainer, compared to other languages (I have a half-assed English grammar parser in 60-odd lines, with a few comments!) But getting into prolog needs a complete rewire of how you think about programming: if you are used to imperative (or functional, or list-based, or almost whatever else) prolog feels very foreign.

I'm also a Lisp aficionado, having written more than a few small pieces (not counting emacs lisp, where I write more than a few!) to scrape the web or draw Lavaurs chords.

And my day-to-day I write PHP, Python, awk, R and whatever it takes to improve revenues in my company. So I have both perspectives, Lisp & Prolog and its awesomeness and "the other side." And mixing them up (splurge into data with awk, write it as Prolog terms, analyse its structure in Prolog and represent it in R) is one of the biggest joys of programming. Don't get entrenched in your "language," learn as many as you can and cherry-pick each one as you see fit for the problem.

Re: Lisp Prolog and Evolution

#9

On the subject of why amazingly-powerful, ahead-of-their-time languages don't catch on.. I'd be interested to know if a study has ever been done on the "accessibility" of a language and its popularity. By which I mean: A total novice, even a non-programmer, can be given a simple bit of PHP/Javascript, and work out what it does and how to make minor changes to it. But something like Lisp & Haskell, you just can't do t…

This is an interesting line of inquiry. I wonder, though, what would be a good way to quantify accessibility. I find myself doubting your statement that even non-programmers would find JavaScript or PHP easier than Lisp due to syntax, given the latter's extreme simplicity of syntax. Programmers with C/Java/etc. experience would of course likely find JS and PHP more familiar and hence accessible.

Re: Lisp Prolog and Evolution

#10
post #5
post #3

I absolutely love programming in Prolog. I've never needed to write anything large in it at all (which is where most prolog interpreters fail), but when it comes together so beautifully at the end, its quite amazing. I thoroughly recommend "The Art of Prolog" which is an engaging and fun read.

When I first learned about Prolog in AI class, the first thing that struct me was how beautiful Prolog/logic programming solutions are. In non-declarative languages like Java, you have to build up the different pieces of computations, while you keep maintaining a mental picture of how the various pieces fit together. In Prolog, you declare the entities and the relationships/constraints between them, and the system wi…

I seem to recall that one of the issue with Prolog is that, above a certain level of complexity, you can't really write purely declarative Prolog "progams" - you have to start considering the procedural aspect as well which (in certain cases) can be non-trivial.
Post reply on HN