Skgland
3c9c7ade8d
use checked_add to prevent silent overflow
2026-03-27 22:00:54 +01:00
Skgland
5fc21241d6
hint to the compiler/branch-predictor that
...
we expect p to be in bound
if we are suffiently certain that p can never be oob
unsafe get_unchecked could be used to
eliminate bounds checking all together
which should improve performance further.
2026-03-21 19:01:52 +01:00
Skgland
833c3bd77f
run rustfmt
2026-03-21 14:24:13 +01:00
Skgland
153f04b72a
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
2026-03-21 14:20:11 +01:00
Skgland
8aab887388
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%
2026-03-21 13:36:40 +01:00
Mark Thom
79a9b950cb
Merge pull request #3243 from danilp-id/master
...
fix http stream not being closed fully
2026-03-19 23:36:58 -07:00
Mark Thom
fba2854f21
Merge pull request #3257 from triska/include
...
ISO: Implement the include/1 directive
2026-03-17 23:58:04 -07:00
Markus Triska
1c9fd1501a
retain error context (load/1) when using :- D.
2026-03-16 07:36:55 +01:00
Mark Thom
b0b89a0aca
Merge pull request #3258 from no382001/fix_load_xml/3
...
load_xml was returning a single term instead of a list of nodes
2026-03-14 22:46:03 -07:00
no382001
025da8315b
load_xml was returning a single term instead of a list of nodes
2026-03-10 12:20:34 +01:00
Mark Thom
8002b9a78b
Merge pull request #3234 from fusiongyro/patch-1
...
Fixed a typo in the documentation for atom_codes/2
2026-03-09 22:09:40 -07:00
Mark Thom
02f86587b5
Merge pull request #3232 from triska/not_si
...
ADDED: not_si/1
2026-03-09 22:09:09 -07:00
Mark Thom
4d144ea819
Merge pull request #3252 from Skgland/towards-a-crate-without-syn@1
...
replace custom modular_bitfields fork with update upstream
2026-03-09 22:08:28 -07:00
Mark Thom
02c927bb83
Merge pull request #3241 from Skgland/parse-error-improvements
...
change `ParserError` type
2026-03-09 22:07:03 -07:00
Mark Thom
4a8388a6e9
Merge pull request #3189 from Skgland/fix-function_casts_as_integer
...
fix `function_casts_as_integer` warning
2026-03-09 22:06:33 -07:00
Mark Thom
7bf014cdf5
Merge pull request #3260 from thierrymarianne/dealing-with-invalid-utf8-string
...
handle invalid UTF-8 string
2026-03-09 20:56:04 -07:00
Markus Triska
b41563e976
ENHANCED: support quads in included files
...
Suggested by @dcnorris, many thanks!
https://github.com/mthom/scryer-prolog/issues/634#issuecomment-4003451420
2026-03-07 09:37:30 +01:00
Thierry Marianne
ead2fccdbb
add documentation
...
Signed-off-by: Thierry Marianne <thierry@marianne.io >
2026-03-05 09:03:31 +01:00
Thierry Marianne
817c584993
revise indentation of raw string
...
Signed-off-by: Thierry Marianne <thierry@marianne.io >
2026-03-04 15:06:27 +01:00
Thierry M.
e00112b92f
use C-string literal
...
Co-authored-by: Bennet Bleßmann <3877590+Skgland@users.noreply.github.com >
2026-03-04 15:01:23 +01:00
Thierry Marianne
4bd0ff0fcb
cargo fmt fixes
...
Signed-off-by: Thierry Marianne <thierry@marianne.io >
2026-03-04 14:04:47 +01:00
Thierry Marianne
ed59aa05b0
apply suggestion
...
Signed-off-by: Thierry Marianne <thierry@marianne.io >
2026-03-04 14:01:17 +01:00
Thierry Marianne
16ed1040d2
move test to tests/scryer/ffi.rs
...
Signed-off-by: Thierry Marianne <thierry@marianne.io >
2026-03-04 14:01:17 +01:00
Thierry M.
fa21ff4813
use CStr .to_str() method
...
Co-authored-by: Bennet Bleßmann <3877590+Skgland@users.noreply.github.com >
2026-03-04 14:00:44 +01:00
Thierry M.
891f7fc892
use C-string literal
...
Co-authored-by: Bennet Bleßmann <3877590+Skgland@users.noreply.github.com >
2026-03-04 13:59:53 +01:00
Thierry Marianne
fae9ca1bb9
fix utf-8 panic
...
Signed-off-by: Thierry Marianne <thierry@marianne.io >
2026-03-04 12:45:58 +01:00
Thierry Marianne
ac71cff338
add failing test highlighting panic on invalid UTF-8 cstr
...
Signed-off-by: Thierry Marianne <thierry@marianne.io >
2026-03-04 12:45:48 +01:00
Markus Triska
8f39bee463
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 .
2026-02-28 14:49:13 +01:00
Skgland
2dc904aa73
run apt update before apt install
...
https://github.com/orgs/community/discussions/145882#discussioncomment-11447924
2026-02-20 23:00:45 +01:00
Skgland
0ceab41b39
fix warning in CI about using apt in a script
2026-02-20 22:57:44 +01:00
Skgland
2a79d6fc40
run cargo fmt
2026-02-20 22:52:25 +01:00
Skgland
49e49b425d
fix clippy lint warning
2026-02-20 22:47:08 +01:00
Skgland
7d0d61d789
remove no longer necessary allows
2026-02-20 22:45:09 +01:00
Skgland
5ef5a3f30a
replace custom modular_bitfields fork with update upstream
...
part of #2468
2026-02-20 22:40:33 +01:00
Danil Platonov
337d9c5583
move drop to impl Drop
2026-01-26 04:57:28 -08:00
Danil Platonov
26523139a8
fix http stream not being closed fully
2026-01-25 03:16:37 -08:00
Skgland
65aadb3b88
reduce visibility to pub(crate) to prevent accidentally exposing
2026-01-24 04:20:13 +01:00
Skgland
dfad71bc6e
fix some lint warnings
2026-01-24 04:13:26 +01:00
Skgland
d8c6fa1fe5
don't expose lexical error and provide location
2026-01-24 04:08:41 +01:00
Skgland
18b476af28
make ParserError a struct with an enum kind field
2026-01-24 04:08:40 +01:00
Skgland
bd233fedfd
add location to InvalidSingleQuotedCharacter
2026-01-24 04:08:40 +01:00
Skgland
083546442d
make match exhaustive
2026-01-24 04:08:40 +01:00
Skgland
3343188756
replace pairs of usize with location struct
2026-01-24 04:08:40 +01:00
Daniel K Lyons
ed36aa7313
Fixed a typo in the documentation for atom_codes/2
2026-01-20 09:54:18 -07:00
Markus Triska
0dc94ecc0b
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!
2026-01-18 09:58:31 +01:00
Mark Thom
453a88f03e
Merge pull request #3211 from mthom/setof_correction_and_opt
...
Correct and optimize setof/3 and bagof/3
2026-01-14 22:07:10 -07:00
Mark Thom
c79fd74331
remove unnecessary extra work in findall_with_existential/5
2026-01-14 20:39:48 -08:00
Mark Thom
e446b13376
remove hashbrown crate
2026-01-14 20:39:48 -08:00
Mark Thom
a83f412251
replace sort_without_dedup/2 with keysort/2
2026-01-14 20:39:48 -08:00
Mark Thom
1a8c4f9b03
cargo fmt fixes
2026-01-14 20:39:48 -08:00