Hacker News new | past | comments | ask | show | jobs | submit login

Why not just do relational programming - prolog or sql. The lisp weenies still don't get it.

> Why not just do relational programming - prolog or sql. The lisp weenies still don't get it.

John McCarthy was the first to recommend using logic in programs with his advice taker proposal. This inspired the logic programming paradigm:


Paul Graham (creator of the hacker news site) has an entire chapter in his book On Lisp on embedding prolog:


Peter Norvig's Paradigms of Artificial Intelligence programming includes an implementation of prolog in Lisp:


Common Lisp relations: an extension of Lisp for logic programming proposed a mechanism for logic programming back in 1988:


Franz. Inc is developing Allegro Prolog as an extension to Common Lisp:


The Clojure programming language includes relational programming functionality through the core/logic module:


Racklog is an embedding of Prolog-style programming in Racket.


The Shen programming languages includes a fully functional embedded prolog system:


CycL is a declarative ontology language based upon classical first-order language which includes support for ontology components including parts and relations:


What is it that we don't get again?

There's even a parallel branch built on top of fork/join that needs more work: https://github.com/clojure/core.logic/tree/fork-join

So basically a thin sliver of what an sql rdbms provides.

Your "thin sliver" idea is intriguing. Maybe we can call slivers "simple components" and build bigger things out of them.

I wonder if there would be any benefit to that?

If 'components' were that useful for the things rdbms's are used for the thousands of highly trained phd's at oracle, microsoft, ibm would have added them to their sql products.

Of course, this a ROR crowd, software invented by a business school grad/game review writer, so it's can be an uphill battle explaining this stuff.

For those keeping score at home:

* argumentum ad verecundiam * ad hominem

If you think what a PhD gets you is "training", you've tragically misunderstood the point.

You say that like it's a bad thing.

Clojure tends to emphasise simple components that do specific tasks; so core.logic focuses on logic programming and not, for instance, persistence or atomicity. Because it's so focused, it's more capable in its particular area of expertise than a more general tool like SQL.

I think we will see a Datalog made faster by parallel reduce/combine real soon now. :-)

I'm getting there. :)

I'm not a supporter of Lisp myself, but still interested in what they don't get.

Well, basically, most applications that you want to write are basically 90 percent rdbms with a thin layer on top for the views (usually php etc.). The 'power' of lisp isn't relevant. Other types of applications are usually performance critical and written in c etc, or glue code written in languages with libraries tcl/perl/python etc.

So basically the traditional niche of lisp, complex apps, has been replaced by sql.

There are apps written in lisp, like this site for example, but that's just for vanity mainly (pg is famous for his lisp books) - it would be have been easier to write it in sql.

What on earth are you talking about? Are you a SQL consultant or a professional Troll or what am I missing here?

He's a big data consultant, and all he has is a hammer :-).

I've explained a bit longer than your 'wtf'. Perhaps you can explain to me applications where lisp is the best fit?

Almost every website or software running a business I can think of runs sql. The very small few that don't, google for example, run on c++ and assembly.

So, in 2012, with gigs of ram and postgres, why would I use lisp?

Dude, you advertised on here 36 days ago that you are a Lisp contractor (https://news.ycombinator.com/item?id=3784418) -- WTF?

Why WTF! I'm looking for AI type work, which is much much rarer than sql work, which was my point. You wouldn't use lisp for that either (matlab/numpy followed by c optimizations is used there).

Because 1 hour ago you said:

Why not just do relational programming - prolog or sql. The lisp weenies still don't get it.

And now you've peppered the entire thread with non sequiturs and off-the-wall droppings. Please take a break.

I'll plead WTF on that.

I'm simply trying to tell the kids on here that SQL is great and ROR/LISP/NoSQL worship around these parts is misguided. No 'droppings' in that.

Yes, I write Lisp on my resume to make me look like a stronger candidate. I learnt it a few years ago for fun, that's all (I'm not a lisp flip-flopper). Just want to put the advice out there to be a relational weenie (instead of lisp weenie).

Your point is a complete non-sequitur in this thread. Lumping Ruby on Rails, Lisp and NoSQL together is non-sensical. One is a framework for building web applications, the other is a family of programming languages with over 50 years of history, and "NoSQL" is a bad name for highly scalable data storage methods which abandon the relational model.

What planet do you live on? Your comments are comprised entirely of droppings. This post had nothing to do with any of those topics until you arrived; it's about a way to abstract operations over collections of data that has some cool properties. You then came in unprompted and attempted to troll the whole world about your pet peeve.

If you have something to say about the actual post, then please say it. Otherwise, get out.

Possibly a chatterbot with all the non sequiturs and AI references and previous postings about "bots" (http://news.ycombinator.com/item?id=808240).

Because many programmers are not in the website business. I'm a scientist, working with long-term simulation models. My problem is trying to find a good model representation of the data that I observe. I keep my eyes open towards probabilistic relational programming languages (such as http://www.openbugs.info ), but so far I haven't found a way to apply it to my work.

Lisp is useful to me (more useful than ruby or C was), predominantly because I can work with emacs/swank/slime and change and query my program while I'm observing its output.

How come you're not using matlab/numpy?

I think Twitter is using Clojure now that they've acquired BackType.

I think you have a good spirit to what you're saying. Everything is Turing Complete here, and yes with views and stored procedures and the like, and normalizing everything most apps would indeed just be a thin layer over top of these forms. However, set theory isn't exclusive to tables, nor even tree or document stores, and often with online systems like how a previous person mentioned Storm, you might not have the luxury of the overhead of a whole interpreted SQL stack, but may only need linked lists or something more bare, and closer to logic. I think you're not being downvoted on merit of the idea, just perhaps the quickness as classifying this work, even if it is correct, as something that is just more of the same. Everything in computers is arguably just more of the same. Just my opinion!

Even when all you need is a thin layer over SQL, a language with macros helps you keep your code cleaner, e.g. http://brl.codesimply.net/brl_4.html#SEC31

I applaude your attempt to say that SQL is "real world FP".

But you made your claim too big.

SQL (even with recursive CTE) is still just a DSL for relational data. Even more: DSL for relational data only.

wrexsoul? Is that you?

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact