Mark Thom
9ba503cd6b
use printer cycle detection when printing partial strings ( #1263 ), refactor skip_max_list functions
2022-02-06 21:36:49 -07:00
Mark Thom
7b8001d060
fix '$skip_max_list'/4 ( #1260 )
2022-02-05 18:33:30 -07:00
Mark Thom
4b71607215
count cycle lengths in skip_max_list_cycle ( #1260 )
2022-01-31 18:23:16 -07:00
Mark Thom
0d653a2ce6
improve '$skip_max_list'/4 and length/2 ( #1023 , #110 )
2022-01-29 12:47:26 -07:00
Mark Thom
b3006f6fd8
inline store & deref calls in '' ( #1176 )
2022-01-26 23:03:19 -07:00
Mark Thom
3ebf8d5db9
clear alias in close before resetting the stream to null ( #1231 )
2022-01-17 17:58:14 -07: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
39e28f1f2a
write plaintext and ciphertext directly to atoms ( #1193 )
2022-01-13 08:47:56 -07:00
Mark Thom
cfe257495a
recognize characters as separate from atoms in ''/7 ( #1192 )
2022-01-10 21:18:11 -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
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
520121b2b2
remove skeletons from replaced modules
2022-01-06 21:44:41 -07:00
Mark Thom
8ba61a1da1
defer installation of inference counter for call_with_inference_limit til after goals expanded
2022-01-06 21:44:41 -07:00
Mark Thom
d7bf04d2c0
fix off by one bug in system_calls
2022-01-06 21:44:41 -07:00
Mark Thom
529c401eee
don't allow [] as a stream alias, restore domain error on source sink for open/{3,4}
2022-01-06 21:44:41 -07:00
Mark Thom
d02b9d848c
break from loop upon successful peek in peek_char/1 and peek_code/1
2022-01-06 21:44:41 -07:00
Mark Thom
f340f9ac94
break from loop in get_code upon successful character read
2022-01-06 21:44:41 -07:00
Mark Thom
10bb6ab3bb
restore old thread_goals to fix top-level solutions printing bug
2022-01-06 21:44:41 -07:00
Mark Thom
073f281f1e
fix arg/3 bug
2022-01-06 21:44:41 -07:00
Mark Thom
addc817cca
break from get_char loop after successful char unification
2022-01-06 21:44:41 -07:00
Mark Thom
b24e7cce38
support comparison and unification of cyclic partial strings
2022-01-06 21:44:41 -07:00
Mark Thom
ffd1b7069f
greatly reduce the number of goal expansions done in callable if/then/else
2022-01-06 21:44:41 -07:00
Mark Thom
0404c3bd94
use new heap term representation
2022-01-06 21:44:38 -07:00
Markus Triska
7e8a635e7e
implement tls_client_negotiate/3 for explicit negotiation
2021-12-05 17:39:22 +01:00
Markus Triska
77c04c3a14
ADDED: Support for creating TLS servers.
...
The new predicates tls_server_context/2 and tls_server_negotiate/3 can
be used to negotiate TLS connections with clients for encrypted and
authenticated communication.
2021-12-03 16:45:27 +01:00
Adrián Arroyo Calle
86161ccf2a
Allow all kinds of string to be processed in open/4
2021-11-28 12:37:16 +01:00
Mark Thom
1d2a838717
Merge pull request #1077 from pmoura/fix_get_code_predicates_at_end_of_file
...
Fix the get_code/1-2 predicates to return -1 at the end of stream as per standard
2021-11-07 09:40:29 -05:00
Mark Thom
0b2638b201
Merge pull request #1070 from triska/open_stream
...
ENHANCED: open/4 to allow opening a stream by specifying stream(S).
2021-11-07 09:39:41 -05:00
Paulo Moura
658b835a70
Fix the get_code/1-2 predicates to return -1 at the end of stream
2021-11-06 19:41:25 +00:00
Markus Triska
f668640e3d
move error handling to Prolog by using the new '$first_non_octet'/2
2021-11-04 18:35:22 +01:00
Markus Triska
afcd44deaa
ENHANCED: open/4 to allow opening a stream by specifying stream(S).
...
This allows switching standard output to binary, using for example:
?- current_output(S0), open(stream(S0), write, S, [type(binary)]).
format/3 can then be used to write binary data to S. This is needed
for example when piping binary data to other programs.
This addresses #614 , please read the discussion for more information.
The current implementation is very preliminary: Specifically, it works
by destructively modifiying the parameters of the underlying stream,
making it no longer usable in its original mode. Currently, if the
type of standard output is set to binary, then the toplevel no longer
works. Therefore, after writing binary output to standard output,
the program should either halt, or set the stream type back to text.
2021-11-04 18:33:40 +01:00
Markus Triska
494bd7b79c
ADDED: '$first_non_octet'/2, for much more efficient domain checks in library(crypto).
...
'$first_non_octet'(Cs, C) <=> C is the leftmost character in the
string Cs whose character code is not in 0..255.
2021-11-04 00:12:00 +01:00
Adrián Arroyo Calle
391cda919f
Implement shell/1 and shell/2
2021-10-11 22:35:05 +02:00
Adrián Arroyo Calle
47d811c250
use shutdown error values to throw exceptions in close stream
2021-09-30 00:10:03 +02:00
Adrián Arroyo Calle
4d0998ef72
launch exception if closing a closed TCP stream #1046
2021-09-28 22:48:51 +02:00
Regan-Koopmans
72a7765b58
981 Reimplement as library system call
2021-06-17 12:10:25 +02:00
Mark Thom
87ef3519d9
Merge pull request #972 from pmoura/add_pid_predicate
...
Add pid/1 predicate to the os library
2021-05-19 14:09:21 -06:00
Paulo Moura
b9ad6f4fd2
Add pid/1 predicate to the os library
2021-05-18 20:05:30 +01:00
Paulo Moura
58555d598b
Add rename_file/2 predicate to the files library
2021-05-18 18:08:30 +01:00
Mark Thom
0eeae24049
Merge pull request #968 from pmoura/add_make_directory_path_predicate
...
Add make_directory_path/1 predicate to the files library
2021-05-18 10:26:06 -06:00
Paulo Moura
eeac3bc436
Add delete_directory/1 predicate to the files library
2021-05-18 08:41:19 +01:00
Paulo Moura
bdebc7f32e
Add make_directory_path/1 predicate to the files library
2021-05-18 00:21:11 +01:00
Mark Thom
b21a096516
add read/2 and nl/1 ( #896 )
2021-05-01 16:12:00 -06:00
Mark Thom
d0b25de554
add user_error stream ( #917 )
2021-04-30 21:58:03 -06:00