]> Repositorios git - scryer-prolog.git/log
scryer-prolog.git
10 months agouse named vars instead of wildcards
Bennet Bleßmann [Wed, 30 Jul 2025 20:19:03 +0000 (22:19 +0200)]
use named vars instead of wildcards

makes updating tests easier as globs are sometimes lost when using TRYCMD=overwrite

10 months agofix culprit
Bennet Bleßmann [Wed, 30 Jul 2025 20:14:43 +0000 (22:14 +0200)]
fix culprit

10 months agofix arity of prcess_wait builtin errors
Bennet Bleßmann [Wed, 30 Jul 2025 19:22:37 +0000 (21:22 +0200)]
fix arity of prcess_wait builtin errors

10 months agomore tests
Bennet Bleßmann [Sun, 27 Jul 2025 18:36:07 +0000 (20:36 +0200)]
more tests

10 months agoadjust/add tests
Bennet Bleßmann [Sat, 26 Jul 2025 21:59:58 +0000 (23:59 +0200)]
adjust/add tests

10 months agoadjust options checking and add more tests
Bennet Bleßmann [Sat, 26 Jul 2025 21:10:29 +0000 (23:10 +0200)]
adjust options checking and add more tests

10 months agoaddress comment by triska
Bennet Bleßmann [Sat, 26 Jul 2025 20:08:58 +0000 (22:08 +0200)]
address comment by triska

https://github.com/mthom/scryer-prolog/pull/3009#discussion_r2233221091

10 months agouse functor/3 for must_be_known_options
Bennet Bleßmann [Sat, 26 Jul 2025 19:55:18 +0000 (21:55 +0200)]
use functor/3 for must_be_known_options

10 months agoreformat ;
Bennet Bleßmann [Sat, 26 Jul 2025 19:39:44 +0000 (21:39 +0200)]
reformat ;

10 months agoadd another test and remove unecessary module qualification
Bennet Bleßmann [Sat, 26 Jul 2025 19:18:15 +0000 (21:18 +0200)]
add another test and remove unecessary module qualification

10 months agoreplace filter by tfiltert and fix Pipe{Reader,Writer} streams
Bennet Bleßmann [Sat, 26 Jul 2025 19:02:42 +0000 (21:02 +0200)]
replace filter by tfiltert and fix Pipe{Reader,Writer} streams

10 months agoadjust error kind
Bennet Bleßmann [Sat, 26 Jul 2025 16:46:47 +0000 (18:46 +0200)]
adjust error kind

10 months agoget process_create working and add tests
Bennet Bleßmann [Sat, 26 Jul 2025 16:21:00 +0000 (18:21 +0200)]
get process_create working and add tests

10 months agoadd documentation
Bennet Bleßmann [Sat, 26 Jul 2025 11:30:56 +0000 (13:30 +0200)]
add documentation

10 months agochange behaviour in supposedly unreachable cases
Bennet Bleßmann [Sat, 26 Jul 2025 11:14:29 +0000 (13:14 +0200)]
change behaviour in supposedly unreachable cases

10 months agoadjust error for duplicate options
Bennet Bleßmann [Sun, 20 Jul 2025 22:25:34 +0000 (00:25 +0200)]
adjust error for duplicate  options

10 months agofix rename pid to process
Bennet Bleßmann [Sun, 20 Jul 2025 22:06:46 +0000 (00:06 +0200)]
fix rename pid to process

10 months agodon't remove the child on wait/kill
Bennet Bleßmann [Sun, 20 Jul 2025 22:06:03 +0000 (00:06 +0200)]
don't remove the child on wait/kill

- important for wait with timout(0) as we may want to try again until the process has realy exited.

- make process_release release the process instead

10 months agofix timeout default value in process_wait/3
Bennet Bleßmann [Sun, 20 Jul 2025 21:53:01 +0000 (23:53 +0200)]
fix timeout default value in process_wait/3

10 months agoincorporate suggestion by triska
Bennet Bleßmann [Sun, 20 Jul 2025 21:52:25 +0000 (23:52 +0200)]
incorporate suggestion by triska

10 months agomake atom!() with a new value less annoying
Bennet Bleßmann [Sun, 20 Jul 2025 21:04:01 +0000 (23:04 +0200)]
make atom!() with a new value less annoying

10 months agoimplement process_release/1, process_wait/2, process_wait/3, and process_kill/1
Bennet Bleßmann [Sun, 20 Jul 2025 20:57:06 +0000 (22:57 +0200)]
implement process_release/1, process_wait/2, process_wait/3, and process_kill/1

