Superset goal in clojure.core.logic?

2013-04-07 Thread Adam Saleh
Hi, I am having trouble creating superset goal. I managed to create a subset goal: (defn subseto [smaller larger] (fresh [e] (appendo smaller e larger))) (run 3 [s l] (membero :a s) (membero :b s) (membero :a l) (membero :c l) (subseto s l)

Re: Superset goal in clojure.core.logic?

2013-04-07 Thread Adam Saleh
This seemed to do the trick :) (defne superseto "A relation where x, y are proper collections, such that y is superset x" [x y] ([() y]) ([[a . d] y] (membero a y) (superseto d y))) I modified appendo ... will try to create subseto goal in similar fashion so that I see where

Where is clojure.inspector namespace

2013-04-07 Thread Josh Kamau
I keep getting this : ClassNotFoundException clojure.inspector java.net.URLClassLoader$1.run (URLClassLoader.java:366) when i try to do this : (clojure.inspector/inspect (range 10)) Do i need to require/use or add any dependency ? -- -- You received this message because you are subscribed to

Re: Superset goal in clojure.core.logic?

2013-04-07 Thread Adam Saleh
I forgot to run it with multiple goals, it seems it behaves the same :-/ -- -- 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 patie

Re: Where is clojure.inspector namespace

2013-04-07 Thread David Powell
On Sun, Apr 7, 2013 at 10:36 AM, Josh Kamau wrote: > > I keep getting this : > ClassNotFoundException clojure.inspector java.net.URLClassLoader$1.run > (URLClassLoader.java:366) > > when i try to do this : > (clojure.inspector/inspect (range 10)) > > Do i need to require/use or add any dependen

Re: Where is clojure.inspector namespace

2013-04-07 Thread Michael Klishin
2013/4/7 Josh Kamau > Do i need to require/use or add any dependency ? Namespaces besides clojure.core need to be required. REPLs such as REPLy may require a few additional ones for you, sometimes. http://clojure-doc.org/articles/language/namespaces.html -- MK http://github.com/michaelklishi

Re: Where is clojure.inspector namespace

2013-04-07 Thread Josh Kamau
Thanks Michael and David. You mean even if i use a fully qualified namespace such as (clojure.inspector/inspect ) , i will still need to have 'required' the namespace? ... In java, if i use the fully qualified class name (e.g java.util.Date), i dont have to import it. Regards Josh On Sun,

Re: Where is clojure.inspector namespace

2013-04-07 Thread Michael Klishin
2013/4/7 Josh Kamau > You mean even if i use a fully qualified namespace such as > (clojure.inspector/inspect ) , i will still need to have 'required' the > namespace? ... In java, if i use the fully qualified class name (e.g > java.util.Date), i dont have to import it. Yes. In Java you

Re: Where is clojure.inspector namespace

2013-04-07 Thread Josh Kamau
Thanks very much Michael... Now i finally get it ;) Josh On Sun, Apr 7, 2013 at 1:55 PM, Michael Klishin wrote: > > 2013/4/7 Josh Kamau > >> You mean even if i use a fully qualified namespace such as >> (clojure.inspector/inspect ) , i will still need to have 'required' the >> namespace?

Re: Superset goal in clojure.core.logic?

2013-04-07 Thread David Nolen
I don't have much advice beyond looking at how people do this in Prolog. We're starting to look into CLP(Set) which will provide much better support for working with sets and doesn't rely on list encodings. On Sun, Apr 7, 2013 at 5:24 AM, Adam Saleh wrote: > Hi, > > I am having trouble creating

[ANN] dependency graph library 0.1.0

2013-04-07 Thread Stuart Sierra
https://github.com/stuartsierra/dependency In Leiningen: [com.stuartsierra/dependency "0.1.0"] Some of you may have seen the dependency graph structure I used in tools.namespace . This library contains that same structure, available for applicatio

[ann] data.json 0.2.2

