Commit Graph
2401 Commits
Author SHA1 Message Date
Mark Thom 413f797155 Merge pull request #1228 from triska/charsio-read-renames
MODIFIED: Rename two predicates in library(charsio)
2022-01-17 17:03:46 -07:00
Markus Triska 516ed1fd5b ENHANCED: library(crypto): Retain a compact internal representation of the ciphertext throughout decryption.
This allows efficient decryption also of very large files and long
strings.

It is usually highly advisable to stick to common and portable library
predicates such as append/3. However, since append/3 does not yet
recognize this opportunity for improvement, I apply it manually in
this case, so that also very large files can be efficiently decrypted
using the compact internal string representation.

Without this change, decrypting a 1 GB file takes 48 GB of RAM,
whereas with this change, it only takes 2 GB (one for the string, one
for its copy with the appended tag).
2022-01-17 23:02:56 +01:00
Jos De Roo 1a4f8f992b Update clpz.pl
While running with scryer-prolog the resource control file should be ~/.scryerrc
2022-01-17 22:35:31 +01:00
Markus Triska 23adfef281 MODIFIED: library(charsio): read_n_chars/3 is now called get_n_chars/3
This is because "read" is associated with general Prolog terms.
2022-01-17 20:37:55 +01:00
Markus Triska 20b6816562 MODIFIED: library(charsio): read_term_from_chars/2 is now called read_from_chars/2
This is for compatibility with SICStus Prolog and GNU Prolog.
2022-01-17 20:21:18 +01:00
Mark Thom c6400550e1 dereference second argument of '/2 2022-01-17 00:00:23 -07:00
Markus Triska 11d504e8f4 retain the string "[]" as is, instead of converting it to '[]' (i.e., "")
This addresses #1215.
2022-01-16 17:50:20 +01:00
Mark Thom 83378e4373 deduplicate but do not sort anonymous variables in toplevel (#1196) 2022-01-15 19:24:22 -07:00
Mark Thom 06abe2302b add missing cases to retract_clause (#1214) 2022-01-15 00:51:38 -07:00
Mark Thom f3e5f7879d allow late dynamic declaration for predicates (#1205) 2022-01-14 16:31:49 -07:00
Mark Thom bc5125b719 put_complete_string should push the empty list to the heap for empty strings (#1209) 2022-01-14 16:31:49 -07:00
Mark Thom c6d23f9a0b fix off-by-one error in DynamicIndexedChoice (#1210) 2022-01-14 16:31:22 -07:00
Mark Thom 3b8afce7c7 fix syntax regressions (#1198, #1164) 2022-01-13 23:54:55 -07:00
Mark Thom 39e28f1f2a write plaintext and ciphertext directly to atoms (#1193) 2022-01-13 08:47:56 -07:00
Mark Thom d9e190096c delimit partial strings around \x0\ 2022-01-12 22:10:59 -07:00
Mark Thom 340d428c88 Merge pull request #1199 from Skgland/do_not_gen_in_src
Generate into $OUT_DIR instead of src/
2022-01-11 23:01:59 -07:00
Mark Thom d22bbc54c7 Merge pull request #1195 from triska/rebis-dev-format-U
ADDED: format specifier ~NU, using underscores to separate groups of digits
2022-01-11 22:49:38 -07:00
Mark Thom c5cda99f9d evaluate floats referenced from the heap by tagged pointers (#1203) 2022-01-11 18:42:01 -07:00
Mark Thom 67854e0720 execute trust instead of retry at the end of dynamic choice blocks (#1204, #1173) 2022-01-11 18:24:26 -07:00
Mark Thom cfe257495a recognize characters as separate from atoms in ''/7 (#1192) 2022-01-10 21:18:11 -07:00
Mark Thom 5f4e701461 render [] as empty string in AtomOrString::as_str() (#1193) 2022-01-10 20:46:00 -07:00
Mark Thom e3622e0860 improve between_/3 implementation (#1186, #1191) 2022-01-10 18:34:25 -07:00
Mark Thom f0e6b8ca47 imitate Rc-style equality for TypedArenaPtr (#1190) 2022-01-10 18:25:30 -07:00
Mark Thom ef0b239e70 correctly print [] functors (#1189) 2022-01-10 17:26:57 -07:00
Skgland a5de329712 don't genrate code in src/
[Outputs of Build Script](https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script) states that only files in $OUT_DIR may be modified
2022-01-10 21:19:18 +01:00
Markus Triska 2889a4438b ADDED: format specifier ~NL to limit the number of digits per line
Example:

    %?- format("~65L", [2^1000]).
    %@ 10715086071862673209484250490600018105614048117055336074437503883_
    %@ 70351051124936122493198378815695858127594672917553146825187145285_
    %@ 69231404359845775746985748039345677748242309854210746050623711418_
    %@ 77954182153046474983581941267398767559165543946077062914571196477_
    %@ 686542167660429831652624386837205668069376   true.
2022-01-10 17:52:42 +01:00
Markus Triska f5952088e3 ADDED: format specifier ~NU, using underscores to separate groups of digits
Example:

    ?- format("~2U", [10^12]).
    %@ 10_000_000_000.00   true.
2022-01-10 16:07:05 +01:00
Mark Thom bcacb49c05 compare bigints by value not by pointer (#1183) 2022-01-09 23:33:26 -07:00
Mark Thom 976b8e426d Merge pull request #1160 from aarroyoc/add-ugraphs-library
Add ugraphs library (ported from SWI)
2022-01-09 12:43:46 -07:00
Adrián Arroyo Calle 35670c8654 remove TLS option in socket_client_open/3 2022-01-09 17:04:54 +01:00
Adrián Arroyo Calle 07bc97fb31 fix socket_client_open/3 2022-01-08 23:31:32 +01:00
Mark Thom a54e42961c unify current time as a complete string, not an atom (#1175) 2022-01-08 11:47:35 -07:00
Mark Thom d90cf6384c complete handling of control operators in interpreted (,)/2 (#1172) 2022-01-08 00:04:04 -07:00
Adrián Arroyo Calle af3f676683 Minor fixes 2022-01-07 19:28:07 +01:00
Adrián Arroyo Calle abf980d603 Merge remote-tracking branch 'upstream/rebis-dev' into add-ugraphs-library 2022-01-07 19:14:34 +01:00
Mark Thom 06313cac64 update README.md 2022-01-07 00:17:17 -07:00
Mark Thom cf1e315d72 add parser tests 2022-01-06 22:09:38 -07:00
Mark Thom 955e1799c8 flatten the instruction dispatch loop 2022-01-06 22:09:36 -07:00
Mark Thom 3db86f1e25 relocate most instruction routines from MachineState to Machine 2022-01-06 21:46:23 -07:00
Mark Thom 6f9b6a29c4 remove LocalCodePtr::IndexingBuf 2022-01-06 21:44:41 -07:00
Mark Thom b056d40eba module-qualify incomplete goals in expand_goal/3 2022-01-06 21:44:41 -07:00
Mark Thom 708c3bc3ce dereference first argument of (is)/2 2022-01-06 21:44:41 -07:00
Mark Thom 39efc12dc8 generate heap_loc cells to refer to 0-arity atoms in read.rs 2022-01-06 21:44:41 -07:00
Mark Thom 4211151fe6 fix unify_float 2022-01-06 21:44:41 -07:00
Mark Thom 3974b6e6cd dereference variables when looking for string terminators 2022-01-06 21:44:41 -07:00
Mark Thom b24df6e195 properly iterate over read terms in MachineState::read_term 2022-01-06 21:44:41 -07:00
Mark Thom bcd33dc8e3 get test suite working 2022-01-06 21:44:41 -07:00
Mark Thom 6c66c236fb fix printing of CStr's 2022-01-06 21:44:41 -07:00
Mark Thom 520121b2b2 remove skeletons from replaced modules 2022-01-06 21:44:41 -07:00
Mark Thom 48c1d05151 use heap_loc to refer to 0-arity atom instead of str_loc 2022-01-06 21:44:41 -07:00