Re: [Wrapl-discussion] Feedback on Wrapl-1.9-1074 for Windows
Brought to you by:
rajamukherji
|
From: Raja M. <raj...@gm...> - 2010-06-01 07:52:28
|
Roman Mishin wrote:
> The message seems unreadable through SourceForge Mail Archive so I
> repost it as plain text.
>
> ---------- Forwarded message ----------
> From: Roman Mishin<rom...@gm...>
>
> I have tried new Wrapl's version (for Windows). On the whole, it all
> works well. All those methods I mentioned in previous letters are
> working.
> The following are the errors I found in the old Wrapl version. They
> remain in the new version also. Perhaps, I am making wrong invocation.
> -----------------------------------------
> File.Temp() function crashes the program:
> -----------------------------------------
> Interactive Wrapl [1.9:1074]
> --> IMP IO.File;
> NIL
> --> VAR f<- File.Temp();
> 4 [main] riva 408 exception::handle: Exception: STATUS_ACCESS_VIOLATION
> 467 [main] riva 408 open_stackdumpfile: Dumping stack trace to
> riva.exe.stackdump
> -----------------
> Here is the dump:
> -----------------
> Exception: STATUS_ACCESS_VIOLATION at eip=0080EACE
> eax=007AEB48 ebx=00000000 ecx=00817548 edx=00000000 esi=0080EAD5 edi=0022C918
> ebp=0022C8FC esp=0022C8FC program=C:\Wrapl\bin\riva.exe, pid 408, thread main
> cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023
> Stack trace:
> Frame Function Args
> 0022C8FC 0080EACE (009C3810, 00000000, 00000000, 00000000)
> 00853F08 00000000 (1460FF10, 40000001, 00000000, 0096FF60)
> End of stack trace
>
After checking the source code, it seems that this function, and several
in the Sys.FileSys module also are not implemented yet in the windows
port. I will get started on implementing these and upload a new version
once they are done.
> -------------------------------
> Foreign character set mismatch:
> -------------------------------
> --> VAR S<- "Russian Language";
> "Russian Language"
> --> ALL S:any("s");
> [3, 4]
> --> VAR s<- "Русский Язык";
> "\x90\xE3\xE1\xE1\xAA\xA8\xA9 \x9F\xA7\xEB\xAA"
> --> Out:write('{s[3]}\n{s[4]}\n');
> с
> с
> /usr/lib/IO/Terminal.Out
> --> ALL s:any("с");
> [5, 6, 11]
> --> Out:write('{s[5]}\n{s[6]}\n{s[11]}\n');
> к
> и
> ы
> /usr/lib/IO/Terminal.Out
> --> Out:writes(ALL s:split(" "),"\n");
> [Русский, Язык]
> /usr/lib/IO/Terminal.Out
> --> Out:writes(ALL s:split("и"),"\n");
> [Русский Язык]
> /usr/lib/IO/Terminal.Out
> -->
>
> The file in attachment is the source code (UTF-8) that demonstrates
> the work of :map method with foreign characters. ltxt and utxt are
> unreadable in any encoding I tried. lower, upper and text variables
> are outputted as is and are readable.
> To summarize on Std.String library: those methods that access a string
> by index are working with foreign character sets (e.g. :"[]") but
> "modifiers" are not.
>
Currently Wrapl strings are only considered as arrays of single bytes
--> "б":length;
2
So they can be used to store and join UTF-8 text but some of the
string methods will not work correctly. Indexing should only index on
byte boundaries, it is surprising (and probably a coincidence) that it
seems to work here.
Methods that compare substrings will work, such as :find, although the
resulting index is in bytes and so "wrong" from a character point of
view. :map should work using the call
string:map(["а", "б", "в", "г", ...], ["А", "Б", "В", "Г", ...])
since it will replace each multi-byte substring.
I think a set of UTF-8 aware methods or a subtype of String.T which is
UTF-8 aware is probably necessary.
> Regarding Interactive Wrapl mode: is this necessary (helpful) to
> output module name after results are printed (i.e.
> /usr/lib/IO/Terminal.Out)?
>
>
It is not necessary to use Out:write to show the results in Interactive
Wrapl, the results of a calculation are automatically displayed (and
stored in a variable called "_"). If you use Out:write(...) then the
final result is whatever is returned by Out:write(...) which is Out,
which the interactive interpreter resolves to be /usr/lib/IO/Terminal.Out.
Btw, it seems that the line editing library I use for the Linux version
(tecla) does not support UTF-8 at all. I have been looking to replace it
for a while, so I will try to find one that is UTF-8 capable.
> --
> Roman
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
>
>
Again, thanks for the feedback.
Raja
> ------------------------------------------------------------------------
>
> _______________________________________________
> Wrapl-discussion mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapl-discussion
>
|