Missing de facto standard format/2-3 predicates
See original GitHub issueWould be possible to add the de facto standard format/2-3
predicates? Any (relatively) easy way for lifting the required functionality from an existing JS library?
For sample calls and tests, please see: https://github.com/LogtalkDotOrg/logtalk3/blob/master/tests/prolog/predicates/format_2/tests.lgt https://github.com/LogtalkDotOrg/logtalk3/blob/master/tests/prolog/predicates/format_3/tests.lgt
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:26 (9 by maintainers)
Top Results From Across the Web
The ACS Style Guide - Clarkson University
Most manuscripts are now written with de facto standard word-processing software and adhere to formats developed for ... scientific paper format, 23.
Read more >Untitled
My awakening tv, 4th step inventory format, 23 de noviembre cristo rey, ... Turin brakes lost property review, Identificaron el cuerpo de paul...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The default value for
double_quotes
in Tau Prolog iscodes
. The ISO/IEC 13211-1 leaves the default value to the implementation, so I relied on the default value of SWI (that now isstring
) and GNU Prolog. But the decision was totally arbitrary, I would have no problem changing it.Thank you very much for your interest!
format.pl
is available from:https://github.com/mthom/scryer-prolog/blob/master/src/lib/format.pl
It would be awesome if you could integrate it in Tau Prolog too, this is a great opportunity for collaboration between two Prolog systems that are very conforming to the ISO standard and hence allow easy porting of applications and libraries. It is especially fortunate that both systems have taken the bold step to set
double_quotes
tochars
by default, a setting which I strongly encourage and whichformat.pl
also assumes.If possible, please make the non-terminal
format_//2
from this library also available in Tau Prolog: I have foundformat_//2
to be a really useful building block to format lists of characters, and to declaratively describe output so that it can actually be reasoned about in test cases instead of appearing only on the screen.The library also provides
listing/1
andportray_clause/1
, which I hope you also find useful for Tau Prolog. I often useportray_clause/1
when emitting solutions to generate output that can later be read withread/1
for convenient testing and reasoning.Please let me know if you need anything specific to use the library: Ideally, porting it should amount to maybe changing a few directives, and changing the two occurrences of “Scryer” to “Tau”.