> If all you need is a statistical or array-processing language like MATLAB,
> my frank view is you're best off staying in R, or Mathematica, or MATLAB, or
> Octave, or whatever... they're mature and great at what they do (Mathematica
> most of all ;-) ). The reason you might want to use Clojurati
Jim was working on logic programming in Clojure up to a few months
ago, and it seems as if the concern was that the code was too
derivative.
I have recently made available a Scala-based Kanren implementation;
the differences between Scala and Scheme means that the code is
sufficiently original. M
On Sat, Oct 24, 2009 at 10:19 PM, Robert Stehwien wrote:
> Hadn't seen it posted here yet:
> http://sicpinclojure.com/
>
Are they looking for help writing Clojure versions of the Scheme code
snippets?
--~--~-~--~~~---~--~~
You received this message because you are
> In clojure, i can grab the first n lines nicely:
> (with-open [r (reader "FILE")] (str-join ", " (take n (line-seq r
>
> How can i grab the first n lines starting from an line offset? ex,
> grab lines 5 to 10 rather than just the first 5.
(with-open [r (reader "FILE")]
(str-join ", "
I have a huge file(>900MB) that I would like to read/process in
chunks.
In clojure, i can grab the first n lines nicely:
(with-open [r (reader "FILE")] (str-join ", " (take n (line-seq r
How can i grab the first n lines starting from an line offset? ex,
grab lines 5 to 10 rather than just t
Hadn't seen it posted here yet:
http://sicpinclojure.com/
--~--~-~--~~~---~--~~
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
I'm confused about the slide on barging:
"txnB has a status of RUNNING and can be changed to KILLED".
Are you implying that simply having a status of RUNNING is all that is
required for the txn to be killed?
Or, are there other requirements to "can be changed"?
I'm having a hard time wrapping m
On Sat, Oct 24, 2009 at 10:50 PM, Richard Newman wrote:
>
>> for anyone who has this same problem. The only solution that I've
>> gotten so far that works is to use a java file that launches my
>> clojure files. I'm still looking for a better way to do this.
>
> I've had success on several projec
Thanks for your replies. You've been very helpful.
On Oct 24, 1:36 pm, Konrad Hinsen wrote:
> On 23 Oct 2009, at 22:00, Konrad Hinsen wrote:
>
> > For matrix computations and linear algebra, your best choice is
> > probably
> > the Colt library developed at CERN, or the somewhat parallelized
After reading your PDF, I now understand what Clojure means by the
term "coordinate". Thanks a lot!
--
coordinating activities of multiple actors (i.e. transactions)
• may want to send messages to multiple actors within a txn
and guarantee that either all messages are proc
Jeez, that's amazing. Thanks a lot; I had no idea that trees-seq
existed. I keep getting surprised by Clojure.
On Oct 24, 2:05 pm, James Reeves wrote:
> This is a slightly faster and somewhat shorter version:
>
> (defn find-dependencies2
> [rel-rep]
> (set (filter symbol? (tree-seq seq? rest
This is a slightly faster and somewhat shorter version:
(defn find-dependencies2
[rel-rep]
(set (filter symbol? (tree-seq seq? rest rel-rep
- James
On Oct 24, 9:55 pm, samppi wrote:
> I suspect the code below can be improved. The function returns the set
> of all symbols inside a list-
I suspect the code below can be improved. The function returns the set
of all symbols inside a list-tree that are not at the beginning of a
list. Is there a way to make the code more compact or faster?
(with-test
(defn- find-dependencies
[rel-rep]
(cond
(list? rel-rep)
(le
Baishampayan Ghose writes:
> Hello,
>
> I was trying to download a zip file using clojure.contrib.http.agent and
> writing it to a file using clojure.contrib.duck-streams.
>
> Apparently the zip file is getting corrupt because I was trying to treat
> the stream as a string.
>
> Is there any way
> for anyone who has this same problem. The only solution that I've
> gotten so far that works is to use a java file that launches my
> clojure files. I'm still looking for a better way to do this.
I've had success on several projects with:
(ns com.foo.bar
(:refer-clojure)
(:gen-class))
for anyone who has this same problem. The only solution that I've
gotten so far that works is to use a java file that launches my
clojure files. I'm still looking for a better way to do this.
Here is the code for the launcher.
import java.io.OutputStreamWriter;
import java.io.IOException;
impor
>From my perspective, having the forms be flatter (less nested) and
having the call to the extend-dom function be at the outermost level
is the most readable.
On Fri, Oct 23, 2009 at 1:20 PM, Meikel Brandmeyer wrote:
> Hi,
>
> Am 23.10.2009 um 21:16 schrieb Howard Lewis Ship:
>
>> Here's what I
On Sat, Oct 24, 2009 at 2:43 PM, samppi wrote:
> Thanks a lot! I didn't know about the existence of gensym. This will
> help a lot.
You're welcome.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
T
Thanks a lot! I didn't know about the existence of gensym. This will
help a lot.
On Oct 23, 9:54 pm, John Harrop wrote:
> On Sat, Oct 24, 2009 at 12:19 AM, samppi wrote:
> > user=> (defmacro b [form]
> > (let [processed-form (a form rec#)]
> > `(fn [rec#] processed-form)))
> > java.lang.Exc
I gave a talk on STM at a conference in St. Louis called "Strange
Loop" last Thursday.
1 up and 2 up PDF versions of the slides are available at
http://ociweb.com/mark/stm/.
The talk was videotaped. I'll send another email when that is available.
Feedback is welcomed! I'll update the slides if nee
It's difficult to provide advice without more information about your
current code. You say that you want a part of your system, which
manipulates a lot of objects, to run in parallel. Do you mean that you
want this part of the system to run parallel to the other parts -or-
do you mean that this pa
On 23 Oct 2009, at 22:00, Konrad Hinsen wrote:
> For matrix computations and linear algebra, your best choice is
> probably
> the Colt library developed at CERN, or the somewhat parallelized
> version called Parallel Colt. Colt has arrays up to three dimensions
> for
> a couple of data types
Thanks for the help!
I created a small function, which convert the nodes of a nested
collection to strings:
(defn rec-to-strs [f]
"recursively change parameters to strings"
(vec (for [c f]
(if (coll? c)
(vec (rec-to-strs c))
(str c)
I use this function from a macro as
On Oct 21, 9:14 pm, John Harrop wrote:
> You probably therefore want this instead:
>
> (defn multi-filter [filters coll]
> (let [c (count filters)
> ignore (Object.)]
> (map
> (fn [i]
> (remove #(= % ignore)
> (take-nth c
> (drop i
>
24 matches
Mail list logo