Re: Need some Advice for my Prolog Project

2013-05-15 Thread Paul L. Snyder
On Wed, 15 May 2013, Charles Hoskinson wrote: > I'm starting an open sourced project to port Prolog to the JVM like you > guys did with LISP and I'd like to get some advice on where to start, > materials to review, pitfalls to avoid, and anything else you feel would be > useful to know. Could y

Re: Utility libraries and dependency hygiene

2013-05-15 Thread Devin Walters
I must admit that I haven't read every response in this thread but my gut feeling is that a lot of the "I just need a couple of functions" situations would be mitigated by making non-core devs feel more welcome to suggesting and contributing modular contrib ideas. I hate to bring up process beca

who's not using leiningen?

2013-05-15 Thread Dave Sann
If you are not using Leiningen, what do you use? why do you prefer it? D -- -- 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 pat

Re: Utility libraries and dependency hygiene

2013-05-15 Thread Stuart Sierra
On Thu, May 16, 2013 at 8:51 AM, Laurent PETIT wrote: > How is the advice of each library re-creating for itself little > utility functions, again and again, going to address the specific > concern of "made it hard to read code written by anyone else" ? > If the functions are in the same file or

Re: Utility libraries and dependency hygiene

2013-05-15 Thread Laurent PETIT
Hello, 2013/5/16 Stuart Sierra : > > On Wed, May 15, 2013 at 11:35 PM, Michael Fogus wrote: >> >> Are Common Lispers actively suffering under this problem? > > > I certainly suffered from it back when I used Common Lisp. Every library was > written in its own dialect of CL based on a different se

Re: idiomatic terminating infinite loops

2013-05-15 Thread Stuart Sierra
Colin Yates wrote: > I have a scheduler which creates a future that basically > does a (while true (let [next-job (.take queue)]...)), > where queue is a LinkedBlockingQueue. The problem is that > once it is running, because futures aren't daemon threads > it hangs lein. Instead of .take, you can

Re: Utility libraries and dependency hygiene

2013-05-15 Thread Brian Marick
On May 15, 2013, at 8:28 AM, Dave Kincaid wrote: > One that I encountered last week was Midje. In trying to work through all of > its dependencies I discovered that Pomegranate is also dependent on Maven, > but I think I was able to work around that by adding 4 or 5 Maven libraries > into our

Re: Utility libraries and dependency hygiene

2013-05-15 Thread Stuart Sierra
I did not intend to say that libraries should never have any dependencies at all. (Perhaps "zero" was too strong in my original post.) I only ask that libraries try to avoid any **unnecessary** dependencies. Many "utility" libraries fall into this category, especially if you only depend on them fo

Re: confused on set!

2013-05-15 Thread AtKaaZ
I think the answer is in RT 's doInit Var.pushThreadBindings( RT.mapUniqueKeys(CURRENT_NS, CURRENT_NS.deref(), WARN_ON_REFLECTION, WARN_ON_REFLECTION.deref() ,RT.UNCHECKED_MATH, RT.UNCHECKED_MATH.deref())); it basically does a (binding [*warn-on-r

Re: Utility libraries and dependency hygiene

2013-05-15 Thread Stuart Sierra
On Wed, May 15, 2013 at 11:35 PM, Michael Fogus wrote: > Are Common Lispers actively suffering under this problem? I certainly suffered from it back when I used Common Lisp. Every library was written in its own dialect of CL based on a different set of these "utilities." It made it hard to read

Re: idiomatic terminating infinite loops

2013-05-15 Thread Gary Trakhman
A couple of approaches: 1. Stop using compojure's 'defroutes'. Generate routes via 'routes' that close over your service. Try not to do anything that would make this expensive. 2. Pass it along on a request map via some middleware. The relevant principle: lifecycle of your component and usage sh

Re: Need some Advice for my Prolog Project

2013-05-15 Thread myriam abramson
Good idea! But I would build it on top of Clojure. Maybe something like Norvig did in his "Paradigms" book. Of course, it depends on how ambitious you want to be. On Wed, May 15, 2013 at 12:17 PM, Charles Hoskinson < charles.hoskin...@gmail.com> wrote: > I'm starting an open sourced project to p

Re: Need some Advice for my Prolog Project

2013-05-15 Thread Gary Trakhman
I'm just wildly speculating about things I know nothing about, but it might be helpful if you narrow down your design-space. Core.logic does some of the same stuff as prolog, I wonder if you could just parse to it, or if you need something more direct. At any rate, looking at that and clojure's c

Re: confused on set!

2013-05-15 Thread Jim - FooBar();
On 15/05/13 17:28, Jim - FooBar(); wrote: On 15/05/13 17:23, Phillip Lord wrote: I cannot do (set!*my-test* true) (alter-var-root #'*my-test* (constantly true)) Jim here explains what you're asking: http://clojure.org/Vars scroll down to until you see (*set!*var-symbol expr) HT

Re: confused on set!

2013-05-15 Thread Jim - FooBar();
On 15/05/13 17:23, Phillip Lord wrote: I cannot do (set!*my-test* true) (alter-var-root #'*my-test* (constantly true)) Jim -- -- 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 tha

confused on set!

2013-05-15 Thread Phillip Lord
I'm still a bit confused on the use of set! I would like to define a configuration variable that is easy to change, but which is not critical to my infrastructure; it's will set some default behaviours. Now, I can do things like (binding [*warn-on-reflection* true] (do-some-function)) an

Need some Advice for my Prolog Project

2013-05-15 Thread Charles Hoskinson
I'm starting an open sourced project to port Prolog to the JVM like you guys did with LISP and I'd like to get some advice on where to start, materials to review, pitfalls to avoid, and anything else you feel would be useful to know. Could you either post here or contact me at charles.hoskin...

Re: Utility libraries and dependency hygiene

2013-05-15 Thread Phil Hagelberg
Timothy Baldridge writes: > Neither of these snarky answers solve the problem. I just spent an entire > week updating modules from version of a library that expected a seq of maps > to one that expected map of seqs of maps. The very nature of data implies > a format. If that format changes you h

Re: Utility libraries and dependency hygiene

2013-05-15 Thread fmjrey
I think this discussion would greatly benefit from some hammock development time ;) The original post was quite precise in its scope, but we quickly side-stepped into related issues, so it feels like we have lost some focus. On the other hand I think many of us get the feeling we can't provide s

Re: Utility libraries and dependency hygiene

2013-05-15 Thread Michael Fogus
> take this opportunity to ask everyone to help us avoid the dependency > mess that Common Lisp has gotten into, where there are over a dozen > such "convenience" libraries[1]. Are Common Lispers actively suffering under this problem? With the emergence of QuickLisp, CL dependency problems seem t

Re: unusual question: how do you get morale?(or moral support)

2013-05-15 Thread Allen Johnson
I've recently been wondering about this. I'd say that I'm coming out of a burnout period that I've been in for at least the last few months. Also, reading things like hacker news gives me this feeling that I'm not doing enough with my time -- which adds to the weight that I already feel on my shoul

Re: Utility libraries and dependency hygiene

2013-05-15 Thread Dave Kincaid
One that I encountered last week was Midje. In trying to work through all of its dependencies I discovered that Pomegranate is also dependent on Maven, but I think I was able to work around that by adding 4 or 5 Maven libraries into our repository as dependencies (not ideal, but it looked like

Re: Utility libraries and dependency hygiene

2013-05-15 Thread Daniel
That seems orthogonal to the problem the loader is trying to solve. -- -- 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 w

Re: Not using dependency injection - how do I share services around?

2013-05-15 Thread Colin Yates
Nice videos - thanks for the heads up. On Saturday, 11 May 2013 11:40:04 UTC+1, abp wrote: > > Well, you could also watch Stuart Sierras talks on structuring functional > programs: > > Clojure in the Large > http://vimeo.com/46163090 > > Thinking in Data & Functional Design Patterns > http://www.

Re: Utility libraries and dependency hygiene

2013-05-15 Thread Laurent PETIT
2013/5/15 Dave Kincaid : > As long as we remember that not everyone is using Leiningen and/or Maven. > There are other build and dependency systems out there, so any change to > dependency management tooling will have to cover all of them. > > There are already popular libraries that don't work out

Re: xslt extension functions in clojure

2013-05-15 Thread Jim
On 15/05/13 13:08, Gregg Reynolds wrote: The errors I get involve finding the class. But calling the functions from clojure works just fine. It's not a classpath problem because the same thing happens using command line processing with explicit classpath (see the test.sh files in the repo).

Re: Not using dependency injection - how do I share services around?

2013-05-15 Thread Colin Yates
Thanks Jason, I will take a look. On Sunday, 12 May 2013 01:27:11 UTC+1, Jason Wolfe wrote: > > Hi Colin, > > This is one of the reasons we created graph: > > https://github.com/prismatic/plumbing > > which is a general declarative mechanism for describing complex function > compositions. There'

Re: xslt extension functions in clojure

2013-05-15 Thread John D. Hume
In the xalan.ext :gen-class the static methods are named "foo" and "bar" but your xslt template is using the (prefixed) names of the clojure impl fns. Did you try just "foo" and "bar" instead? To be sure the class and methods are available in your test, rather than calling the clojure fns, call th

idiomatic terminating infinite loops

2013-05-15 Thread Colin Yates
Hi all, I have a scheduler which creates a future that basically does a (while true (let [next-job (.take queue)]...)), where queue is a LinkedBlockingQueue. The problem is that once it is running, because futures aren't daemon threads it hangs lein. It will ultimately run inside a compojure

Re: Utility libraries and dependency hygiene

2013-05-15 Thread Dave Kincaid
As long as we remember that not everyone is using Leiningen and/or Maven. There are other build and dependency systems out there, so any change to dependency management tooling will have to cover all of them. There are already popular libraries that don't work outside of Leiningen, but that's

xslt extension functions in clojure

2013-05-15 Thread Gregg Reynolds
Hi, I'm having trouble getting clojure functions to work as xslt extensions. The code is very simple; you can find it at https://github.com/greynolds/xslj. The problem is obviously related to how clojure functions get called from java. I have some idea of how that works but can't figure out how

ANN: Imagez 0.0.1

2013-05-15 Thread Mikera
Hi all, I created a small utility library for handling images in Clojure. https://github.com/mikera/imagez Features so far: - Creating new images - Scaling / zooming images - Loading images from resource files - Getting and setting pixels in bulk (fast - using primitive arrays) - Various colour

Re: Utility libraries and dependency hygiene

2013-05-15 Thread Glen Mailer
At the risk of making a slight strawman here, I agree this issue has the potential to drag on Clojure adoption - but in the opposite way to what you describe. At the root of it, is the Clojure ecosystem a "dependencies are bad" system, or a "dependencies are good" system? The former encourages