Hi all,
why does the existance of a namespace not suffice to use or require it?
Currently, with clojure 1.3, it has to be associated with a class or
clojure file.
Here's a simple example REPL session:
--8<---cut here---start->8---
user> (ns test)
nil
test> (de
Meikel,
That's very helpful. You and I took essentially the same approach - wrap a
"real" map and delegate most operations to it. You used deftype, which I
was afraid to try because there seemed to be too many interfaces and too
many methods to implement, so I used proxy and APersistentMap to g
Many of you asked me to show an example of a literate
program and demonstrate the use of the tangle function.
I usually use Latex for literate work but I've done
this example using HTML and tags.
I've written a self-referential literate program that
explains the details of the tangle function in
Hi,
glad it helped. There are still intresting questions. For example
transients. It'd sure be interesting to have this also.
Meikel
--
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
why does the existance of a namespace not suffice to use or require it?
Currently, with clojure 1.3, it has to be associated with a class or
clojure file.
The primary purpose of both use and require is to load code from a file in
classpath.
So while I can't use or require it, I can refer
On Nov 18, 2011, at 7:17 AM, daly wrote:
> http://daly.literatesoftware.com/lithtml/litprog.html
FYI, this is 404 at the moment.
- Chas
--
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
N
sigh. Try
http://daly.axiom-developer.org/lithtml/litprog.html
On Fri, 2011-11-18 at 07:46 -0500, Chas Emerick wrote:
> On Nov 18, 2011, at 7:17 AM, daly wrote:
>
> > http://daly.literatesoftware.com/lithtml/litprog.html
>
> FYI, this is 404 at the moment.
>
> - Chas
>
--
You received th
Stephen Gilardi writes:
Hi!
>> Currently, with clojure 1.3, it has to be associated with a class or
>> clojure file.
>
> The primary purpose of both use and require is to load code from a
> file in classpath.
Sure. But when you say primary you imply there's also a secondary
purpose.
>> So whi
I believe I fixed it.
Please try it again and let me know.
Tim
On Fri, 2011-11-18 at 07:46 -0500, Chas Emerick wrote:
> On Nov 18, 2011, at 7:17 AM, daly wrote:
>
> > http://daly.literatesoftware.com/lithtml/litprog.html
>
> FYI, this is 404 at the moment.
>
> - Chas
>
--
You received this
it works for me.
Las
2011/11/18 daly
> I believe I fixed it.
> Please try it again and let me know.
>
> Tim
>
> On Fri, 2011-11-18 at 07:46 -0500, Chas Emerick wrote:
> > On Nov 18, 2011, at 7:17 AM, daly wrote:
> >
> > > http://daly.literatesoftware.com/lithtml/litprog.html
> >
> > FYI, this is
Over 50 new CAs have been signed. If you have signed one, you should see
your name on this list: http://clojure.org/contributing.
Thanks everybody!
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegr
On Nov 17, 5:18 pm, Paul Richards wrote:
> Aside from loading times (due to different file sizes) and memory
> usage (again due to different file sizes, minified field names, etc),
> do we expect the optimized version to execute faster?
Theoretically, yes, because GClosure Advanced Mode does some
Thanks, Sean. Exactly what I was looking for.
IMO, clojure.tools.logging could of made this easier: log
implementation from classpath by default with override by client when
needed.
On Nov 17, 11:32 pm, Sean Corfield wrote:
> Note: if you just want something that will execute at startup and
> for
On Nov 18, 1:17 pm, daly wrote:
> Many of you asked me to show an example of a literate
> program and demonstrate the use of the tangle function.
Thanks to your perseverance, I am looking into practicing literate
programming.
However, I decided to settle for emacs org-mode environment with the
Came across this code in clojure.tools.logging
(defn cl-factory
"Returns a Commons Logging-based implementation of the LoggerFactory
protocol, or
nil if not available."
[]
(try
(Class/forName "org.apache.commons.logging.Log")
(eval
`(do
(extend org.apache.commons.log
Hello,
I wanted to summarize my thoughts on the current state of SQL in
clojure, with respect to the new library, Korma, to get a discussion
going.
It turned out to be too long for the ML, so I blogged it:
http://thinkrevoactevo.blogspot.com/2011/11/sql-in-clojure.html
enjoy
--
_
My speculation is that the eval is required in the case that commons-logger
is not in the classpath. The code wouldn't compile without it.
--
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
I don't think you are right - it does compiles without it.
After more thinking my guess is that eval is used to combine extend
and reify in the same function. Let's see if somebody else could shed
a light on this.
On Nov 18, 12:45 pm, Gary Trakhman wrote:
> My speculation is that the eval is requ
Thanks!
To confirm my understanding: in my original version I defined (using def) a
reference to a lazy sequence. I then evaluated it, using nth to pick a
value from the sequence. Because I have a reference to the beginning of the
sequence all the lazily generated items are retained. I.e. the lazy
Are there currently any plans to eventually replace PersistentVector?
Looking at the code, the upper limit for the number of elements that can be
stored in PersistentVector is 32^6, which is quite a lot but still might
become a real limitation in the near future.
--
You received this message
On Fri, 2011-11-18 at 07:07 -0800, bernardH wrote:
>
> On Nov 18, 1:17 pm, daly wrote:
> > Many of you asked me to show an example of a literate
> > program and demonstrate the use of the tangle function.
>
> Thanks to your perseverance, I am looking into practicing literate
> programming.
>
>
I'm surprised that I can do the following. Am I wrong about namespaces?
1. M-x clojure-jack-in
2. at the repl, execute (ns my-proj.core)
3. compile my core.clj (see ns snippet below)
4. back in the repl, use a function from a library that wasn't included
in the :only clause from my
The :as clause establishes an alias for the entire clj-webdriver.core
namespace. The value of :only lists the vars from that namespace that are
referred into my-proj.core, which you can use without qualification e.g.
`(attribute …)` will work, but `(start …)` won't. Both `(cw/attribute …)` and
I get this when i try it in a blank project, removing the eval and the
quote:
Unknown location:
error: java.lang.ClassNotFoundException: org.apache.commons.logging.Log
core.clj:16:8:
error: java.lang.ClassNotFoundException: org.apache.commons.logging.Log
(core.clj:16)
Compilation failed.
Oh, thanks. Is there a way to "import" some functions and not others such
that the others cannot be used at all?
--
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 m
Sure, just remove the :as argument:
(ns example.ns
(:use [clojure.string :only (join)])
On Friday, November 18, 2011, Andrew wrote:
> Oh, thanks. Is there a way to "import" some functions and not others such
that the others cannot be used at all?
>
> --
> You received this message because you
On Nov 18, 8:05 am, Konrad Hinsen
wrote:
> --On 17 novembre 2011 15:09:11 -0800 Nils Bertschinger
>
> wrote:
> > The two approaches are somewhat complementary to each other. Your
> > monad does exact inference on discrete distributions by running
> > through all possibilities. Mine is sampling ba
On Fri, Nov 18, 2011 at 6:35 AM, vitalyper wrote:
> IMO, clojure.tools.logging could of made this easier: log
> implementation from classpath by default with override by client when
> needed.
I agree but when I brought the issue up, there didn't seem to be much
support for making it easier... Per
On Friday, November 18, 2011 7:17:08 AM UTC-5, TimDaly wrote:
>
> Many of you asked me to show an example of a literate
> program and demonstrate the use of the tangle function.
>
> I usually use Latex for literate work but I've done
> this example using HTML and tags.
>
> I've written a self-refe
On Fri, 2011-11-18 at 20:02 -0800, Daniel Jomphe wrote:
> On Friday, November 18, 2011 7:17:08 AM UTC-5, TimDaly wrote:
> Many of you asked me to show an example of a literate
> program and demonstrate the use of the tangle function.
>
> I usually use Latex for literate work
30 matches
Mail list logo