Adrián Arroyo Calle
dbc193ab2a
WIP http_server
2020-12-09 23:40:00 +01:00
Adrián Arroyo Calle
0696a18e0b
Change name to list_max, list_min as PR feedback
2020-12-06 21:58:37 +01:00
Adrián Arroyo Calle
0cc9388af0
Use foldl as PR feedback suggested
2020-12-06 17:31:42 +01:00
Adrián Arroyo Calle
a73529969a
Add max_list & min_list to lists
2020-12-05 14:20:50 +01:00
Markus Triska
41a751e7f5
ADDED: Provisional support for (#=)/3 and (#<)/3.
...
These predicates are intended for constructs from library(reif), such
as if_/3. For the time being, they are defined here. If you have any
recommendations or comments regarding the best location of these
predicates, or need more of them, please file an issue.
Suggested by @Qqwy in https://github.com/triska/clpz/issues/12 .
Many thanks!
2020-11-08 09:26:50 +01:00
Markus Triska
46dfaa5b28
ENHANCED: library(files): Error handling if requested files do not exist.
...
We now throw exceptions instead of failing silently, or even crashing
when using file_size/2 etc. with nonexistent files.
2020-09-13 10:23:23 +02:00
Mark Thom
d677d3d2ef
preface the 'spelling error' with an explainer comment ( #687 )
2020-09-05 18:07:58 -06:00
Markus Triska
5f3ab823fd
FIXED: format_//2: Keep different variables distinct.
...
Example:
?- phrase(format_("~w~w", [_,_]), Ls).
%@ Ls = "AB"
%@ ; false.
2020-09-05 09:58:49 +02:00
Markus Triska
79cb4cd6a5
ADDED: First version of call_nth/2.
...
A thread-safe implementation is possible for example with
'$nb_setarg'/3 (see #390 ).
2020-08-24 19:29:08 +02:00
Mark Thom
d3ab4b5def
flatten passage of cut point B in (,)/2, (->)/2 and (;)/2 ( #685 , #683 )
2020-08-23 22:49:10 -03:00
Markus Triska
cc77ef680d
dif/2: Omit entailed residual goals, if the arguments are not unifiable.
...
This addresses #135 .
2020-08-22 17:50:15 +02:00
Markus Triska
e75ebd9b6e
dif/2: Succeed unconditionally if the arguments are not unifiable.
...
This addresses one part of #135 .
2020-08-22 17:50:15 +02:00
notoria
0724c044d6
Use nonterminal fd_put//3 in mod from clpz
2020-08-15 17:56:07 +02:00
notoria
bed4afe74f
Simplified the code
2020-08-15 17:39:34 +02:00
notoria
d4263cc8b9
Using queue_goal//1 to correctly bind variables
2020-08-15 17:06:12 +02:00
notoria
b4b11465a1
Fixed variable bindings in mod from clpz
2020-08-15 13:37:33 +02:00
notoria
daaebc59cb
Made mod stronger and addressed #675
2020-08-15 12:53:28 +02:00
Mark Thom
79a74038ac
Merge pull request #674 from notoria/clpz_mod
...
Improved mod in clpz
2020-08-14 00:21:19 -03:00
notoria
314baabf1d
More improvement on mod from CLP(Z)
2020-08-13 21:36:36 +02:00
notoria
a24fbb8f61
Improved mod in CLP(Z)
...
This is still a work in progress.
2020-08-13 10:33:36 +02:00
Markus Triska
e185b626bd
FIXED: CLP(B): Delay BDD restriction until after the instantiation.
...
This is necessary to actually take the new value into account.
Example:
?- sat(A*B>=C*D), A=1,B=0,C=1,D=1.
false.
This addresses #670 .
2020-08-12 19:51:25 +02:00
Markus Triska
ad8e2ad4f6
omit internal attributes in residual goals when using taut/2
...
Examples:
?- taut(X=:=X,1).
clpb:sat(X=:=X)
; false.
?- taut(X=\=X,0).
clpb:sat(X=:=X)
; false.
2020-08-11 20:49:10 +02:00
Mark Thom
4b610b6293
Merge pull request #656 from notoria/try_from_number
...
Fixed some conversion issues
2020-08-08 12:24:29 -03:00
Markus Triska
c55cc3c472
ensure proper lengths of key and initialization vector
...
This avoids crashes when using unsuitable lengths.
2020-08-06 23:27:49 +02:00
Markus Triska
674483a4c6
remove entailed constraint
2020-08-06 23:17:08 +02:00
notoria
3143468751
Fixed some conversion issues
2020-08-06 11:39:55 +02:00
Markus Triska
2d3f1e51ec
shorten, and increase readability
2020-08-05 21:49:46 +02:00
Markus Triska
1c23336cff
use "octet" as a string literal, reducing the number of arguments
2020-08-05 20:21:46 +02:00
Markus Triska
a622ffddfe
ADDED: library(crypto): Support for additional authenticated data (AAD).
...
Additional authenticated data can now be specified with the new
aad(Chars) option for encryption and decryption. It is authenticated,
but not encrypted.
2020-08-05 20:09:07 +02:00
Mark Thom
4f15802fbc
reconcile '[]' and [] ( #644 ), solve remaining conformity issues ( #648 ), move (-->) from dcgs.pl to builtins.pl ( #649 )
2020-08-02 23:35:53 -06:00
Markus Triska
32c612b747
ADDED: library(crypto): ECDH key exchange over Curve25519 (X25519)
2020-07-29 23:51:11 +02:00
Markus Triska
dcc4b91b35
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:
2020-07-25 09:49:02 +02:00
Markus Triska
4a90f13dee
better error handling for options
2020-07-23 00:27:31 +02:00
Markus Triska
61dddcee3f
use newly available chars_base64/3
2020-07-22 20:35:48 +02:00
Markus Triska
4c510001ce
ADDED: chars_base64/3 for efficient bidirectional Base64 conversion.
2020-07-22 20:35:48 +02:00
Markus Triska
2768beec4c
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.
2020-07-19 12:32:01 +02:00
Mark Thom
bd0aa16322
Merge pull request #633 from triska/file_time
...
ADDED: file_creation_time/2 and file_access_time/2.
2020-07-18 12:40:53 -03:00
Mark Thom
a1746a5bf1
Merge pull request #631 from cduret/lib_csv
...
add write_csv & change skip_header to with_header option
2020-07-18 12:40:28 -03:00
Markus Triska
17dd9239b6
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
2020-07-17 18:48:39 +02:00
Cyrille Duret
920644afaf
set domain_error exception & use format/3 with setup_call_cleanup/3 for stream writing
2020-07-17 01:21:40 +02:00
Markus Triska
8668aee7fd
ENHANCED: Reorder fields in time stamps so that (@<)/2 is meaningful.
2020-07-16 23:40:03 +02:00
Markus Triska
4f386b3e5e
ADDED: file_modification_time/2, obtaining a time stamp.
...
This addresses a remaining aspect of #511 .
2020-07-16 23:40:03 +02:00
Markus Triska
0f4667d942
ADDED: path_canonical/2, obtaining the canonical absolute path.
...
This addresses a remaining aspect of #511 .
2020-07-15 20:43:34 +02:00
Cyrille Duret
5705c42820
set throw() to follow ISO recommendations
2020-07-15 18:26:57 +02:00
794404
f5f0d00a75
add write_csv & change skip_header to with_header option
2020-07-15 13:02:30 +02:00
Markus Triska
94e9e17c79
ADDED: working_directory/2, addressing a remaining aspect of #511
2020-07-14 23:05:29 +02:00
Markus Triska
5134e64cae
ADDED: delete_file/1, addressing a remaining aspect of #511
2020-07-14 22:21:46 +02:00
Markus Triska
88a2b82f7e
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.
2020-07-12 11:54:37 +02:00
Markus Triska
0fa8feb475
use newly available character type in must_be/2
2020-07-11 21:00:25 +02:00
Markus Triska
eb872f8fca
ADDED: library(os), reasoning about environment variables.
...
Together with library(files), this addresses #511 .
2020-07-11 21:00:25 +02:00