3 ms·
Picat: A Logic-based Multi-paradigm Language (2014) [pdf]
- sirwhinesalot 1y agoPicat the language is pretty cute but the really impressive part of Picat to me is their CP solver. It's one of the best in recent years, despite using just eager compilation to SAT rather than lazy clause generation or another fancy hybrid technique. It went against the grain by using encodings with smaller size that have poor propagation properties (like encoding numbers into binary with adder circuits) but then threw all sorts of compiler tech at the problem to optimize the circuits as much as possible. It paid off it sure seems like.
- aredox 1y agoToo sad the WebIDE link on https://picat-lang.org/ https://picat-lang.org/ doesn't work, I would have been happy to try it with minimal fuss. It seems to be a very nice langage for niche but important use cases.
- bmacho 1y agoThe language runtime is very small (6.5MB binary, 4MB library, examples, docs) on Windows.
- bmacho 1y agoYou can try it out in Google colab[0] which is a free computer for people with Google accounts. You are allowed to anything that's legal, not a file-server, not crypto and not chess[1]. You can download and unpack it with !wget -c "https://picat-lang.org/download/picat39_linux64.tar.gz" > /dev/null 2>&1 # 3.4MB so it's probably fine to download it every day !tar -xvzf "picat39_linux64.tar.gz" -C . > /dev/null 2>&1 !echo 'picat binary is at /content/Picat/picat' You can create a file by %%shell cat <<MultiString > welcome.pi main => print(" Welcome to PICAT’s world! \n "). main(Args) => print(" Welcome to PICAT’s world! \n"), foreach (Arg in Args) printf("%s \n", Arg) end. MultiString and run it as !/content/Picat/picat welcome a b c I don't think that Picat supports the REPL workflow, even just defining functions on the fly. You have to put your functions into files (fix me). The official guide is at [2]. I've created an example notebook at [3] (although you shouldn't use people's notebooks especially if they are mutable: they might have access to your Google Drive files, or use up your resources). [0] : https://colab.google.com/ https://colab.google.com/ [1] : https://research.google.com/colaboratory/faq.html https://research.google.com/colaboratory/faq.html [2] : https://picat-lang.org/download/picat_guide_html/picat_guide.html#x1-370002 https://picat-lang.org/download/picat_guide_html/picat_guide... [3] : https://colab.research.google.com/gist/bmacho/b0327ec63d1f509574a999e7434be367/try_picat.ipynb https://colab.research.google.com/gist/bmacho/b0327ec63d1f50...
- deleted 1y ago[deleted]
- bmacho 1y agoColab opening notebooks from gist fails me after some repetitions. It seems it goes through my computer (Google fetches it with javascript), and Microsoft rate limits me. Then it works again from private browser or after a cooldown period.
- linguaz 1y agoInteresting post about Picat: Planner programming blows my mind https://www.hillelwayne.com/post/picat/ https://www.hillelwayne.com/post/picat/ > Picat is a research language intended to combine logic programming, imperative programming, and constraint solving. I originally learned it to help with vacation scheduling but soon discovered its planner module, which is one of the most fascinating programming models I’ve ever seen. ...