]>
Repositorios git - scryer-prolog.git/log
Skgland [Sat, 21 Mar 2026 13:24:13 +0000 (14:24 +0100)]
run rustfmt
Skgland [Sat, 21 Mar 2026 13:20:11 +0000 (14:20 +0100)]
adjust interrupt handling
we used to spend ~5.8% of the time on getting the next value of the 0..INSTRUCTIONS_PER_INTERRUPT_POLL iterator
increment on Wrapping<u8> now only takes ~0.58 of the time
Skgland [Sat, 21 Mar 2026 12:36:40 +0000 (13:36 +0100)]
switch from Integer to u128
- u128 is only 16 bytes instead of 24
- incrementing u128 does not involve heap allocations
- u128 should be sufficent
it would take more than 2 sextilion years to overflow if we would be incrementing it every tick at 5GHz
i.e. 2^128-1 / 5 GHz / 60 / 60 / 24 / 356 > 2 sextilion
before this ~3.2% of the execution time of the program in https://github.com/mthom/scryer-prolog/issues/3265#issuecomment-
4103176469 was spend in the increment_call_count function, after this change it's down to 0.3%
Mark Thom [Fri, 20 Mar 2026 06:36:58 +0000 (23:36 -0700)]
Merge pull request #3243 from danilp-id/master
fix http stream not being closed fully
Mark Thom [Wed, 18 Mar 2026 06:58:04 +0000 (23:58 -0700)]
Merge pull request #3257 from triska/include
ISO: Implement the include/1 directive
Markus Triska [Mon, 16 Mar 2026 06:36:55 +0000 (07:36 +0100)]
retain error context (load/1) when using :- D.
Mark Thom [Sun, 15 Mar 2026 05:46:03 +0000 (22:46 -0700)]
Merge pull request #3258 from no382001/fix_load_xml/3
load_xml was returning a single term instead of a list of nodes
no382001 [Tue, 3 Mar 2026 11:34:31 +0000 (12:34 +0100)]
load_xml was returning a single term instead of a list of nodes
Mark Thom [Tue, 10 Mar 2026 05:09:40 +0000 (22:09 -0700)]
Merge pull request #3234 from fusiongyro/patch-1
Fixed a typo in the documentation for atom_codes/2
Mark Thom [Tue, 10 Mar 2026 05:09:09 +0000 (22:09 -0700)]
Merge pull request #3232 from triska/not_si
ADDED: not_si/1
Mark Thom [Tue, 10 Mar 2026 05:08:28 +0000 (22:08 -0700)]
Merge pull request #3252 from Skgland/towards-a-crate-without-syn@1
replace custom modular_bitfields fork with update upstream
Mark Thom [Tue, 10 Mar 2026 05:07:03 +0000 (22:07 -0700)]
Merge pull request #3241 from Skgland/parse-error-improvements
change `ParserError` type
Mark Thom [Tue, 10 Mar 2026 05:06:33 +0000 (22:06 -0700)]
Merge pull request #3189 from Skgland/fix-function_casts_as_integer
fix `function_casts_as_integer` warning
Mark Thom [Tue, 10 Mar 2026 03:56:04 +0000 (20:56 -0700)]
Merge pull request #3260 from thierrymarianne/dealing-with-invalid-utf8-string
handle invalid UTF-8 string
Markus Triska [Sat, 7 Mar 2026 08:37:30 +0000 (09:37 +0100)]
ENHANCED: support quads in included files
Suggested by @dcnorris, many thanks!
https://github.com/mthom/scryer-prolog/issues/634#issuecomment-
4003451420
Thierry Marianne [Thu, 5 Mar 2026 08:02:59 +0000 (09:02 +0100)]
add documentation
Signed-off-by: Thierry Marianne <[email protected] >
Thierry Marianne [Wed, 4 Mar 2026 14:06:27 +0000 (15:06 +0100)]
revise indentation of raw string
Signed-off-by: Thierry Marianne <[email protected] >
Thierry M. [Wed, 4 Mar 2026 14:01:23 +0000 (15:01 +0100)]
use C-string literal
Co-authored-by: Bennet Bleßmann <[email protected] >
Thierry Marianne [Wed, 4 Mar 2026 13:04:47 +0000 (14:04 +0100)]
cargo fmt fixes
Signed-off-by: Thierry Marianne <[email protected] >
Thierry Marianne [Wed, 4 Mar 2026 12:58:08 +0000 (13:58 +0100)]
apply suggestion
Signed-off-by: Thierry Marianne <[email protected] >
Thierry Marianne [Wed, 4 Mar 2026 12:57:17 +0000 (13:57 +0100)]
move test to tests/scryer/ffi.rs
Signed-off-by: Thierry Marianne <[email protected] >
Thierry M. [Wed, 4 Mar 2026 12:40:05 +0000 (13:40 +0100)]
use CStr .to_str() method
Co-authored-by: Bennet Bleßmann <[email protected] >
Thierry M. [Wed, 4 Mar 2026 12:33:00 +0000 (13:33 +0100)]
use C-string literal
Co-authored-by: Bennet Bleßmann <[email protected] >
Thierry Marianne [Wed, 4 Mar 2026 11:03:21 +0000 (12:03 +0100)]
fix utf-8 panic
Signed-off-by: Thierry Marianne <[email protected] >
Thierry Marianne [Wed, 4 Mar 2026 07:55:11 +0000 (08:55 +0100)]
add failing test highlighting panic on invalid UTF-8 cstr
Signed-off-by: Thierry Marianne <[email protected] >
Markus Triska [Sat, 28 Feb 2026 13:23:44 +0000 (14:23 +0100)]
ISO: Implement the include/1 directive
Quoting from the standard:
7.4.2.7 include/1
If F is an implementation defined ground term designating
a Prolog text unit, then Prolog text P1 which contains
a directive include(F) is identical to a Prolog text P2
obtained by replacing the directive include(F) in P1 by
the Prolog text denoted by F.
Example:
:- include("hello.pl").
This addresses #583 and #634.
Skgland [Fri, 20 Feb 2026 22:00:45 +0000 (23:00 +0100)]
run apt update before apt install
https://github.com/orgs/community/discussions/145882#discussioncomment-
11447924
Skgland [Fri, 20 Feb 2026 21:57:44 +0000 (22:57 +0100)]
fix warning in CI about using apt in a script
Skgland [Fri, 20 Feb 2026 21:52:25 +0000 (22:52 +0100)]
run cargo fmt
Skgland [Fri, 20 Feb 2026 21:47:08 +0000 (22:47 +0100)]
fix clippy lint warning
Skgland [Fri, 20 Feb 2026 21:45:09 +0000 (22:45 +0100)]
remove no longer necessary allows
Skgland [Fri, 20 Feb 2026 21:37:49 +0000 (22:37 +0100)]
replace custom modular_bitfields fork with update upstream
part of #2468
Danil Platonov [Mon, 26 Jan 2026 12:57:28 +0000 (04:57 -0800)]
move drop to impl Drop
Danil Platonov [Sun, 25 Jan 2026 11:16:37 +0000 (03:16 -0800)]
fix http stream not being closed fully
Skgland [Sat, 24 Jan 2026 03:20:13 +0000 (04:20 +0100)]
reduce visibility to pub(crate) to prevent accidentally exposing
Skgland [Sat, 24 Jan 2026 03:13:26 +0000 (04:13 +0100)]
fix some lint warnings
Skgland [Sat, 24 Jan 2026 02:32:42 +0000 (03:32 +0100)]
don't expose lexical error and provide location
Skgland [Sat, 24 Jan 2026 02:24:02 +0000 (03:24 +0100)]
make ParserError a struct with an enum kind field
Skgland [Sat, 24 Jan 2026 01:23:19 +0000 (02:23 +0100)]
add location to InvalidSingleQuotedCharacter
Skgland [Sat, 24 Jan 2026 01:22:44 +0000 (02:22 +0100)]
make match exhaustive
Skgland [Sat, 24 Jan 2026 00:54:29 +0000 (01:54 +0100)]
replace pairs of usize with location struct
Daniel K Lyons [Tue, 20 Jan 2026 16:54:18 +0000 (09:54 -0700)]
Fixed a typo in the documentation for atom_codes/2
Markus Triska [Sun, 18 Jan 2026 08:57:37 +0000 (09:57 +0100)]
ADDED: not_si/1
For a recent example that would benefit from this, see "Prolog Basics
Explained with Pokémon" by @alexpetros:
https://unplannedobsolescence.com/blog/prolog-basics-pokemon/
Thank you a lot!
Mark Thom [Thu, 15 Jan 2026 05:07:10 +0000 (22:07 -0700)]
Merge pull request #3211 from mthom/setof_correction_and_opt
Correct and optimize setof/3 and bagof/3
Mark Thom [Tue, 13 Jan 2026 06:47:39 +0000 (22:47 -0800)]
remove unnecessary extra work in findall_with_existential/5
Mark Thom [Tue, 13 Jan 2026 06:13:02 +0000 (22:13 -0800)]
remove hashbrown crate
Mark Thom [Fri, 9 Jan 2026 04:29:26 +0000 (20:29 -0800)]
replace sort_without_dedup/2 with keysort/2
Mark Thom [Fri, 9 Jan 2026 04:09:12 +0000 (20:09 -0800)]
cargo fmt fixes
Mark Thom [Thu, 8 Jan 2026 08:27:02 +0000 (00:27 -0800)]
remove variant_hashing.rs and related instructions
Mark Thom [Thu, 8 Jan 2026 08:23:52 +0000 (00:23 -0800)]
find variant terms using just sort/2 and (==)/2
Mark Thom [Wed, 31 Dec 2025 06:16:25 +0000 (22:16 -0800)]
do not retain attributes in solutions of findall (#3020)
Mark Thom [Sun, 14 Dec 2025 02:22:15 +0000 (18:22 -0800)]
fix cargo fmt
Mark Thom [Sat, 13 Dec 2025 02:05:47 +0000 (18:05 -0800)]
add variant_hash and is_non_variant to fix setof/3, bagof/3
Mark Thom [Fri, 12 Dec 2025 06:08:16 +0000 (22:08 -0800)]
replace compare_term_test with parallel iterator, add is_not_variant
Mark Thom [Wed, 10 Dec 2025 07:14:24 +0000 (23:14 -0800)]
use branch numbers to detect branch subsumption
Mark Thom [Sun, 7 Dec 2025 23:15:18 +0000 (15:15 -0800)]
assert rational(3) as true in tests/builtins.pl
Mark Thom [Tue, 13 Jan 2026 06:22:44 +0000 (23:22 -0700)]
Merge pull request #3222 from Skgland/reduce-instructions_template
move static parts of instructions template directly into instructions module, fix clippy and typos
Skgland [Sat, 10 Jan 2026 17:31:40 +0000 (18:31 +0100)]
run rustfmt to fix formatting
Bennet Bleßmann [Sat, 10 Jan 2026 17:30:09 +0000 (18:30 +0100)]
restore accidentally removed comment
Skgland [Sat, 10 Jan 2026 16:53:19 +0000 (17:53 +0100)]
fix spelling
Skgland [Sat, 10 Jan 2026 16:52:34 +0000 (17:52 +0100)]
fix clippy lints
Skgland [Sat, 10 Jan 2026 16:48:07 +0000 (17:48 +0100)]
extaract the static part of the instructions template directly into the instructions module
This way goto source doesn't end up in a generated file for those parts and they can be edited directly.
I have way too often accidentally edited the generated file.
Mark Thom [Wed, 17 Dec 2025 21:11:21 +0000 (14:11 -0700)]
Merge pull request #3207 from Skgland/quote-fix-unquote-segv
"fix" segv from #3198, #3199, and #3205
Skgland [Tue, 9 Dec 2025 23:04:24 +0000 (00:04 +0100)]
throw `error(resource_error(memory), [])` when the list length exceeds usize.
Mark Thom [Tue, 9 Dec 2025 02:23:52 +0000 (19:23 -0700)]
Merge pull request #3177 from triska/use_phrase_to_file
use more recently available phrase_[to|from]_file/3 in example
Skgland [Mon, 8 Dec 2025 21:27:24 +0000 (22:27 +0100)]
remove overengineered RecursionGuard
Skgland [Mon, 8 Dec 2025 18:59:43 +0000 (19:59 +0100)]
fix another integer overflow
Skgland [Sun, 7 Dec 2025 22:06:09 +0000 (23:06 +0100)]
don't calculate panic message eagerly
Skgland [Sun, 7 Dec 2025 21:59:00 +0000 (22:59 +0100)]
handle overflown in Heap::with_cell_capacity
Skgland [Sun, 7 Dec 2025 20:45:13 +0000 (21:45 +0100)]
handle oob heap index calculation
Skgland [Sun, 7 Dec 2025 20:31:24 +0000 (21:31 +0100)]
use checked multiplication in heap_index! macro
Skgland [Sun, 7 Dec 2025 20:27:24 +0000 (21:27 +0100)]
prevent multiply with overflow resulting in odd errors/segv
Skgland [Sun, 7 Dec 2025 20:08:17 +0000 (21:08 +0100)]
detect recursive throw_resource_error and panic instead of causing a segmentation fault
Skgland [Thu, 27 Nov 2025 19:11:55 +0000 (20:11 +0100)]
deny `function_casts_as_integer` warnings
Skgland [Thu, 27 Nov 2025 19:07:13 +0000 (20:07 +0100)]
fix `function_casts_as_integer` warning
Comparing addresses of function pointers is brittle.
Functions may be duplicated resulting in function pointers to the same function to compare !=.
Functions may be merged/de-duplicated resulting in function pointers to different function to compare ==.
The later shouldn't be relevant here as the function differ in behavior, but mentioning it for completeness.
Mark Thom [Thu, 4 Dec 2025 02:13:00 +0000 (18:13 -0800)]
fix backtrack_on_resource_error around choice instructions
Mark Thom [Thu, 4 Dec 2025 02:10:46 +0000 (19:10 -0700)]
Merge pull request #3185 from mthom/install_verify_attr_opt
Optimize `verify_attr` by removing the need to scan instructions
Mark Thom [Thu, 4 Dec 2025 02:10:22 +0000 (19:10 -0700)]
Merge pull request #3164 from Skgland/alloc_errors2
handle machine heap/stack allocation error
Mark Thom [Tue, 2 Dec 2025 07:24:46 +0000 (00:24 -0700)]
Merge pull request #3147 from jjtolton/error-termination-flag
Add -t flag for custom toplevel (replaces --halt-on-error)
Mark Thom [Tue, 2 Dec 2025 06:55:46 +0000 (23:55 -0700)]
Merge pull request #3179 from triska/meetups
update meetups
Mark Thom [Tue, 2 Dec 2025 06:55:34 +0000 (23:55 -0700)]
Merge pull request #3180 from triska/foldl_6
ADDED: foldl/6, addressing #2973
Mark Thom [Fri, 28 Nov 2025 05:03:56 +0000 (21:03 -0800)]
corrections to arithmetic expression compilation
Mark Thom [Fri, 28 Nov 2025 05:03:22 +0000 (21:03 -0800)]
corrections to dispatch loop
Mark Thom [Wed, 26 Nov 2025 07:17:22 +0000 (23:17 -0800)]
revise InstallVerifyAttrs to remove need for predicate scanning (#3175)
Mark Thom [Tue, 25 Nov 2025 06:19:09 +0000 (22:19 -0800)]
remove interms field from MachineState
Markus Triska [Sun, 23 Nov 2025 09:59:12 +0000 (10:59 +0100)]
ADDED: foldl/6, addressing #2973
Markus Triska [Sun, 23 Nov 2025 09:29:31 +0000 (10:29 +0100)]
update meetups
Markus Triska [Sun, 23 Nov 2025 08:42:14 +0000 (09:42 +0100)]
use more recently available phrase_[to|from]_file/3 in example
Skgland [Thu, 20 Nov 2025 22:08:46 +0000 (23:08 +0100)]
fix pstr_iter_tests test
Skgland [Thu, 20 Nov 2025 20:44:29 +0000 (21:44 +0100)]
remove RESOURCE_ERROR_OFFSET_INIT
With it when using multiple Machine in one process only the first would store the pre-allocated error.
Instead Heap.resource_err_loc is now Option<NonZero<usize>> instead of usize using None for uninitialized.
The cell at index 0 should alredy be used by a runtime reserved interstitial cell that is allocated prior. So requiring the offset to be non zero should be fine.
Skgland [Thu, 20 Nov 2025 20:24:47 +0000 (21:24 +0100)]
fix unecessary parens in macro
Skgland [Thu, 20 Nov 2025 20:13:17 +0000 (21:13 +0100)]
return an AllocError instead of panicing in Heap::with_cell_capacity
Skgland [Wed, 19 Nov 2025 23:48:04 +0000 (00:48 +0100)]
wrap resource_error into an error/2 functor and don't wrap it into a syntax_error functor
Skgland [Wed, 19 Nov 2025 23:19:24 +0000 (00:19 +0100)]
propagate AllocErrro instead of unwrapping
Skgland [Wed, 19 Nov 2025 21:08:42 +0000 (22:08 +0100)]
handle machine heap/stack allocation error
Skgland [Tue, 18 Nov 2025 21:13:18 +0000 (22:13 +0100)]
stub a clippy config
with things we need to get rid of replace if we want to eliminate panics due to oom
Skgland [Tue, 18 Nov 2025 21:01:42 +0000 (22:01 +0100)]
use as_bytes().to_vec() instead of bytes().collect()
copying a slice into a vec should be easier to optimize by the complier than collecting a byte iteration into a vec
Skgland [Tue, 18 Nov 2025 20:59:55 +0000 (21:59 +0100)]
remove some uncessary allocations/copies
Skgland [Tue, 18 Nov 2025 20:54:02 +0000 (21:54 +0100)]
ignore incompatible msrv in compat module
Skgland [Tue, 18 Nov 2025 20:42:10 +0000 (21:42 +0100)]
improve count_to_letter_code
- reserve the complete required length at the beginning to reduce reallocations
- use u8 instead of char so that we can re-use the allocation for the string