Skip to content
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

Closed
wants to merge 0 commits into from
Closed

Conversation

pitr-ch
Copy link
Member

@pitr-ch pitr-ch commented Jun 2, 2015

No description provided.

@pitr-ch pitr-ch added the truffle label Jun 2, 2015
@pitr-ch pitr-ch self-assigned this Jun 2, 2015
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
Copy link
Contributor

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

@chrisseaton chrisseaton added this to the truffle-dev milestone Jun 2, 2015
@pitr-ch pitr-ch force-pushed the master branch 6 times, most recently from 042ada0 to 348a526 Compare June 4, 2015 10:16
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'
Copy link
Contributor

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?

Copy link
Member Author

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?

Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Member

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.

Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants