Closed Rifhutch closed 6 months ago
Liftin High takes the spirit and greatness
doesn't appear to be a valid function declaration as far as I can tell. the spirit
is a perfectly good common variable, but greatness
isn't either a common or proper variable. The spec describes them as "a list of argument" [sic] and I'm assuming they all need to be variables.
@palfrey you're correct, if you change the greatness
to Greatness
you it will compile fine: webpiler
Yup, the transpiler didn't have a problem with it, but you're right. Fixed to Greatness.
@Rifhutch I actually filed https://github.com/yanorestes/rockstar-py/issues/13 about the problem, and he has since fixed it :)
I'm also fairly sure this isn't compliant as it hit 85070591730234615865843651857942052864 (2^126) at which point my Rust implementation gets unhappy (given that 128-bit integers are the max in the standard library). Given the spec says "Numbers in Rockstar are stored using the DEC64 numeric type" I'm fairly sure this comfortably exceeds what's intended. Python 3 OTOH is perfectly happy with arbitrary-sized numbers...
Connor Fitzgerald Sent from my Phone. Please excuse my brevity.
On July 30, 2018 6:37:24 PM EDT, Tom Parker notifications@github.com wrote:
I'm also fairly sure this isn't compliant as it hit 85070591730234615865843651857942052864 (2^126) at which point my Rust implementation gets unhappy (given that 128-bit integers are the max in the standard library). Given the spec says "Numbers in Rockstar are stored using the DEC64 numeric type" I'm fairly sure this comfortably exceeds what's intended. Python 3 OTOH is perfectly happy with arbitrary-sized numbers...
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/dylanbeattie/rockstar/issues/105#issuecomment-409034580
Definitely exploiting a few features of the target language (python) to use a big integer as a boolean array :)
Although for default settings, the numbers shouldn't get quite that high...possibly another python transpiler quirk was allowing something it shouldn't. @palfrey
Sincerely, I'm not planning on implementing DEC64 on rockstar-py. It works well the way it is and it allows more possibilities (without actually affecting on Rockstar code)
@Rifhutch @yanorestes Also entirely probable there's a bug in my interpreter. I know there's at least one that's stopping other parts of this program so I should prod those first...
@yanorestes More possibilities is totally more rock'n'roll! One thing (that may have already been fixed) is I had an assignment: Davy is without an earlier transpiled that to Davy=0, (aliasing 'without' to a 0-valued expression?), but in this case it should've been Davy=7. That may have produced the exploding values.
@Rifhutch from the official README - "As long as the next symbol is not a reserved keyword". without
is a reserved keyword simbolizing subtraction, that's why it fails. Davy is nothing
is converted to Davy is -
, which is then converted to Davy = 0
, since the length of alphabetical characters in "-"
is 0
@palfrey I also do some hinky arithmetic on strings using '+' to concatenate, I'm guessing that doesn't translate well either.
@yanorestes good point, in this case the quirk was in the webpiler. in any case the assignment was updated to reflect the intended assignment to 0.
@Rifhutch I've just noticed there's also some stuff where you treat a 0 integer as true
specifically If Truth Of The Now taking the soul,the stage
. Rewriting it as If Truth Of The Now taking the soul,the stage is nothing
works better for me, but we're missing a spec for "truthy" values (I'll file a bug)
@palfrey Cool, removed dependence on truthy integers and put in explicit equality checks.
@Rifhutch What is a quirk in the webpiler? If there's a bug, feel free to submit it here :)
https://github.com/Rifhutch/cellular-rocktomata