Re: Translating from Prolog to core.logic

2012-07-28 Thread JvJ
Alright, that makes sense. I suppose that since facts are represented under the hood as relations, anyways, that this might work. Thanks. On Saturday, 28 July 2012 21:52:46 UTC-4, David Nolen wrote: > > On Sat, Jul 28, 2012 at 8:53 PM, JvJ wrote: > > I'm having trouble translating some Prolog

Re: community interest in machine learning (?)

2012-07-28 Thread Lee Spector
Thanks Cameron, I've tried again and indeed it does work now. Thanks so much, -Lee On Jul 26, 2012, at 6:52 PM, cameron wrote: > Hi Lee, >apologies for the missing dependencies, it's been a while since I worked > on the project and I had local copies of jscheme in .m2. The documentation

Re: Why is EMPTY.withMeta(meta()) used instead of just EMPTY in clojure.lang.*?

2012-07-28 Thread Timothy Baldridge
On Sat, Jul 28, 2012 at 7:47 AM, Per Mildner wrote: > Looking at the persistent types in clojure.lang.* (PersistentVector.java > et al.) I see several occurrences of the idiom EMPTY.withMeta(meta()) where > EMPTY is a constant (static final) denoting an empty collection of the > appropriate type.

Re: Translating from Prolog to core.logic

2012-07-28 Thread David Nolen
On Sat, Jul 28, 2012 at 8:53 PM, JvJ wrote: > I'm having trouble translating some Prolog code to core.logic. > > In particular, I'd like to do something like this: > >> 2 ?- assert(a(b)). >> true. >> 3 ?- assert(a(a(b))). >> true. >> 4 ?- a(X). >> X = b ; >> X = a(b). >> 5 ?- a(a(X)). >> X = b. W

Why is EMPTY.withMeta(meta()) used instead of just EMPTY in clojure.lang.*?

2012-07-28 Thread Per Mildner
Looking at the persistent types in clojure.lang.* (PersistentVector.java et al.) I see several occurrences of the idiom EMPTY.withMeta(meta()) where EMPTY is a constant (static final) denoting an empty collection of the appropriate type. What I can not understand, given that these types are al

JDBC Timezone Issue

2012-07-28 Thread Jestine Paul
Hi, I have raised a JIRA issue (JDBC-35) regarding the timezones returned from the ResultSet getter method. http://dev.clojure.org/jira/browse/JDBC-35 I have also attached a patch to this issue. http://dev.clojure.org/jira/secure/attachment/11394/resultset-timezone.diff Please review my patch a

Re: Experiences developing a crowdfunding site for open source projects in Clojure (from a Python background)

2012-07-28 Thread Samrat Man Singh
I can't access your site. Also, I wanted to ask whether you used Noir or used a lower-level option(Compojure,etc)? On Friday, July 27, 2012 1:44:46 AM UTC+5:45, Aaron Lebo wrote: > > Hello! > > Sometime around 2 and a half months ago, I started to work on a new > project using Clojure. I've bee

Re: Clojure Sticker

2012-07-28 Thread Benjamin Kircher
On Sat, Jul 28, 2012 at 2:05 PM, Rich Hickey wrote: > You can now get official Clojure stickers here: > > http://clojure.org/swag > > I'll be adding T-shirts etc soon. > > Rich > > On Jul 19, 2012, at 3:13 PM, charlie wrote: > >> Yeah any sort of vector image should work for us >> >> On Wed, Jul

Translating from Prolog to core.logic

2012-07-28 Thread JvJ
I'm having trouble translating some Prolog code to core.logic. In particular, I'd like to do something like this: 2 ?- assert(a(b)). > true. > 3 ?- assert(a(a(b))). > true. > 4 ?- a(X). > X = b ; > X = a(b). > 5 ?- a(a(X)). > X = b. However, the core.logic equivalent doesn't seem to work: user

Re: community interest in machine learning (?)

2012-07-28 Thread Ben Mabey
On 7/28/12 4:52 PM, Timothy Washington wrote: Hey Jim, Encog does look very interesting. Right now, I'm trying (and failing) to implement the sigmoid function. I'm using wikipedia's reference , and trying to use Incanter's (incanter/exp) function

Re: community interest in machine learning (?)

2012-07-28 Thread Timothy Washington
Hey Jim, Encog does look very interesting. Right now, I'm trying (and failing) to implement the sigmoid function. I'm using wikipedia's reference, and trying to use Incanter's (incanter/exp) function, but Incanter's function doesn't seem to work: use

Re: auxiliary methods like :before and :after for multimethods?

2012-07-28 Thread Chas Emerick
On Jul 28, 2012, at 4:36 PM, Vinzent wrote: > > robert.hooke works fine with multimethods: > > user=> (defmulti foo class) > nil > user=> (defmethod foo :default [x] (str x)) > # > user=> (require '[robert.hooke :refer (add-hook)]) > nil > user=> (add-hook #'foo (fn [f & [x]] (str "K: " (

