6 ms·
Picat 3.0 released (logic-based multi-paradigm programming language)
- The_rationalist 6y agoNew logical programming only languages have very few chance of adoption. What I would like to see more would be to enable logic programming related futures on current mainstream multi paradigm languages like in kotlin https://github.com/Kotlin/KEEP/pull/199 https://github.com/Kotlin/KEEP/pull/199
- the_af 6y agoAccording to Picat's homepage, it's multiparadigm, aimed at everyday programming, and suitable for writing scripts...
- The_rationalist 6y agoWhat does it bring over prolog?
- callmekit 6y agoLoops, optional destructive assignment, tabling (although some Prolog implementations also have tabling), better constraint programming support than many Prolog implementations. With version 3.0 Picat is also mostly backward-compatible with Prolog.
- callmekit 6y agoPicat was born out for BProlog, and it used to be like a pre-processor for BProlog, but I don't think this is true anymore.
- felixyz 6y agoOne of the main differences is that Picat allows both deterministic functions (like in functional languages) and non-deterministic predicates (like in logic languages), which often simplifies code and makes for more efficient execution (although functions are translated into predicates). In my opinion, Picat's biggest attraction is its facilities for constraint solving and optimization, which are in some respects state of the art.
- the_af 6y agoIt's multiparadigm and suitable for writing scripts. (I learned this by going to the project's homepage; I had never heard of this language before).
- mncharity 6y agoSource LICENSE is mozilla.org/MPL/2.0/ (for anyone else who did "wat?" on http://picat-lang.org/ http://picat-lang.org/ 's "Picat can be used for any fair purpose,").
- dfischer 6y agoThis is interesting. Thanks.
- rurban 6y agoI use it to reverse engineer the DWG format as described here: https://savannah.gnu.org/forum/forum.php?forum_id=9203 https://savannah.gnu.org/forum/forum.php?forum_id=9203 It's perfect to declare the known facts, and let it find the best possible answers automatically. Not as strict as with prolog, but with loops. Much easier to work with and extremely fast. I create the facts automatically.
- zem 6y agovery interesting! i worked briefly for a failed cad startup, and the dwg format was the bane of our existences. (we didn't try to reverse engineer it ourselves, we relied on an unfortunately buggy library we purchased)
- rurban 6y agoIn commercial settings I would still use OpenDWG/Teigha. But open source CAD programs will surpass them all eventually.
- mncharity 6y agoPySwip[1] makes SWI Prolog more accessible, by allowing much of a system to be written in more familiar python. Something analogous for Picat might be interesting, but seemingly stumbles a bit on lack of dynamic predicates.[2][3] [1] https://github.com/yuce/pyswip https://github.com/yuce/pyswip [2] http://picat-lang.org/download/picat_compared_to_prolog_haskell_python.html http://picat-lang.org/download/picat_compared_to_prolog_hask... [3] https://www.swi-prolog.org/pldoc/man?section=declare https://www.swi-prolog.org/pldoc/man?section=declare
- marmaduke 6y ago> it allows to directly convert the problem statement into an efficiently solvable declarative problem specification without inventing an imperative algorithm. -- Sergii Dymchenko This quote from the front page reminds me of the motivation for Autograd (and other AD frameworks) > just write down the loss function using a standard numerical library like Numpy, and Autograd will give you its gradient. or even probabilistic programming languages like Stan, where you can write down a Bayesian model and get posterior samples. Working backwards (as I know Stan but not Picat), I guess to really put the language to work you need to be aware of limits of the implementations, and how to dance around them.
- mncharity 6y ago> to really put [a] language to work you need to be aware of limits of the implementations, and how to dance around them This seems generally an important and underdocumented aspect of language characterization. I wonder how that might be improved?
- marmaduke 6y agoWell, instead of a language pretending the abstractions are watertight, be transparent: present them as leaky or whatever. Pure functions are a good example of abstraction since you can always step in, see what’s happening and step out. Stricts are ok. Macros are ok. From then on, someone somewhere is hiding something and you have to figure it out. This happens at the CPU level as well.
- srean 6y agoI think a discussion on Picat would be a little incomplete without one on Mercury. It combines pure functional programming with logic programming and is plenty fast. https://mercurylang.org/ https://mercurylang.org/
- hrishios 6y agoI'm glad that logic programming isn't completely dead. I think once gradient descent has filled it's niches well and the AI summer quietens a little, we might see a return to knowledge engines and decision trees as a useful complement (if not a supplement) to solving the class of problems not well served by neural nets.