10 months agostore child process in machine state
Bennet Bleßmann [Sun, 20 Jul 2025 19:08:44 +0000 (21:08 +0200)]
store child process in machine state

10 months agohandle some error cases and replace unwrap with expect
Bennet Bleßmann [Sun, 20 Jul 2025 18:11:12 +0000 (20:11 +0200)]
handle some error cases and replace unwrap with expect

10 months agoadjust errors
Bennet Bleßmann [Sun, 20 Jul 2025 16:47:44 +0000 (18:47 +0200)]
adjust errors

10 months agorename pid to process
Bennet Bleßmann [Sun, 20 Jul 2025 16:34:45 +0000 (18:34 +0200)]
rename pid to process

10 months agoundo changes to error.pl
Bennet Bleßmann [Sat, 19 Jul 2025 23:52:34 +0000 (01:52 +0200)]
undo changes to error.pl

10 months agoadjust default cwd
Bennet Bleßmann [Sat, 19 Jul 2025 23:25:16 +0000 (01:25 +0200)]
adjust default cwd

10 months agorestructure option parsing
Bennet Bleßmann [Sat, 19 Jul 2025 22:51:50 +0000 (00:51 +0200)]
restructure option parsing

10 months agoadd comments and try to fix binding the child process pid
Bennet Bleßmann [Sat, 19 Jul 2025 20:56:51 +0000 (22:56 +0200)]
add comments and try to fix binding the child process pid

10 months agofix more things
Bennet Bleßmann [Sat, 19 Jul 2025 19:44:28 +0000 (21:44 +0200)]
fix more things

10 months agoget it working
Bennet Bleßmann [Sat, 19 Jul 2025 19:33:19 +0000 (21:33 +0200)]
get it working

10 months agofix indices
Bennet Bleßmann [Sat, 19 Jul 2025 19:00:36 +0000 (21:00 +0200)]
fix indices

10 months ago[WIP] add support to spawn new processes
Bennet Bleßmann [Sat, 19 Jul 2025 18:50:53 +0000 (20:50 +0200)]
[WIP] add support to spawn new processes

10 months agoMerge pull request #3019 from Skgland/rebis-dev_fix-clippy
Mark Thom [Fri, 1 Aug 2025 05:09:41 +0000 (22:09 -0700)]
Merge pull request #3019 from Skgland/rebis-dev_fix-clippy

fix clippy

10 months agoreplace .skip(n).next() with .nth(n)
Bennet Bleßmann [Thu, 31 Jul 2025 19:46:21 +0000 (21:46 +0200)]
replace .skip(n).next() with .nth(n)

10 months agoremove unecessary cast
Bennet Bleßmann [Thu, 31 Jul 2025 19:45:57 +0000 (21:45 +0200)]
remove unecessary cast

10 months agoremove unecessary into_iter
Bennet Bleßmann [Thu, 31 Jul 2025 19:45:44 +0000 (21:45 +0200)]
remove unecessary into_iter

10 months agoprefere for loop
Bennet Bleßmann [Thu, 31 Jul 2025 19:45:26 +0000 (21:45 +0200)]
prefere for loop

10 months agoreplace always erroring of_else with map_err
Bennet Bleßmann [Thu, 31 Jul 2025 19:44:52 +0000 (21:44 +0200)]
replace always erroring of_else with map_err

10 months agoreplace single non-wildcard pattern match with if let
Bennet Bleßmann [Thu, 31 Jul 2025 19:43:59 +0000 (21:43 +0200)]
replace single non-wildcard pattern match with if let

10 months agoremove already implied must_use
Bennet Bleßmann [Thu, 31 Jul 2025 19:41:51 +0000 (21:41 +0200)]
remove already implied must_use

10 months agocollaps els-if / if-if
Bennet Bleßmann [Thu, 31 Jul 2025 19:41:23 +0000 (21:41 +0200)]
collaps els-if / if-if

10 months agoingore nerver looping loop, but add a todo
Bennet Bleßmann [Thu, 31 Jul 2025 19:40:38 +0000 (21:40 +0200)]
ingore nerver looping loop, but add a todo

10 months agofix clippy::unit_arg
Bennet Bleßmann [Thu, 31 Jul 2025 19:40:05 +0000 (21:40 +0200)]
fix clippy::unit_arg

10 months agocheck not empty instead of len > 0
Bennet Bleßmann [Thu, 31 Jul 2025 19:38:48 +0000 (21:38 +0200)]
check not empty instead of len > 0

