Closed giuliolunati closed 4 years ago
Sorry for the delay, things are starting to get a bit hectic over here too. Hope you are staying well (!)
Also: sorry you've had to be bearing the brunt of the UTF-8 Everywhere bugs...but glad you are testing it with higher codepoints everywhere. Ideally I'd have had a lot of stress tests--but some of these mass changes touch so much it's hard to do. And it's good to give things some time to figure out their shape before wasting too much time making something perfect that will need to be changed.
But things have been looking pretty good and stabilizing. This fix includes an example of the kinds of tests we should probably be doing more of:
random/seed "let's be deterministic"
codepoints: [
#"b" ; 1 utf-8 byte
#"à" ; 2 utf-8 bytes encoded
#"漢" ; 3 utf-8 bytes encoded
#"😺" ; 4 utf-8 bytes encoded
]
count-up size 4 [
c: codepoints/(size)
if size != length of to binary! c [
fail "test character doesn't match expected size"
]
repeat len 64 [
s: copy {}
e: copy {}
picks: copy []
repeat i len [
append s random/only codepoints
append e c
append picks i
]
random picks ; randomize positions so not always in order
for-each i picks [
comment [
print [{Trying} i {/} len {in} mold s]
]
s/(i): c
if len != length of s [
fail ["Length not" len "for" mold s]
]
]
if not s = e [fail ["Mismatch:" mold s "=>" mold e]]
]
true
]
The output is kind of neat :-)
[...]
Trying 4 / 11 in "b😺bbàbàbb漢😺
Trying 3 / 11 in "b😺b😺àbàbb漢😺
Trying 7 / 11 in "b😺😺😺àbàbb漢😺
Trying 10 / 11 in "b😺😺😺àb😺bb漢😺
Trying 1 / 11 in "b😺😺😺àb😺bb😺😺
Trying 6 / 11 in "😺😺😺😺àb😺bb😺😺
Trying 5 / 11 in "😺😺😺😺à😺😺bb😺😺
Trying 9 / 11 in "😺😺😺😺😺😺😺bb😺😺
Trying 8 / 11 in "😺😺😺😺😺😺😺b😺😺😺
Trying 2 / 11 in "😺😺😺😺😺😺😺😺😺😺😺
[...]
(When "Redbol" gets made, we will have the benefit of being able to run through Red's tests, too.)
Anyway, thanks for your patience. If there's anything else I can do to help with "productivity", let me know. (I sent the tab-complete routine skeleton... which shows us closer to being able to process events while waiting for input. But something I did there broke the web REPL, so right now I'm going to go fix that...)
Sending thoughts/prayers to you and Italy and everyone...
Thank you Brian. Here, we are at home during last 2 weeks...
Il gio 19 mar 2020, 15:06 Brian Dickens notifications@github.com ha scritto:
Closed #1060 https://github.com/metaeducation/ren-c/issues/1060.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/metaeducation/ren-c/issues/1060#event-3145700227, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLC4M4JOUR55RSHE2Y52HTRIIRGRANCNFSM4LMFRGSA .
s: "abc" s/2: #"à" probe s
=>"aà^@"