Re: auxiliary methods like :before and :after for multimethods?

2012-07-28 Thread Vinzent
> robert.hooke works fine with multimethods: > > user=> (defmulti foo class) > nil > user=> (defmethod foo :default [x] (str x)) > # > user=> (require '[robert.hooke :refer (add-hook)]) > nil > user=> (add-hook #'foo (fn [f & [x]] (str "K: " (f x > (#) > user=> (foo 42) > "K: 42" >

Re: Experiences developing a crowdfunding site for open source projects in Clojure (from a Python background)

2012-07-28 Thread Takahiro Hozumi
Hi Aaron, Thank you for the interesting post. I guess we all here have quite similar experience as code size shrink. > I found myself digging around in github repos to actual read code instead of documentation a lot more than I ever did with Python. Agreed. In fact, for emacs/swank-clojure users

Re: auxiliary methods like :before and :after for multimethods?

2012-07-28 Thread Chas Emerick
On Jul 28, 2012, at 7:02 AM, Ben Smith-Mannschott wrote: > On Fri, Jul 27, 2012 at 9:06 PM, Vinzent wrote: >> robert-hooke actualy doesn't work with multimethods afaik. You can try my >> new library (https://github.com/dnaumov/hooks), but it's alpha (no docs yet, >> sorry). > > (defmulti foo* (f

Re: community interest in machine learning (?)

2012-07-28 Thread Dimitrios Jim Piliouras
If you're doing anything related with neural nets I think clojure-encog is indeed the place to start... I've wrapped most of the original java encog v3 so far and I am actively using it for my own projects...I'd be very happy to hear your feedback if you decide to use it after all...The truth is I'

Re: Transitioning an App from Java to Clojure (Notes of a Talk)

2012-07-28 Thread Timothy Washington
Very interesting. Thanks for the insight. Tim Washington Interruptsoftware.ca 416.843.9060 On Sat, Jul 28, 2012 at 6:40 AM, nicolas.o...@gmail.com < nicolas.o...@gmail.com> wrote: > > There is indeed an infinite number of functions, or relationships between > > natural numbers. I don't think

Re: Clojure Sticker

2012-07-28 Thread Rich Hickey
You can now get official Clojure stickers here: http://clojure.org/swag I'll be adding T-shirts etc soon. Rich On Jul 19, 2012, at 3:13 PM, charlie wrote: > Yeah any sort of vector image should work for us > > On Wed, Jul 18, 2012 at 7:59 PM, Alex Kurilin wrote: > +1. A temporary workaround

Re: Looking for help with a deadlock issue

2012-07-28 Thread John Szakmeister
On Fri, Jul 27, 2012 at 12:02 PM, Kyle R. Burton wrote: > I encountered a deadlock on one of our production systems (one out of > 3) last night. Looking at a thread dump of the JVM, there are several > (over 200) threads that are all waiting on a > java.util.concurrent.locks.ReentrantLock from Ke

Re: auxiliary methods like :before and :after for multimethods?

2012-07-28 Thread Ben Smith-Mannschott
On Fri, Jul 27, 2012 at 9:06 PM, Vinzent wrote: > robert-hooke actualy doesn't work with multimethods afaik. You can try my > new library (https://github.com/dnaumov/hooks), but it's alpha (no docs yet, > sorry). (defmulti foo* (fn [args] ...) ...) (defmethod foo* :x [args]...) (defmethod foo* :y

Re: Transitioning an App from Java to Clojure (Notes of a Talk)

2012-07-28 Thread nicolas.o...@gmail.com
> There is indeed an infinite number of functions, or relationships between > natural numbers. I don't think that means that that any one of those > relationships is not computable because it is within the range of infinite > functions. The countable parts of a program can still accept an infinite

Re: Problems extending sequences

2012-07-28 Thread Vinzent
nth is used by the clojure printer (see print-method). Try the following code: (do (ConsCell. 1 nil) :ok) It looks like you have to implement Sequential in order to get nth working on your datasctructure. суббота, 28 июля 2012 г., 10:33:48 UTC+6 пользователь JvJ написал: > > I'm trying to creat

Re: Extending protocol for maps

2012-07-28 Thread Vinzent
You can implement the clojure.lang.IPersistentMap interface if you want to create your own map type. суббота, 28 июля 2012 г., 8:09:05 UTC+6 пользователь JvJ написал: > > Is there a way to extend whatever protocol is used by Clojure maps (struct > maps, array maps, hash maps, etc.)? -- You rec

Re: auxiliary methods like :before and :after for multimethods?

2012-07-28 Thread Vinzent
Can you elaborate more about how the system should behave? Also, I don't think it's correct to say that "you own the target function" here, since hook applies to the whole defmulti, not to some concrete defmethod, so I don't see any difference between hooks for functions and multimethods in thi