10 months agoimpl From rather than Into
Bennet Bleßmann [Thu, 31 Jul 2025 19:38:26 +0000 (21:38 +0200)]
impl From rather than Into

10 months agofix unecessary mut
Bennet Bleßmann [Thu, 31 Jul 2025 19:37:23 +0000 (21:37 +0200)]
fix unecessary mut

10 months agoignore clippy::unbuffered_bytes in test helper functions
Bennet Bleßmann [Thu, 31 Jul 2025 19:36:53 +0000 (21:36 +0200)]
ignore clippy::unbuffered_bytes in test helper functions

10 months agofix legacy int constants
Bennet Bleßmann [Thu, 31 Jul 2025 19:35:55 +0000 (21:35 +0200)]
fix legacy int constants

10 months agoignore wrong self convention
Bennet Bleßmann [Thu, 31 Jul 2025 19:35:40 +0000 (21:35 +0200)]
ignore wrong self convention

10 months agofix match/if-let can be simplified to ?
Bennet Bleßmann [Thu, 31 Jul 2025 19:34:15 +0000 (21:34 +0200)]
fix match/if-let can be simplified to ?

10 months agofix unecessary return
Bennet Bleßmann [Thu, 31 Jul 2025 19:33:13 +0000 (21:33 +0200)]
fix unecessary return

10 months agofix unecessary reference/dereference
Bennet Bleßmann [Thu, 31 Jul 2025 19:31:34 +0000 (21:31 +0200)]
fix unecessary reference/dereference

10 months agofix clone on copy values
Bennet Bleßmann [Thu, 31 Jul 2025 19:28:30 +0000 (21:28 +0200)]
fix clone on copy values

10 months agofix clippy::uninlined_format_args
Bennet Bleßmann [Thu, 31 Jul 2025 19:26:08 +0000 (21:26 +0200)]
fix clippy::uninlined_format_args

10 months agoremove outdated comment
Bennet Bleßmann [Thu, 31 Jul 2025 18:07:57 +0000 (20:07 +0200)]
remove outdated comment

10 months agoalso run CI on rebis-dev
Bennet Bleßmann [Thu, 31 Jul 2025 18:07:07 +0000 (20:07 +0200)]
also run CI on rebis-dev

