[ANN] pex, a powerful PEG parsing library

2015-11-16 Thread Ghadi Shayban
Here is a compliant JSON parser in 99 LOC, implemented with *pex, a new parsing library*. [1] This is alpha software. Hot off the heels of Colin Fleming's Conj talk on PEGs [2], I'm making public an early version of pex [3], a parsing library in the PEG family. For those of you familiar with

Re: Poor parallelization performance across 18 cores (but not 4)

2015-11-16 Thread Andy Fingerhut
There is no STM involved if you only have atoms, and no refs, so it can't be STM-related. I have a conjecture, but don't yet have a suggestion for an experiment that would prove or disprove it. The JVM memory model requires that changes to values that should be visible to all threads, like swap!

Poor parallelization performance across 18 cores (but not 4)

2015-11-16 Thread David Iba
I have functions f1 and f2 below, and let's say they run in T1 and T2 amount of time when running a single instance/thread. The issue I'm facing is that parallelizing f2 across 18 cores takes anywhere from 2-5X T2, and for more complex funcs takes absurdly long. 1. (defn f1 [] 2. (app

Re: ClassNotFoundException: clojure.lang.AFunction on OS X

2015-11-16 Thread Gary Verhaegen
I have no idea what this could be. Is there any chance you could build up a minimal-ish project that reproduces this ? I have been using Clojure on a Mac for years without any problem. Also, at much less effort on your part, could you post the Leiningen and JVM versions ? lein version should print

[ANN] Simulant 0.1.8

2015-11-16 Thread Michael Nygard
Simulant 0.1.8 is now available. This is a maintenance release that incorporates some bug fixes and updates Clojure and Datomic dependencies Try it via - Leiningen: [com.datomic/simulant "0.1.8"] Changes since 0.1.7: - PR 24 Allow overriding

Re: arity-3 `iterate`

2015-11-16 Thread Ben Wolfson
ncomp would be faster if it's implemented a la exponentiation by squaring. On Mon, Nov 16, 2015 at 12:55 PM, Ben Wolfson wrote: > If you rearrange the arguments of your proposed three-argument iterate: > > (defn iterate > ... > ([f n x] >(if (zero? n) > x > (recur f (f x) (dec

ClassNotFoundException: clojure.lang.AFunction on OS X

2015-11-16 Thread Phil Segal
We have been happily using clojure on windows and linux, today we tried to run on a MacBook Pro and ran into several issues. The current stopper is a CNFE as per the title (stack trace at the end). I have now replicated this on my personal Mac and seen the same behaviour. I can't find anything

Re: arity-3 `iterate`

2015-11-16 Thread Ben Wolfson
If you rearrange the arguments of your proposed three-argument iterate: (defn iterate ... ([f n x] (if (zero? n) x (recur f (f x) (dec n it supports partial application of the multiply-composed function to different arguments more easily, which suggests redefinition as: (def

arity-3 `iterate`

2015-11-16 Thread Jason Felice
I *frequently* see: (nth (iterate foo bar) n) And: (->> (iterate foo bar) (drop n) first) I've also coded this in `avi` after being surprised no such thing exists: (defn n-times [thing n a-fn] (reduce (fn [thing n] (a-fn thing)) thing (range n))) (which is kind of

New Functional Programming Job Opportunities

2015-11-16 Thread Functional Jobs
Here are some functional programming job opportunities that were posted recently: Software Developer | Scala, Clojure | Spark, Solr, Agile at Elmar Reizen https://functionaljobs.com/jobs/8865-software-developer--scala-clojure--spark-solr-agile-at-elmar-reizen Cheers, Sean Murphy Functiona

Re: Largest Clojure codebases?

2015-11-16 Thread Michael Willis
For what it's worth, here's the way that I always count lines of code, should work on any unix-like system: find -name "*.clj" | wc -l On Sunday, November 15, 2015 at 5:23:01 PM UTC-6, Colin Yates wrote: > > Exactly this. I couldn’t find a reliable way of counting LOC but my > (Clojure/ClojureS

[ANN] konserve 0.3.0

2015-11-16 Thread Christian Weilbach
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I am happy to announce the release of version 0.3.0 of konserve, a clojuresque durable key-value/document store protocol with core.async. Most importantly serialization protocols are now factored as a protocol with implementations for Fressian

Re: Largest Clojure codebases?

2015-11-16 Thread Kyle R. Burton
At the last company I was with I used sloccount [1] to analyze the codebase. I concatenated all the clj files to a .lisp file so sloccount could analyze it. I was curious about the cost estimate that sloccount performs to see how the team measured up (size varied from 2 to 7 over 5 years). When

[ANN] Clojure 1.8.0-RC2

2015-11-16 Thread Alex Miller
Clojure 1.8.0-RC2 is now available. *This build is a "release candidate"!* We would appreciate any and all testing you can do on your own libraries or internal projects to find problems. Try it via - Download: https://repo1.maven.org/maven2/org/clojure/clojure/1.8.0-RC2 - Leiningen: [org

Re: Reflection warning on try/catch inside go block

2015-11-16 Thread Nicola Mometto
It's possibly a tools.analyzer issue, I'll take a look ASAP > On 16 Nov 2015, at 12:41, Alice wrote: > > Sorry, I was having some copy & paste mistake, but I'm seeing the same > warning with .printStackTrace. > > On Monday, November 16, 2015 at 9:25:06 PM UTC+9, Herwig Hochleitner wrote: > The

Re: Reflection warning on try/catch inside go block

2015-11-16 Thread Alice
Sorry, I was having some copy & paste mistake, but I'm seeing the same warning with .printStackTrace. On Monday, November 16, 2015 at 9:25:06 PM UTC+9, Herwig Hochleitner wrote: > > The method is called .printStackTrace: > http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printSt

Re: Reflection warning on try/catch inside go block

2015-11-16 Thread Herwig Hochleitner
The method is called .printStackTrace: http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace() I can't speak to why the reflection warning disappears in some cases. Seems fishy, ​ -- You received this message because you are subscribed to the Google Groups "Clojure" g

Re: Reflection warning on try/catch inside go block

2015-11-16 Thread Alice
[org.clojure/clojure "1.7.0"] [org.clojure/core.async "0.2.374"] On Monday, November 16, 2015 at 8:28:27 PM UTC+9, Alex Miller wrote: > > Which version of core.async? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email t

Re: Locking non-local variable inside macro

2015-11-16 Thread Alex Miller
Usually it's better to create a sentinel (Object.) to lock on to avoid sharing it. (Well really it's best to avoid locking at all and use Clojure state constructs if you can.) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, se

Reflection warning on try/catch inside go block

2015-11-16 Thread Alex Miller
Which version of core.async? -- 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 th

Reflection warning on try/catch inside go block

2015-11-16 Thread Alice
I get a reflection warning "reference to field printstacktrace can't be resolved" from the following code: (defn foo [] (go-loop [] (http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscrib