News for hackers. Stuff that matters.
Re:The Mercury logic programming system by alexchamberlain on Sunday April 14, 2019 @03:27AM (#19658047)
I'm sure this is awesome, but there's no code examples until I download a read a PDF tutorial. I think a couple of examples in the README or on the homepage could go a long way. What differiates this from Prolog or Datalog?
Re:The Mercury logic programming system by bjz_ on Sunday April 14, 2019 @07:43AM (#19658816)
> I'm sure this is awesome, but there's no code examples until I download a read a PDF tutorial.

Yeah, I definitely think this is something that could be improved - Mercury tends to come from a more 'old-school' form of OSS where the importance of marketing and design was less well understood. I hope they get around to fixing this!

The biggest thing that Mercury brings to the table is types, a mode system, and performance. This makes it viable for large scale software development.

Re:The Mercury logic programming system by Avshalom on Sunday April 14, 2019 @10:18AM (#19659552)
The primary difference is that it has a strong static haskell-ish type system. Secondarily it is purely declarative (though so is datalog) and functional so no side effects and the clauses can be written/checked in any order (though it uses monads, like in Haskell to be do IO and force ordered evaluation when that's important)
Re:The Mercury logic programming system by kiriakasis on Sunday April 14, 2019 @04:24AM (#19658183)
More expressive than datalog, faster than Prolog.
Re:The Mercury logic programming system by lpu4o74p on Sunday April 14, 2019 @06:51AM (#19658602)
However, less expressive than Prolog
Re:The Mercury logic programming system by srean on Sunday April 14, 2019 @07:46AM (#19658826)
Could you explain or point to any discussion on why would that be.
Re:The Mercury logic programming system by bjz_ on Sunday April 14, 2019 @08:22AM (#19658972)
Mercury brings a bit more sanity to Prolog with its mode system. This is one of the key reasons why it runs fast and can be used to build big systems like Prince. That said, it _is_ a restriction on expressiveness of programs, and sometimes that makes it hard to do certain things. That's true of any type system.

There's still an interesting question about whether a different iteration on the mode system could capture more of the semantics of Prolog while still being useful, but so far nobody has done that research yet. It's more trendy to do FP research these days, so I'm expecting it could be a _long_ time before we get an answer, sadly.