After much tinkering I am announcing a new monads implementation:
https://github.com/bwo/monads
Rather than using protocols or symbol macros as (I believe) all hitherto
existing monad libraries for Clojure have, this implementation has the
elements of a monadic computation build up a structure wh
I'm actually very interested in getting involved with core.logic, but I'm
having a hard time finding a comprehensive guide to the implementation of
the systems. I've gathered some bits and pieces about how goals work, but
I'm not sure I totally understand the system. Do you know any good place
Cool... I wrote a similar little disassembler for ClojureCLR a few weeks
ago:
https://github.com/aaronc/ClojureClrEx/blob/master/src/clojure/clr/ildasm.clj
It uses Mono.Reflection to interpret the byte codes.
On Saturday, March 30, 2013 9:06:25 AM UTC-4, Gary Trakhman wrote:
>
> I made a littl
Sounds interesting. I've seen nothing like this in the Prolog literature,
but I may not have looked hard enough. Probably worth investigating, might
turn up some other interesting ideas even if you can't make
assertion/retraction relational.
On Thu, Apr 4, 2013 at 9:21 PM, JvJ wrote:
> I've bee
I've been working a lot with core.logic and pldb (
https://github.com/threatgrid/pldb), and I've been troubled by the lack of
an assertion operation that would allow addition of facts to a database as
a relational operation. I've been thinking that this could be solved by
creating some kind of
You there are plug mappings for all the repl actions:
clj_repl_enter. -- key for enter press
clj_repl_eval. -- key to for evaluation in the middle of the repl
(i.e. not at the end of the form)
clj_repl_hat. -- equivalent to ^
clj_repl_Ins. -- equivalent to I
clj_repl_uphist. -- history up
clj_rep
I strongly recommend lein-pedantic to help with problems like this. On
large enough projects you can very easily get non-reproducible executions
depending on how lein resolves conflicting dependencies.
https://github.com/xeqi/lein-pedantic
On Thursday, April 4, 2013 7:32:04 PM UTC-4, puzzler
Thanks everyone!
--
--
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
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group
The latest version of seesaw is 1.4.3. Unfortunately there is a bug in
clojars with scp uploads that does not update the search index, so it is
showing an older version on the search page.
If you want seesaw 1.4.2 you can use [seesaw "1.4.2" :exclusions
[org.clojure/clojure]].
If you are using
The latest Seesaw version on Clojars is 1.4.3. It addresses the Clojure
dependency issue.
Cheers,
Dave
On Thu, Apr 4, 2013 at 4:40 PM, Jim - FooBar(); wrote:
> [ghostandthemachine/seesaw "1.4.3-SNAPSHOT" :exclusions [
> org.clojure/clojure]]
>
> Jim
>
> ps: maybe the actual coordinate for cloj
[ghostandthemachine/seesaw"1.4.3-SNAPSHOT":exclusions[org.clojure/clojure]]
Jim
ps: maybe the actual coordinate for clojure is wrong but I can
On 05/04/13 00:32, Mark Engelberg wrote:
Right now, I'm experimenting with seesaw. In Clojars, it appears the
latest version is 1.4.2.
When I inclu
Right now, I'm experimenting with seesaw. In Clojars, it appears the
latest version is 1.4.2.
When I include [seesaw "1.4.2"] in my project.clj file, then the REPL comes
up as 1.3.0 (even though I explicitly define clojure 1.5.1 as a dependency
in the project.clj file). How do I make my preferre
Very nice work,
Thank you
On Wednesday, April 3, 2013 11:08:30 PM UTC+3, dgrnbrg wrote:
>
> Although I've announced vim-redl in the past, now you can reap the
> benefits of all of its features without leaving fireplace behind! Just go
> to https://github.com/dgrnbrg/vim-redl for installation i
Thumbs up on the comparators doc!
On Apr 4, 2013 12:49 PM, "Andy Fingerhut" wrote:
> I am seriously considering the idea of working on some "extended doc
> strings" for Clojure functions. Having only scratched the surface so far,
> I have learned that it could take a *lot* of hours to write such
Isn't the dot just like Clojure's *comp*? As Allan correctly points out,
the thrushes are macros that combine the given forms in a specified way,
which only under certain constraints has the effect of composing function
applications, whereas *comp* is truly a function composition operator.
On T
I am seriously considering the idea of working on some "extended doc
strings" for Clojure functions. Having only scratched the surface so far,
I have learned that it could take a *lot* of hours to write such
documentation for every function distributed as part of Clojure, at least
if written in th
On Thu, Apr 4, 2013 at 8:44 AM, Tassilo Horn wrote:
>
> However, the what's bad with the juxt approach above is that the
> collection is iterated twice. If somebody comes up with a version that
> returns a vector of two lazy seqs and which iterates the input
> collection only once, she'd get
Yes it is indeed cool but it suffers from the same problem as the juxt
version (as Tassillo mentioned)...they are both very elegant and
succinct but unfortunately slow for large sequences. The group-by
version and the doseq version are way faster...also, there is a
reducer-based filter if you w
On Thursday, April 4, 2013 12:13:13 PM UTC-4, Jim foo.bar wrote:
> there is a separate fn in contrib and does exactly what you want
> (assuming you don't care about the 2 passes):
>
> (defn separate
> "Returns a vector:
>[ (filter f s), (filter (complement f) s) ]"
> [f s]
> [(filter f
So I got it working and it's pretty cool. But is there any options to remap
default keys (for example I'm using "-_" instead of "$^")?
Thanks
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegrou
there is a separate fn in contrib and does exactly what you want
(assuming you don't care about the 2 passes):
(defn separate
"Returns a vector:
[ (filter f s), (filter (complement f) s) ]"
[f s]
[(filter f s) (filter (complement f) s)])
If you do care about the 2 passes you can always fall b
Christian Romney writes:
Hey Christian,
> (defn segregate
> "Takes a predicate, p, and a collection, coll, and separates the items in
> coll
>into matching and non-matching subsets. Like Scheme or Ruby's partition."
> [p coll]
> (loop [s coll y [] n []]
> (if (empty? s) [y n]
>
There is currently no simple way to make a substring goal beyond
manipulating strings as sequences which is not ideal. The constraint
framework does make it possible, but that API is under change so you can't
build things upon it reliably yet.
So project is your best option for now.
On Thu, Apr
Thanks, this got me quite far.
But I'd like to create goals with string, for example currently I have no
idea, how would I write a substring goal.
Thanks for any suggestion!
Adam
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this
if you come from the haskell world, it is like . piplining - but in reverse
order
I needed some time to get used to it but I really like -> ->> as-> ... to
structure my code.
It helps to see the sequence of functions that operate on your data
On Wed, Apr 3, 2013 at 11:05 PM, Alan Malloy wrote:
On Thu, Apr 4, 2013 at 8:06 AM, David Powell wrote:
> You could use the long-form of map destructuring:
>
> (let [{odd true even false} (group-by odd? (range 1 10))]
> (println odd)
> (println even))
I do this frequently. Do be careful that if your "predicate" doesn't
return actual booleans,
str is a function not a goal/relation - it doesn't know how to deal with
logic vars. If you want that to work you will need to project result first.
But if you project result then order matters and the unification of query
must come after the membero call.
On Thu, Apr 4, 2013 at 9:25 AM, Adam Sal
Hi, I am trying to write myself something to generate some test data, and I
thought
clojure.core logic fits the bill ... unfortunately, for some reason, it
doesn't work.
In my project.clj:
[org.clojure/clojure "1.5.0"]
[org.clojure/core.logic "0.8.3"]
in my namespace:
(ns tests.search
(:req
> I thought about map destructuring but I don't think it works with boolean
> keys. I think this is good enough though:
>
You could use the long-form of map destructuring:
(let [{odd true even false} (group-by odd? (range 1 10))]
(println odd)
(println even))
--
Dave
--
--
You received t
On Thursday, April 4, 2013 8:25:32 AM UTC-4, Jonathan Fischer Friberg wrote:
> I think group-by can do what you want (and more);
>
Hi Jonathan,
Thanks for the reply. I had looked at group-by, and hastily dismissed it
due to lack of imagination. This would work, though it isn't as "pretty".
(le
- :injections [(require '[redl core complete])]
- :dependencies [[redl "0.1.0"]]
Did you see those 2 lines in the installation instructions in the readme?
You need to include them both in your profiles.clj. I've updated the readme
to now also include a sample profiles.clj.
Thanks!
On Apr 4, 2013 6:54 AM, "Jim - FooBar();" wrote:
>
> Thanks John,
>
> I came up with this, which uses destructuring quite heavily and might
slow things down...
>
> (reduce (fn [s [t1 t2 w3 v]] (assoc-in s [t1 t2 w3] (/ (count v) all))) {}
> (for [[k1 v1] ems [k2 v2] v1 [k3 v3] v2] [k1 k2 k3 v3]))
I think group-by can do what you want (and more);
http://clojuredocs.org/clojure_core/clojure.core/group-by
Jonathan
On Thu, Apr 4, 2013 at 2:16 PM, Christian Romney wrote:
> Hi all,
>
> I was wondering if something in core (or new contrib) like this exists
> already...
>
> (defn segregate
>
Hi all,
I was wondering if something in core (or new contrib) like this exists
already...
(defn segregate
"Takes a predicate, p, and a collection, coll, and separates the items in
coll
into matching and non-matching subsets. Like Scheme or Ruby's partition."
[p coll]
(loop [s coll y
Thanks John,
I came up with this, which uses destructuring quite heavily and might
slow things down...
(reduce (fn [s [t1 t2 w3 v]] (assoc-in s [t1 t2 w3] (/ (count v) all))) {}
(for [[k1 v1] ems [k2 v2] v1 [k3 v3] v2] [k1 k2 k3 v3]))
is this what you meant?
Jim
On 03/04/13 19:54, John D.
Awesome! Thank you!
Can you add example profiles.clj to readme? Because I can understand how to
configure Clojure component.
On Wednesday, April 3, 2013 11:08:30 PM UTC+3, David Greenberg wrote:
>
> Although I've announced vim-redl in the past, now you can reap the
> benefits of all of its feat
36 matches
Mail list logo