2013-04-07 Thread Stuart Sierra
https://github.com/clojure/data.json In Leiningen: [org.clojure/data.json "0.2.2"] This is a bug fix release which resolves DJSON-7and DJSON-8 . -- -- You received this message because you are subscrib

Re: Opinion on testing strategies?

2013-04-07 Thread Jonah Benton
The feedback that comes immediately to mind: * it sounds like property #3 complects black box vs white box and specification vs implementation concerns * it sounds like the feature functions potentially combine the state and calculation layers in ways that should be internally reused, but also are

how to create dependncies for mysql in clojure

2013-04-07 Thread jayvandal . js
I want to access mysql. it is in c:\program files as mysql what is the rule to create a dependicy statement " [mysql/mysql-connector-java "5.1.23"]]". I have two books "Practical Clojure" "Programming Clojure" No answer in the books that I find -- -- You received this message because you ar

Re: how to create dependncies for mysql in clojure

2013-04-07 Thread George Oliver
On Sunday, April 7, 2013 4:03:46 PM UTC-7, jayvan...@gmail.com wrote: > > I want to access mysql. it is in c:\program files as mysql > what is the rule to create a dependicy statement " > [mysql/mysql-connector-java "5.1.23"]]". > I have two books "Practical Clojure" > "Programming Clojure"

[ANN] java.jdbc 0.3.0-alpha1

2013-04-07 Thread Sean Corfield
TL;DR: Major API overhaul to make it more idiomatic; old API deprecated High-level changes described here: http://corfield.org/blog/post.cfm/clojure-java-jdbc-0-3-0-alpha-1 The README says: Release 0.3.0-alpha1 on 2013-04-07 MAJOR API OVERHAUL! Most of the old 0.2.x API has been deprecated and

Re: how to create dependncies for mysql in clojure

2013-04-07 Thread Sean Corfield
lein new mysql-test Edit mysql-test/project.clj to add: [mysql/mysql-connector-java "5.1.23"] to the list of :dependencies You'll probably also want to add clojure.java.jdbc or another database library. For c.j.jdbc, add this dependency: [org.clojure/java.jdbc "0.3.0-alpha1"] Your project.clj sh

[ANN] vectorz-clj 0.8.0

2013-04-07 Thread Mikera
Pleased to announce a new release of vectorz-clj, a fast and idiomatic matrix/vector maths library for Clojure. https://github.com/mikera/vectorz-clj Key developments: - Update to core.matrix 0.5.0 for the latest core.matrix features - Improved operator support: ability to combine operators, ta

Re: Function recurring regardless of condition

2013-04-07 Thread Michał Marczyk
Incidentally, this thread made me feel a sudden desire to write my own bf interpreter. Feel free to take a look at https://github.com/michalmarczyk/bf.clj if you'd like. :-) Cheers, Michał On 7 April 2013 05:23, Sean Corfield wrote: > I agree. I see nothing that sets the code pointer back to

Re: Function recurring regardless of condition

2013-04-07 Thread Timothy Baldridge
And feel free to steal ideas from my Clojure BF->Native compiler. https://github.com/halgari/mjolnir/blob/master/src/examples/bf.clj Mjolnir Expressions are a bit different than Clojure, but it shouldn't be to hard to write a BF Clojure compiler using this as a starting place. Notice how the entir

Re: Function recurring regardless of condition

2013-04-07 Thread Andrew Spano
Awesome! I've been re-factoring my code but I am having difficulty figuring out how to deal with state without manipulating global state; my first thought was to create a binding form within a doseq in a function that executed each instruction and mutated the cells when necessary--but that did

Why don't absolute classpaths work when starting clojure repl?

2013-04-07 Thread John Wang
A problem has traped me for quite a while when I'm exploring Clojure. I try to generate a class by invoking the compile function in REPL on a Clojure script as below: (ns mylib.DirLister (:gen-class)) (defn -listDir [this path] (->> path java.io.File. .listFiles (map #(.getName