]>
Repositorios git - scryer-prolog.git/log
Markus Triska [Sat, 25 Jul 2020 07:47:59 +0000 (09:47 +0200)]
ENHANCED: flush output for impure I/O (format/[2,3], portray_clause/1 etc.)
Without this, we do not get a (timely) prompt in cases like:
?- format("press a key: ", []), get_single_char(C).
whereas for example write/1 already works in such cases:
?- write('press a key: '), get_single_char(C).
press a key:
Mark Thom [Thu, 23 Jul 2020 22:49:12 +0000 (19:49 -0300)]
Merge pull request #638 from triska/base64
ADDED: chars_base64/3 for efficient bidirectional Base64 conversion.
Markus Triska [Wed, 22 Jul 2020 22:35:23 +0000 (00:35 +0200)]
throw an error if a character cannot be encoded
Markus Triska [Wed, 22 Jul 2020 22:27:31 +0000 (00:27 +0200)]
better error handling for options
Markus Triska [Wed, 22 Jul 2020 18:19:56 +0000 (20:19 +0200)]
use newly available chars_base64/3
Markus Triska [Wed, 22 Jul 2020 18:17:46 +0000 (20:17 +0200)]
ADDED: chars_base64/3 for efficient bidirectional Base64 conversion.
Mark Thom [Sun, 19 Jul 2020 16:16:27 +0000 (13:16 -0300)]
Merge pull request #636 from triska/path_segments
ADDED: path_segments/2 for portable reasoning about path components.
Markus Triska [Sun, 19 Jul 2020 09:07:03 +0000 (11:07 +0200)]
ADDED: path_segments/2 for portable reasoning about path components.
The platform-specific directory separator is taken into account.
The clean representation of segments as a list simplifies reasoning.
Mark Thom [Sat, 18 Jul 2020 15:40:53 +0000 (12:40 -0300)]
Merge pull request #633 from triska/file_time
ADDED: file_creation_time/2 and file_access_time/2.
Mark Thom [Sat, 18 Jul 2020 15:40:28 +0000 (12:40 -0300)]
Merge pull request #631 from cduret/lib_csv
add write_csv & change skip_header to with_header option
Mark Thom [Sat, 18 Jul 2020 15:40:09 +0000 (12:40 -0300)]
Merge pull request #635 from triska/more_links
DOC: add more links to libraries, and include iso_ext in the enumeration
Markus Triska [Sat, 18 Jul 2020 06:09:52 +0000 (08:09 +0200)]
DOC: add more links to libraries, and include iso_ext in the enumeration
Mark Thom [Fri, 17 Jul 2020 17:02:58 +0000 (11:02 -0600)]
look up operator precedence when arity does not match what the atom records, don't print brackets around outermost '+' (#629)
Markus Triska [Fri, 17 Jul 2020 16:48:39 +0000 (18:48 +0200)]
ADDED: file_creation_time/2 and file_access_time/2.
The code can be simplified once if- and while-let-chains are available:
https://github.com/rust-lang/rust/issues/53667
Mark Thom [Fri, 17 Jul 2020 00:03:13 +0000 (21:03 -0300)]
Merge pull request #632 from triska/path_canonical
ADDED: path_canonical/2, obtaining the canonical absolute path.
Cyrille Duret [Thu, 16 Jul 2020 23:21:40 +0000 (01:21 +0200)]
set domain_error exception & use format/3 with setup_call_cleanup/3 for stream writing
Markus Triska [Thu, 16 Jul 2020 21:33:52 +0000 (23:33 +0200)]
ENHANCED: Reorder fields in time stamps so that (@<)/2 is meaningful.
Markus Triska [Thu, 16 Jul 2020 20:56:10 +0000 (22:56 +0200)]
ADDED: file_modification_time/2, obtaining a time stamp.
This addresses a remaining aspect of #511.
Markus Triska [Wed, 15 Jul 2020 18:24:26 +0000 (20:24 +0200)]
ADDED: path_canonical/2, obtaining the canonical absolute path.
This addresses a remaining aspect of #511.
Cyrille Duret [Wed, 15 Jul 2020 16:26:57 +0000 (18:26 +0200)]
set throw() to follow ISO recommendations
794404 [Wed, 15 Jul 2020 11:02:30 +0000 (13:02 +0200)]
add write_csv & change skip_header to with_header option
Mark Thom [Tue, 14 Jul 2020 23:26:51 +0000 (20:26 -0300)]
Merge pull request #630 from triska/delete_file
ADDED: delete_file/1, addressing a remaining aspect of #511
Markus Triska [Tue, 14 Jul 2020 20:37:05 +0000 (22:37 +0200)]
ADDED: working_directory/2, addressing a remaining aspect of #511
Markus Triska [Tue, 14 Jul 2020 20:16:15 +0000 (22:16 +0200)]
ADDED: delete_file/1, addressing a remaining aspect of #511
Mark Thom [Sun, 12 Jul 2020 15:17:58 +0000 (12:17 -0300)]
Merge pull request #626 from triska/compact_crypto
ENHANCED: library(crypto): Retain the compact representation of strings.
Markus Triska [Sun, 12 Jul 2020 09:58:39 +0000 (11:58 +0200)]
mention symmetric encryption and ChaCha20-Poly1305
Markus Triska [Sun, 12 Jul 2020 08:07:56 +0000 (10:07 +0200)]
ENHANCED: library(crypto): Retain the compact representation of strings.
This avoids the costly (in terms of space requirements!) conversion of
compact lists of characters to lists of integers, making hashing, HKDF,
encryption, decryption, signing and signature verification an order of
magnitude more efficient (primarily in terms of space, also in time).
This makes library(crypto) suitable to process also very large files.
Mark Thom [Sun, 12 Jul 2020 02:50:01 +0000 (23:50 -0300)]
Merge pull request #625 from triska/os
ADDED: library(os), reasoning about environment variables.
Markus Triska [Sat, 11 Jul 2020 17:52:01 +0000 (19:52 +0200)]
use newly available character type in must_be/2
Markus Triska [Sat, 11 Jul 2020 16:41:18 +0000 (18:41 +0200)]
ADDED: library(os), reasoning about environment variables.
Together with library(files), this addresses #511.
Mark Thom [Fri, 10 Jul 2020 21:22:15 +0000 (15:22 -0600)]
slight update to the BiMetaTrans README
Mark Thom [Fri, 10 Jul 2020 16:26:48 +0000 (10:26 -0600)]
update bimetatrans tests
Mark Thom [Fri, 10 Jul 2020 02:53:13 +0000 (20:53 -0600)]
add bimetatrans README
Mark Thom [Fri, 3 Jul 2020 17:40:52 +0000 (14:40 -0300)]
Merge pull request #621 from notoria/tabling
Tabling
notoria [Wed, 1 Jul 2020 11:14:12 +0000 (13:14 +0200)]
Enhanced the implementation
The restriction has been removed by using read_library_path from
cfd15f4e027b4df216e723bbd35facac28a09a1c .
notoria [Wed, 1 Jul 2020 08:22:17 +0000 (10:22 +0200)]
Allowing paths in use_module(library(..)) (#604)
In a module, the path is restricted in being an atom.
notoria [Wed, 1 Jul 2020 08:07:26 +0000 (10:07 +0200)]
Revert "allow paths in use_module(library(..)) (#604)"
This reverts commit
cfd15f4e027b4df216e723bbd35facac28a09a1c .
notoria [Wed, 1 Jul 2020 08:06:20 +0000 (10:06 +0200)]
Revert "build.rs recursively delves into directories during library bake stage, correct misnamed file at machine/mod.rs:455 (#617)"
This reverts commit
c1b577f2c7a148b13c1692ab8ac741aa57b0ac43 .
Mark Thom [Tue, 30 Jun 2020 16:34:39 +0000 (13:34 -0300)]
Merge pull request #606 from triska/files
ADDED: library(files), for reasoning about files and directories.
Mark Thom [Mon, 29 Jun 2020 06:58:10 +0000 (00:58 -0600)]
build.rs recursively delves into directories during library bake stage, correct misnamed file at machine/mod.rs:455 (#617)
Mark Thom [Sat, 27 Jun 2020 19:28:10 +0000 (16:28 -0300)]
Merge pull request #613 from cduret/csv_lib
add csv library
Cyrille Duret [Thu, 25 Jun 2020 19:13:29 +0000 (21:13 +0200)]
add csv library
Markus Triska [Sat, 20 Jun 2020 08:12:14 +0000 (10:12 +0200)]
directory_files/2: throw representation error if into_string() fails
Suggested by @notoria in #606. Many thanks!
Markus Triska [Wed, 24 Jun 2020 20:29:22 +0000 (22:29 +0200)]
comment on indexing, addressing a comment by @pmoura in #606
If indexing is needed for lists of characters, it should be added to
the engine.
Markus Triska [Fri, 19 Jun 2020 16:20:31 +0000 (18:20 +0200)]
ADDED: library(files), for reasoning about files and directories.
Mark Thom [Mon, 22 Jun 2020 15:21:35 +0000 (12:21 -0300)]
Merge pull request #608 from triska/xml
ADDED: load_xml/3 to load XML files from streams, files and strings.
Markus Triska [Sun, 21 Jun 2020 07:44:57 +0000 (09:44 +0200)]
library(format) is not used in this example
Markus Triska [Sun, 21 Jun 2020 06:35:08 +0000 (08:35 +0200)]
ADDED: load_xml/3 to load XML files from streams, files and strings.
Mark Thom [Sat, 20 Jun 2020 17:46:52 +0000 (14:46 -0300)]
Merge pull request #607 from triska/xpath
ADDED: library(xpath) for convenient analysis of HTML and XML documents.
Markus Triska [Sat, 20 Jun 2020 17:07:43 +0000 (19:07 +0200)]
import member/2 from library(lists)
This is needed when processing redirects.
Markus Triska [Sat, 20 Jun 2020 10:25:13 +0000 (12:25 +0200)]
ADDED: library(xpath) for convenient analysis of HTML and XML documents.
Mark Thom [Fri, 19 Jun 2020 15:59:06 +0000 (12:59 -0300)]
Merge pull request #596 from triska/sgml
ADDED: library(sgml), providing load_html/3 to parse HTML documents
Mark Thom [Fri, 19 Jun 2020 15:58:26 +0000 (12:58 -0300)]
Merge pull request #605 from notoria/debug
Added library(debug)
notoria [Fri, 19 Jun 2020 15:48:55 +0000 (17:48 +0200)]
Added an entry in README
notoria [Fri, 19 Jun 2020 15:18:59 +0000 (17:18 +0200)]
Added library(debug)
Markus Triska [Sun, 14 Jun 2020 14:52:46 +0000 (16:52 +0200)]
ADDED: library(sgml), providing load_html/3 to parse HTML documents
Mark Thom [Fri, 19 Jun 2020 14:30:23 +0000 (11:30 -0300)]
Merge pull request #592 from triska/http_open
ADDED: library(http/http_open), opening HTTP and HTTPS streams for reading
Mark Thom [Fri, 19 Jun 2020 06:58:43 +0000 (00:58 -0600)]
Merge branch 'master' of https://github.com/mthom/rusty-wam
Mark Thom [Fri, 19 Jun 2020 06:57:56 +0000 (00:57 -0600)]
allow paths in use_module(library(..)) (#604)
Mark Thom [Fri, 19 Jun 2020 05:47:54 +0000 (23:47 -0600)]
clarify meaning of AssertItems and QueryItems in BiMetaTrans source-level documentation
Mark Thom [Thu, 18 Jun 2020 15:16:47 +0000 (12:16 -0300)]
Merge pull request #602 from triska/put_char
put_char/[1,2]: throw type errors for atoms that are not characters
Markus Triska [Wed, 17 Jun 2020 22:09:33 +0000 (00:09 +0200)]
put_char/[1,2]: throw type errors for atoms that are not characters
Example:
?- put_char(hello).
%@ caught: error(type_error(character,hello),put_char/2)
Mark Thom [Wed, 17 Jun 2020 21:48:49 +0000 (18:48 -0300)]
Merge pull request #597 from triska/faster_format
ENHANCED: much faster format/3 for text streams
Markus Triska [Sat, 13 Jun 2020 07:32:08 +0000 (09:32 +0200)]
ADDED: library(http/http_open), opening HTTP and HTTPS streams for reading
Example:
?- http_open("https://github.com/mthom/scryer-prolog", Stream, []),
length(Ls, 10),
maplist(get_char(Stream), Ls).
Yielding:
%@ Stream = '$stream'(0x7fba4c59ef10), Ls = "\n\n\n\n\n<!DOC"
%@ ; false.
Mark Thom [Wed, 17 Jun 2020 01:03:07 +0000 (19:03 -0600)]
cover Addr::Fixnum when not referenced as an Addr::Con, undefine dynamic predicate definitions from within modules too (#588)
Mark Thom [Wed, 17 Jun 2020 00:47:53 +0000 (18:47 -0600)]
Merge branch 'master' of https://github.com/mthom/rusty-wam
Mark Thom [Wed, 17 Jun 2020 00:47:39 +0000 (18:47 -0600)]
fix copy_partial_string bug (#572)
Markus Triska [Tue, 16 Jun 2020 19:13:03 +0000 (21:13 +0200)]
ENHANCED: much faster format/3 for text streams
This is now also used by format/2 to emit output on the terminal,
and significantly speeds up toplevel output of long strings.
Mark Thom [Tue, 16 Jun 2020 03:06:01 +0000 (00:06 -0300)]
Merge pull request #590 from triska/read_line_to_chars
ADDED: read_line_to_chars/3, reading up to and including "\n" from a stream
Mark Thom [Mon, 15 Jun 2020 22:38:27 +0000 (16:38 -0600)]
change the plurality of AssertItem(s), QueryItem(s) in bimetatrans.pl
Mark Thom [Sun, 14 Jun 2020 15:37:06 +0000 (12:37 -0300)]
Merge pull request #595 from triska/faster_format
ENHANCED: faster format/3 when writing to binary streams
Markus Triska [Sun, 14 Jun 2020 08:50:21 +0000 (10:50 +0200)]
use format/3 to benefit from efficiency improvements
Markus Triska [Sun, 14 Jun 2020 08:06:27 +0000 (10:06 +0200)]
ENHANCED: faster format/3 when writing to binary streams
This is also more secure, since it does not change the atom table
and therefore leaves little trace of what was processed.
Mark Thom [Sun, 14 Jun 2020 00:09:19 +0000 (21:09 -0300)]
Merge pull request #589 from triska/lazy_pio
ENHANCED: Read more characters at once, significantly speeding up library(pio)
Mark Thom [Sun, 14 Jun 2020 00:08:54 +0000 (21:08 -0300)]
Merge pull request #593 from triska/portray_clause
ADDED: portray_clause/2, writing to a specified stream.
Mark Thom [Sat, 13 Jun 2020 20:55:32 +0000 (17:55 -0300)]
Merge pull request #594 from triska/scryerrc
explain .scryerrc configuration file
Mark Thom [Sat, 13 Jun 2020 16:46:53 +0000 (10:46 -0600)]
fix broken links in README (#591)
Markus Triska [Fri, 12 Jun 2020 19:07:18 +0000 (21:07 +0200)]
use take() for extra fast processing of binary files
Suggested by @notoria in #589. Many thanks!
Markus Triska [Fri, 12 Jun 2020 18:54:30 +0000 (20:54 +0200)]
better naming: str --> string
Suggested by @notoria in #589. Many thanks!
Markus Triska [Sat, 13 Jun 2020 14:47:02 +0000 (16:47 +0200)]
explain .scryerrc configuration file
Markus Triska [Sat, 13 Jun 2020 14:45:47 +0000 (16:45 +0200)]
ADDED: portray_clause/2, writing to a specified stream.
Markus Triska [Fri, 12 Jun 2020 15:29:18 +0000 (17:29 +0200)]
ENHANCED: Read more characters at once, significantly speeding up library(pio).
Markus Triska [Sat, 13 Jun 2020 07:06:57 +0000 (09:06 +0200)]
ADDED: read_line_to_chars/3, reading up to and including "\n" from a stream, yielding a list difference.
This works for both binary and text streams.
Mark Thom [Sat, 13 Jun 2020 00:32:48 +0000 (18:32 -0600)]
rename bimetatrans example files and directory
Mark Thom [Sat, 13 Jun 2020 00:28:07 +0000 (18:28 -0600)]
Merge branch 'master' of https://github.com/mthom/rusty-wam
Mark Thom [Sat, 13 Jun 2020 00:26:38 +0000 (18:26 -0600)]
remove vestigial prolog/ directory (#444)
Mark Thom [Fri, 12 Jun 2020 14:24:52 +0000 (11:24 -0300)]
Merge pull request #587 from triska/lazy_pio
ENHANCED: phrase_from_file/[2,3] now read the file lazily.
Mark Thom [Fri, 12 Jun 2020 04:28:05 +0000 (22:28 -0600)]
add missing ! in int_pow (#580)
Mark Thom [Fri, 12 Jun 2020 03:25:20 +0000 (21:25 -0600)]
adjust the tail created by CreatePartialString to point to the last cell it pushed to the heap (#586)
Mark Thom [Fri, 12 Jun 2020 03:24:20 +0000 (21:24 -0600)]
credit Ulrich Neumerkel for partial strings in README
Markus Triska [Thu, 11 Jun 2020 14:44:23 +0000 (16:44 +0200)]
include library(pio) and library(charsio) in the itemization
Markus Triska [Thu, 11 Jun 2020 13:29:06 +0000 (15:29 +0200)]
ENHANCED: phrase_from_file/[2,3] now read the file lazily.
This allows processing extremely large files. In addition, the
efficient string representation helps to reduce memory usage.
These features unleash the full power of Prolog for text processing,
the exact use case Prolog was designed for.
Mark Thom [Thu, 11 Jun 2020 18:22:35 +0000 (12:22 -0600)]
remove most cuts from bimetatrans_ruleml.pl
Mark Thom [Thu, 11 Jun 2020 17:11:04 +0000 (11:11 -0600)]
fix printing of atoms like '.x' (#585)
Mark Thom [Thu, 11 Jun 2020 04:25:23 +0000 (22:25 -0600)]
eliminate unnecessary find_min_time_ predicate in least_time.pl example
Mark Thom [Wed, 10 Jun 2020 23:21:44 +0000 (20:21 -0300)]
Merge pull request #582 from triska/format_time
ADDED: format_time//2 for describing strings involving dates and times
Markus Triska [Wed, 10 Jun 2020 21:13:14 +0000 (23:13 +0200)]
ADDED: format_time//2 for describing strings involving dates and times
current_time/1 yields the current system time as an opaque time stamp.
Mark Thom [Wed, 10 Jun 2020 20:29:13 +0000 (14:29 -0600)]
scryer and prolog_parser version bump (#581)
Mark Thom [Wed, 10 Jun 2020 04:15:11 +0000 (22:15 -0600)]
prolog_parser version bump, scryer version bump
Mark Thom [Tue, 9 Jun 2020 21:56:29 +0000 (18:56 -0300)]
Merge pull request #579 from triska/master
ENHANCED: throw Prolog exception on expired certificates