-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partial strings: #95
Comments
In the second instance, Y points to the end of a singly allocated string buffer, which is not part of the heap, so there is no heap cell to refer to. |
That does not make sense to me. The end must be a real variable. |
On the heap, Xs0 = [a,b,c|Xs], Xs0 = [_|Xs1] would look like (byte-by-byte)" a <---- Xs0 points here |
See #24 |
|
Currently I get:
But this is not a syntax error. And further, "inadmissible_query_term" is what is found and not what is expected. See N226 for a lengthy analysis of what errors are about. TL;DR: They signal primarily what is expected and not what is found. In the long run, you will find yourself going through that table of error classification quite frequently. An existence_error or a permission_error is preferable in this situation. OK, you can also signal a system_error. |
Do you think you will be able to continue work on partial strings? |
I do. Things are sluggish right now because I'm preparing to leave in two weeks. |
How do you intend to proceed? It seems in spite of this, you have still these |
I will change the |
Here is a related problem:
Expected: success. |
Yet,
|
I don't understand why the partial string "abc" should have 4 elements. |
Because
succeeds as well. |
In other words:
( In any case: very nice
|
Alternatively:
|
@triska, can you reproduce this? |
Yes, I can reproduce this, but unfortunately I cannot help with this issue! |
I will have a look tomorrow. |
I'm not sure how to make sense of that. Internally, a partial string is a buffer of UTF-8 characters. If the buffer is expanded to accommodate new characters, how would that work with respect to unification? The variables beyond |
What about talking about it? |
Sure, we can work out a time over email. |
I'm about ready to take a second crack at this from Unsafe Rust. You gave this example layout a few months back: a <---- Xs0 points here To be sure I understand the example properly, the final four/eight bytes are self-referential until bound, correct? This is how unbound variables are implemented elsewhere. |
Yes. Let's consider a built_in
creates above term. Please keep in mind that
might now have just the code for |
Alright. And the pointer at Xs could also point into the WAM heap or stack? |
edit And thus, strictly speaking, also choicepoints point to other stackelements |
Here is an extreme example,
And these are the resulting terms on the heap of a 64 bit machine: 0'a <------------ Xs0 In another notation we have:
It should be noted that zeroes in strings are extremely rare, so it is not worth doing any extra optimization for them. |
Another request that calls for this feature: |
I suppose if we have an example a bit more general than your last:
with the uninstantiated 0'a <------------ Xs0 |
See #95 (comment) |
Why this difference?
The text was updated successfully, but these errors were encountered: