ANN: simplecl & structgen: OpenCL processing pipelines & C-struct interop

2012-12-09 Thread Karsten Schmidt
Dear all, I've just pushed two libraries which I've been working on since summer now and which have already proven themselves in production too (regardless of their baby age): === http://hg.postspectacular.com/simplecl ==

Re: n00b question on embedded defrecord

2012-12-09 Thread mond
Thanks Jordan - I just couldn't quite get that magic combination :) On Sunday, December 9, 2012 11:38:50 PM UTC+1, Jordan wrote: > > > > > On Sun, Dec 9, 2012 at 4:45 PM, mond >wrote: > >> ; I have these records defined >> >> (defrecord Customer [firstName lastName emailAddress deliveryAddress

Re: Clojure raytracing scene description language

2012-12-09 Thread Grant Rettke
On Sun, Dec 9, 2012 at 6:03 PM, Mikera wrote: > Any thoughts / ideas / feedback? What if you try keeping it pretty close to the current POV syntax/format? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@g

Re: Clojure raytracing scene description language

2012-12-09 Thread Brandon Bloom
Are you only interested in static scenes? Or are you interested in simulations too? On Sunday, December 9, 2012 4:03:36 PM UTC-8, Mikera wrote: > > Hi all, > > I'm working on a hobby project to implement a Clojure raytracer, something > along the lines of POV-Ray: > https://github.com/mikera/enl

Re: ANN: clj-schema, Schemas For Clojure Maps

2012-12-09 Thread Brandon Bloom
I wanted something like this to create an AST validator for ClojureScript! Will have to find some time to study your approach. On Sunday, November 25, 2012 3:22:04 PM UTC-8, Alex Baranosky wrote: > > Clj-schema is a library for defining and validating schemas for maps, as > well as for using tho

Re: abysmal multicore performance, especially on AMD processors

2012-12-09 Thread Softaddicts
There's no magic here, everyone tuning their app hit this wall eventually, tweaking the JVM memory options :) Luc > > On Dec 9, 2012, at 6:25 AM, Softaddicts wrote: > > > If the number of object allocation mentioned earlier in this thread are > > real, > > yes vm heap management can be a bott

Re: what Jetty jars do I need for WebSockets?

2012-12-09 Thread Jay Fields
I don't have the answer, but I would strongly recommend webbit: https://github.com/webbit/webbit I've been using it for quite awhile and I've been very happy with it. On Sun, Dec 9, 2012 at 8:55 PM, larry google groups wrote: > > I am still fairly new to Clojure, the JVM and Java, so I get lost

what Jetty jars do I need for WebSockets?

2012-12-09 Thread larry google groups
I am still fairly new to Clojure, the JVM and Java, so I get lost trying to read some of the stuff that assumes knowledge of any of those 3. I want to build a Clojure app using Jetty and offering WebSocket connections. I have already built an app with Clojure and Jetty, so that part is easy.

Clojure raytracing scene description language

2012-12-09 Thread Mikera
Hi all, I'm working on a hobby project to implement a Clojure raytracer, something along the lines of POV-Ray: https://github.com/mikera/enlight It's a a fairly preliminary stage right now, but I'm interested in ideas on how to create the scene description language. Roughly the objectives are:

Re: n00b question on embedded defrecord

2012-12-09 Thread Jordan Berg
On Sun, Dec 9, 2012 at 4:45 PM, mond wrote: > ; I have these records defined > > (defrecord Customer [firstName lastName emailAddress deliveryAddress > invoiceAddress]) > (defrecord Address [street number town postcode]) > This looks fine > > ; I have this small sample data > (def customers >

Re: core.logic vs datomic

2012-12-09 Thread Brent Millare
You are right. I am referring to the querying function, not datomic on the whole. I have my own understanding about the differences but I was interested in hearing others. Please don't feel pressured to answer my question. I'm trying to compile understanding akin to stackoverflow, where as lon

n00b question on embedded defrecord

2012-12-09 Thread mond
; I have these records defined (defrecord Customer [firstName lastName emailAddress deliveryAddress invoiceAddress]) (defrecord Address [street number town postcode]) ; I have this small sample data (def customers { (->Customer "Drongo" "Bongo" "dro...@bongo.co" (->Address "Gongo" "3

Re: ANN: clj-schema, Schemas For Clojure Maps

2012-12-09 Thread Alex Baranosky
Hi Laurent, It was originally written as loose-only, because that is an easier problem to solve, but since these schemas are being used at work to make sure no bad data gets stored in HBase we decided collectively that strictness was more of what we wanted. I'm open to exploring ways to make the

Re: core.logic vs datomic

2012-12-09 Thread Nick Zbinden
First of all, stop saying 'on datomic'. Datomic as a Database, witch in its Peer library has a implmentation of Datalog. This implmentation of Datalog has basicly nothing to do with the rest of datomic, it can be used as a query language for data from all sources, it just comes with the Datomic

Re: leiningen and updating project versions

2012-12-09 Thread Frank Siebenlist
When I'm working on a number of interdependent projects, I'm making symbolic links of the src directories of the dependent project inside my main project. In that way, I can easily make changes in the multiple projects without having to go thru the update version/jar/pom/install cycles for all a

Re: Specific reduce function version

2012-12-09 Thread Alexander Semenov
Not exactly: my initial acc value is usually something like #{} or [] but I've got the idea. On Sunday, December 9, 2012 9:29:25 PM UTC+3, Alan Malloy wrote: > > You seem to have written (reduce (fn [acc [a b]] ...) (partition 2 1 > coll)). > > On Sunday, December 9, 2012 7:39:21 AM UTC-8, Alexa

Re: abysmal multicore performance, especially on AMD processors

2012-12-09 Thread Andy Fingerhut
On Dec 9, 2012, at 6:25 AM, Softaddicts wrote: > If the number of object allocation mentioned earlier in this thread are real, > yes vm heap management can be a bottleneck. There has to be some > locking done somewhere otherwise the heap would corrupt :) > > The other bottleneck can come from ga

Re: ANN: clj-schema, Schemas For Clojure Maps

2012-12-09 Thread Ambrose Bonnaire-Sergeant
I think Typed Clojure and clj-schema could work very nicely together. I'll look at it again in a few months. Thanks, Ambrose On Wed, Nov 28, 2012 at 11:18 AM, Alex Baranosky < alexander.barano...@gmail.com> wrote: > Hi Stathis, > > Thanks for your interestin clj-schema. If you use it and have an

Re: Specific reduce function version

2012-12-09 Thread Alan Malloy
You seem to have written (reduce (fn [acc [a b]] ...) (partition 2 1 coll)). On Sunday, December 9, 2012 7:39:21 AM UTC-8, Alexander Semenov wrote: > > Hi, folks. > > I'm wondering if Clojure library has 'reduce' function version which is > like (reduce f coll) - i.e. it applies function to coll

Re: ANN: clj-schema, Schemas For Clojure Maps

2012-12-09 Thread Laurent PETIT
Hello, this is exactly the kind of library I was probably going to rewrite for myself rather sooner than later, cool ! One question, though : if I understant it correctly, the default behaviour once you start defining a schema is for it to be "strict" rather than "loose", meaning that any extra k

Re: abysmal multicore performance, especially on AMD processors

2012-12-09 Thread Marshall Bockrath-Vandegrift
Andy Fingerhut writes: > My current best guess is the JVM's memory allocator, not Clojure code. I didn’t mean to imply the problem was in Clojure itself, but I don’t believe the issue is in the memory allocator either. I now believe the problem is in a class of JIT optimization HotSpot is perfo

Re: Specific reduce function version

2012-12-09 Thread Alexander Semenov
Okay thanks, I just wanted to make sure that I'm not re-inventing something already ready. On Sunday, December 9, 2012 8:07:24 PM UTC+3, puzzler wrote: > > Essentially, you are using two accumulators: acc and (first coll). > > You can probably use reduce for this purpose by > (reduce f [acc (firs

Re: abysmal multicore performance, especially on AMD processors

2012-12-09 Thread Andy Fingerhut
On Dec 9, 2012, at 4:48 AM, Marshall Bockrath-Vandegrift wrote: > > It’s like there’s a lock of some sort sneaking in on the `conj` path. > Any thoughts on what that could be? My current best guess is the JVM's memory allocator, not Clojure code. Andy -- You received this message because you

Re: Multiple java class import

2012-12-09 Thread Yinka Erinle
Thanks On Sunday, December 9, 2012 3:11:02 PM UTC, Jim foo.bar wrote: > > Rich explains why here: > > https://groups.google.com/forum/?fromgroups=#!msg/clojure/-gCg_0wmT5o/H7WobsV-yt0J > > Jim > > > On 09/12/12 15:06, Yinka Erinle wrote: > > Thanks Jim. > I wonder why. > > On Sunday, December

Re: abysmal multicore performance, especially on AMD processors

2012-12-09 Thread Andy Fingerhut
On Dec 8, 2012, at 9:37 PM, Lee Spector wrote: > > On Dec 8, 2012, at 10:19 PM, meteorfox wrote: >> >> Now if you run vmstat 1 while running your benchmark you'll notice that the >> run queue will be most of the time at 8, meaning that 8 "processes" are >> waiting for CPU, and this is due to m

gen-class: class loading problem

2012-12-09 Thread Vladimir Tsichevski
Hi, I'm trying embed clojure into a proprietary system. That system can be configured to create instances of specified Java classes and calling specified methods. So I want to use gen-class to create these proxies. The only problem is that both clojure and my proprietary system handle class l

Re: Decomplecting if

2012-12-09 Thread Thomas Goossens
Yeah, cond will probably do the trick as well. I do consider if complex (and yeah my argument is true for a lot of functions) What i'm talking about is some accidental complexity of the language. That I must constantly be aware of what parameter of the function I'm looking at. My point is not so

Re: Specific reduce function version

2012-12-09 Thread Mark Engelberg
Essentially, you are using two accumulators: acc and (first coll). You can probably use reduce for this purpose by (reduce f [acc (first coll)] (rest coll)) adjusting the starting accumulator accordingly and altering f to be (fn [[acc coll-acc] item] ...) Frankly, it would probably be more readab

Re: Decomplecting if

2012-12-09 Thread Jozef Wagner
How about cond? (cond test true :else false) BTW I personally don't consider if complected. If reverse order is more appropriate, I use if-not. On Sunday, December 9, 2012 12:02:54 AM UTC+1, Thomas Goossens wrote: > > One of the issues i had and still have with the if function is that >

Specific reduce function version

2012-12-09 Thread Alexander Semenov
Hi, folks. I'm wondering if Clojure library has 'reduce' function version which is like (reduce f coll) - i.e. it applies function to coll elements without the initial value but at the same time allows to use external accumulator which is passed to f as well. Better look at the code: (defn red

Help with zetta-parser please

2012-12-09 Thread timc
Hi Can someone give example of parsing using zetta-parser for the case that the input stream is intermittent (i.e. possibly incomplete at a particular moment). The author of zetta-parser refers to this very possibility in his readme (for example parsing messages arriving at a socket or such).

Re: core.logic vs datomic

2012-12-09 Thread Brent Millare
Can you elaborate on the zebra puzzle? What particular aspect is required? What would need to be implemented to get it to work on datomic? On Sunday, December 9, 2012 5:48:55 AM UTC-5, Nick Zbinden wrote: > > You have a misunderstanding. > > core.logic and datomic datalog are not the same thing.

Re: Multiple java class import

2012-12-09 Thread Jim - FooBar();
Rich explains why here: https://groups.google.com/forum/?fromgroups=#!msg/clojure/-gCg_0wmT5o/H7WobsV-yt0J Jim On 09/12/12 15:06, Yinka Erinle wrote: Thanks Jim. I wonder why. On Sunday, December 9, 2012 2:43:54 PM UTC, Jim foo.bar wrote: Unfortunately you have to import each class separ

Re: Multiple java class import

2012-12-09 Thread Yinka Erinle
Thanks Jim. I wonder why. On Sunday, December 9, 2012 2:43:54 PM UTC, Jim foo.bar wrote: > > Unfortunately you have to import each class separately...no wild-cards > in ns declarations :-( > > Jim > > On 09/12/12 14:21, Yinka Erinle wrote: > > Hi, > > > > Is it possible to import multiple j

parenface support in clojure (parenface-plus)

2012-12-09 Thread Grant Rettke
Here[1] is an enhancement to parenface[2] that adds support for the editor and REPL for Clojure, Jess, and Elisp. 1 http://marmalade-repo.org/packages/parenface-plus 2 http://marmalade-repo.org/packages/parenface -- You received this message because you are subscribed to the Google Groups "Cloj

Re: Multiple java class import

2012-12-09 Thread Jim - FooBar();
Unfortunately you have to import each class separately...no wild-cards in ns declarations :-( Jim On 09/12/12 14:21, Yinka Erinle wrote: Hi, Is it possible to import multiple java classes using import? e.g (import '(java.naming.*)) Or will I have to import each class separately? Thanks, Yin

Re: abysmal multicore performance, especially on AMD processors

2012-12-09 Thread Softaddicts
If the number of object allocation mentioned earlier in this thread are real, yes vm heap management can be a bottleneck. There has to be some locking done somewhere otherwise the heap would corrupt :) The other bottleneck can come from garbage collection which has to freeze object allocation com

Multiple java class import

2012-12-09 Thread Yinka Erinle
Hi, Is it possible to import multiple java classes using import? e.g (import '(java.naming.*)) Or will I have to import each class separately? Thanks, Yinka. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cloj

Re: Starting to use Clojure, Yeah!

2012-12-09 Thread Mimmo Cosenza
have a wonderful journey like I had mimmo On Dec 7, 2012, at 4:16 AM, Xiaodan Yuan wrote: > Yeah! > > -- > 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 mem

Starting to use Clojure, Yeah!

2012-12-09 Thread Xiaodan Yuan
Yeah! -- 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, send email to

Re: Exception when loading clojure.core.reducers

2012-12-09 Thread Alex Baranosky
Thanks Jim, that worked like a charm. For anyone lurking this is what I used in my project.clj: [org.codehaus.jsr166-mirror/jsr166y "1.7.0"] On Sun, Dec 9, 2012 at 4:55 AM, Jim - FooBar(); wrote: > jsr166 -- You received this message because you are subscribed to the Google Groups "Clojure" g

Re: Exception when loading clojure.core.reducers

2012-12-09 Thread Jim - FooBar();
Use java 7 with clojure 1.5.0-beta1 or use java6 with the jsr166.jar already in your classpath...Alternatively, if you use some clojure version older than 1.5.0-beta1 with Java 7 you may need to build clojure on your system... Hope that helps... Jim On 09/12/12 12:44, Alex Baranosky wrote:

Re: abysmal multicore performance, especially on AMD processors

2012-12-09 Thread Marshall Bockrath-Vandegrift
cameron writes: > Interesting problem, the slowdown seems to being caused by the reverse > call (actually the calls to conj with a list argument). Excellent analysis, sir! I think this points things in the right direction. > fast-reverse    : map-ms: 3.3, pmap-ms 0.7, speedup 4.97 > list-cons 

Exception when loading clojure.core.reducers

2012-12-09 Thread Alex Baranosky
Using 1.5.0-beta1, attempting to load the reducers namespace, `(require '[clojure.core.reducers :as r])`, is generating this exception: CompilerException java.lang.ClassNotFoundException: jsr166y.ForkJoinPool, compiling:(clojure/core/reducers.clj:56:21) TERMINAL> java -version java version "1.6.0_

Re: abysmal multicore performance, especially on AMD processors

2012-12-09 Thread Jim - FooBar();
Hi Lee, Would it be difficult to try the following version of 'pmap'? It doesn't use futures but executors instead so at least this could help narrow the problem down... If the problem is due to the high number of futures spawned by pmap then this should fix it... (defn- with-thread-pool* [

Re: Decomplecting if

2012-12-09 Thread Thomas Goossens
Cool thanks! On Sunday, December 9, 2012 11:52:32 AM UTC+1, Alex Baranosky wrote: > > The version I just posted also has the benefit that it does not cause > multiple evaluations of its branches. > > On Sun, Dec 9, 2012 at 2:39 AM, Herwig Hochleitner > > > wrote: > >> 2012/12/9 Ben Wolfson > >>

Clojure contrib datalog

2012-12-09 Thread Shantanu Kumar
Hi, I saw clojure-contrib datalog has not made it into modular contribs: https://github.com/clojure/clojure-contrib/tree/master/modules/datalog http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go http://dev.clojure.org/display/doc/Clojure+Contrib+Libraries Does anybody know if it'

Re: core.logic vs datomic

2012-12-09 Thread Nick Zbinden
You have a misunderstanding. core.logic and datomic datalog are not the same thing. core.logic is a turing complet logic engine, datomic datalog is only a querying subpart of this. You can not solve the zebra problem with datomic datalog, its impossible. Think of datomic datalog as if it would

Re: Decomplecting if

2012-12-09 Thread Herwig Hochleitner
You could add check for other keys than :then and :else being used. For documentation, I'd add a docstring "Macro, similar to if but with branches labeled by keywords :then, :else." + the usage examples you posted. Also, have you looked at cond and if-not? Using cond to me feels like labeling the

Re: Decomplecting if

2012-12-09 Thread Neale Swinnerton
>> >> (defmacro iff [test & {:keys [then else]}] You probably want a different name for this, 'iff' already has a well understood meaning as 'if and only if' See http://en.m.wikipedia.org/wiki/If_and_only_if -- You received this message because you are subscribed to the Google Groups "Clojure"

Re: Decomplecting if

2012-12-09 Thread Thomas Goossens
Nice :) On Sunday, December 9, 2012 1:17:48 AM UTC+1, Michał Marczyk wrote: > > Better yet, > > (defmacro iff [test & {:keys [then else]}] > `(if ~test ~then ~else)) > > (that's doing the lookup for then and else in the map constructing > from the macro's rest argument at compilation time ra

leiningen and updating project versions

2012-12-09 Thread Dave Sann
Has anyone looked at how to manage snapshots and dependencies in projects with checkouts - where the checkouts (also snapshots) are being edited along with the main project? As I look at my layers of projects, they looks like a lot of rather tedious manual work for each project to: bump the pro