hi,
are there any plans to something along the lines of e.g. having
autodef be something that can be turned on per-file via some
expression in the file itself?
thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups
On Oct 9, 1:21 pm, Robert Luo wrote:
> Hi, I am working on a server project, which requires thousands records
Just FYI this came up a while ago:
http://groups.google.com/group/clojure/browse_thread/thread/8c09cab025a716f4
I'm very interested in this also - if it has been progressed in any
way.
> 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 wrote:
> Allen,
> Great job!
>
>
> Regards,
> Emeka
>
>
>
> On Thu, Oct 8, 2009 at 7:18 AM, Meikel Brandmey
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 for
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 de
On Thu, Oct 8, 2009 at 7:49 PM, John Harrop 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))
(Thread/sleep 100
On Thu, Oct 8, 2009 at 1:06 PM, Laurent PETIT wrote:
> 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 able to do better than
On Thu, Oct 8, 2009 at 11:09 AM, Mark Tomko 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 9:38 AM, kunjaan wrote:
>
> java.lang.ClassFormatError: Unknown constant tag 52 in class file
> queries__init (Trial.clj:0)
It seems to be an infrequently-encountered bug in load-file. If you copy and
paste the source code into the REPL and hit enter, it will evaluate the
On Thu, Oct 8, 2009 at 10:25 AM, Robert Stehwien wrote:
> (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. to))]
for that
On Oct 8, 1:49 am, vishy 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 are subscribed to the
What JDK/JRE version?
On Oct 8, 8:38 am, kunjaan 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
Groups "Clojure" grou
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 -
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 pol
On Thu, Oct 8, 2009 at 9:45 AM, Tom Faulhaber wrote:
>
> 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
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,
Can you give some more context?
On Oct 8, 6:38 am, kunjaan 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
Groups "Clo
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 wrote:
> Suggestion :
>
> move and generalize the problem by creating an as-file multifn that may take
> String
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 as-file
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]
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 clojure@googlegroups.
(ns Trial
(:use queries)
(:import (java.io BufferedReader IOException InputStreamReader)
java.net.URL
javafiles.Porter))
;;
(def *server* "fiji4.ccs.neu
>> 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 f
On 7 Okt., 20:34, Phil Hagelberg 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 post to this gro
Allen,
Great job!
Did you try
(defmulti emit class) ?
Regards,
Emeka
On Thu, Oct 8, 2009 at 7:18 AM, Meikel Brandmeyer wrote:
>
> Hi,
>
> On Oct 8, 7:50 am, Jarkko Oranen wrote:
>
> > I took a quick look, and that looks really neat. One thing though:
> > Instead of the "clj" form to escape ba
'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 subscri
Quite right that is an important distinction.
On Oct 8, 5:21 pm, Krukow wrote:
> On Oct 8, 3:43 am, Timothy Pratley wrote:
>
> > Atoms can't do this, as they are synchronous (called and returned
> > immediately) - hence the warning about potentially being called
> > multiple times.
>
> The rea
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.
Hello,
On Thu, Oct 8, 2009 at 8:49 AM, vishy 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 http://github.com/mmcgrana/clj-doc on
29 matches
Mail list logo