vishy wrote:
Hi,
How can I find out all the namespaces in a library like
clojure.contrib.Also, how to find all the functions defined in a
namespace? Are there any commands which I can use on commandline?
http://richhickey.github.com/clojure-contrib/
Hope that helps.
Regards,
BG
--
Hi,
On Oct 8, 7:50 am, Jarkko Oranen chous...@gmail.com wrote:
I took a quick look, and that looks really neat. One thing though:
Instead of the clj form to escape back to clojure, why not just use
unquote (and possibly unquote-splicing)? that would allow you to use
the ~ reader macro as a
On Oct 8, 3:43 am, Timothy Pratley timothyprat...@gmail.com wrote:
Atoms can't do this, as they are synchronous (called and returned
immediately) - hence the warning about potentially being called
multiple times.
The reason that swap! may fail is that it is performing a compare-
and-swap
Hello,
On Thu, Oct 8, 2009 at 8:49 AM, vishy vishalsod...@gmail.com wrote:
How can I find out all the namespaces in a library like
clojure.contrib.Also, how to find all the functions defined in a
namespace? Are there any commands which I can use on commandline?
You can use
vishy wrote:
How can I find out all the namespaces in a library like
clojure.contrib.
I assume you mean doing this at the REPL or OS shell. I don't know how
to do it for non-loaded libs, aside from manually walking the classpath,
but (all-ns) might be what you want for loaded namespaces.
Quite right that is an important distinction.
On Oct 8, 5:21 pm, Krukow karl.kru...@gmail.com wrote:
On Oct 8, 3:43 am, Timothy Pratley timothyprat...@gmail.com wrote:
Atoms can't do this, as they are synchronous (called and returned
immediately) - hence the warning about potentially
'lo all,
Just to let you all know I've created a list specifically for the
clojure-maven-plugin project at:
http://groups.google.com/group/clojure-maven-plugin
Mark
--
Pull me down under...
--~--~-~--~~~---~--~~
You received this message because you are
Allen,
Great job!
Did you try
(defmulti emit class) ?
Regards,
Emeka
On Thu, Oct 8, 2009 at 7:18 AM, Meikel Brandmeyer m...@kotka.de wrote:
Hi,
On Oct 8, 7:50 am, Jarkko Oranen chous...@gmail.com wrote:
I took a quick look, and that looks really neat. One thing though:
Instead of the
On 7 Okt., 20:34, Phil Hagelberg p...@hagelb.org wrote:
[...] it's simply not supported [...]
I'm pretty sure that it used to work some time ago.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Clojure group.
To
Neither gen-class nor proxy seem to mention how one can access or
mutate member variables. I would have thought instance variables
would be accessible and mutatable within some kind of binding...
gen-class has an :exposes option that allows you to create
getter and setter methods for super
(ns Trial
(:use queries)
(:import (java.io BufferedReader IOException InputStreamReader)
java.net.URL
javafiles.Porter))
;;
(def *server*
java.lang.ClassFormatError: Unknown constant tag 52 in class file
queries__init (Trial.clj:0)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
Here is another question on when you would use a multi-method. I want the
mv function to accept a java.io.File or a String for either of the two
parameters and here are the options I came up with:
-(defmulti mv (fn [from to] [(class from) (class to)]))
(defmethod mv [String String] [from to]
Suggestion :
move and generalize the problem by creating an as-file multifn that may take
String, File , and maybe other things later ...
(defmulti as-file type)
(defmethod as-file String [from] (File. from))
(defmethod as-file File [from] from)
(defn mv [from to]
(let [ [from to] (map
Oh, maybe this as-file method already exists in clojure.contrib,
honestly I don't know and don't have the time to search right now,
regards,
--
laurent
On 8 oct, 16:41, Laurent PETIT laurent.pe...@gmail.com wrote:
Suggestion :
move and generalize the problem by creating an as-file multifn
Can you give some more context?
On Oct 8, 6:38 am, kunjaan kunj...@gmail.com wrote:
java.lang.ClassFormatError: Unknown constant tag 52 in class file
queries__init (Trial.clj:0)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Check out clojure.contrib.duck-streams/reader and clojure.contrib.duck-
streams/writer (http://richhickey.github.com/clojure-contrib/duck-
streams-api.html).
They'll give you a java.io.BufferedReader or a java.io.PrintWriter
which is usually what you want with a file. If you have some other
use,
On Thu, Oct 8, 2009 at 9:45 AM, Tom Faulhaber tomfaulha...@gmail.comwrote:
Check out clojure.contrib.duck-streams/reader and clojure.contrib.duck-
streams/writer (http://richhickey.github.com/clojure-contrib/duck-
streams-api.html).
They'll give you a java.io.BufferedReader or a
Hi All,
This is a question about whether I can use agents or some other Clojure
concurrency feature to manage a multithreaded process elegantly and
extensibly. The following is a thought I had for how to do it, but I would
appreciate additional suggestions.
I have an application that needs to
I'm not an expert on asynchronicity with clojure, but I'll benefit from the
fact i'll be the first to answer :-)
But please take this with a grain of salt.
As I see agents, in their generality, they are a generic way to handle a
state asynchronously (commands from multiple non organized sources -
What JDK/JRE version?
On Oct 8, 8:38 am, kunjaan kunj...@gmail.com wrote:
java.lang.ClassFormatError: Unknown constant tag 52 in class file
queries__init (Trial.clj:0)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
On Oct 8, 1:49 am, vishy vishalsod...@gmail.com wrote:
How can I find out all the namespaces in a library like
clojure.contrib.find-namespaces has functions to discover namespaces
on the classpath.
-SS
--~--~-~--~~~---~--~~
You received this message because you
On Thu, Oct 8, 2009 at 10:25 AM, Robert Stehwien rstehw...@gmail.comwrote:
(defn mv2 [from to]
(let [f (if (= (class from) File) from (File. from))
t (if (= (class to) File) from (File. to))]
(println transformed to File)))
ITYM
t (if (= (class to) File) to (File.
On Thu, Oct 8, 2009 at 11:09 AM, Mark Tomko mjt0...@gmail.com wrote:
Can you give some more context?
The pesky thing about that particular error is that there IS no more
context; it fingers no specific line of code, function definition, or
whatever as culprit.
On Thu, Oct 8, 2009 at 1:06 PM, Laurent PETIT laurent.pe...@gmail.comwrote:
So I don't think you need this message-queue at all (or maybe I haven't
understood what it is or I'm mislead by its name), send directly your order
to the agent as what you want to change in its state.
You might be
On Thu, Oct 8, 2009 at 7:49 PM, John Harrop jharrop...@gmail.com wrote:
You might be able to do better than that, and dispense entirely with the
separate polling thread.
Confirmed:
(def x (agent {:polling false :message foo}))
(defn poll [m]
(when (:polling m)
(prn (:message m))
Hi, I am working on a server project, which requires thousands records
of data stored in memory, and they will be accessed by thousands of
threads simultaneously.
I intend to use datalog to store all my data, sharing the whole
database by a reference.
However, I am afraid of concurrency of this
It was a minor thing actually, I didn't like having to quote user
code, and AFAIK, it's not possible to add a quasiquote as part of a
macro. i.e. in my code, there is a function (_js) that does the heavy
lifting, and the macro (js). I couldn't write:
(defmacro js [forms]
(quasiquote (_js
Did you try
(defmulti emit class) ?
That is a good point. I'm actually not sure why I used type there.
It's probably a bug. Thanks for pointing it out.
Allen
On Oct 8, 4:38 am, Emeka emekami...@gmail.com wrote:
Allen,
Great job!
Regards,
Emeka
On Thu, Oct 8, 2009 at 7:18 AM, Meikel
29 matches
Mail list logo