<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Helvetica, Arial, sans-serif">Hi Elias,<br>
<br>
not really. I am only fetching your emacs code from time to time.<br>
I can't test it because I am on vi.<br>
<br>
Best Regards,<br>
Jürgen<br>
<br>
</font><br>
<div class="moz-cite-prefix">On 08/30/2017 10:25 AM, Elias Mårtenson
wrote:<br>
</div>
<blockquote
cite="mid:CADtN0WLg-x+***@mail.gmail.com"
type="cite">
<div dir="ltr">I thought Jürgen fixed that? The cuase was
apparently my misunderstanding of how the GNU APL Simple_string
works.
<div><br>
</div>
<div>Regards,</div>
<div>Elias</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 29 August 2017 at 03:45, Ala'a
Mohammad <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:***@gmail.com" target="_blank">***@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Trying to reduce the steps above to 'define, save, define'
gives the<br>
same thing above. This only happens when the defined
function is saved<br>
without a body (saved only with the header).<br>
<br>
Network listener started. Connection information: mode:tcp
addr:35039<br>
∇x<br>
∇x<br>
<span class=""><br>
==============================<wbr>==============================<wbr>==================<br>
Assertion failed: items<br>
in Function: at<br>
in file: ../Simple_string.hh:277<br>
<br>
Call stack:<br>
<br>
------------------------------<wbr>----------<br>
-- Stack trace at ../Simple_string.hh:277<br>
------------------------------<wbr>----------<br>
</span>0x7F2D7FEEC184<br>
0x7F2D7AC6BBDE connection_loop(void*)<br>
0x7F2D7AC6F0FE NetworkConnection::run()<br>
0x7F2D7AC6E0CB NetworkConnection::process_<wbr>command(std::string
const&)<br>
0x7F2D7AC67CA7 FnCommand::run_command(<wbr>NetworkConnection&,<br>
<span class="im HOEnZb">std::vector<std::string,
std::allocator<std::string> > const&)<br>
0x45EA0F do_Assert(char const*, char const*, char
const*, int)<br>
==============================<wbr>==========<br>
<br>
SI stack:<br>
<br>
<br>
</span><span class="im HOEnZb">==============================<wbr>==============================<wbr>==================<br>
terminate called after throwing an instance of 'ErrorCode'<br>
<br>
Process apl aborted<br>
<br>
<br>
</span>
<div class="HOEnZb">
<div class="h5">On Mon, Aug 28, 2017 at 10:10 PM, Ala'a
Mohammad <<a moz-do-not-send="true"
href="mailto:***@gmail.com">***@gmail.com</a>>
wrote:<br>
> Hi,<br>
><br>
> I do not know if this is the same cause, but the
assertion seems to be the same<br>
><br>
> in a new session do the following<br>
> - write an incorrect name like 'x.y'<br>
> - edit a function like 'z'<br>
> - save the function<br>
> - edit the z function again, and you get the failed
assertion<br>
><br>
> I'm running the latest APL version from svn:<br>
> : apl --version<br>
> BUILDTAG:<br>
> ---------<br>
> Project: GNU APL<br>
> Version / SVN: 1.7 / 1003M<br>
> Build Date: 2017-08-28 18:02:08 UTC<br>
> Build OS: Linux 3.13.0-37-generic x86_64<br>
> config.status: 'RATIONAL_NUMBERS_WANTED=yes'<br>
> Archive SVN: 989<br>
><br>
> Here is a session sample:<br>
> ------------------------------<wbr>----<br>
><br>
> x.y<br>
> VALUE ERROR<br>
> x.y<br>
> ^<br>
> ∇z<br>
> ∇z<br>
><br>
> ==============================<wbr>==============================<wbr>==================<br>
> Assertion failed: items<br>
> in Function: at<br>
> in file: ../Simple_string.hh:277<br>
><br>
> Call stack:<br>
><br>
> ------------------------------<wbr>----------<br>
> -- Stack trace at ../Simple_string.hh:277<br>
> ------------------------------<wbr>----------<br>
> 0x7F2ECE271184<br>
> 0x7F2EC8FF0BDE connection_loop(void*)<br>
> 0x7F2EC8FF40FE NetworkConnection::run()<br>
> 0x7F2EC8FF30CB NetworkConnection::process_<wbr>command(std::string
const&)<br>
> 0x7F2EC8FECCA7 FnCommand::run_command(<wbr>NetworkConnection&,<br>
> std::vector<std::string,
std::allocator<std::string> > const&)<br>
> 0x45EA0F do_Assert(char const*, char const*,
char const*, int)<br>
> ==============================<wbr>==========<br>
><br>
> SI stack:<br>
><br>
> Depth: 0<br>
> Exec: 0xbaf770<br>
> Safe exec: 0<br>
> Pmode: ◊ x.y<br>
> PC: 0 (5) 'y<br>
> Stat: x.y<br>
> err_code: 0x30001<br>
> thrown at: Symbol.cc:683<br>
> e_msg_1: 'VALUE ERROR'<br>
> e_msg_2: ' x.y'<br>
> e_msg_3: ' ^'<br>
><br>
><br>
> ==============================<wbr>==============================<wbr>==================<br>
> terminate called after throwing an instance of
'ErrorCode'<br>
><br>
> Process apl aborted<br>
><br>
><br>
> Hope It Helps<br>
><br>
> Regards,<br>
><br>
> Ala'a<br>
><br>
><br>
><br>
><br>
><br>
> On Tue, Aug 8, 2017 at 2:18 PM, Elias Mårtenson
<<a moz-do-not-send="true"
href="mailto:***@gmail.com">***@gmail.com</a>>
wrote:<br>
>> If that's the case, then you are indeed right.
It's possible that the<br>
>> std::string constructor will work, but that
would be more out of luck than<br>
>> anything else.<br>
>><br>
>> Regards,<br>
>> Elias<br>
>><br>
>> On 8 August 2017 at 18:11, Juergen Sauermann
<<a moz-do-not-send="true"
href="mailto:***@t-online.de">***@t-online.de</a><wbr>><br>
>> wrote:<br>
>>><br>
>>> Hi Elias,<br>
>>><br>
>>> correct, except that an UCS8_string is not
a string, despite of its name.<br>
>>> UCS8_strings have no terminating 0 byte;
the 0-byte is only appended if<br>
>>> the UCS8_string is converted to a C string
with function c_str().<br>
>>><br>
>>> /// Jürgen<br>
>>><br>
>>><br>
>>> On 08/08/2017 09:28 AM, Elias Mårtenson
wrote:<br>
>>><br>
>>> Sorry for not replying earlier, I forgot
about this message.<br>
>>><br>
>>> ucs[0] should be OK for an empty string, as
that will still refer to the<br>
>>> terminating NUL byte at the end of the
string. Note that an empty string is<br>
>>> differetn from a NULL pointer (the former
is a valid string, and the other<br>
>>> is not).<br>
>>><br>
>>> Regards,<br>
>>> Elias<br>
>>><br>
>>> On 1 August 2017 at 19:04, Juergen
Sauermann<br>
>>> <<a moz-do-not-send="true"
href="mailto:***@t-online.de">***@t-online.de</a><wbr>>
wrote:<br>
>>>><br>
>>>> Hi Elias,<br>
>>>><br>
>>>> I don't know what Ala'a did. However,
looking at:<br>
>>>><br>
>>>> /// return a UTF8 encoded std:string<br>
>>>> inline std::string to_string(const
UCS_string & ucs)<br>
>>>> {<br>
>>>> const UTF8_string utf(ucs);<br>
>>>> return string((const char
*)&utf[0], utf.size());<br>
>>>> }<br>
>>>><br>
>>>> I am not sure what happens if string
ucs is empty (in that case ucs[0]<br>
>>>> does not<br>
>>>> exist and may be makes &ucs[0] also
0. The std::string constructor then<br>
>>>> looks<br>
>>>> for the terminating 0 character in a
0-pointer. Using<br>
>>>> UTF8:string::c_str() might<br>
>>>> be better.<br>
>>>><br>
>>>> Also converting a UCS or UTF8 string to
std::string just for outputting<br>
>>>> it with << may be<br>
>>>> an overkill, since ostream <<
often (read: after #include<br>
>>>> "PrintOperator.hh") understands<br>
>>>> UCF and UCS strings directly.<br>
>>>><br>
>>>> /// Jürgen<br>
>>>><br>
>>>><br>
>>>> On 07/31/2017 02:31 AM, Elias Mårtenson
wrote:<br>
>>>><br>
>>>> Can you tell me exactly what you are
doing in order to reproduce the<br>
>>>> problem?<br>
>>>><br>
>>>> Regards,<br>
>>>> Elias<br>
>>>><br>
>>>><br>
>>><br>
>>><br>
>><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>