-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Truffle] BigDecimal more features #3012
Conversation
throw new RuntimeException(); | ||
} | ||
} else { | ||
// precision based on https://github.com/pitr-ch/jruby/blob/bigdecimal/core/src/main/java/org/jruby/ext/bigdecimal/RubyBigDecimal.java#L892-903 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure think this kind of comment is a good idea - the link and line numbers will bit-rot very quickly.
Could you maybe format as:
// Precision based on RubyBigDecimal#op_quo19_20 - see copyright and authorship there
042ada0
to
348a526
Compare
puts ' --server run an instrumentation server on port 8080' | ||
puts ' --igv make sure IGV is running and dump Graal graphs after partial escape (implies --graal)' | ||
puts ' --[j]debug run a JDWP debug server on 8000' | ||
puts ' --jexception[s] print java exceptions' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the optional plural? I'm all for making JT as convenient as possible, but if this is a new argument can't we just pick one and go with it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seemed to me that none of those (singular or plural) is a clear choice so I've added both. I can certainly use just one, which one would you choose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exceptions, as it prints more than one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, e.g. in tests it can print many.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future it'd probably be best to keep unrelated changes out as separate PRs. I had been looking for the proposed JT changes and never would have thought to look at a BigDecimal pull request for them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I like the options here. The alternative is to raise a hard error on bad options. I constantly supply --debug
instead of --jdebug
and don't realize I've messed up until the script has finished running. I'd hate to pick the wrong --jexception
form and think there were no exceptions, when in reality my bad option was just ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But --debug
is a valid Ruby option so it is conflicting!
ruby --debug -e 'p $DEBUG' => true
I like jdebug because it's clear it's for a debugger at the Java level, not the Ruby level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah you are right, I'll remove the alias.
No description provided.