You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm still trucking along in learning Haxe by doing /r/dailyprogrammer challenges. One of the minis for the week has me calculate the number of "ramp numbers" less than a given number. This program should solve it:
using Thx;
class RampNums {
static function main () {
var rampNums = 0, arg = Sys.args()[0].ifEmpty("100");
for (i in 1 ... (arg.canParse() ? arg.toInt() : 100))
if (i.toString() == i.toString().toArray().order.fn(
_0.toInt() - _1.toInt()).join("")) rampNums++;
Sys.println(rampNums.toString());
}
}
However, when I run the generated bin through the cpp build, I get a time: 1969-12-31 19:00:00 And when I build with neko and run that, I get a crash...
Called from ? line 1
Called from RampNums.hx line 6
Called from RampNums.hx line 6
Called from thx/Iterators.hx line 147
Called from /usr/lib/haxe/std/neko/_std/Array.hx line 344
Called from a C function
Called from RampNums.hx line 7
Uncaught exception - Invalid operation (-)
Do you have any ideas in regards to this weirdness?
The text was updated successfully, but these errors were encountered:
I'm still trucking along in learning Haxe by doing /r/dailyprogrammer challenges. One of the minis for the week has me calculate the number of "ramp numbers" less than a given number. This program should solve it:
However, when I run the generated bin through the cpp build, I get a time:
1969-12-31 19:00:00
And when I build with neko and run that, I get a crash...Do you have any ideas in regards to this weirdness?
The text was updated successfully, but these errors were encountered: