Here is quick summary of results I obtained by googling.
There are bunch of libraries out there ... among them are
1. mpiJava a java wrapper for the corresponding c libraries but seems
dated...
2. MPJExpress .. seems to be under more active development.
But yet to find any parallel linear
On 12/31/2010 3:36 AM, Sunil S Nandihalli wrote:
Here is quick summary of results I obtained by googling.
There are bunch of libraries out there ... among them are
1. mpiJava a java wrapper for the corresponding c libraries but seems
dated...
2. MPJExpress .. seems to be under more active
On 31 Dec 2010, at 09:36, Sunil S Nandihalli wrote:
Here is quick summary of results I obtained by googling.
There are bunch of libraries out there ... among them are
1. mpiJava a java wrapper for the corresponding c libraries but
seems dated...
2. MPJExpress .. seems to be under more
Hi Konrad,
Have you looked at
http://nativelibs4java.sourceforge.net/
It is created using a java native interface generater called jnaerator .. it
does not seem to have any linear algebra library .. but may be a start .. I
am only introduced to java from clojure ..
Sunil.
2010/12/31 Jarl Haggerty fictivela...@gmail.com
I think I asked the wrong question, not only that but I guess I
answered the question I asked, what I want to know is what exactly is
a type hint. I think I've failed to understand exactly what a type
hint is, I assumed to give a hint was to
On 31 Dec 2010, at 10:56, Sunil S Nandihalli wrote:
Have you looked at
http://nativelibs4java.sourceforge.net/
I have seen it, but not looked any closer.
It is created using a java native interface generater called
jnaerator .. it does not seem to have any linear algebra library ..
but
The problem is that seen will grow without bounds.
Is there a built in way to have some sort of LRU cache or should I use
external libraries (like plru)?
I wrote a persistent LRU cache:
https://github.com/scode/plru
It's not going to be as memory efficient as a LInkedArrayList, but if
it
Hello Everybody,
why does this give an error in clojure-1.3-alpha4
(aset (make-array Integer/TYPE 3 4 5) 1 2 3 -1)
can anybody tell me as to how to do this right?
Thanks,
Sunil.
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group,
I have read Fast Track Clojure's serials tutorial. lession 5 is about
a web server.
Below is part of demo code:
(use 'clojure.contrib.server-socket)
(create-server
8080
(fn [in out]
(binding
[*out* (java.io.PrintWriter. out)]
(println HTTP/1.0 200 OK)
(println
I have read Fast Track Clojure's serials tutorial. lession 5 is about
a web server.
Below is part of demo code:
(use 'clojure.contrib.server-socket)
(create-server
8080
(fn [in out]
(binding
[*out* (java.io.PrintWriter. out)]
(println HTTP/1.0 200 OK)
(println
The hints are not use for static type analysis they are there for
speed. There is no type checker. In your example the compiler tries
using it as an int if that is not working the compiler uses reflaction
to find out the type.
no auto casts are by design.
On 31 Dez., 05:57, Jarl Haggerty
I have read Fast Track Clojure's serials tutorial. lession 5 is about
a web server.
Below is part of demo code:
(use 'clojure.contrib.server-socket)
(create-server
8080
(fn [in out]
(binding
[*out* (java.io.PrintWriter. out)]
(println HTTP/1.0 200 OK)
(println
Sorry for my net speed is too slow result in duplicate post.
--
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
This worked for me on 1.3.0:
(aset-int (make-array Integer/TYPE 3 4 5) 1 2 3 -1)
Might have something to do with the enhanced primitive support which
causes array handling to be stricter than it was in 1.2? Just a guess.
Allen
On Fri, Dec 31, 2010 at 8:53 AM, Sunil S Nandihalli
This looks very cool, and the opportunities for fully exploiting the
power of a cross-referenced book format are very appealing
Might I suggest two possible improvements:
1) Colored syntax highlighting for all clojure code.
2) Cross references for every clojure symbol used in the code --- I'd
On Dec 31, 12:48 am, Ken Wesson kwess...@gmail.com wrote:
Is mapcat also semi-eager, then?
I guess so. The Clojure 1.1 release notes also say, Some of the
sequence processing functions (like map and
filter) are now chunk-aware and leverage this efficiency. I should
have mentioned that.
--
Generating readable code for IDEs is not a good reason. You should
think carefully about variable capture and decide which you want.
Usually, in a macro-generated defn, I do want to capture the
parameters, so I would use ~'this.
On Dec 30, 11:54 pm, André Thieme splendidl...@googlemail.com wrote:
I wrote a persistent LRU cache:
https://github.com/scode/plru
Yup, I've looked at it (mentioned in the original post). I might end up
using it, thanks.
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
Both of these examples work for me (clojure 1.2).
Is there an error on the console when you access the site?
Also, if this is not a learning exercise, I recommend having a look at
Compojure for web development.
HTH,
--
Miki
--
You received this message because you are subscribed to the
Be sure to also implement the version of get which takes a not-found
argument so that your objects will work with map code which uses this
functionality.
(defrecord map-like-object [field-1 field-2 etc]
clojure.lang.IFn
(invoke [this k] (get this k))
(invoke [this k not-found] (get this k
Hi Allen ..
is 1.3.0 out? and I did not know that aset had so many variants.. glad I
asked .. now I know .. :) thanks Allen.
Sunil.
On Fri, Dec 31, 2010 at 8:19 PM, Allen Johnson akjohnso...@gmail.comwrote:
This worked for me on 1.3.0:
(aset-int (make-array Integer/TYPE 3 4 5) 1 2 3 -1)
Ken,
Classloader visibility (http://dev.clojure.org/jira/browse/CLJ-371) is one
possible point of confusion. If you have an AOT-compiled class, you can't
replace it from the REPL which works from a child classloader.
This is correct from a Java perspective, and easy enough to deal with one you
Sorry I should have written 1.3.0-master-SNAPSHOT or whatever the
convention is that represents the latest master build :)
On Fri, Dec 31, 2010 at 11:21 AM, Sunil S Nandihalli
sunil.nandiha...@gmail.com wrote:
Hi Allen ..
is 1.3.0 out? and I did not know that aset had so many variants.. glad
(aset (make-array Integer/TYPE 3 4 5) 1 2 3 -1)
can anybody tell me as to how to do this right?
(aset (make-array Long/TYPE 3 4 5) 1 2 3 -1)
I *think* that number by default are long, and the array is of ints.
HTH,
--
Miki
http://clojurewise.blogspot.com/
--
You received this message
ehanneken ehanne...@pobox.com writes:
I spent a long time debugging some Clojure code yesterday. The
essence of it looked similar to this:
(defn items []
(mapcat expensive-function (range 0 4000 100)))
. . . (take 5 (items)) . . .
I tried to distill the problem down by defining a
In Clojure 1.2, type hints only help the compiler avoid reflection and thus
generate faster Java interop code.
Starting in 1.3, function arguments and return values can have ^long or
^double type hints (int and float are not supported). These are enforced at
compile time, but they are not
Yes, integer literals are longs by default in 1.3. As noted, this works:
(aset-int (make-array Integer/TYPE 3 4 5) 1 2 3 -1)
My intuition says this should work as well, but it doesn't:
(aset ^ints (make-array Integer/TYPE 3 4 5) 1 2 3 (int -1))
IllegalArgumentException argument
Chas,
Thanks for your help. However, modifying the code to use mapcat
instead of (map println) seems to cause some chunking:
(defn tenify [n]
(do
(println \ n \)
[n n n n n n n n n n]))
= (- (range 50)
(mapcat list)
(mapcat tenify)
first)
0
1
2
3
0
And indeed,
On 12/31/2010 10:36 AM, Robert McIntyre wrote:
This looks very cool, and the opportunities for fully exploiting the
power of a cross-referenced book format are very appealing
Might I suggest two possible improvements:
1) Colored syntax highlighting for all clojure code.
2) Cross references
In 1.2, I don't understand why one of the sequences below is chunked,
but the other is not. Also, chunked-seq? seems to be lying about the
second one.
user (take 1 (map #(do (print .) [% %2]) (range 100) (range 100)))
(.[0 0])
user (take 1 (map #(do (print .) [%]) (range 100)))
Good day
Before anything I'd like to thank you for your time
I've the following problem:
user= (def x 1)
#'user/x
user= (def y 1)
#'user/y
user= (+ x y)
2
user= (binding [x 2 y 3] (+ x y))
IllegalStateException Can't dynamically bind non-dynamic var: user/x
clojure.lang.Var.pushThreadBindings
Hi,
Am 31.12.2010 um 19:57 schrieb Mike K:
In 1.2, I don't understand why one of the sequences below is chunked,
but the other is not. Also, chunked-seq? seems to be lying about the
second one.
user (take 1 (map #(do (print .) [% %2]) (range 100) (range 100)))
(.[0 0])
user (take 1 (map
Hi,
Am 31.12.2010 um 20:12 schrieb xlarsx:
Good day
Before anything I'd like to thank you for your time
I've the following problem:
user= (def x 1)
#'user/x
user= (def y 1)
#'user/y
user= (+ x y)
2
user= (binding [x 2 y 3] (+ x y))
IllegalStateException Can't dynamically bind
On Fri, Dec 31, 2010 at 11:12 AM, xlarsx xla...@gmail.com wrote:
user= (binding [x 2 y 3] (+ x y))
IllegalStateException Can't dynamically bind non-dynamic var: user/x
clojure.lang.Var.pushThreadBindings (Var.java:339)
The origin of this code is: http://clojure.org/vars
The docs refer to
OK, I understand the difference in behavior between the two maps. But
why is chunked-seq? incorrect?
user (take 1 (map #(do (print .) [%]) (range 100)))
([0])
user (chunked-seq? (range 100))
false
user (chunked-seq? (map #(do (print .) [%]) (range 100)))
false
Msd,
something like this
java -Djava.library.path=/usr/local/lib -cp clojure-1.2.0.jar:src
clojure.main
or in lein add
:native-path /usr/local/lib:/usr/lib
to your project def
then you should be able to make the JNI/JNA calls
On Dec 31, 12:39 pm, ax2groin ax2gr...@gmail.com wrote:
I'm
There is no any error when I access http://127.0.0.1:8080 by browser.
While with wget, there will be some messages as below:
--2011-01-01 09:22:49-- (try:20) http://127.0.0.1:8080/
Connecting to 127.0.0.1:8080... connected.
HTTP request sent, awaiting response... 200 No headers, assuming HTTP/
On Dec 31, 2010, at 5:53 PM, Mike K wrote:
OK, I understand the difference in behavior between the two maps. But
why is chunked-seq? incorrect?
Also, Chas Emerick stated in another discussion that ranges always
produce chunked seqs, but the value of (chunked-seq? (range 100))
seems to
38 matches
Mail list logo