Releases: wouterbeek/prolog_library_collection
1.0.16
1.0.16 (2021-05-03)
Another small release with the following changes:
dcg
- Removal of many DCG rules that now can be implemented by using the more generic
abnf
module. - Added
error_location/[2,3]
for communicating parsing errors to the user.
sort_ext
- Added
order_by2/2
as an alternative to the built-inorder_by/2
predicate. The difference that thisorder_by2/2
is able to handle
the empty list of ordering commands (useful in situations where the ordered commands are generated algorithmically).
term_ext
- Added
shared_vars/3
as a convenience predicate forshared_vars/2
that calculates the shared variables between exactly two terms.
1.0.15
1.0.15 (2021-04-21)
This is a very small release with only the following changes:
term_ext
- Added convenience predicate compound_arguments/2.
- Added convenience predicate compound_arity/2.
type_ext
- Added boolean/1
1.0.14
1.0.14 (2021-04-12)
This release adds several new features to several different modules. See the full log for more details.
abnf
- Added deterministic sequence patterns with separator. This combines the features of the existing set of deterministic sequence patterns and the existing set of sequence patterns with separator.
- Fixed determinism for generative calls to the deterministic sequence patterns.
cli
- Changed the specification of CLI flags: from a nested dict to a list of dicts.
counter
- Full rewriting, using module
nb_ext
. - Renamed
create_counter/1
tocounter_create/1
. - Renamed
increment_counter/1
tocounter_increment/1
. - Added
counter_increment/2
.
file_ext
- Fixed non-first root elements in
append_directories/3
. - Added
change_file_name_extensions/[3,4]
. - Added
file_is_fresh/2
.
http_client2
- Fixed the generic
Accept
header. - Added support for the reasons for HTTP status codes 306 and 307.
- Added
http_last_modified/2
and reimplementedhttp_metadata_last_modified/2
.
list_ext
- Added
remove_initial_members/3
. - Added
remove_trailing_members/3
.
media_type
- Added
must_be_media_type/2
. - Removed
extension_label/2
. - Fixed bugs in registrations for SPARQL Query Results XML Format, GNU Zip, Microsoft PowerPoint Presentation, TriG.
nb_ext
- Added
nb_increment/3
. - Added
nb_plus/4
.
term_ext
- Added
shared_vars/2
.
uri_ext
- Added
uri_comp_get/3
. - Added
uri_data_directory/2
. - Changed
uri_data_file/2
→uri_data_file/3
. - Added
uri_file_is_fresh/2
.
1.0.13
1.0.13 (2021-03-28)
This release introduces support for creating simple command-line interfaces. The SWI-Prolog standard library includes a module called optparse
, but is relatively complex and performs many exponential checks. Also, the here included support library is intended to be decomposed into reusable parts (e.g., calculating width-delimited text is part of string_ext
). The command-line interface support is only an initial version currently, but the intention is to extended this over time.
Here follows the full list of changes:
call_ext
- Renamed
call_bool/2
tocall_boolean/2
. This is more consistent with the name of the Prolog typeboolean
.
cli, cli_arguments, cli_help, cli_version
- Added a new module that makes it easy to write CLI tools.
dcg
-
Added
dcg_char//1
for parsing/generating one single character. -
Renamed
dcg_bool//1
todcg_pp_boolean//1
. This is more consistent with the name of the Prolog typeboolean
, and indicates the pretty-print purpose better. -
Added
dcg_boolean//1
for parsing/generating Boolean values. -
Added
dcg_peek//1
which can be useful for simple debugging.
dict
- Fixed instantiation
(-, +, ?)
of predicatedict_get/3
.
print_ext
- Renamed
call_print_bool/1
tocall_print_boolean/1
and renamedprint_bool/1
toprint_boolean/1
. These are more consistent with the name of the Prolog typeboolean
.
rest-server
- Removed
http_server_init/1
. It is better to use the SWI-Prolog standard library predicates for initialization an HTTP server instead.
string_ext
-
Added
max_string_length/2
for calculating the length of the longest given string. -
Added
message_lines/3
andwords_lines/[3,4]
for generating width-delimited displays of text.
1.0.12
This is identical to release 1.0.11, but also satisfies the Prolog Pack requirement that the pack.pl
file mentions the current Git version tag.
1.0.11
1.0.11 (2021-03-20)
This release introduces many improvements to the media_type
library, together with several smaller improvements and some bug fixes (see below).
jgf
= Fixed the use of an outdated standard library predicate in predicate jgf_reply/2
.
media_type
-
A big rewrite of how Media Types are stored.
-
A new Prolog type called
media_type
that is used to indicate Media Type compound terms. -
Better support for Media Types with identical file name extensions (e.g.,
gml
is used for Geography Markup Language and for Graph Markup Language). -
Removal of the following less used predicates:
extension_label/2
,media_type_comps/4
. -
Changed the API for retrieving Media Type parameters: parameters are now represented as pairs of atoms.
-
A new API for accessing 'families' of grouped Media Types:
media_type_family/2
.
pagination
- Fixed the use of an outdated predicate from the
dict
module in predicatepagination_options/5
.
string_ext
- Added support for
inf
as the maxmimum length that is used instring_ellipsis/3
. This makes it easier to specify that no ellipsis should be applied in some contexts.
term_ext
-
New predicates for generating simple, ASCII-based IDs:
ascii_id/[1,2]
. These IDs are supported by many external languages and tools (e.g., C names, DOT IDs). -
Added a Prolog type declarations for optional types:
maybe(T)
.
tree
- New module, based on a generalization of the old
proof
module. This module current includes the following predicates:depth/2
andshortest/2
.
1.0.10
CHANGELOG
1.0.10 (2021-03-17)
This release fixes one bug in module http_client2
and changes the
behavior of the CLI argument handling predicates (module conf
). It
also introduces several small additions in other modules (see below).
conf
- Changed the predicates for handling CLI arguments
(cli_arguments/[1-3]
).
debug_gui
- Added
gtrace_failure/1
.
dict
- Added
dict_change_keys/3
.
http_client2
- Fixed retrieving the metadata from HTTP requests.
pair_ext
- Added
change_keys/3
. - Added
group_values_by_key/2
.
stream_ext
- Support encoding
iso-8859-1
(an alias ofiso_latin_1
).
term_ext
- Define a term
options
for dictionaries with tag 'options' and used
it everywhere options are used.
1.0.9
Release highlights
-
This release starts the use of dictionaries for representing predicates options. In the past, such options were represented by lists of unary terms. In order to make rewriting the code of manipulating option dictionaries easy, the support for dictionaries (library
dict
) was improved. -
The API for translating the various date/time representations into one another was significantly simplified (library
date_time
andxsd
).
Detailed changelog
archive_ext
A library for archived data support.
- NEW:
archive_stream/2
allows compressed archive streams to be turned into decompressed streams easily. - CHANGED:
archive_call/2
used to take a unary goal argument that received the decompressed data stream; this is not a binary goal argument that receives both the decompressed data stream and a dictionary containing metadata about that data stream, allowing for more use cases.
csv_ext
A library for CSV data processing.
- CHANGED: Numeric cell data used to be converted to numeric data types by default. This is now changed, so that cell data is always returned as a string. This is a better default, because otherwise the datatype could change on a per-cell basis. Specifically, two cells within the same column could have a different datatype.
date_time
and xsd
Libraries for bridging the gap between the SWI-Prolog date/time representations, the XSD date/time representations, and the one RDF date/time representation.
- CHANGED: The full library API was enhanced to make it easier to see which representation is being translated into which other representation.
dict
A library for working with dictionaries.
- NEW:
dict_select/[4,5]
makes it easy to match and extract values from a dictionary. This supports the use of dictionaries for representing options. - NEW:
dict_terms/2
makes it easy to translate dictionaries from/to traditional options lists. This supports the use of dictionaries for representing options, while at the same time allowing code to interface with older code that still uses traditional options lists. - CHANGED:
dict_del/3
, which only supported key lists, anddict_delete_or_default/5
are both replaced withdict_delete/[3-5]
which supports both key lists and simple keys. - FIXED:
dict_select/5
was buggy due to an incorrect argument order :-(
hash_ext
A library for hashing data.
- NEW:
hash_algorithm/1
provides an easy way to enumerate or check the available hashing algorithms. A great use case for this is to check whether a user-entered hash function is supported, e.g., when specifying options.
string_ext
A library for working with strings.
- NEW:
string_code/2
allows single-character strings to be translated to/from codes.
term_ext
A library for working with Prolog terms.
- NEW:
compound_name/2
allows the name of term to be extracted.
1.0.8
v1.0.8
1.0.7
FIXED: Set a default file name in http_download/3.