On Sun, Dec 2, 2012 at 1:42 PM, Jonas wrote:
>
>
> On Sunday, December 2, 2012 7:33:17 PM UTC+2, David Nolen wrote:
>
>> On Sat, Dec 1, 2012 at 12:24 AM, Jonas wrote:
>>
>>>
>>> * Predicates on logic vars:
>>> [(foo (? x number?)) (bar ?x)] => match (foo 42) but not (foo :bar)
>>>
>>
>> This
On Sunday, December 2, 2012 7:33:17 PM UTC+2, David Nolen wrote:
>
> On Sat, Dec 1, 2012 at 12:24 AM, Jonas >wrote:
>
>>
>> * Predicates on logic vars:
>> [(foo (? x number?)) (bar ?x)] => match (foo 42) but not (foo :bar)
>>
>
> This is now possible since we have constraints.
>
Awesome. I
On Sat, Dec 1, 2012 at 12:24 AM, Jonas wrote:
>
> * Predicates on logic vars:
> [(foo (? x number?)) (bar ?x)] => match (foo 42) but not (foo :bar)
>
This is now possible since we have constraints.
> * Segment vars:
> [(* ??x 1 ??y) (* ??x ??y)] => (* 4 3 2 1 2 3 4) would turn into (*
Hi
The function `simplify-one` in kibit.core is the “brain” behind kibit:
(defn simplify-one [expr rules]
(let [alts (logic/run* [q]
(logic/fresh [pat subst]
(logic/membero [pat subst] rules)
(logic/project [pat subst]
(logic/all (pat expr)
2012/10/11 kovas boguta
> Looks neat. Can I make a suggestion?
>
> For these cookbooks, it would be very help to know exactly which
> version of clojure (and any libraries used) were used. You can even
> just put the associated project.clj content at the top.
>
>
putting project.clj in them is co
Looks neat. Can I make a suggestion?
For these cookbooks, it would be very help to know exactly which
version of clojure (and any libraries used) were used. You can even
just put the associated project.clj content at the top.
That way one will have confidence that this is up-to-date info, and
kno
On Tuesday, October 9, 2012 10:38:20 PM UTC-4, Brian Craft wrote:
>
> I need some basic math functions, e.g. floor. I see there are some in
> contrib, but I'm unable to figure out the status of contrib. Seems like
> it's deprecated, or in transition, or something?
To help answer questions like
Probably the best way to get basic maths functions in Clojure is to
use java.lang.Math.
Cheers,
Tom
On Wed, Oct 10, 2012 at 3:38 PM, Brian Craft wrote:
> I need some basic math functions, e.g. floor. I see there are some in
> contrib, but I'm unable to figure out the status of contrib. Seems lik
The apache commons library - http://commons.apache.org/math/ is really rock
solid.
all the utilities can be found in:
http://commons.apache.org/math/apidocs/org/apache/commons/math3/util/FastMath.html
see
http://stackoverflow.com/questions/12327120/finding-all-the-power-roots-in-clojure
for a
On Tue, Oct 9, 2012 at 9:03 PM, kovas boguta wrote:
> The reality is that the function names and signatures are often
> totally different. Just switching the namespaces ain't gonna work.
> These are basically new libraries, that are thematically similar to
> the old ones.
>
>
The math library has
On Tue, Oct 9, 2012 at 9:43 PM, kovas boguta wrote:
> Actually all the examples I had in mind where from 1.2 (I migrated
> from 1.1 so it all seemed part of a piece to me)
>
I think the migration from 1.2 to 1.3 is better documented than the
migration from 1.1 to 1.2...
> So should we expect t
Alright, you got me on that one.
Actually all the examples I had in mind where from 1.2 (I migrated
from 1.1 so it all seemed part of a piece to me)
So should we expect the function and their signatures to be the same then?
On Wed, Oct 10, 2012 at 12:34 AM, Sean Corfield wrote:
> On Tue, Oct 9
On Tue, Oct 9, 2012 at 9:23 PM, kovas boguta wrote:
> The one that bit me specifically was clojure.contrib.string =>
> clojure.string . Not criticising the new design, its just a fact that
> its not backwards compatible.
>
I believe that happened in Clojure 1.2, even before monolithic contrib wa
On Tue, Oct 9, 2012 at 9:22 PM, Brian Craft wrote:
> Top hits on google. "clojure math floor", top three hits are contrib docs.
>
Thanx. I Googled that phrased and the first result was the old richhickey
repo. We should be able to get that fixed - or at least a notice added
linking to the new co
The one that bit me specifically was clojure.contrib.string =>
clojure.string . Not criticising the new design, its just a fact that
its not backwards compatible.
Anyway the point is: we should make clear that this isn't a 1-to-1 migration.
50% (or even 90%) compatibility is not the same as 100%.
On Tuesday, October 9, 2012 8:35:28 PM UTC-7, Sean Corfield wrote:
>
> What would help us is knowing what path you took in looking for
> information about the math functions that led you to old contrib... so we
> can make adjustments to what documentation is out there to make the new
> structu
On Tue, Oct 9, 2012 at 9:03 PM, kovas boguta wrote:
> Most of the time you are using the contrib for some convenience
> function. Its way easier to just copy that function into your own
> project, than to worry about tracking down the new library, and then
> checking that the function in question
Honestly the best bet for migrating from old contrib:
Find the old contrib on github, and just copy the function or 2 that you want.
Anything else is gonna be a frustrating PITA.
Its highly misleading to say that the old contrib was broken up to be
more modular.
The reality is that the function
On Tue, Oct 9, 2012 at 7:38 PM, Brian Craft wrote:
> I need some basic math functions, e.g. floor. I see there are some in
> contrib, but I'm unable to figure out the status of contrib. Seems like
> it's deprecated, or in transition, or something?
Back with Clojure 1.3, the old monolithic contr
As long as we're talking about docs lately, I would like to underscore that the
transition to modular contrib is still confusing to newcomers. Sorry to hijack
the OP's thread, but I think this needs to be dealt with. Suggestions on how to
make this more visible or negate the need for understandi
https://github.com/clojure/math.numeric-tower
[org.clojure/math.numeric-tower "0.0.1"]
On Tue, Oct 9, 2012 at 7:38 PM, Brian Craft wrote:
> I need some basic math functions, e.g. floor. I see there are some in
> contrib, but I'm unable to figure out the status of contrib. Seems like
> it's de
Standard way, definitely no. As others have pointed out, Incanter is
The Clojure Math Tool, but strongly biased towards statistics and
linear algebra, and outside those fields you'll need other tools.
Apache Commons Math (http://commons.apache.org/math/) is one of the
better self-contained Java ma
(defmacro defchunk [name tps]
`(def ~name (quote ~tps)))
(defmacro let-chunk [vname name val-vec & body]
(let [chunk-def @(resolve name)
types (map first chunk-def)
part-names (map (comp symbol (partial str vname "!") second) chunk-def)]
`(let [~vname ~val-vec
~@
On Tue, Dec 7, 2010 at 12:58 AM, Konrad Hinsen
wrote:
> On 06.12.2010, at 22:35, Ken Wesson wrote:
>
>>> I'd say what Java needs is not complex numbers as a value type, but a way
>>> to define additional value types. Complex numbers are just one
>>> applications. Another one is points (2D or 3D)
On 06.12.2010, at 22:35, Ken Wesson wrote:
>> I'd say what Java needs is not complex numbers as a value type, but a way to
>> define additional value types. Complex numbers are just one applications.
>> Another one is points (2D or 3D) for geometry and graphics.
>>
>> Unfortunately the problem
On Mon, Dec 6, 2010 at 11:45 AM, Konrad Hinsen
wrote:
> On 06.12.2010, at 16:02, Johann Hibschman wrote:
>> Maybe I'm not reading the right news, but I've not seen all that much on
>> using Java for scientific work for a while now. The NIST JavaNumerics
>> guys seem to have given up, but if I rem
On 06.12.2010, at 16:02, Johann Hibschman wrote:
> (Konrad Hinsen had started some work on multiarrays in Clojure, but I've
> not been following his progress.)
There hasn't been much, unfortunately. I haven't found much time for serious
Clojure hacking for a few months. But the project is not ab
Robert McIntyre writes:
> I'm wondering if people have had experience with java libraries of
> that sort and might have some recommendations.
>
> Anyone use clojure for scientific data analysis? What do you find
> helpful to use?
I'm still just evaluating clojure for scientific data analysis, bu
I have looked at incanter and like it very much, but these are all
things that incanter can't currently do.
--Robert McIntyre
On Mon, Dec 6, 2010 at 3:15 AM, Saul Hazledine wrote:
> On Dec 6, 12:27 am, Robert McIntyre wrote:
>> I'm trying to use clojure for scientific data analysis but I keep
>
On Dec 6, 12:27 am, Robert McIntyre wrote:
> I'm trying to use clojure for scientific data analysis but I keep
> running into lacunas of functionality.
>
> 6. symbolic manipulation as in sage
This is something that would be awesome to have in Clojure because,
unlike most non-lisps, you can compil
On Mon, Dec 6, 2010 at 2:59 AM, Benny Tsai wrote:
> Always nice to see a fellow Neal Stephenson fan!
>
> On Dec 5, 10:26 pm, Ken Wesson wrote:
>> On Mon, Dec 6, 2010 at 12:14 AM, Miki wrote:
>> > Have you looked at Incanter? (http://incanter.org/)
>>
>> Hmm, interesting. Is there a Rhetor too?
Always nice to see a fellow Neal Stephenson fan!
On Dec 5, 10:26 pm, Ken Wesson wrote:
> On Mon, Dec 6, 2010 at 12:14 AM, Miki wrote:
> > Have you looked at Incanter? (http://incanter.org/)
>
> Hmm, interesting. Is there a Rhetor too?
--
You received this message because you are subscribed to
On Mon, Dec 6, 2010 at 12:14 AM, Miki wrote:
> Have you looked at Incanter? (http://incanter.org/)
Hmm, interesting. Is there a Rhetor too?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Have you looked at Incanter? (http://incanter.org/)
On Dec 5, 3:27 pm, Robert McIntyre wrote:
> I'm trying to use clojure for scientific data analysis but I keep
> running into lacunas of functionality.
>
> I'd love to hear the community's recommendations and experiences with this:
>
> Is there a
Thanks for your input --- I'm hoping that some of this stuff is
already written with performance optimizations and the like.
I'm wondering if people have had experience with java libraries of
that sort and might have some recommendations.
Anyone use clojure for scientific data analysis? What do y
On Sun, Dec 5, 2010 at 6:27 PM, Robert McIntyre wrote:
> I'm trying to use clojure for scientific data analysis but I keep
> running into lacunas of functionality.
>
> I'd love to hear the community's recommendations and experiences with this:
>
> Is there a standard way to do things like:
> 1. ta
On Jul 10, 9:44 am, John Harrop wrote:
> On Fri, Jul 10, 2009 at 9:22 AM, Rich Hickey wrote:
> > On Jul 10, 9:01 am, Chouser wrote:
> > > On Fri, Jul 10, 2009 at 7:14 AM, John Harrop
> > wrote:
> > > > It would be useful to have a *math-context* or similar that had a
> > sensible
> > > > defa
On Fri, Jul 10, 2009 at 9:22 AM, Rich Hickey wrote:
> On Jul 10, 9:01 am, Chouser wrote:
> > On Fri, Jul 10, 2009 at 7:14 AM, John Harrop
> wrote:
> > > It would be useful to have a *math-context* or similar that had a
> sensible
> > > default and could be set with binding to affect bigdec calcu
On Jul 10, 9:01 am, Chouser wrote:
> On Fri, Jul 10, 2009 at 7:14 AM, John Harrop wrote:
> > It would be useful to have a *math-context* or similar that had a sensible
> > default and could be set with binding to affect bigdec calculations within
> > the temporal scope of said binding.
>
> user
On Fri, Jul 10, 2009 at 7:14 AM, John Harrop wrote:
> It would be useful to have a *math-context* or similar that had a sensible
> default and could be set with binding to affect bigdec calculations within
> the temporal scope of said binding.
user=> (binding [*math-context* (java.math.MathContex
On Jan 3, 2:48 pm, "Mark Engelberg" wrote:
> I've noticed that Clojure is missing several math functions that come
> standard with most programming languages, especially other
> Schemes/Lisps. Many of these functions are available in java's math
> library, but only for doubles.
Nice work, Mark.
On Jan 3, 7:46 pm, vogelrn wrote:
> sqrt(a/b) should always be equal to sqrt(a)/sqrt(b) since (a/b)^m =
> a^m/b^m for b != 0. However, I'm unsure of whether it's the best
> option for ratios because unless both the numerator and the
> denominator are perfect squares, you're going to end up with
sqrt(a/b) should always be equal to sqrt(a)/sqrt(b) since (a/b)^m =
a^m/b^m for b != 0. However, I'm unsure of whether it's the best
option for ratios because unless both the numerator and the
denominator are perfect squares, you're going to end up with a float
anyway. This is trading an extra s
On Sat, Jan 3, 2009 at 7:06 PM, Mark H. wrote:
> Would you
> find a sqrt that returns complex numbers for negative inputs (it would
> be the appropriate branch of the sqrt function in order to make it
> single-valued) useful?
Ideally I'd also like that, but since complex numbers aren't part of
On Jan 3, 11:48 am, "Mark Engelberg" wrote:
> If you give it an exact number (i.e., not a floating point),
Floating-point numbers are exact -- it's their operations that may not
be. *ducks*
Seriously, handy code -- many thanks! I should check with someone
whether sqrt(a/b) -> sqrt(a)/sqrt(b)
On 8 déc, 23:13, "Michael Reid" <[EMAIL PROTECTED]> wrote:
> Then I of course write the implementations for various different
> types. Then, because the multi-method names don't look nice, I wrote a
> macro which transformed the regular operators into calls on the
> multi-methods, i.e.:
>
> (macr
I've been toying with something similar. The approach I took was to
define multi-methods for the various operators:
(defmulti add class)
(defmulti sub class)
(defmulti mul class)
(defmulti div class)
...
Then I of course write the implementations for various different
types. Then, because the m
On 8 déc, 17:14, Mark Fredrickson <[EMAIL PROTECTED]>
wrote:
> >> Alternatively, could I provide a "multi-
> >> math" lib to redefine the core math functions?
>
> > Type classes would be king.
>
> Do you mean this in the Haskell sense?
Yes : http://www.haskell.org/tutorial/classes.html
Haskell ma
>
>> Alternatively, could I provide a "multi-
>> math" lib to redefine the core math functions?
>
> Type classes would be king.
Do you mean this in the Haskell sense? (I'm not too familiar with
those) Or something more like Java's types? I was thinking about how
to solve this problem more gen
On 6 déc, 05:09, Mark Fredrickson <[EMAIL PROTECTED]>
wrote:
> Alternatively, could I provide a "multi-
> math" lib to redefine the core math functions?
Type classes would be king.
But at least you can use your definition :
(ns test.test
(:refer-clojure :exclude [+ -]))
(defn +
[a b]
33
50 matches
Mail list logo