<< Back to previous view

[MCOMB-3] Please add project.clj Created: 23/Jun/13  Updated: 23/Jun/13

Status: Open
Project: math.combinatorics
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: David James Assignee: Mark Engelberg
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Is there a reason for not having a `project.clj` in the project?

I'd like to fork, run `lein test` and `lein repl`.



 Comments   
Comment by David James [ 23/Jun/13 5:53 PM ]

I added leiningen support to my fork:
https://github.com/xpe/math.combinatorics





[MCOMB-6] Support ClojureScript by converting from CLJ to CLJC Created: 18/Mar/16  Updated: 18/Mar/16

Status: Open
Project: math.combinatorics
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Minor
Reporter: Eric Lavigne Assignee: Mark Engelberg
Resolution: Unresolved Votes: 0
Labels: None

Attachments: Text File combinatorics-cljc.patch    
Patch: Code

 Description   

Patch attached with two changes:
1) Rename main source file to change extension from .clj to .cljc.
2) Add Clojure 1.7 dependency to pom.xml.

Ran "mvn clojure:test" and confirmed that old tests still pass.

Did not test in ClojureScript environment.

Main downside is increasing the minimum Clojure version from 1.2 to 1.7 for CLJC support. Alex Miller also indicated that the Clojure CI system was not ready for CLJC files yet, but that it would be nice to have the ticket and patch ready.

See previous clojure-dev discussion: https://groups.google.com/forum/#!topic/clojure-dev/PDyOklDEv7Y






[MCOMB-7] Fix reflection errors Created: 03/May/16  Updated: 03/May/16

Status: Open
Project: math.combinatorics
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Minor
Reporter: Ambrose Bonnaire-Sergeant Assignee: Mark Engelberg
Resolution: Unresolved Votes: 0
Labels: None

Attachments: Text File fix-reflection.patch    

 Description   

I get several reflection errors compiling math.combinatorics 0.1.1 on Clojure 1.8.

They were quite confusing to fix, but refactoring loops into multi-arity functions consistently fixed these errors.



 Comments   
Comment by Ambrose Bonnaire-Sergeant [ 03/May/16 12:43 PM ]

Patch fixes reflection errors in Clojure 1.8.

Comment by Mark Engelberg [ 03/May/16 2:48 PM ]

These loop auto-boxing warnings are because integer literals are now read in as primitive longs (since 1.6?), but these loops want boxed longs.

The simplest fix, I think, would be to replace the literals in the loop args with boxed longs. So, for example, 1 becomes (Long. 1). I believe that this is what the compiler does automatically when it sees that recur isn't passing in a primitive long (thus the warning that it is auto-boxing the loop arg), so I don't think it would have any impact on performance (this isn't actually a warning that it needs to do reflection at runtime), but it would make the warning disappear.

Breaking the loop out into a separate function strikes me as a heavy-handed solution (it makes the warning disappear because Clojure boxes numbers on function calls unless otherwise annotated, but there's really no need to break it into a separate function).

Comment by Ambrose Bonnaire-Sergeant [ 03/May/16 3:26 PM ]

Ah. My understanding here is limited. Would you like me to work on another patch with those suggestions?





Generated at Tue May 03 17:13:36 CDT 2016 using JIRA 4.4#649-r158309.