<div dir="ltr"><div><div>(Interesting to see the hg revision numbers differ because the build machines must have other unrelated branches which differed - only the commit hash is useful)<br><br></div>I tried compiling with clang, but couldn't reproduce this.<br><br></div><div>However, I notice that the code in optimized_arg() in hspeak for computing ^ is susceptible to rounding error, since subtracting epsilon from the result of power()<br>gives a different result. That must be the problem; working on fixing it.<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On 21 February 2018 at 16:00, James Paige <span dir="ltr"><<a href="mailto:Bob@hamsterrepublic.com" target="_blank">Bob@hamsterrepublic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The exact version I have on the Mac vm is:<div><br></div><div><span><div style="color:rgb(34,34,34);font-size:14px">Euphoria to C Translator v4.1.0 development</div></span><div style="color:rgb(34,34,34);font-size:14px">   64-bit OS X, Using System Memory</div><div style="color:rgb(34,34,34);font-size:14px">   Revision Date: 2015-02-02 14:18:53, Id: 6300:57179171dbed</div><div style="color:rgb(34,34,34);font-size:14px"><br></div><div style="color:rgb(34,34,34);font-size:14px">So it looks like the same one you have.</div><div><div class="gmail-m_-1022341151645365549h5"><br>On Tuesday, February 20, 2018, Ralph Versteegen <<a href="mailto:teeemcee@gmail.com" target="_blank">teeemcee@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>Wow! That's pretty alarming.<br><br></div>I'm testing with both euphoria 4.1.0 and 4.0.3 on linux, and I get -4097 both ways. Maybe this is actually due to using a different C compiler on the Mac: clang. I'll try that next.<br></div><div>Alternatively, maybe we're actually using slightly different versions of 4.1.0. On sourceforge there are releases called 4.1.0 and 4.1.0-beta2. The beta2 is actually newer. The exact version I'm using is:<br><br>Euphoria to C Translator v4.1.0 development<br>   64-bit Linux, Using System Memory<br>   Revision Date: 2015-02-02 14:18:53, Id: 5861:57179171dbed<br><br></div><div><br></div>^ is implemented both in hspeak and in FB using floating point and the pow() function, so I'd guess some difference in int <-> float semantics.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 21 February 2018 at 10:16, James Paige <span dir="ltr"><<a href="mailto:Bob@hamsterrepublic.com" target="_blank">Bob@hamsterrepublic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div>So I used hspeak version 3Tg on both<br></div> my linux box and my Mac virtual machine, and the resulting autotest.hs files differed.<br><br></div>I used the decompile.py tool from your rpgbatch branch of nohrio and found the difference:<br><br>james@ghostorchid:~/Dropbox/sr<wbr>c/otherohr/nohrio/3rdparty$ diff -u testlinux testmac<br>diff -u testlinux/32504.hss testmac/32504.hss<br>--- testlinux/32504.hss    2018-02-20 13:07:44.589047653 -0800<br>+++ testmac/32504.hss    2018-02-20 13:01:39.493031141 -0800<br>@@ -1,7 +1,7 @@<br> Script harmtiletests<-testdamagepatte<wbr>rns()<br> do(<br>   setcaterpillarmode(1)<br>-  writegeneral(177, readgeneral(177) ,and, -4097)<br>+  writegeneral(177, readgeneral(177) ,and, -4096)<br>   walkhero(0, 3, 1)<br>   waitforhero(0)<br>   _checkpoint()<br><br><br></div>I notice that I am using euphoria 4.0.5 on my Linux box, but 4.1.0 on the Mac, but none of the warnings at <a href="https://rpg.hamsterrepublic.com/ohrrpgce/Compiling#hspeak" target="_blank">https://rpg.hamsterrepublic.co<wbr>m/ohrrpgce/Compiling#hspeak</a> seem to match the problem I see.<br><br></div><br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 20, 2018 at 11:30 AM, James Paige <span dir="ltr"><<a href="mailto:Bob@hamsterrepublic.com" target="_blank">Bob@hamsterrepublic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div>The test cases on Mac started failing with revision 9497, but that is just:<br><br>r9497 | teeemcee | 2017-09-28 09:00:57 -0700 (Thu, 28 Sep 2017) | 2 lines<br>scons now automatically reimports scripts into autotest.rpg and interactivetest.rpg<br><br></div>The failure goes all the way back to revision 8184 which is the revision where this particular test was first added:<br><br>r8184 | teeemcee | 2016-10-30 07:13:24 -0700 (Sun, 30 Oct 2016) | 4 lines<br>autotest: add (failing) test for harm tiles when there are gaps in the active party<br>Also add a test.rpg menu option to swap hero slots.<br><br></div>But it only seems to fail if autotest.hss was compiled on mac. If compiled by by hspeak on linux, then the problem doesn't happen.<br><br></div>Could this be an hspeak bug?<br><div><div><div><br></div></div></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 20, 2018 at 8:58 AM, James Paige <span dir="ltr"><<a href="mailto:Bob@hamsterrepublic.com" target="_blank">Bob@hamsterrepublic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>This does fix compiling on mac<br><br></div>I do notice that scons test fails on mac, saying:<br><br><div>==> g_debug.txt <==</div>
<div>! TRACE: rank = 1, slot = 2, get hero stat(slot, stat:hp) = 9, start hp -- harm amount = 10</div>
<div>! TRACE: ASSERT FAILURE:</div>
<div>! TRACE: autotest.hss:2260: get hero stat(slot, stat:hp) == start hp -- harm amount [actual values were 9 == 10]</div>
<div>! TRACE: crash() called from newgame -> runtests1 
-> triggertests -> harmtiletests -> testdamagepatterns -> 
asserthurtpattern -> considerrank -> assertfailure -> crash</div>
<div>! TRACE: in testsuite: assert hurt pattern, test no. 3</div>
<div>! _checkpoint ignored</div>
...Quit the game.<br><br></div>I'm going to go back and see if I can figure out when the failure started<br><br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 20, 2018 at 7:54 AM,  <span dir="ltr"><<a href="mailto:subversion@hamsterrepublic.com" target="_blank">subversion@hamsterrepublic.co<wbr>m</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">teeemcee<br>
2018-02-20 07:54:42 -0800 (Tue, 20 Feb 2018)<br>
67<br>
scons: Attempt to fix mac builds due to --gc-sections being missing<br>
---<br>
U   wip/SConscript<br>
______________________________<wbr>_________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank">ohrrpgce@lists.motherhamster.o<wbr>rg</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.org<wbr>/listinfo.cgi/ohrrpgce-motherh<wbr>amster.org</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank">ohrrpgce@lists.motherhamster.o<wbr>rg</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.org<wbr>/listinfo.cgi/ohrrpgce-motherh<wbr>amster.org</a><br>
<br></blockquote></div><br></div>
</blockquote></div></div></div>
<br>______________________________<wbr>_________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank">ohrrpgce@lists.motherhamster.o<wbr>rg</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.org<wbr>/listinfo.cgi/ohrrpgce-motherh<wbr>amster.org</a><br>
<br></blockquote></div><br></div></div></div></div>