10 months agodetect end_of_file before end_of_stream in get_char (#2990)
Mark Thom [Wed, 23 Jul 2025 03:16:24 +0000 (20:16 -0700)]
detect end_of_file before end_of_stream in get_char (#2990)

10 months agoallow abolish_clause to abolish empty dynamic clauses (#3010)
Mark Thom [Sun, 20 Jul 2025 23:55:07 +0000 (16:55 -0700)]
allow abolish_clause to abolish empty dynamic clauses (#3010)

10 months agofix variadic_functor
Mark Thom [Thu, 17 Jul 2025 04:52:40 +0000 (21:52 -0700)]
fix variadic_functor

10 months agofix parsing partial number tokens in other radixes (#3000)
Mark Thom [Tue, 15 Jul 2025 06:05:10 +0000 (23:05 -0700)]
fix parsing partial number tokens in other radixes (#3000)

11 months agofmt improvements
Mark Thom [Tue, 8 Jul 2025 20:47:08 +0000 (13:47 -0700)]
fmt improvements

11 months agocorrect number_chars (#2976)
Mark Thom [Tue, 1 Jul 2025 22:47:26 +0000 (15:47 -0700)]
correct number_chars (#2976)

11 months agouse granular hierarchical locks in offset_table.rs
Mark Thom [Wed, 25 Jun 2025 04:58:40 +0000 (21:58 -0700)]
use granular hierarchical locks in offset_table.rs

11 months agosynchronize offset table growth with the borrowing of offset pointers
Mark Thom [Sat, 21 Jun 2025 06:19:32 +0000 (23:19 -0700)]
synchronize offset table growth with the borrowing of offset pointers

11 months agouse OffsetTableImpl without synchronization by default
Mark Thom [Fri, 23 May 2025 06:49:57 +0000 (23:49 -0700)]
use OffsetTableImpl without synchronization by default

11 months agofix crash when loading html
Bennet Bleßmann [Fri, 9 May 2025 21:45:03 +0000 (23:45 +0200)]
fix crash when loading html

11 months agomake Fixnum::build_with harder to accidentally misuse
Bennet Bleßmann [Wed, 22 Jan 2025 20:10:44 +0000 (21:10 +0100)]
make Fixnum::build_with harder to accidentally misuse
change trait bound order for better

11 months agoAlign the heap to the size of heap cells
bakaq [Mon, 5 May 2025 03:15:14 +0000 (00:15 -0300)]
Align the heap to the size of heap cells

11 months agoAdd scan_slice_to_str_from_start
bakaq [Mon, 5 May 2025 00:01:50 +0000 (21:01 -0300)]
Add scan_slice_to_str_from_start

11 months agocorrect threshold marking in copy_structure (#2920)
Mark Thom [Sun, 4 May 2025 05:04:04 +0000 (22:04 -0700)]
correct threshold marking in copy_structure (#2920)

11 months agoFIXED: correct partial string tail calculation in arg/3
Markus Triska [Thu, 1 May 2025 07:18:00 +0000 (09:18 +0200)]
FIXED: correct partial string tail calculation in arg/3

This addresses another aspect of #2924, found by @haijinSk.
Thank you again!

Example:

    ?- "aaaaaaa" = [_,_,_,_,_,_|T], arg(2, T, 2).
       false.

11 months agoFIXED: arg/3 for partial strings
Markus Triska [Tue, 29 Apr 2025 20:48:13 +0000 (22:48 +0200)]
FIXED: arg/3 for partial strings

This address #2924, reported by @haijinSk. Thank you a lot!

Example:

    ?- arg(2, "a", A).
       A = [].

The fact that such a mistake in macro usage is even possible could be
a sign that the macro definition should be stricter.

11 months agofix cont function crashes (#2920)
Mark Thom [Tue, 29 Apr 2025 06:39:52 +0000 (23:39 -0700)]
fix cont function crashes (#2920)

11 months agoreplace deprecated unify_complete_string call with allocate_cstr
Mark Thom [Mon, 28 Apr 2025 05:27:12 +0000 (22:27 -0700)]
replace deprecated unify_complete_string call with allocate_cstr

11 months agoMigrate to strict and exposed provenance
bakaq [Sun, 27 Apr 2025 02:34:53 +0000 (23:34 -0300)]
Migrate to strict and exposed provenance

11 months agoallow unused_parens around let statement in functor! macro
Mark Thom [Sun, 27 Apr 2025 04:11:27 +0000 (21:11 -0700)]
allow unused_parens around let statement in functor! macro

11 months agoFIXED: invoke correct predicate
Markus Triska [Fri, 25 Apr 2025 16:39:21 +0000 (18:39 +0200)]
FIXED: invoke correct predicate

Noted by Oleg Finkelstein. Many thanks!

11 months agoENHANCED: partial_string/3 no longer creates atoms
Markus Triska [Fri, 25 Apr 2025 20:16:44 +0000 (22:16 +0200)]
ENHANCED: partial_string/3 no longer creates atoms

As a consequence, resulting strings are now quickly reclaimed on
backtracking.

This addresses #2912.

Test case:

    :- use_module(library(iso_ext)).
    :- use_module(library(lists)).

    ab(a).
    ab(b).

Sample query:

    ?- length(Ls, 1_000_000),
       maplist(ab, Ls),
       partial_string(Ls, Es0, []),
       Es0 == Ls.
       Ls = "aaaaaaaaaaaaaaaaaaa ...", Es0 = "aaaaaaaaaaaaaaaaaaa ..."
    ;  Ls = "aaaaaaaaaaaaaaaaaaa ...", Es0 = "aaaaaaaaaaaaaaaaaaa ..."
    ;  Ls = "aaaaaaaaaaaaaaaaaaa ...", Es0 = "aaaaaaaaaaaaaaaaaaa ..."
    ;  Ls = "aaaaaaaaaaaaaaaaaaa ...", Es0 = "aaaaaaaaaaaaaaaaaaa ..."
    ;  Ls = "aaaaaaaaaaaaaaaaaaa ...", Es0 = "aaaaaaaaaaaaaaaaaaa ..."
    ;  ... .

running in constant memory.

11 months agoENHANCED: use a fast test for the expected case of chars in atom_chars/2 etc.
Markus Triska [Thu, 24 Apr 2025 16:19:05 +0000 (18:19 +0200)]
ENHANCED: use a fast test for the expected case of chars in atom_chars/2 etc.

Suggested by Oleg Finkelstein, thank you a lot!

Example, before this change:

    ?- t+\(length(As, 1_000_000), maplist(=(a), As), time(atom_chars(A, As))).
       % CPU time: 0.693s, 7_000_041 inferences
       true.

Now:

    ?- t+\(length(As, 1_000_000), maplist(=(a), As), time(atom_chars(A, As))).
       % CPU time: 0.080s, 40 inferences
       true.

This also partially ameliorates #2907.

11 months agocorrect heap-to-cell-index comparison in copy_slice_to_end (#2906)
Mark Thom [Fri, 25 Apr 2025 05:20:40 +0000 (22:20 -0700)]
correct heap-to-cell-index comparison in copy_slice_to_end (#2906)

11 months agofix functor! size calculations around indexing_code_ptr
Mark Thom [Thu, 24 Apr 2025 05:49:03 +0000 (22:49 -0700)]
fix functor! size calculations around indexing_code_ptr

11 months agorestore tab completion to REPL (#2575)
Mark Thom [Thu, 24 Apr 2025 01:55:50 +0000 (18:55 -0700)]
restore tab completion to REPL (#2575)

11 months agomake self.s_offset use bytes in case of HeapPtr::PStr in UnifyVoid (#2897)
Mark Thom [Tue, 22 Apr 2025 03:25:50 +0000 (20:25 -0700)]
make self.s_offset use bytes in case of HeapPtr::PStr in UnifyVoid (#2897)

11 months agocorrect heap_print.rs for null characters being excluded from pstr regions of heap...
Mark Thom [Mon, 21 Apr 2025 00:14:13 +0000 (17:14 -0700)]
correct heap_print.rs for null characters being excluded from pstr regions of heap (#2890)

11 months agocorrectly increment s_offset for partial strings (#2897)
Mark Thom [Sun, 20 Apr 2025 23:53:36 +0000 (16:53 -0700)]
correctly increment s_offset for partial strings (#2897)

11 months agofix typo in try_from_partial_string
Mark Thom [Sun, 20 Apr 2025 07:07:55 +0000 (00:07 -0700)]
fix typo in try_from_partial_string

11 months agofix read_s logic around HeapPtr::PStrLoc (#2894)
Mark Thom [Sun, 20 Apr 2025 06:51:26 +0000 (23:51 -0700)]
fix read_s logic around HeapPtr::PStrLoc (#2894)

11 months agorepair cyclic PStrLoc handling in heap_print.rs
Mark Thom [Fri, 18 Apr 2025 07:03:33 +0000 (00:03 -0700)]
repair cyclic PStrLoc handling in heap_print.rs

11 months agoremove compare_pstr_to_string and related result type
Mark Thom [Fri, 18 Apr 2025 03:20:38 +0000 (20:20 -0700)]
remove compare_pstr_to_string and related result type

11 months agoENHANCED: dedicated faster branches for repositionable streams
Markus Triska [Thu, 17 Apr 2025 20:14:37 +0000 (22:14 +0200)]
ENHANCED: dedicated faster branches for repositionable streams

rebis-dev makes the speed difference especially apparent due to the
linear scan of strings on the heap in partial_string_tail/2 which is
now avoided for repositionable streams, notably files.

This addresses #2888 reported and analyzed by @haijinSk. Many thanks!

11 months agocorrect GetPartialString (#2887)
Mark Thom [Thu, 17 Apr 2025 05:20:31 +0000 (22:20 -0700)]
correct GetPartialString (#2887)

11 months agogeneralize compare_pstr_segments
Mark Thom [Wed, 16 Apr 2025 05:10:02 +0000 (22:10 -0700)]
generalize compare_pstr_segments

11 months agoensure '\0' atom is static & never inlined (#2880)
Mark Thom [Sun, 13 Apr 2025 01:48:47 +0000 (18:48 -0700)]
ensure '\0' atom is static & never inlined (#2880)

11 months agofix root reading of complete strings (#2882)
Mark Thom [Sun, 13 Apr 2025 00:32:11 +0000 (17:32 -0700)]
fix root reading of complete strings (#2882)

11 months agosome cosmetic tweaks
Mark Thom [Sat, 12 Apr 2025 23:43:51 +0000 (16:43 -0700)]
some cosmetic tweaks

11 months agomark done item
Markus Triska [Sat, 12 Apr 2025 20:54:04 +0000 (22:54 +0200)]
mark done item

11 months agocorrect and simplify compute_pstr_size
Mark Thom [Sat, 12 Apr 2025 07:22:29 +0000 (00:22 -0700)]
correct and simplify compute_pstr_size

11 months agocorrect create_partial_string (#2593)
Mark Thom [Sat, 12 Apr 2025 06:59:53 +0000 (23:59 -0700)]
correct create_partial_string (#2593)