Clojure

Add *math-context* to with-bindings so it's set!-able at REPL

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: Release 1.1
  • Component/s: None
  • Labels:
    None
  • Approval:
    Ok

Description

Add math-context</code> to <code>clojure.main/with-bindings so it's set!-able at REPL.

Activity

Hide
Assembla Importer added a comment -

scgilardi said: [file:bYiaYCznur3QWleJe5aVNr]: patches clojure.main/with-bindings to include math-context

Show
Assembla Importer added a comment - scgilardi said: [file:bYiaYCznur3QWleJe5aVNr]: patches clojure.main/with-bindings to include math-context
Hide
Assembla Importer added a comment -

richhickey said: Please mark as "ready to test" when you add a patch, thanks

Show
Assembla Importer added a comment - richhickey said: Please mark as "ready to test" when you add a patch, thanks
Hide
Assembla Importer added a comment -

richhickey said: Also please submit patches as produced by git format-patch, they retain authorship and other commit information.

See:
http://clojure.org/patches

Thanks

Show
Assembla Importer added a comment - richhickey said: Also please submit patches as produced by git format-patch, they retain authorship and other commit information. See: http://clojure.org/patches Thanks
Hide
Assembla Importer added a comment -

scgilardi said: Updated patch using git format-patch, ready to test. Thanks.

Show
Assembla Importer added a comment - scgilardi said: Updated patch using git format-patch, ready to test. Thanks.
Hide
Assembla Importer added a comment -

chouser@n01se.net said: This patch works fine with git for me – attribution and all. It does contain two commits, which threw me for a moment, but I think multi-commit patches are acceptable.

This patch looks fine to me.

Show
Assembla Importer added a comment - chouser@n01se.net said: This patch works fine with git for me – attribution and all. It does contain two commits, which threw me for a moment, but I think multi-commit patches are acceptable. This patch looks fine to me.
Hide
Assembla Importer added a comment -

importer said: (In [[r:ab7947e68a5b435f243790e197cfdb781d47986f]]) Refs #137: make math-context settable, with test + tests of with-precision

Signed-off-by: Chouser <chouser@n01se.net>

Branch: master

Show
Assembla Importer added a comment - importer said: (In [[r:ab7947e68a5b435f243790e197cfdb781d47986f]]) Refs #137: make math-context settable, with test + tests of with-precision Signed-off-by: Chouser <chouser@n01se.net> Branch: master
Hide
Assembla Importer added a comment -

importer said: (In [[r:12888faab8f5c7bc13da5a8f506c2a594c48500c]]) move with-precision tests to that section of vars.clj Fixes #137

Signed-off-by: Chouser <chouser@n01se.net>

Branch: master

Show
Assembla Importer added a comment - importer said: (In [[r:12888faab8f5c7bc13da5a8f506c2a594c48500c]]) move with-precision tests to that section of vars.clj Fixes #137 Signed-off-by: Chouser <chouser@n01se.net> Branch: master
Hide
Assembla Importer added a comment -

scgilardi said: Given Rich's post today about math-context not being part of Clojure's public API, should we add to this ticket implementation of a function like "set-precision!" (a sibling of with-precision) to make this capability usable in Clojure code?

I like math-context not being public. I hadn't thought of it before, but having it be public would be an unnecessary Java-ism--inappropriate for the Clojure-in-Clojure future.

(I'm leaving this ticket as fixed. We can either reopen it, open another ticket for set-precision!, or do nothing based on any futher discussions.)

Show
Assembla Importer added a comment - scgilardi said: Given Rich's post today about math-context not being part of Clojure's public API, should we add to this ticket implementation of a function like "set-precision!" (a sibling of with-precision) to make this capability usable in Clojure code? I like math-context not being public. I hadn't thought of it before, but having it be public would be an unnecessary Java-ism--inappropriate for the Clojure-in-Clojure future. (I'm leaving this ticket as fixed. We can either reopen it, open another ticket for set-precision!, or do nothing based on any futher discussions.)
Hide
Assembla Importer added a comment -

chouser@n01se.net said: I didn't know (or had forgotten) about with-precision.

I'd personally be happy to see a 'set-precision!' and maybe a docstring for math-context that points to 'with-precision' and 'set-precision!'.

I'd also think that should be a new ticket, since the problem described in this ticket is indeed fixed by the patch in this ticket.

Show
Assembla Importer added a comment - chouser@n01se.net said: I didn't know (or had forgotten) about with-precision. I'd personally be happy to see a 'set-precision!' and maybe a docstring for math-context that points to 'with-precision' and 'set-precision!'. I'd also think that should be a new ticket, since the problem described in this ticket is indeed fixed by the patch in this ticket.

People

  • Assignee:
    Unassigned
    Reporter:
    Anonymous
Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: