-
Notifications
You must be signed in to change notification settings - Fork 416
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
replace/all/deep
hangs up
#4174
Comments
If rewrite is in order, then we need to come up with desideratum and discuss subtle design points (e.g. lax/strict comparison and usage of Parse patterns). |
My initial thoughts:
See also red/REP#18 on more radical changes ideas, like Another thought is, |
So there's a split here:
|
Start humble. |
For the record, both R2's and R3's So, we can have a simple |
I'd make replace/deep a recursive dumb predictable operation based on |
@hiiamboris that would limit the recursion level by the size of the Red's stack. Might be not that important for the common |
It's about ~2000 calls long. Parse has this limit too IIRC. |
Line 19 in 586f267
|
FIX: issue #4174 (`replace/all/deep` hangs up).
Looks like not the first time: #2808 #3132, so the algorithm should probably be revisited to prevent further failures like this.
Describe the bug
What likely happens:
/deep
switchesreplace
into parse modequote a:
becomes justa:
in parse expression and does not advance the inputx:
indefinitely into the same point thenTo reproduce
Expected behavior
Platform version (please complete the following information)
The text was updated successfully, but these errors were encountered: