3 ms·
Prolog admittedly mystifies me even more than the Haskell family. How do you do anything effectful, like read from a file, or output arbitrary data to standard
by zahlman 10mo ago
Prolog admittedly mystifies me even more than the Haskell family. How do you do anything effectful, like read from a file, or output arbitrary data to standard out, or set up a loop to process keyboard events every 1/n seconds? How do you make system calls?
- pjmlp 10mo agoBy thinking in LP terms, like FP, LP requires rewiring the brain to think differently how to approach algorithms. Here is a sample on how to read a file. https://lpn.swi-prolog.org/lpnpage.php?pagetype=html&pageid=lpn-htmlse54 https://lpn.swi-prolog.org/lpnpage.php?pagetype=html&pageid=... How to make syscalls, https://www.swi-prolog.org/pldoc/man?section=foreign https://www.swi-prolog.org/pldoc/man?section=foreign