combiner function not called for r/fold with single partition?

2015-08-16 Thread Ron Toland
In my local Clojure Users Group last week, we encountered an odd behavior with r/fold. Specifically, it seems like the three-arity version (r/fold combiner-fn reducer-fn coll) doesn't call the combiner-fn if the coll has fewer elements than the default partition-size (512). This leads to some

Re: How to abort a long running operation at the SLIME REPL?

2015-03-16 Thread ron
Hi!..given than clojure contrib is deprecated, which could be the option now?...(thread-stopper or set-break-handler from clojure.repl maybe?) 2) this could work with a non ring server?..I'm using other server which doesnt provide a function for shutdown nor restart, how could use it for this

Re: Read Microsoft Word .doc files in Clojure

2014-12-05 Thread Ron Toland
Divya, Here's a simple example for converting text from an input stream (which you can convert any file into): (ns sample.tika (:require [clj-tika.core :as tika]) (defn extract-text "Extracts the text from the input stream" [input-stream] (tika/parse input-stream))

Re: Read Microsoft Word .doc files in Clojure

2014-01-02 Thread Ron Toland
If all you need is the text, you could use Apache Tika to extract it: http://tika.apache.org/ There's a simple clojure lib to get you started: https://github.com/alexott/clj-tika I've used it to pull text out of .doc, .pdf, and .odt files. Ron On Wednesday, January 1, 2014 11:49:3

[ANN] Recursd - Functional Programming Conference in San Diego

2013-12-09 Thread Ron Toland
e to see you there! Ron -- -- 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

Re: Clojure & Jruby (Ruby on Rails) Interop

2013-09-10 Thread Ron Toland
ly. As for portability, we started with everything on Heroku, but we've been slowly migrating to aws as our needs scale up. Our configuration makes this really easy: we can move the rabbitmq piece over one week, then the clojure the next, without changing anything but a few lines in a config file.

Clojure & Jruby (Ruby on Rails) Interop

2013-09-09 Thread Ron Toland
At Rewryte, we use Rails for the web frontend and Clojure for the data processing backend for exactly the reasons you described. We use RabbitMQ to communicate between the two. This maintains separation between the two apps (no JRuby required), and lets us scale them both independently, while t

Re: End user applications

2013-06-13 Thread Ron Toland
At rewryte.com, we use Clojure for all our back- end data processing. -- -- 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

Re: ANN: rewryte.com uses clojure for automated writing feedback

2013-01-27 Thread Ron Toland
Zack: It only accepts plain txt files at the moment. We're working on supporting other formats. :) -- -- 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

How to log a precondition in clojure 1.3

2012-03-21 Thread ron peterson
So I'd like to log the AssertionError using clojure.tools.logging library. For example if my function throws the following: # How do I "redirect it" to be printed in the console using the clojure.tools.logging library? Thanks, R. -- You received this message because you are subscribed to the Go

group-by by multiple keys

2012-01-31 Thread ron peterson
hello, How to group a collection of maps by multiple keys? For example (def m1 [{:a 1 :b 2 :c 3}{:a 1 :b 2 :c 4}{:a 1 :b 4 :c 3}{:a 1 :b 4 :c 3}]) (group-by-x [:a :b] m1) I'd it like to return this: [{:a 1 :b 2}[{:a 1 :b 2 :c 3}{:a 1 :b 2 :c 4}], {:a 1 :b 4}[{:a 1 :b 4 :c 3}{:a 1 :b 4 :c 3}]]

about partial and clojure curry

2011-12-28 Thread ron
Hi everybody..I've a little question..the way in than clojure implement curry is affected for the jvm or it is a "Rick decision" ...in haskell every function accept only one parameter and if you call a function with >1 parameter it use currying...I feel than it is really natural and more clean than

clojurescript on windows (how create goog.jar)...Noob question

2011-12-06 Thread ron
hi everybody...I'm trying install clojurescript on windows...I'm follow the steps but I'm not sure with this specific step: Create a goog.jar file and copy to lib cd closure\library\closure jar cf goog.jar goog copy goog.jar ..\..\..\lib now..I've downloaded clojure, closure and the closure

Re: Calling a Java call with array from Clojure

2011-09-13 Thread ron peterson
a String and a > String[]. Use into-array to create a string array, and pass that as > the second arg. > > On Sep 13, 6:21 pm, ron peterson wrote: > > > > > > > > > I have a following API call that I need to make from Clojure: > > > class A > >

Calling a Java call with array from Clojure

2011-09-13 Thread ron peterson
I have a following API call that I need to make from Clojure: class A doSomething(java.lang.String arg1, String... args) so I tried (def a (new A)) ;this works (.doSomething a "abc" "efg" "hij") ;this doesn't work giving me no matching method found: doSomething for class A -- You received

Re: Error running Clojure 1.3 in Eclipse

2011-07-19 Thread ron peterson
from contrib 1.2.0). You might try: > > [org.clojure.contrib/standalone "1.3.0-SNAPSHOT"] > > instead but at this point you might need to start looking at the new > contrib libraries and migrating to those: > > http://dev.clojure.org/display/design/Contrib+Library+

Error running Clojure 1.3 in Eclipse

2011-07-18 Thread ron peterson
I've upgraded my projects in Eclipse 3.7 to use Clojure 1.3 beta1 release, however when I try running it in Eclipse the REPL console throws the following exception. Other versions of Clojure 1.3 alpha gave the same exception: (but clojure 1.2.1 works fine) Warning: *print-detail-on-error* not dec

Re: How to convert a string to a data structure

2011-05-26 Thread ron peterson
Thank you everyone for the solution. Ron. On May 25, 6:24 pm, Luc Prefontaine wrote: > Use: > > (read-string (read-string "[{:a \"blah\" :b 23} {:d 34 :c \"hello\"}]") > > I believe your expression is wrong, (:d should be {:d. > > Luc P. &

How to convert a string to a data structure

2011-05-25 Thread ron peterson
Hi, If I have a following string for example: [{:a "blah" :b 23}(:d 34 :c "hello"}] how can I convert it to a clojure data structure? Thanks, Ron. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to thi

Clojureql possilbe bug when using union with constraints

2011-05-18 Thread ron peterson
I'm using the [clojureql "1.0.0"] library. (:require [clojureql.core :as sq]) The following query doesn't generate correct sql: (-> (sq/select (sq/join (sq/table db :tableA)(sq/table db :tableB)(sq/ where (= :tableA.id 27219))) (sq/where (= :tableA.group_id 27202))) (sq/union (sq/select (sq/join

Re: Strange little difference with the reader and the java float parsers

2009-11-27 Thread Ron Thomas
user=> (- (new Double "1786.28") (read-string "1786.28")) 0.0 Following uip on what Hugo said, modifying your code to a double returns the following. On Nov 27, 1:32 pm, "Hugo Duncan" wrote: > On Fri, 27 Nov 2009 14:50:27 -0500, Nathan Cunningham   > > wrote: > > Apparently there are cases whe

Re: suggestion for resultset-seq and duplicate column names

2009-03-12 Thread Ron Lusk
Works for me: I just overwrote my copy of resultset-seq with one that uses getColumnLabel, and I am now getting the results I expected from complex queries (in Interbase, at least). On Feb 23, 9:33 am, Rich Hickey wrote: > Sounds good to me - any drawbacks to this? Does it require that the > col

Two errors building closure

2009-01-15 Thread Ron Parker
I am trying to build Clojure on Fedora 10. When I first run ant, I get a message about the compliance level 1.4 not supporting target version 1.5. So I add source="1.5" to the javac task. Then I get a lot of warnings and the following 3 errors. [javac] 354. ERROR in /home/rdp/lisp/clj/cloju