3 ms·
Naturally, the “curse of Turing” means that virtually any programming language can, with enough effort, do anything. I wouldn’t classify Prolog as appropriate l
by todd8 4y ago
Naturally, the “curse of Turing” means that virtually any programming language can, with enough effort, do anything. I wouldn’t classify Prolog as appropriate language for general purpose vs say Python.
In theory, I could write a replacement for the Linux kernel in machine code or COBOL or even Prolog. This doesn’t mean that it would be wise to do so. (I’ve written code in professional settings in all of these ways.)
- jodrellblank 4y agoWhy wouldn't you? "Curse of Turing" usually implies "if you implement a VM capable of running a Python runtime then you can do what Python can do", but Prolog is nothing like that: > "You can write anything in python, from quick and dirty replacements for bash scripts" SWI Prolog: can do shell scripts with shebang lines, args, reading from stdin, for 8+ years: https://www.swi-prolog.org/pldoc/man?section=plscript https://www.swi-prolog.org/pldoc/man?section=plscript Directory and file interactions: https://www.swi-prolog.org/pldoc/man?section=files https://www.swi-prolog.org/pldoc/man?section=files OS integrations for shelling out or environment variables: https://www.swi-prolog.org/pldoc/man?section=system https://www.swi-prolog.org/pldoc/man?section=system and regex support: https://www.swi-prolog.org/pldoc/doc_for?object=section(%27packages/pcre.html%27) https://www.swi-prolog.org/pldoc/doc_for?object=section(%27p... > "to windows desktop applications" SWI Prolog has a builtin cross-platform GUI library/toolkit: https://www.swi-prolog.org/packages/xpce/examples.html https://www.swi-prolog.org/packages/xpce/examples.html > "clustered supercomputer code" Not sure about supercomputing, but SWI has: Threading: https://www.swi-prolog.org/search?for=thread&in=lib&match=summary&resultFormat=summary https://www.swi-prolog.org/search?for=thread&in=lib&match=su... Transparent Inter-Process Communications (TIPC) libraries "a framework for cooperation between federations of trusted peers that are operating as a unit. It was developed by Ericsson AB" - https://www.swi-prolog.org/pldoc/doc_for?object=section(%27packages/tipc.html%27) https://www.swi-prolog.org/pldoc/doc_for?object=section(%27p... Addons which include an MPI library port: https://www.swi-prolog.org/pack/list https://www.swi-prolog.org/pack/list > "It also has an library ecosystem to match." SWI won't have anything like Python's ecosystem due to many fewer users, but it has a non-toy ecosystem of networking code, image processing, database connecting, more performant datastructures, Protocol Buffers, Unicode, YAML, SGML, XML, Http, zlib, gzip, unit testing, debugging, profiling, FFI, etc. I mean, you might not want to, but it's not like you have to start from half a dozen Turing Machine instructions and an infinite tape and work your way up from there.